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
76c4bfe2
Commit
76c4bfe2
authored
Jun 15, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux: new metric segment is starting to work
parent
5f3b5fdc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
public/app/core/components/form_dropdown/form_dropdown.ts
+10
-11
public/app/features/panel/partials/metrics_tab.html
+1
-2
No files found.
public/app/core/components/form_dropdown/form_dropdown.ts
View file @
76c4bfe2
...
...
@@ -20,7 +20,9 @@ export class FormDropdownCtrl {
text
:
any
;
options
:
any
;
cssClass
:
any
;
cssClasses
:
any
;
allowCustom
:
any
;
labelMode
:
boolean
;
linkMode
:
boolean
;
cancelBlur
:
any
;
onChange
:
any
;
...
...
@@ -33,15 +35,15 @@ export class FormDropdownCtrl {
this
.
linkMode
=
true
;
this
.
cancelBlur
=
null
;
if
(
!
this
.
getOptions
)
{
this
.
getOptions
=
()
=>
{
return
Promise
.
resolve
(
this
.
options
);
};
}
// listen to model changes
$scope
.
$watch
(
"ctrl.model"
,
this
.
modelChanged
.
bind
(
this
));
if
(
this
.
labelMode
)
{
this
.
cssClasses
=
'gf-form-label '
+
this
.
cssClass
;
}
else
{
this
.
cssClasses
=
'gf-form-input gf-form-input--dropdown '
+
this
.
cssClass
;
}
this
.
inputElement
.
attr
(
'data-provide'
,
'typeahead'
);
this
.
inputElement
.
typeahead
({
source
:
this
.
typeaheadSource
.
bind
(
this
),
...
...
@@ -199,9 +201,7 @@ const template = `
spellcheck="false"
style="display:none">
</input>
<a class="gf-form-label"
ng-class="ctrl.cssClass"
<a ng-class="ctrl.cssClasses"
tabindex="1"
ng-click="ctrl.open()"
give-focus="ctrl.focus"
...
...
@@ -218,12 +218,11 @@ export function formDropdownDirective() {
controllerAs
:
'ctrl'
,
scope
:
{
model
:
"="
,
options
:
"="
,
getOptions
:
"&"
,
onChange
:
"&"
,
cssClass
:
"@"
,
allowCustom
:
"@"
,
select
Mode
:
"@"
,
label
Mode
:
"@"
,
},
link
:
function
()
{
}
...
...
public/app/features/panel/partials/metrics_tab.html
View file @
76c4bfe2
...
...
@@ -36,8 +36,7 @@
<label
class=
"gf-form-label"
>
Panel Data Source
</label>
<gf-form-dropdown
model=
"ctrl.panelDsValue"
get-options=
"ctrl.getOptions(true)"
on-change=
"ctrl.datasourceChanged($option)"
css-class=
"width-10"
>
on-change=
"ctrl.datasourceChanged($option)"
>
</gf-form-dropdown>
</div>
</div>
...
...
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