url.ts 236 B

12345678910
  1. import { config } from '@grafana/runtime';
  2. export const getRootPath = (root = window.location.origin) => {
  3. let rootPath = root + config.appSubUrl;
  4. if (rootPath.endsWith('/')) {
  5. rootPath.slice(0, -1);
  6. }
  7. return rootPath;
  8. };