Commit 9d5979c0 by Torkel Ödegaard

Moved dashboards dir and started work on new panel for dashboard lists

parent bc673fd9
...@@ -19,6 +19,7 @@ function (_, crypto) { ...@@ -19,6 +19,7 @@ function (_, crypto) {
'graph': { path: 'panels/graph' }, 'graph': { path: 'panels/graph' },
'singlestat': { path: 'panels/singlestat' }, 'singlestat': { path: 'panels/singlestat' },
'text': { path: 'panels/text' }, 'text': { path: 'panels/text' },
'starred': { path: 'panels/starred', hide: true },
}, },
plugins : {}, plugins : {},
default_route : '/dashboard/file/default.json', default_route : '/dashboard/file/default.json',
......
<grafana-panel>
<h2>Starred</h2>
</grafana-panel>
define([
'angular',
'app',
'components/panelmeta',
],
function (angular, app, PanelMeta) {
'use strict';
var module = angular.module('grafana.panels.starred', []);
app.useModule(module);
module.directive('grafanaPanelStarred', function() {
return {
controller: 'StarredPanelCtrl',
templateUrl: 'app/panels/starred/module.html',
};
});
module.controller('StarredPanelCtrl', function($scope, panelSrv) {
$scope.panelMeta = new PanelMeta({
panelName: 'Starred',
editIcon: "fa fa-star",
fullscreen: true,
});
$scope.init = function() {
panelSrv.init($scope);
};
$scope.init();
});
});
...@@ -77,7 +77,7 @@ define(['settings'], function(Settings) { ...@@ -77,7 +77,7 @@ define(['settings'], function(Settings) {
}, },
// default home dashboard // default home dashboard
default_route: '/dashboard/file/default.json', default_route: 'dashboard/file/default.json',
// set to false to disable unsaved changes warning // set to false to disable unsaved changes warning
unsaved_changes_warning: true, unsaved_changes_warning: true,
......
{
"title": "Grafana Home",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"rows": [
{
"title": "New row",
"height": "150px",
"collapse": false,
"editable": true,
"panels": [
{
"id": 1,
"span": 12,
"editable": true,
"type": "text",
"mode": "html",
"content": "<div class=\"text-center\" style=\"padding-top: 15px\">\n<img src=\"img/logo_transparent_200x.png\"> \n</div>",
"style": {},
"title": "Welcome to"
}
]
},
{
"height": "210px",
"panels": [
{
"id": 2,
"span": 6,
"type": "starred",
"title": "Starred dashboards"
}
]
}
],
"nav": [
{
"type": "timepicker",
"collapse": false,
"enable": true,
"status": "Stable",
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
],
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"now": true
}
],
"time": {
"from": "now-6h",
"to": "now"
},
"templating": {
"list": []
},
"version": 5
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment