mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
search: worked on search results
This commit is contained in:
@@ -6,10 +6,12 @@ export class FolderDashboardsCtrl {
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private backendSrv, navModelSrv, private $routeParams) {
|
||||
if (this.$routeParams.folderId && this.$routeParams.type && this.$routeParams.slug) {
|
||||
if (this.$routeParams.folderId && this.$routeParams.slug) {
|
||||
this.folderId = $routeParams.folderId;
|
||||
|
||||
new FolderPageLoader(this.backendSrv, this.$routeParams).load(this, this.folderId, 'manage-folder-dashboards');
|
||||
const loader = new FolderPageLoader(this.backendSrv, this.$routeParams);
|
||||
|
||||
loader.load(this, this.folderId, 'manage-folder-dashboards');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ export class FolderPageLoader {
|
||||
icon: 'fa fa-folder-open',
|
||||
id: 'manage-folder',
|
||||
subTitle: 'Manage folder dashboards & permissions',
|
||||
url: '/fsdfds',
|
||||
url: '',
|
||||
text: '',
|
||||
breadcrumbs: [
|
||||
{ title: 'Dashboards', url: '/dashboards' },
|
||||
@@ -41,11 +41,11 @@ export class FolderPageLoader {
|
||||
}
|
||||
};
|
||||
|
||||
return this.backendSrv.getDashboard(this.$routeParams.type, this.$routeParams.slug).then(result => {
|
||||
return this.backendSrv.getDashboard('db', this.$routeParams.slug).then(result => {
|
||||
const folderTitle = result.dashboard.title;
|
||||
ctrl.navModel.main.text = '';
|
||||
ctrl.navModel.main.breadcrumbs = [
|
||||
{ title: 'Dashboards', uri: '/dashboards' },
|
||||
{ title: 'Dashboards', url: '/dashboards' },
|
||||
{ title: folderTitle }
|
||||
];
|
||||
|
||||
@@ -65,6 +65,6 @@ export class FolderPageLoader {
|
||||
}
|
||||
|
||||
createFolderUrl(folderId: number, type: string, slug: string) {
|
||||
return `/dashboards/folder/${folderId}/${type}/${slug}`;
|
||||
return `/dashboards/folder/${folderId}/${slug}`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ export class FolderPermissionsCtrl {
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private backendSrv, navModelSrv, private $routeParams) {
|
||||
if (this.$routeParams.folderId && this.$routeParams.type && this.$routeParams.slug) {
|
||||
if (this.$routeParams.folderId && this.$routeParams.slug) {
|
||||
this.folderId = $routeParams.folderId;
|
||||
|
||||
new FolderPageLoader(this.backendSrv, this.$routeParams).load(this, this.folderId, 'manage-folder-permissions');
|
||||
|
||||
@@ -11,7 +11,7 @@ export class FolderSettingsCtrl {
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private backendSrv, navModelSrv, private $routeParams, private $location) {
|
||||
if (this.$routeParams.folderId && this.$routeParams.type && this.$routeParams.slug) {
|
||||
if (this.$routeParams.folderId && this.$routeParams.slug) {
|
||||
this.folderId = $routeParams.folderId;
|
||||
|
||||
this.folderPageLoader = new FolderPageLoader(this.backendSrv, this.$routeParams);
|
||||
|
||||
@@ -65,11 +65,11 @@
|
||||
</div>
|
||||
|
||||
<div class="gf-form-button-row">
|
||||
<button type="submit" class="btn btn-success" ng-disabled="ctrl.current.readOnly" ng-click="ctrl.saveChanges()">Save</button>
|
||||
<button type="submit" class="btn btn-success" ng-disabled="ctrl.current.readOnly" ng-click="ctrl.saveChanges()">Save & Test</button>
|
||||
<button type="submit" class="btn btn-danger" ng-disabled="ctrl.current.readOnly" ng-show="!ctrl.isNew" ng-click="ctrl.delete()">
|
||||
Delete
|
||||
</button>
|
||||
<a class="btn btn-link" href="datasources">Cancel</a>
|
||||
<a class="btn btn-inverse" href="datasources">Back</a>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
Reference in New Issue
Block a user