mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Moved dashboards dir and started work on new panel for dashboard lists
This commit is contained in:
@@ -16,9 +16,10 @@ function (_, crypto) {
|
||||
datasources : {},
|
||||
window_title_prefix : 'Grafana - ',
|
||||
panels : {
|
||||
'graph': { path: 'panels/graph' },
|
||||
'graph': { path: 'panels/graph' },
|
||||
'singlestat': { path: 'panels/singlestat' },
|
||||
'text': { path: 'panels/text' },
|
||||
'text': { path: 'panels/text' },
|
||||
'starred': { path: 'panels/starred', hide: true },
|
||||
},
|
||||
plugins : {},
|
||||
default_route : '/dashboard/file/default.json',
|
||||
|
||||
3
src/app/panels/starred/module.html
Normal file
3
src/app/panels/starred/module.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<grafana-panel>
|
||||
<h2>Starred</h2>
|
||||
</grafana-panel>
|
||||
33
src/app/panels/starred/module.js
Normal file
33
src/app/panels/starred/module.js
Normal file
@@ -0,0 +1,33 @@
|
||||
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) {
|
||||
},
|
||||
|
||||
// default home dashboard
|
||||
default_route: '/dashboard/file/default.json',
|
||||
default_route: 'dashboard/file/default.json',
|
||||
|
||||
// set to false to disable unsaved changes warning
|
||||
unsaved_changes_warning: true,
|
||||
|
||||
78
src/dashboards/home.json
Normal file
78
src/dashboards/home.json
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
Reference in New Issue
Block a user