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
cb522d58
Commit
cb522d58
authored
Sep 19, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(templating): back to be able to continue work on ad hoc filters, #6048
parent
7a6fb700
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
public/app/features/templating/adhoc_variable.ts
+52
-0
public/app/features/templating/all.ts
+2
-0
No files found.
public/app/features/templating/adhoc_variable.ts
0 → 100644
View file @
cb522d58
///<reference path="../../headers/common.d.ts" />
import
_
from
'lodash'
;
import
kbn
from
'app/core/utils/kbn'
;
import
{
Variable
,
assignModelProperties
,
variableTypes
}
from
'./variable'
;
import
{
VariableSrv
}
from
'./variable_srv'
;
export
class
AdhocVariable
implements
Variable
{
defaults
=
{
type
:
'adhoc'
,
name
:
''
,
label
:
''
,
hide
:
0
,
datasource
:
null
,
options
:
[],
current
:
{},
tags
:
{},
};
/** @ngInject **/
constructor
(
private
model
,
private
timeSrv
,
private
templateSrv
,
private
variableSrv
)
{
assignModelProperties
(
this
,
model
,
this
.
defaults
);
}
setValue
(
option
)
{
return
Promise
.
resolve
();
}
getModel
()
{
assignModelProperties
(
this
.
model
,
this
,
this
.
defaults
);
return
this
.
model
;
}
updateOptions
()
{
return
Promise
.
resolve
();
}
dependsOn
(
variable
)
{
return
false
;
}
setValueFromUrl
(
urlValue
)
{
return
Promise
.
resolve
();
}
}
variableTypes
[
'adhoc'
]
=
{
name
:
'Ad hoc'
,
ctor
:
AdhocVariable
,
description
:
'Ad hoc filters'
,
};
public/app/features/templating/all.ts
View file @
cb522d58
...
...
@@ -7,6 +7,7 @@ import {QueryVariable} from './query_variable';
import
{
DatasourceVariable
}
from
'./datasource_variable'
;
import
{
CustomVariable
}
from
'./custom_variable'
;
import
{
ConstantVariable
}
from
'./constant_variable'
;
import
{
AdhocVariable
}
from
'./adhoc_variable'
;
export
{
VariableSrv
,
...
...
@@ -15,4 +16,5 @@ export {
DatasourceVariable
,
CustomVariable
,
ConstantVariable
,
AdhocVariable
,
}
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