diff --git a/packages/grafana-toolkit/src/cli/templates/component.tsx.template.ts b/packages/grafana-toolkit/src/cli/templates/component.tsx.template.ts index 3beb79f06e2..9cf159aefc1 100644 --- a/packages/grafana-toolkit/src/cli/templates/component.tsx.template.ts +++ b/packages/grafana-toolkit/src/cli/templates/component.tsx.template.ts @@ -1,7 +1,6 @@ -export const componentTpl = ` -import React, { FC } from 'react'; +export const componentTpl = `import React, { FC } from 'react'; -interface Props = {}; +interface Props {}; export const <%= name %>: FC = (props) => { return ( diff --git a/public/app/core/components/Select/FolderPicker.tsx b/public/app/core/components/Select/FolderPicker.tsx index fe783fb0c40..a6063dcfe74 100644 --- a/public/app/core/components/Select/FolderPicker.tsx +++ b/public/app/core/components/Select/FolderPicker.tsx @@ -43,7 +43,7 @@ export class FolderPicker extends PureComponent { enableReset: false, initialTitle: '', enableCreateNew: false, - useInNextGenForms: false, + useNewForms: false, }; componentDidMount = async () => { diff --git a/public/app/core/components/manage_dashboards/manage_dashboards.ts b/public/app/core/components/manage_dashboards/manage_dashboards.ts index 307489d313e..deec960960a 100644 --- a/public/app/core/components/manage_dashboards/manage_dashboards.ts +++ b/public/app/core/components/manage_dashboards/manage_dashboards.ts @@ -1,6 +1,7 @@ import { IScope } from 'angular'; import _ from 'lodash'; import { SelectableValue } from '@grafana/data'; +//@ts-ignore import coreModule from 'app/core/core_module'; import appEvents from 'app/core/app_events'; import { SearchSrv } from 'app/core/services/search_srv'; @@ -337,26 +338,6 @@ export class ManageDashboardsCtrl { return url; } - - // TODO handle this inside SearchResults component - toggleSelection = (item: any, evt: any) => { - if (evt) { - evt.stopPropagation(); - evt.preventDefault(); - } - - item.checked = !item.checked; - - if (item.items) { - _.each(item.items, i => { - i.checked = item.checked; - }); - } - - if (this.selectionChanged) { - this.selectionChanged(); - } - }; } export function manageDashboardsDirective() { @@ -373,4 +354,4 @@ export function manageDashboardsDirective() { }; } -coreModule.directive('manageDashboards', manageDashboardsDirective); +//coreModule.directive('manageDashboards', manageDashboardsDirective); diff --git a/public/app/core/selectors/location.ts b/public/app/core/selectors/location.ts index b49bdbe0513..97bb61c43cb 100644 --- a/public/app/core/selectors/location.ts +++ b/public/app/core/selectors/location.ts @@ -2,3 +2,4 @@ import { LocationState } from 'app/types'; export const getRouteParamsId = (state: LocationState) => state.routeParams.id; export const getRouteParamsPage = (state: LocationState) => state.routeParams.page; +export const getRouteParams = (state: LocationState) => state.routeParams; diff --git a/public/app/features/folders/FolderDashboardsCtrl.ts b/public/app/features/folders/FolderDashboardsCtrl.ts deleted file mode 100644 index 96b2b9d6d5d..00000000000 --- a/public/app/features/folders/FolderDashboardsCtrl.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ILocationService, IScope } from 'angular'; - -import { FolderPageLoader } from './services/FolderPageLoader'; -import locationUtil from 'app/core/utils/location_util'; -import { NavModelSrv } from 'app/core/core'; -import { promiseToDigest } from '../../core/utils/promiseToDigest'; - -export default class FolderDashboardsCtrl { - navModel: any; - folderId: number; - uid: string; - - /** @ngInject */ - constructor( - navModelSrv: NavModelSrv, - private $routeParams: any, - $location: ILocationService, - private $scope: IScope - ) { - if (this.$routeParams.uid) { - this.uid = $routeParams.uid; - - const loader = new FolderPageLoader(); - - promiseToDigest(this.$scope)( - loader.load(this, this.uid, 'manage-folder-dashboards').then((folder: any) => { - const url = locationUtil.stripBaseFromUrl(folder.url); - - if (url !== $location.path()) { - $location.path(url).replace(); - } - }) - ); - } - } -} diff --git a/public/app/features/folders/partials/folder_dashboards.html b/public/app/features/folders/partials/folder_dashboards.html deleted file mode 100644 index d8dfd9f82f8..00000000000 --- a/public/app/features/folders/partials/folder_dashboards.html +++ /dev/null @@ -1,7 +0,0 @@ - - -
- -
- -