mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ux: minor navbar update
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div class="page-nav container">
|
||||
|
||||
<div class="page-breadcrumb">
|
||||
<div class="page-breadcrumb__item dropdown" ng-repeat="item in ::ctrl.model.items">
|
||||
<div class="page-breadcrumb__item dropdown" ng-repeat="item in ctrl.model.items">
|
||||
<a class="pointer" ng-href="{{::item.url}}" data-toggle="dropdown" ng-if="::item.items">
|
||||
{{::item.title}}
|
||||
<i class="page-breadcrumb__caret fa fa-caret-down"></i>
|
||||
@@ -14,7 +14,6 @@
|
||||
<ul class="dropdown-menu dropdown-menu--navbar">
|
||||
<li ng-repeat="subItem in ::item.items">
|
||||
<a class="pointer" ng-href="{{::subItem.url}}" ng-click="ctrl.navItemClicked(subItem, $event)">
|
||||
<i class="{{::subItem.icon}}" ng-show="::subItem.icon"></i>
|
||||
{{::subItem.title}}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -59,6 +59,7 @@ export class DataSourceEditCtrl {
|
||||
initNewDatasourceModel() {
|
||||
this.isNew = true;
|
||||
this.current = angular.copy(defaults);
|
||||
this.navModel.items.push({title: 'New data source'});
|
||||
|
||||
// We are coming from getting started
|
||||
if (this.$location.search().gettingstarted) {
|
||||
@@ -85,10 +86,13 @@ export class DataSourceEditCtrl {
|
||||
this.backendSrv.get('/api/datasources/' + id).then(ds => {
|
||||
this.isNew = false;
|
||||
this.current = ds;
|
||||
this.navModel.items.push({title: ds.name});
|
||||
|
||||
if (datasourceCreated) {
|
||||
datasourceCreated = false;
|
||||
this.testDatasource();
|
||||
}
|
||||
|
||||
return this.typeChanged();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<div class="page-header">
|
||||
<h1>
|
||||
<i class="icon-gf icon-gf-datasources"></i>
|
||||
Settings <span ng-show="ctrl.isNew" class="muted">(new)</span>
|
||||
<span ng-show="ctrl.isNew">New data source</span>
|
||||
<span ng-hide="ctrl.isNew">{{ctrl.current.name}}</span>
|
||||
</h1>
|
||||
|
||||
<a class="page-header__cta btn btn-success" href="datasources/new" ng-show="ctrl.isNew">
|
||||
|
||||
Reference in New Issue
Block a user