loaders.ts 368 B

123456789101112
  1. import { backendSrv } from 'app/core/services/backend_srv';
  2. import { buildNavModel } from '../folders/state/navModel';
  3. export const loadFolderPage = (uid: string) => {
  4. return backendSrv.getFolderByUid(uid).then((folder) => {
  5. const navModel = buildNavModel(folder);
  6. navModel.children![0].active = true;
  7. return { folder, folderNav: navModel };
  8. });
  9. };