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
5b83f6d4
Commit
5b83f6d4
authored
Dec 19, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes undefined issue with angular panels and editorTabs
parent
d0f8d034
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
16 deletions
+6
-16
public/app/features/dashboard/dashgrid/VisualizationTab.tsx
+1
-0
public/app/features/panel/metrics_panel_ctrl.ts
+0
-2
public/app/features/panel/panel_ctrl.ts
+5
-11
public/app/plugins/panel/dashlist/module.ts
+0
-1
public/app/plugins/panel/pluginlist/module.ts
+0
-1
public/app/plugins/panel/text/module.ts
+0
-1
No files found.
public/app/features/dashboard/dashgrid/VisualizationTab.tsx
View file @
5b83f6d4
...
@@ -106,6 +106,7 @@ export class VisualizationTab extends PureComponent<Props, State> {
...
@@ -106,6 +106,7 @@ export class VisualizationTab extends PureComponent<Props, State> {
}
}
const
panelCtrl
=
scope
.
$$childHead
.
ctrl
;
const
panelCtrl
=
scope
.
$$childHead
.
ctrl
;
panelCtrl
.
initEditMode
();
let
template
=
''
;
let
template
=
''
;
for
(
let
i
=
0
;
i
<
panelCtrl
.
editorTabs
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
panelCtrl
.
editorTabs
.
length
;
i
++
)
{
...
...
public/app/features/panel/metrics_panel_ctrl.ts
View file @
5b83f6d4
...
@@ -30,8 +30,6 @@ class MetricsPanelCtrl extends PanelCtrl {
...
@@ -30,8 +30,6 @@ class MetricsPanelCtrl extends PanelCtrl {
constructor
(
$scope
,
$injector
)
{
constructor
(
$scope
,
$injector
)
{
super
(
$scope
,
$injector
);
super
(
$scope
,
$injector
);
// make metrics tab the default
this
.
editorTabIndex
=
1
;
this
.
$q
=
$injector
.
get
(
'$q'
);
this
.
$q
=
$injector
.
get
(
'$q'
);
this
.
contextSrv
=
$injector
.
get
(
'contextSrv'
);
this
.
contextSrv
=
$injector
.
get
(
'contextSrv'
);
this
.
datasourceSrv
=
$injector
.
get
(
'datasourceSrv'
);
this
.
datasourceSrv
=
$injector
.
get
(
'datasourceSrv'
);
...
...
public/app/features/panel/panel_ctrl.ts
View file @
5b83f6d4
...
@@ -18,7 +18,6 @@ export class PanelCtrl {
...
@@ -18,7 +18,6 @@ export class PanelCtrl {
panel
:
any
;
panel
:
any
;
error
:
any
;
error
:
any
;
dashboard
:
any
;
dashboard
:
any
;
editorTabIndex
:
number
;
pluginName
:
string
;
pluginName
:
string
;
pluginId
:
string
;
pluginId
:
string
;
editorTabs
:
any
;
editorTabs
:
any
;
...
@@ -39,7 +38,7 @@ export class PanelCtrl {
...
@@ -39,7 +38,7 @@ export class PanelCtrl {
this
.
$location
=
$injector
.
get
(
'$location'
);
this
.
$location
=
$injector
.
get
(
'$location'
);
this
.
$scope
=
$scope
;
this
.
$scope
=
$scope
;
this
.
$timeout
=
$injector
.
get
(
'$timeout'
);
this
.
$timeout
=
$injector
.
get
(
'$timeout'
);
this
.
editorTab
Index
=
0
;
this
.
editorTab
s
=
[]
;
this
.
events
=
this
.
panel
.
events
;
this
.
events
=
this
.
panel
.
events
;
this
.
timing
=
{};
this
.
timing
=
{};
...
@@ -90,10 +89,10 @@ export class PanelCtrl {
...
@@ -90,10 +89,10 @@ export class PanelCtrl {
}
}
initEditMode
()
{
initEditMode
()
{
this
.
editorTabs
=
[];
if
(
!
this
.
editModeInitiated
)
{
this
.
editModeInitiated
=
true
;
this
.
editModeInitiated
=
true
;
this
.
events
.
emit
(
'init-edit-mode'
,
null
)
;
this
.
events
.
emit
(
'init-edit-mode'
,
null
);
}
}
}
addEditorTab
(
title
,
directiveFn
,
index
?,
icon
?)
{
addEditorTab
(
title
,
directiveFn
,
index
?,
icon
?)
{
...
@@ -212,11 +211,6 @@ export class PanelCtrl {
...
@@ -212,11 +211,6 @@ export class PanelCtrl {
this
.
containerHeight
=
$
(
window
).
height
();
this
.
containerHeight
=
$
(
window
).
height
();
}
}
// hacky solution
if
(
this
.
panel
.
isEditing
&&
!
this
.
editModeInitiated
)
{
this
.
initEditMode
();
}
this
.
height
=
this
.
containerHeight
-
(
PANEL_BORDER
+
PANEL_HEADER_HEIGHT
);
this
.
height
=
this
.
containerHeight
-
(
PANEL_BORDER
+
PANEL_HEADER_HEIGHT
);
}
}
...
...
public/app/plugins/panel/dashlist/module.ts
View file @
5b83f6d4
...
@@ -60,7 +60,6 @@ class DashListCtrl extends PanelCtrl {
...
@@ -60,7 +60,6 @@ class DashListCtrl extends PanelCtrl {
}
}
onInitEditMode
()
{
onInitEditMode
()
{
this
.
editorTabIndex
=
1
;
this
.
modes
=
[
'starred'
,
'search'
,
'recently viewed'
];
this
.
modes
=
[
'starred'
,
'search'
,
'recently viewed'
];
this
.
addEditorTab
(
'Options'
,
'public/app/plugins/panel/dashlist/editor.html'
);
this
.
addEditorTab
(
'Options'
,
'public/app/plugins/panel/dashlist/editor.html'
);
}
}
...
...
public/app/plugins/panel/pluginlist/module.ts
View file @
5b83f6d4
...
@@ -29,7 +29,6 @@ class PluginListCtrl extends PanelCtrl {
...
@@ -29,7 +29,6 @@ class PluginListCtrl extends PanelCtrl {
}
}
onInitEditMode
()
{
onInitEditMode
()
{
this
.
editorTabIndex
=
1
;
this
.
addEditorTab
(
'Options'
,
'public/app/plugins/panel/pluginlist/editor.html'
);
this
.
addEditorTab
(
'Options'
,
'public/app/plugins/panel/pluginlist/editor.html'
);
}
}
...
...
public/app/plugins/panel/text/module.ts
View file @
5b83f6d4
...
@@ -43,7 +43,6 @@ export class TextPanelCtrl extends PanelCtrl {
...
@@ -43,7 +43,6 @@ export class TextPanelCtrl extends PanelCtrl {
onInitEditMode
()
{
onInitEditMode
()
{
this
.
addEditorTab
(
'Options'
,
'public/app/plugins/panel/text/editor.html'
);
this
.
addEditorTab
(
'Options'
,
'public/app/plugins/panel/text/editor.html'
);
this
.
editorTabIndex
=
1
;
if
(
this
.
panel
.
mode
===
'text'
)
{
if
(
this
.
panel
.
mode
===
'text'
)
{
this
.
panel
.
mode
=
'markdown'
;
this
.
panel
.
mode
=
'markdown'
;
...
...
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