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
f18ebea0
Commit
f18ebea0
authored
Jun 05, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: dashboard save modals had double submit on enter after my refactoring this morning
parent
82d4d54d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
12 deletions
+4
-12
pkg/services/sqlstore/dashboard.go
+0
-1
public/app/features/dashboard/save_as_modal.ts
+4
-4
public/app/features/dashboard/save_modal.ts
+0
-7
No files found.
pkg/services/sqlstore/dashboard.go
View file @
f18ebea0
...
@@ -142,7 +142,6 @@ func GetDashboard(query *m.GetDashboardQuery) error {
...
@@ -142,7 +142,6 @@ func GetDashboard(query *m.GetDashboardQuery) error {
dashboard
.
Data
.
Set
(
"id"
,
dashboard
.
Id
)
dashboard
.
Data
.
Set
(
"id"
,
dashboard
.
Id
)
query
.
Result
=
&
dashboard
query
.
Result
=
&
dashboard
return
nil
return
nil
}
}
...
...
public/app/features/dashboard/save_as_modal.ts
View file @
f18ebea0
...
@@ -15,19 +15,19 @@ const template = `
...
@@ -15,19 +15,19 @@ const template = `
</a>
</a>
</div>
</div>
<
div class="modal-content"
>
<
form name="ctrl.saveForm" ng-submit="ctrl.save()" class="modal-content" novalidate
>
<div class="p-t-2">
<div class="p-t-2">
<div class="gf-form">
<div class="gf-form">
<label class="gf-form-label">New name</label>
<label class="gf-form-label">New name</label>
<input type="text" class="gf-form-input" ng-model="ctrl.clone.title" give-focus="true"
ng-keydown="ctrl.keyDown($event)"
>
<input type="text" class="gf-form-input" ng-model="ctrl.clone.title" give-focus="true"
required
>
</div>
</div>
</div>
</div>
<div class="gf-form-button-row text-center">
<div class="gf-form-button-row text-center">
<
a class="btn btn-success" ng-click="ctrl.save();">Save</a
>
<
button type="submit" class="btn btn-success" ng-disabled="ctrl.saveForm.$invalid">Save</button
>
<a class="btn-text" ng-click="ctrl.dismiss();">Cancel</a>
<a class="btn-text" ng-click="ctrl.dismiss();">Cancel</a>
</div>
</div>
</
div
>
</
form
>
</div>
</div>
`
;
`
;
...
...
public/app/features/dashboard/save_modal.ts
View file @
f18ebea0
...
@@ -29,7 +29,6 @@ const template = `
...
@@ -29,7 +29,6 @@ const template = `
ng-model="ctrl.message"
ng-model="ctrl.message"
ng-model-options="{allowInvalid: true}"
ng-model-options="{allowInvalid: true}"
ng-maxlength="this.max"
ng-maxlength="this.max"
ng-keydown="ctrl.keyDown($event)"
autocomplete="off"
autocomplete="off"
required />
required />
<small class="gf-form-hint-text muted" ng-cloak>
<small class="gf-form-hint-text muted" ng-cloak>
...
@@ -73,12 +72,6 @@ export class SaveDashboardModalCtrl {
...
@@ -73,12 +72,6 @@ export class SaveDashboardModalCtrl {
return
this
.
dashboardSrv
.
save
(
saveModel
,
options
).
then
(
this
.
dismiss
);
return
this
.
dashboardSrv
.
save
(
saveModel
,
options
).
then
(
this
.
dismiss
);
}
}
keyDown
(
evt
)
{
if
(
evt
.
keyCode
===
13
)
{
this
.
save
();
}
}
}
}
export
function
saveDashboardModalDirective
()
{
export
function
saveDashboardModalDirective
()
{
...
...
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