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
415ad8fb
Commit
415ad8fb
authored
Jun 06, 2018
by
Ryan McKinley
Committed by
Torkel Ödegaard
Jun 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove DashboardRowCtrl (#12187)
parent
f93d83be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
110 deletions
+0
-110
public/app/features/plugins/plugin_component.ts
+0
-10
public/app/features/plugins/row_ctrl.ts
+0
-100
No files found.
public/app/features/plugins/plugin_component.ts
View file @
415ad8fb
...
@@ -6,7 +6,6 @@ import coreModule from 'app/core/core_module';
...
@@ -6,7 +6,6 @@ import coreModule from 'app/core/core_module';
import
{
importPluginModule
}
from
'./plugin_loader'
;
import
{
importPluginModule
}
from
'./plugin_loader'
;
import
{
UnknownPanelCtrl
}
from
'app/plugins/panel/unknown/module'
;
import
{
UnknownPanelCtrl
}
from
'app/plugins/panel/unknown/module'
;
import
{
DashboardRowCtrl
}
from
'./row_ctrl'
;
/** @ngInject **/
/** @ngInject **/
function
pluginDirectiveLoader
(
$compile
,
datasourceSrv
,
$rootScope
,
$q
,
$http
,
$templateCache
)
{
function
pluginDirectiveLoader
(
$compile
,
datasourceSrv
,
$rootScope
,
$q
,
$http
,
$templateCache
)
{
...
@@ -59,15 +58,6 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $
...
@@ -59,15 +58,6 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $
}
}
function
loadPanelComponentInfo
(
scope
,
attrs
)
{
function
loadPanelComponentInfo
(
scope
,
attrs
)
{
if
(
scope
.
panel
.
type
===
'row'
)
{
return
$q
.
when
({
name
:
'dashboard-row'
,
bindings
:
{
dashboard
:
'='
,
panel
:
'='
},
attrs
:
{
dashboard
:
'ctrl.dashboard'
,
panel
:
'panel'
},
Component
:
DashboardRowCtrl
,
});
}
var
componentInfo
:
any
=
{
var
componentInfo
:
any
=
{
name
:
'panel-plugin-'
+
scope
.
panel
.
type
,
name
:
'panel-plugin-'
+
scope
.
panel
.
type
,
bindings
:
{
dashboard
:
'='
,
panel
:
'='
,
row
:
'='
},
bindings
:
{
dashboard
:
'='
,
panel
:
'='
,
row
:
'='
},
...
...
public/app/features/plugins/row_ctrl.ts
deleted
100644 → 0
View file @
f93d83be
import
_
from
'lodash'
;
export
class
DashboardRowCtrl
{
static
template
=
`
<div class="dashboard-row__center">
<div class="dashboard-row__actions-left">
<i class="fa fa-chevron-down" ng-hide="ctrl.panel.collapse"></i>
<i class="fa fa-chevron-right" ng-show="ctrl.panel.collapse"></i>
</div>
<a class="dashboard-row__title pointer" ng-click="ctrl.toggle()">
<span class="dashboard-row__title-text">
{{ctrl.panel.title | interpolateTemplateVars:this}}
</span>
</a>
<div class="dashboard-row__actions-right">
<a class="pointer" ng-click="ctrl.openSettings()"><span class="fa fa-cog"></i></a>
</div>
</div>
<div class="dashboard-row__panel_count">
({{ctrl.panel.hiddenPanels.length}} hidden panels)
</div>
<div class="dashboard-row__drag grid-drag-handle">
</div>
`
;
dashboard
:
any
;
panel
:
any
;
constructor
()
{
this
.
panel
.
hiddenPanels
=
this
.
panel
.
hiddenPanels
||
[];
}
toggle
()
{
if
(
this
.
panel
.
collapse
)
{
let
panelIndex
=
_
.
indexOf
(
this
.
dashboard
.
panels
,
this
.
panel
);
for
(
let
child
of
this
.
panel
.
hiddenPanels
)
{
this
.
dashboard
.
panels
.
splice
(
panelIndex
+
1
,
0
,
child
);
child
.
y
=
this
.
panel
.
y
+
1
;
console
.
log
(
'restoring child'
,
child
);
}
this
.
panel
.
hiddenPanels
=
[];
this
.
panel
.
collapse
=
false
;
return
;
}
this
.
panel
.
collapse
=
true
;
let
foundRow
=
false
;
for
(
let
i
=
0
;
i
<
this
.
dashboard
.
panels
.
length
;
i
++
)
{
let
panel
=
this
.
dashboard
.
panels
[
i
];
if
(
panel
===
this
.
panel
)
{
console
.
log
(
'found row'
);
foundRow
=
true
;
continue
;
}
if
(
!
foundRow
)
{
continue
;
}
if
(
panel
.
type
===
'row'
)
{
break
;
}
this
.
panel
.
hiddenPanels
.
push
(
panel
);
console
.
log
(
'hiding child'
,
panel
.
id
);
}
for
(
let
hiddenPanel
of
this
.
panel
.
hiddenPanels
)
{
this
.
dashboard
.
removePanel
(
hiddenPanel
,
false
);
}
}
moveUp
()
{
// let panelIndex = _.indexOf(this.dashboard.panels, this.panel);
// let rowAbove = null;
// for (let index = panelIndex-1; index > 0; index--) {
// panel = this.dashboard.panels[index];
// if (panel.type === 'row') {
// rowAbove = panel;
// }
// }
//
// if (rowAbove) {
// this.panel.y = rowAbove.y;
// }
}
link
(
scope
,
elem
)
{
elem
.
addClass
(
'dashboard-row'
);
scope
.
$watch
(
'ctrl.panel.collapse'
,
()
=>
{
elem
.
toggleClass
(
'dashboard-row--collapse'
,
this
.
panel
.
collapse
===
true
);
});
}
}
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