PR: ux changes to #11528

This commit is contained in:
Torkel Ödegaard 2018-05-08 11:24:20 +02:00
parent 6a5ce09b08
commit eb3aa7b193
3 changed files with 18 additions and 5 deletions

View File

@ -88,16 +88,22 @@
</div> </div>
<div class="dashboard-settings__content" ng-if="ctrl.viewId === 'dashboard_json'" > <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'dashboard_json'" >
<h3 class="dashboard-settings__header">Dashboard JSON</h3> <h3 class="dashboard-settings__header">JSON Model</h3>
<div class="dashboard-settings__subheader">
The JSON Model below is data structure that defines the dashboard. Including settings, panel settings & layout,
queries etc.
</div>
<div class="gf-form"> <div class="gf-form">
<code-editor content="ctrl.json" data-mode="json" data-max-lines=30 ></code-editor> <code-editor content="ctrl.json" data-mode="json" data-max-lines=30 ></code-editor>
</div> </div>
<button class="btn btn-success dashboard-settings__json-save-button" ng-click="ctrl.saveDashboardJson()" ng-show="ctrl.canSave"> <div class="gf-form-button-row">
<i class="fa fa-save"></i> Save JSON <button class="btn btn-success" ng-click="ctrl.saveDashboardJson()" ng-show="ctrl.canSave">
<i class="fa fa-save"></i> Save Changes
</button> </button>
</div> </div>
</div>
<div class="dashboard-settings__content" ng-if="ctrl.viewId === 'permissions'" > <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'permissions'" >
<dashboard-permissions ng-if="ctrl.dashboard && !ctrl.hasUnsavedFolderChange" <dashboard-permissions ng-if="ctrl.dashboard && !ctrl.hasUnsavedFolderChange"

View File

@ -100,7 +100,7 @@ export class SettingsCtrl {
} }
this.sections.push({ this.sections.push({
title: 'Dashboard JSON', title: 'JSON Model',
id: 'dashboard_json', id: 'dashboard_json',
icon: 'gicon gicon-json', icon: 'gicon gicon-json',
}); });

View File

@ -53,6 +53,13 @@
margin-bottom: $spacer*2; margin-bottom: $spacer*2;
} }
.dashboard-settings__subheader {
color: $text-muted;
font-style: italic;
position: relative;
top: -1.5rem;
}
.dashboard-settings__nav-item { .dashboard-settings__nav-item {
padding: 7px 12px; padding: 7px 12px;
color: $text-color; color: $text-color;