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
d2bdf8cf
Commit
d2bdf8cf
authored
Oct 09, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: fixed issues now things are starting to work as before for angular panels
parent
2f84101f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
11 deletions
+16
-11
public/app/core/constants.ts
+3
-0
public/app/features/panel/metrics_panel_ctrl.ts
+1
-1
public/app/features/panel/panel_ctrl.ts
+2
-2
public/app/features/panel/panel_directive.ts
+0
-6
public/app/features/plugins/plugin_component.ts
+5
-1
public/app/partials/dashboard.html
+1
-1
public/sass/pages/_dashboard.scss
+4
-0
No files found.
public/app/core/constants.ts
View file @
d2bdf8cf
...
...
@@ -8,3 +8,6 @@ export const DEFAULT_ROW_HEIGHT = 250;
export
const
MIN_PANEL_HEIGHT
=
GRID_CELL_HEIGHT
*
3
;
export
const
LS_PANEL_COPY_KEY
=
'panel-copy'
;
export
const
DASHBOARD_TOOLBAR_HEIGHT
=
55
;
export
const
DASHBOARD_TOP_PADDING
=
20
;
public/app/features/panel/metrics_panel_ctrl.ts
View file @
d2bdf8cf
...
...
@@ -57,7 +57,7 @@ class MetricsPanelCtrl extends PanelCtrl {
}
private
onInitMetricsPanelEditMode
()
{
this
.
addEditorTab
(
'
Querie
s'
,
metricsTabDirective
,
1
,
'fa fa-database'
);
this
.
addEditorTab
(
'
Metric
s'
,
metricsTabDirective
,
1
,
'fa fa-database'
);
this
.
addEditorTab
(
'Time range'
,
'public/app/features/panel/partials/panelTime.html'
);
}
...
...
public/app/features/panel/panel_ctrl.ts
View file @
d2bdf8cf
...
...
@@ -220,8 +220,8 @@ export class PanelCtrl {
calculatePanelHeight
()
{
if
(
this
.
panel
.
fullscreen
)
{
const
docHeight
=
$
(
window
).
height
();
const
editHeight
=
Math
.
floor
(
docHeight
*
0.
4
);
const
docHeight
=
$
(
'.react-grid-layout'
).
height
();
const
editHeight
=
Math
.
floor
(
docHeight
*
0.
35
);
const
fullscreenHeight
=
Math
.
floor
(
docHeight
*
0.8
);
this
.
containerHeight
=
this
.
panel
.
isEditing
?
editHeight
:
fullscreenHeight
;
}
else
{
...
...
public/app/features/panel/panel_directive.ts
View file @
d2bdf8cf
...
...
@@ -90,10 +90,6 @@ module.directive('grafanaPanel', ($rootScope, $document, $timeout) => {
ctrl
.
dashboard
.
setPanelFocus
(
0
);
}
function
panelHeightUpdated
()
{
// panelContent.css({ height: ctrl.height + 'px' });
}
function
resizeScrollableContent
()
{
if
(
panelScrollbar
)
{
panelScrollbar
.
update
();
...
...
@@ -138,7 +134,6 @@ module.directive('grafanaPanel', ($rootScope, $document, $timeout) => {
ctrl
.
events
.
on
(
'panel-size-changed'
,
()
=>
{
ctrl
.
calculatePanelHeight
();
panelHeightUpdated
();
$timeout
(()
=>
{
console
.
log
(
'panel directive panel size changed, render'
);
resizeScrollableContent
();
...
...
@@ -148,7 +143,6 @@ module.directive('grafanaPanel', ($rootScope, $document, $timeout) => {
// set initial height
ctrl
.
calculatePanelHeight
();
panelHeightUpdated
();
ctrl
.
events
.
on
(
'render'
,
()
=>
{
console
.
log
(
'panel_directive: render'
,
ctrl
.
panel
.
id
);
...
...
public/app/features/plugins/plugin_component.ts
View file @
d2bdf8cf
...
...
@@ -8,7 +8,7 @@ import { importPluginModule } from './plugin_loader';
import
{
UnknownPanelCtrl
}
from
'app/plugins/panel/unknown/module'
;
/** @ngInject */
function
pluginDirectiveLoader
(
$compile
,
datasourceSrv
,
$rootScope
,
$q
,
$http
,
$templateCache
)
{
function
pluginDirectiveLoader
(
$compile
,
datasourceSrv
,
$rootScope
,
$q
,
$http
,
$templateCache
,
$timeout
)
{
function
getTemplate
(
component
)
{
if
(
component
.
template
)
{
return
$q
.
when
(
component
.
template
);
...
...
@@ -207,12 +207,16 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $
// let a binding digest cycle complete before adding to dom
setTimeout
(()
=>
{
scope
.
$applyAsync
(()
=>
{
elem
.
append
(
child
);
setTimeout
(()
=>
{
scope
.
$applyAsync
(()
=>
{
console
.
log
(
'post appendAndCompile, broadcast refresh'
,
scope
.
panel
);
scope
.
$broadcast
(
'component-did-mount'
);
});
});
});
});
}
function
registerPluginComponent
(
scope
,
elem
,
attrs
,
componentInfo
)
{
...
...
public/app/partials/dashboard.html
View file @
d2bdf8cf
...
...
@@ -7,7 +7,7 @@
class=
"dashboard-settings"
>
</dashboard-settings>
<div
class=
"dashboard-container
"
>
<div
class=
"dashboard-container"
ng-class=
"{'dashboard-container--has-submenu': ctrl.dashboard.meta.submenuEnabled}
"
>
<dashboard-submenu
ng-if=
"ctrl.dashboard.meta.submenuEnabled"
dashboard=
"ctrl.dashboard"
>
</dashboard-submenu>
...
...
public/sass/pages/_dashboard.scss
View file @
d2bdf8cf
...
...
@@ -3,6 +3,10 @@
width
:
100%
;
height
:
100%
;
box-sizing
:
border-box
;
&
--has-submenu
{
height
:
calc
(
100%
-
50px
);
}
}
.template-variable
{
...
...
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