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
5b522254
Commit
5b522254
authored
Sep 20, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: panel options idea2
parent
3c7e5446
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
20 deletions
+39
-20
public/app/features/panel/metrics_panel_ctrl.ts
+1
-1
public/app/features/panel/panel_ctrl.ts
+2
-1
public/app/features/panel/panel_editor_tab.ts
+1
-2
public/app/features/panel/partials/metrics_tab.html
+0
-4
public/app/features/panel/viz_tab.ts
+33
-10
public/app/plugins/panel/graph/module.ts
+2
-2
No files found.
public/app/features/panel/metrics_panel_ctrl.ts
View file @
5b522254
...
...
@@ -56,7 +56,7 @@ class MetricsPanelCtrl extends PanelCtrl {
}
private
onInitMetricsPanelEditMode
()
{
this
.
addEditor
Tab
(
'Time range'
,
'public/app/features/panel/partials/panelTime.html'
);
// this.addCommon
Tab('Time range', 'public/app/features/panel/partials/panelTime.html');
}
private
onMetricsPanelRefresh
()
{
...
...
public/app/features/panel/panel_ctrl.ts
View file @
5b522254
...
...
@@ -100,11 +100,12 @@ export class PanelCtrl {
this
.
optionTabs
=
[];
this
.
addCommonTab
(
'Queries'
,
metricsTabDirective
,
0
,
'fa fa-database'
);
this
.
addCommonTab
(
'Visualization'
,
vizTabDirective
,
1
,
'fa fa-line-chart'
);
this
.
addCommonTab
(
'General'
,
'public/app/partials/panelgeneral.html'
);
this
.
editModeInitiated
=
true
;
this
.
events
.
emit
(
'init-edit-mode'
,
null
);
// this.addEditorTab('General', 'public/app/partials/panelgeneral.html');
const
urlTab
=
(
this
.
$injector
.
get
(
'$routeParams'
).
tab
||
''
).
toLowerCase
();
if
(
urlTab
)
{
this
.
editorTabs
.
forEach
((
tab
,
i
)
=>
{
...
...
public/app/features/panel/panel_editor_tab.ts
View file @
5b522254
...
...
@@ -13,9 +13,8 @@ function panelEditorTab(dynamicDirectiveSrv) {
},
directive
:
scope
=>
{
const
pluginId
=
scope
.
ctrl
.
pluginId
;
const
tabName
=
scope
.
editorTab
.
title
.
toLowerCase
();
const
tabName
=
scope
.
editorTab
.
title
.
toLowerCase
()
.
replace
(
' '
,
'-'
)
;
console
.
log
(
'panelEditorTab'
,
pluginId
,
tabName
);
if
(
directiveCache
[
pluginId
])
{
if
(
directiveCache
[
pluginId
][
tabName
])
{
return
directiveCache
[
pluginId
][
tabName
];
...
...
public/app/features/panel/partials/metrics_tab.html
View file @
5b522254
<div
class=
"gf-form-group"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label gf-query-ds-label"
>
<i
class=
"icon-gf icon-gf-datasources"
></i>
</label>
<label
class=
"gf-form-label"
>
Data Source
</label>
<gf-form-dropdown
model=
"ctrl.panelDsValue"
css-class=
"gf-size-auto"
lookup-text=
"true"
get-options=
"ctrl.getOptions(true)"
...
...
public/app/features/panel/viz_tab.ts
View file @
5b522254
...
...
@@ -22,18 +22,42 @@ export class VizTabCtrl {
}
const
template
=
`
<div class="viz-editor">
<div class="viz-editor-col1">
<viz-type-picker currentType="ctrl.panelCtrl.panel.type" onTypeChanged="ctrl.onTypeChanged"></viz-type-picker>
<div class="gf-form-group ">
<div class="gf-form-query">
<div class="gf-form">
<label class="gf-form-label">
<img src="public/app/plugins/panel/graph/img/icn-graph-panel.svg" style="width: 16px; height: 16px" />
Graph
<i class="fa fa-caret-down" />
</label>
</div>
<div class="viz-editor-col2">
<div ng-repeat="tab in ctrl.panelCtrl.optionTabs" >
<h5 class="page-heading">{{tab.title}}</h5>
<panel-editor-tab editor-tab="tab" ctrl="ctrl.panelCtrl" index="$index"></panel-editor-tab>
<div class="gf-form gf-form--grow">
<label class="gf-form-label gf-form-label--grow"></label>
</div>
</div>
</div>
`
;
<br />
<br />
<div class="query-editor-rows gf-form-group">
<div ng-repeat="tab in ctrl.panelCtrl.optionTabs">
<div class="gf-form-query">
<div class="gf-form gf-form-query-letter-cell">
<label class="gf-form-label">
<span class="gf-form-query-letter-cell-carret">
<i class="fa fa-caret-down"></i>
</span>
<span class="gf-form-query-letter-cell-letter">{{tab.title}}</span>
</label>
</div>
<div class="gf-form gf-form--grow">
<label class="gf-form-label gf-form-label--grow"></label>
</div>
</div>
</div>
</div>
</div>`
;
/** @ngInject */
export
function
vizTabDirective
()
{
...
...
@@ -46,5 +70,4 @@ export function vizTabDirective() {
}
react2AngularDirective
(
'vizTypePicker'
,
VizTypePicker
,
[
'currentType'
,
[
'onTypeChanged'
,
{
watchDepth
:
'reference'
}]]);
coreModule
.
directive
(
'vizTab'
,
vizTabDirective
);
public/app/plugins/panel/graph/module.ts
View file @
5b522254
...
...
@@ -134,12 +134,12 @@ class GraphCtrl extends MetricsPanelCtrl {
}
onInitEditMode
()
{
this
.
addEditorTab
(
'Display'
,
'public/app/plugins/panel/graph/tab_display.html'
,
4
);
this
.
addEditorTab
(
'Axes'
,
axesEditorComponent
,
2
);
this
.
addEditorTab
(
'Legend'
,
'public/app/plugins/panel/graph/tab_legend.html'
,
3
);
this
.
addEditorTab
(
'Display'
,
'public/app/plugins/panel/graph/tab_display.html'
,
4
);
if
(
config
.
alertingEnabled
)
{
this
.
add
Editor
Tab
(
'Alert'
,
alertTab
,
5
);
this
.
add
Common
Tab
(
'Alert'
,
alertTab
,
5
);
}
this
.
subTabIndex
=
0
;
...
...
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