mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ds: updated ds nav
This commit is contained in:
@@ -261,7 +261,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
|
||||
|
||||
if c.IsGrafanaAdmin {
|
||||
cfgNode.Children = append(cfgNode.Children, &dtos.NavLink{
|
||||
Divider: true, HideFromTabs: true,
|
||||
Divider: true, HideFromTabs: true, Id: "admin-divider", Text: "Text",
|
||||
})
|
||||
cfgNode.Children = append(cfgNode.Children, &dtos.NavLink{
|
||||
Text: "Server Admin",
|
||||
|
||||
@@ -9,6 +9,12 @@ export class DataSourceDashboardsCtrl {
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private backendSrv, private $routeParams) {
|
||||
if (store.nav.main === null) {
|
||||
store.nav.load('cfg', 'datasources');
|
||||
}
|
||||
|
||||
this.navModel = toJS(store.nav);
|
||||
|
||||
if (this.$routeParams.id) {
|
||||
this.getDatasourceById(this.$routeParams.id);
|
||||
}
|
||||
|
||||
@@ -29,15 +29,12 @@ export class DataSourceEditCtrl {
|
||||
navModel: any;
|
||||
|
||||
/** @ngInject */
|
||||
constructor(
|
||||
private $q,
|
||||
private backendSrv,
|
||||
private $routeParams,
|
||||
private $location,
|
||||
private datasourceSrv,
|
||||
navModelSrv
|
||||
) {
|
||||
this.navModel = navModelSrv.getNav('cfg', 'datasources', 0);
|
||||
constructor(private $q, private backendSrv, private $routeParams, private $location, private datasourceSrv) {
|
||||
if (store.nav.main === null) {
|
||||
store.nav.load('cfg', 'datasources');
|
||||
}
|
||||
|
||||
this.navModel = toJS(store.nav);
|
||||
this.datasources = [];
|
||||
|
||||
this.loadDatasourceTypes().then(() => {
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<page-header model="ctrl.navModel"></page-header>
|
||||
|
||||
<div class="page-container page-body">
|
||||
<div class="page-container page-body" ng-if="ctrl.datasourceMeta">
|
||||
|
||||
<h3 class="page-heading">Bundled Plugin Dashboards</h3>
|
||||
<div class="section">
|
||||
<dashboard-import-list plugin="ctrl.datasourceMeta" datasource="ctrl.current"></dashboard-import-list>
|
||||
</div>
|
||||
<dashboard-import-list plugin="ctrl.datasourceMeta" datasource="ctrl.current"></dashboard-import-list>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,7 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
|
||||
})
|
||||
.when('/datasources/edit/:id/dashboards', {
|
||||
templateUrl: 'public/app/features/plugins/partials/ds_dashboards.html',
|
||||
controller: 'DataSourceEditCtrl',
|
||||
controller: 'DataSourceDashboardsCtrl',
|
||||
controllerAs: 'ctrl',
|
||||
})
|
||||
.when('/datasources/new', {
|
||||
|
||||
Reference in New Issue
Block a user