From 54eae2e34aaf08be0e49ab34b768e7923b06a31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 7 Dec 2013 14:40:14 +0100 Subject: [PATCH] addded graphiteUrl to config.js --- .gitignore | 3 +- src/app/components/require.config.js | 2 +- src/app/components/settings.js | 3 +- src/app/dashboards/default.json | 86 +--------------------------- src/app/panels/graph/editor.html | 11 ---- src/app/panels/graph/module.html | 13 ----- src/app/panels/graph/module.js | 74 ------------------------ src/app/panels/graphite/module.html | 2 +- src/app/panels/graphite/module.js | 27 +++------ src/app/panels/histogram/module.js | 10 ---- src/app/partials/dasheditor.html | 56 ++---------------- src/config.js | 4 +- src/index.html | 2 +- 13 files changed, 25 insertions(+), 268 deletions(-) delete mode 100644 src/app/panels/graph/editor.html delete mode 100644 src/app/panels/graph/module.html delete mode 100644 src/app/panels/graph/module.js diff --git a/.gitignore b/.gitignore index 098c43737c5..bbc85197689 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules .aws-config.json dist -web.config \ No newline at end of file +web.config +config.dev.js \ No newline at end of file diff --git a/src/app/components/require.config.js b/src/app/components/require.config.js index ba6cd679992..aba7def3881 100644 --- a/src/app/components/require.config.js +++ b/src/app/components/require.config.js @@ -5,7 +5,7 @@ require.config({ baseUrl: 'app', // urlArgs: 'r=@REV@', paths: { - config: '../config', + config: '../config.dev', settings: 'components/settings', kbn: 'components/kbn', diff --git a/src/app/components/settings.js b/src/app/components/settings.js index a3dcd15e9d9..ba787cb7bda 100644 --- a/src/app/components/settings.js +++ b/src/app/components/settings.js @@ -12,7 +12,8 @@ function (_) { var defaults = { elasticsearch : "http://"+window.location.hostname+":9200", panel_names : [], - kibana_index : 'kibana-int' + kibana_index : 'kibana-int', + graphiteUrl : null, }; // This initializes a new hash on purpose, to avoid adding parameters to diff --git a/src/app/dashboards/default.json b/src/app/dashboards/default.json index bd3df035893..c7aefe6e773 100644 --- a/src/app/dashboards/default.json +++ b/src/app/dashboards/default.json @@ -37,7 +37,7 @@ "rows": [ { "title": "Intro", - "height": "150px", + "height": "400px", "editable": true, "collapse": false, "collapsable": false, @@ -55,90 +55,6 @@ } ], "notice": true - }, - { - "title": "Intro", - "height": "150px", - "editable": true, - "collapse": false, - "collapsable": false, - "panels": [ - { - "span": 12, - "editable": true, - "group": [ - "default" - ], - "type": "histogram", - "mode": "count", - "time_field": "@timestamp", - "value_field": null, - "x-axis": true, - "y-axis": true, - "scale": 1, - "y_format": "none", - "grid": { - "max": null, - "min": 0 - }, - "queries": { - "mode": "all", - "ids": [ - 0 - ] - }, - "annotate": { - "enable": false, - "query": "*", - "size": 20, - "field": "_type", - "sort": [ - "_score", - "desc" - ] - }, - "auto_int": true, - "resolution": 100, - "interval": "30s", - "intervals": [ - "auto", - "1s", - "1m", - "5m", - "10m", - "30m", - "1h", - "3h", - "12h", - "1d", - "1w", - "1y" - ], - "lines": false, - "fill": 0, - "linewidth": 3, - "points": false, - "pointradius": 5, - "bars": true, - "stack": true, - "spyable": true, - "zoomlinks": true, - "options": true, - "legend": true, - "show_query": true, - "interactive": true, - "legend_counts": true, - "timezone": "browser", - "percentage": false, - "zerofill": true, - "derivative": false, - "tooltip": { - "value_type": "cumulative", - "query_as_alias": true - } - } - ], - "notice": true } ], "editable": true, diff --git a/src/app/panels/graph/editor.html b/src/app/panels/graph/editor.html deleted file mode 100644 index 6e195172926..00000000000 --- a/src/app/panels/graph/editor.html +++ /dev/null @@ -1,11 +0,0 @@ -
-
-
- - -
-
- - - -
\ No newline at end of file diff --git a/src/app/panels/graph/module.html b/src/app/panels/graph/module.html deleted file mode 100644 index 8611ca12fad..00000000000 --- a/src/app/panels/graph/module.html +++ /dev/null @@ -1,13 +0,0 @@ -
-

{{panel.someprop}}

- - - -
-
-
-
-
\ No newline at end of file diff --git a/src/app/panels/graph/module.js b/src/app/panels/graph/module.js deleted file mode 100644 index bddc8c64ee8..00000000000 --- a/src/app/panels/graph/module.js +++ /dev/null @@ -1,74 +0,0 @@ -define([ - 'jquery', - 'angular', - 'app', - 'underscore', - 'ts-widget' -], -function ($, angular, app, _) { - 'use strict'; - - var module = angular.module('kibana.panels.graph', []); - app.useModule(module); - - module.controller('graph', function($scope) { - $scope.panelMeta = { - status : "Unstable", - description : "A graphite graph module" - }; - - // Set and populate defaults - var _d = { - }; - - _.defaults($scope.panel,_d); - - $scope.init = function() { - $scope.ready = false; - $scope.saySomething = "something!"; - }; - - }); - - angular - .module('kibana.directives') - .directive('mychart', function () { - return { - restrict: 'E', - link: function (scope, elem) { - var tsData = { - from: '-30d', - until: 'now', - height: '300', - width: '740', - targets: [ - { - name: 'series 1', - color: '#CC6699', - target: 'randomWalk("random1")', - }, - { - name: 'series 2', - color: '#006699', - target: 'randomWalk("random2")', - } - ], - title: 'horizontal title', - vtitle: 'vertical title', - drawNullAsZero: false, - state: 'stacked', - hover_details: true, - legend: { container: '#legend_flot_simple', noColumns: 4 }, - }; - - $("#chart_flot").graphiteFlot(tsData, function(err) { - console.log(err); - }); - - console.log('asd'); - $(elem).html('NJEEEJ!'); - } - }; - }); - -}); \ No newline at end of file diff --git a/src/app/panels/graphite/module.html b/src/app/panels/graphite/module.html index c100c911598..95bfe71670a 100644 --- a/src/app/panels/graphite/module.html +++ b/src/app/panels/graphite/module.html @@ -1,4 +1,4 @@ -
+