Commit cfd755eb by Torkel Ödegaard

updated new dashboard folder

parent 271c597c
...@@ -7,7 +7,7 @@ export class CreateFolderCtrl { ...@@ -7,7 +7,7 @@ export class CreateFolderCtrl {
titleTouched = false; titleTouched = false;
constructor(private backendSrv, private $location, navModelSrv) { constructor(private backendSrv, private $location, navModelSrv) {
this.navModel = navModelSrv.getNav('create', 'folder'); this.navModel = navModelSrv.getNav('dashboards', 'manage-dashboards', 0);
} }
create() { create() {
......
...@@ -2,42 +2,42 @@ ...@@ -2,42 +2,42 @@
<div class="page-container page-body" ng-cloak> <div class="page-container page-body" ng-cloak>
<form name="ctrl.saveForm" ng-submit="ctrl.create()" class="modal-content folder-modal" novalidate> <h3 class="page-sub-heading">New Dashboard Folder</h3>
<div class="gf-form-group">
<div class="gf-form-inline">
<div class="gf-form gf-form--grow">
<label class="gf-form-label width-10">Folder name</label>
<input type="text" class="gf-form-input" ng-model="ctrl.title" give-focus="true" ng-change="ctrl.titleChanged()" ng-model-options="{ debounce: 400 }" ng-class="{'validation-error': ctrl.nameExists || !ctrl.dash.title}">
<label class="gf-form-label text-success" ng-if="!ctrl.nameExists && ctrl.title">
<i class="fa fa-check"></i>
</label>
</div>
</div>
<div class="gf-form-inline" ng-if="ctrl.nameExists"> <form name="ctrl.saveForm" ng-submit="ctrl.create()" novalidate>
<div class="gf-form offset-width-10 gf-form--grow"> <div class="gf-form-inline">
<label class="gf-form-label text-warning gf-form-label--grow"> <div class="gf-form gf-form--grow">
<i class="fa fa-warning"></i> <label class="gf-form-label width-10">Folder name</label>
A Folder or Dashboard with the same name already exists <input type="text" class="gf-form-input max-width-25" ng-model="ctrl.title" give-focus="true" ng-change="ctrl.titleChanged()" ng-model-options="{ debounce: 400 }" ng-class="{'validation-error': ctrl.nameExists || !ctrl.dash.title}">
</label> <label class="gf-form-label text-success" ng-if="!ctrl.nameExists && ctrl.title">
</div> <i class="fa fa-check"></i>
</div> </label>
</div>
</div>
<div class="gf-form-inline" ng-if="!ctrl.title && ctrl.titleTouched"> <div class="gf-form-inline" ng-if="ctrl.nameExists">
<div class="gf-form offset-width-10 gf-form--grow"> <div class="gf-form offset-width-10 gf-form--grow">
<label class="gf-form-label text-warning gf-form-label--grow"> <label class="gf-form-label text-warning gf-form-label--grow">
<i class="fa fa-warning"></i> <i class="fa fa-warning"></i>
A Folder should have a name A Folder or Dashboard with the same name already exists
</label> </label>
</div> </div>
</div> </div>
</div>
<div class="gf-form-button-row"> <div class="gf-form-inline" ng-if="!ctrl.title && ctrl.titleTouched">
<button type="submit" class="btn btn-success width-12" ng-disabled="ctrl.nameExists || ctrl.title.length === 0"> <div class="gf-form offset-width-10 gf-form--grow">
<i class="fa fa-save"></i> Create <label class="gf-form-label text-warning gf-form-label--grow">
</button> <i class="fa fa-warning"></i>
</div> A Folder should have a name
</form> </label>
</div>
</div>
<div class="gf-form-button-row">
<button type="submit" class="btn btn-success width-12" ng-disabled="ctrl.nameExists || ctrl.title.length === 0">
<i class="fa fa-save"></i> Create
</button>
</div>
</form>
</div> </div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment