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
56c76f38
Commit
56c76f38
authored
Jan 28, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(panels): fixes
parent
a00231a1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
20 deletions
+24
-20
public/app/core/components/grafana_app.ts
+1
-1
public/app/features/panel/metrics_panel_ctrl.ts
+1
-0
public/app/features/panel/panel_ctrl.ts
+6
-3
public/app/features/panel/panel_editor_tab.ts
+0
-1
public/app/plugins/panel/graph/graph_ctrl.ts
+9
-6
public/app/plugins/panel/singlestat/controller.ts
+2
-4
public/app/plugins/panel/table/controller.ts
+2
-3
public/app/plugins/panel/table/module.ts
+3
-1
public/app/plugins/panel/text/module.ts
+0
-1
No files found.
public/app/core/components/grafana_app.ts
View file @
56c76f38
...
...
@@ -5,7 +5,7 @@ import store from 'app/core/store';
import
_
from
'lodash'
;
import
angular
from
'angular'
;
import
$
from
'jquery'
;
import
coreModule
from
'
..
/core_module'
;
import
coreModule
from
'
app/core
/core_module'
;
export
class
GrafanaCtrl
{
...
...
public/app/features/panel/metrics_panel_ctrl.ts
View file @
56c76f38
...
...
@@ -49,6 +49,7 @@ class MetricsPanelCtrl extends PanelCtrl {
initEditMode
()
{
this
.
addEditorTab
(
'Metrics'
,
'public/app/partials/metrics.html'
);
this
.
addEditorTab
(
'Time range'
,
'app/features/panel/partials/panelTime.html'
);
this
.
datasources
=
this
.
datasourceSrv
.
getMetricSources
();
}
...
...
public/app/features/panel/panel_ctrl.ts
View file @
56c76f38
...
...
@@ -80,7 +80,7 @@ export class PanelCtrl {
return
;
}
addEditorTab
(
title
,
directiveFn
)
{
addEditorTab
(
title
,
directiveFn
,
index
?
)
{
var
editorTab
=
{
title
,
directiveFn
};
if
(
_
.
isString
(
directiveFn
))
{
...
...
@@ -88,8 +88,11 @@ export class PanelCtrl {
return
{
templateUrl
:
directiveFn
};
};
}
this
.
editorTabs
.
push
(
editorTab
);
if
(
index
)
{
this
.
editorTabs
.
splice
(
index
,
0
,
editorTab
);
}
else
{
this
.
editorTabs
.
push
(
editorTab
);
}
}
getMenu
()
{
...
...
public/app/features/panel/panel_editor_tab.ts
View file @
56c76f38
...
...
@@ -16,7 +16,6 @@ function panelEditorTab(dynamicDirectiveSrv) {
directive
:
scope
=>
{
var
pluginId
=
scope
.
ctrl
.
pluginId
;
var
tabIndex
=
scope
.
index
;
console
.
log
(
'tab plugnId:'
,
pluginId
);
return
Promise
.
resolve
({
name
:
`panel-editor-tab-
${
pluginId
}${
tabIndex
}
`
,
...
...
public/app/plugins/panel/graph/graph_ctrl.ts
View file @
56c76f38
...
...
@@ -104,13 +104,9 @@ class GraphCtrl extends MetricsPanelCtrl {
super
.
initEditMode
();
this
.
icon
=
"fa fa-bar-chart"
;
this
.
addEditorTab
(
'Axes & Grid'
,
'public/app/plugins/panel/graph/axisEditor.html'
);
this
.
addEditorTab
(
'Display Styles'
,
'public/app/plugins/panel/graph/styleEditor.html'
);
this
.
addEditorTab
(
'Axes & Grid'
,
'public/app/plugins/panel/graph/axisEditor.html'
,
2
);
this
.
addEditorTab
(
'Display Styles'
,
'public/app/plugins/panel/graph/styleEditor.html'
,
3
);
// $scope.panelMeta.addEditorTab('Time range', 'app/features/panel/partials/panelTime.html');
// $scope.panelMeta.addExtendedMenuItem('Export CSV', '', 'exportCsv()');
// $scope.panelMeta.addExtendedMenuItem('Toggle legend', '', 'toggleLegend()');
//
this
.
logScales
=
{
'linear'
:
1
,
'log (base 2)'
:
2
,
...
...
@@ -121,6 +117,13 @@ class GraphCtrl extends MetricsPanelCtrl {
this
.
unitFormats
=
kbn
.
getUnitFormats
();
}
getExtendedMenu
()
{
var
menu
=
super
.
getExtendedMenu
();
menu
.
push
({
text
:
'Export CSV'
,
click
:
'ctrl.exportCsv()'
});
menu
.
push
({
text
:
'Toggle legend'
,
click
:
'ctrl.toggleLegend()'
});
return
menu
;
}
setUnitFormat
(
axis
,
subItem
)
{
this
.
panel
.
y_formats
[
axis
]
=
subItem
.
value
;
this
.
render
();
...
...
public/app/plugins/panel/singlestat/controller.ts
View file @
56c76f38
...
...
@@ -52,12 +52,10 @@ export class SingleStatCtrl extends MetricsPanelCtrl {
initEditMode
()
{
super
.
initEditMode
();
this
.
icon
=
"fa fa-dashboard"
;
this
.
fontSizes
=
[
'20%'
,
'30%'
,
'50%'
,
'70%'
,
'80%'
,
'100%'
,
'110%'
,
'120%'
,
'150%'
,
'170%'
,
'200%'
];
this
.
addEditorTab
(
'Options'
,
'app/plugins/panel/singlestat/editor.html'
);
this
.
addEditorTab
(
'Time range'
,
'app/features/panel/partials/panelTime.html'
);
this
.
addEditorTab
(
'Options'
,
'app/plugins/panel/singlestat/editor.html'
,
2
);
this
.
unitFormats
=
kbn
.
getUnitFormats
();
}
...
...
public/app/plugins/panel/table/controller.ts
View file @
56c76f38
...
...
@@ -57,13 +57,12 @@ export class TablePanelCtrl extends MetricsPanelCtrl {
initEditMode
()
{
super
.
initEditMode
();
this
.
addEditorTab
(
'Options'
,
tablePanelEditor
);
this
.
addEditorTab
(
'Time range'
,
'app/features/panel/partials/panelTime.html'
);
this
.
addEditorTab
(
'Options'
,
tablePanelEditor
,
1
);
}
getExtendedMenu
()
{
var
menu
=
super
.
getExtendedMenu
();
menu
.
push
({
text
:
'Export CSV'
,
click
:
'exportCsv()'
});
menu
.
push
({
text
:
'Export CSV'
,
click
:
'
ctrl.
exportCsv()'
});
return
menu
;
}
...
...
public/app/plugins/panel/table/module.ts
View file @
56c76f38
...
...
@@ -89,7 +89,9 @@ class TablePanel extends PanelDirective {
scope
.
$on
(
'render'
,
function
(
event
,
renderData
)
{
data
=
renderData
||
data
;
renderPanel
();
if
(
data
)
{
renderPanel
();
}
});
}
}
...
...
public/app/plugins/panel/text/module.ts
View file @
56c76f38
...
...
@@ -59,7 +59,6 @@ export class TextPanelCtrl extends PanelCtrl {
this
.
updateContent
(
this
.
converter
.
makeHtml
(
text
));
}
else
{
System
.
import
(
'vendor/showdown'
).
then
(
Showdown
=>
{
console
.
log
(
this
);
this
.
converter
=
new
Showdown
.
converter
();
this
.
$scope
.
$apply
(()
=>
{
this
.
updateContent
(
this
.
converter
.
makeHtml
(
text
));
...
...
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