Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
0bb30b14
Commit
0bb30b14
authored
Jun 12, 2018
by
Patrick O'Carroll
Committed by
Marcus Efraimsson
Jun 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save-modal save button (#12047)
Disable save dashboard button when saving
parent
dbaa45e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
public/app/features/dashboard/save_modal.ts
+15
-2
public/sass/components/_buttons.scss
+16
-0
No files found.
public/app/features/dashboard/save_modal.ts
View file @
0bb30b14
...
...
@@ -50,8 +50,17 @@ const template = `
</div>
<div class="gf-form-button-row text-center">
<button type="submit" class="btn btn-success" ng-disabled="ctrl.saveForm.$invalid">Save</button>
<a class="btn btn-link" ng-click="ctrl.dismiss();">Cancel</a>
<button
id="saveBtn"
type="submit"
class="btn btn-success"
ng-class="{'btn-success--processing': ctrl.isSaving}"
ng-disabled="ctrl.saveForm.$invalid || ctrl.isSaving"
>
<span ng-if="!ctrl.isSaving">Save</span>
<span ng-if="ctrl.isSaving === true">Saving...</span>
</button>
<button class="btn btn-inverse" ng-click="ctrl.dismiss();">Cancel</button>
</div>
</form>
</div>
...
...
@@ -68,6 +77,7 @@ export class SaveDashboardModalCtrl {
originalCurrent
=
[];
max
:
number
;
saveForm
:
any
;
isSaving
:
boolean
;
dismiss
:
()
=>
void
;
timeChange
=
false
;
variableValueChange
=
false
;
...
...
@@ -76,6 +86,7 @@ export class SaveDashboardModalCtrl {
constructor
(
private
dashboardSrv
)
{
this
.
message
=
''
;
this
.
max
=
64
;
this
.
isSaving
=
false
;
this
.
templating
=
dashboardSrv
.
dash
.
templating
.
list
;
this
.
compareTemplating
();
...
...
@@ -126,6 +137,8 @@ export class SaveDashboardModalCtrl {
var
dashboard
=
this
.
dashboardSrv
.
getCurrent
();
var
saveModel
=
dashboard
.
getSaveModelClone
(
options
);
this
.
isSaving
=
true
;
return
this
.
dashboardSrv
.
save
(
saveModel
,
options
).
then
(
this
.
dismiss
);
}
}
...
...
public/sass/components/_buttons.scss
View file @
0bb30b14
...
...
@@ -100,6 +100,22 @@
// Success appears as green
.btn-success
{
@include
buttonBackground
(
$btn-success-bg
,
$btn-success-bg-hl
);
&
--processing
{
@include
button-outline-variant
(
$gray-1
);
@include
box-shadow
(
none
);
cursor
:
default
;
&
:hover
,
&
:active
,
&
:active:hover
,
&
:focus
,
&
:disabled
{
color
:
$gray-1
;
background-color
:
transparent
;
border-color
:
$gray-1
;
}
}
}
// Info appears as a neutral blue
.btn-secondary
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment