mirror of https://github.com/grafana/grafana
parent
d760468c84
commit
54eae2e34a
@ -1,4 +1,5 @@ |
||||
node_modules |
||||
.aws-config.json |
||||
dist |
||||
web.config |
||||
web.config |
||||
config.dev.js |
@ -1,11 +0,0 @@ |
||||
<div> |
||||
<div class="row-fluid"> |
||||
<div class="span4"> |
||||
<label class="small">Graphite Url</label> |
||||
<input type="text" class="input-large" ng-model="panel.graphiteUrl"></input> |
||||
</div> |
||||
</div> |
||||
|
||||
<label class=small>Targets</label> |
||||
<textarea ng-model="panel.targets" rows="6" style="width:95%"></textarea> |
||||
</div> |
@ -1,13 +0,0 @@ |
||||
<div ng-controller='graph' ng-init="init()"> |
||||
<h2>{{panel.someprop}}</h2> |
||||
|
||||
<ul> |
||||
<li>{{panel.graphiteUrl}}</li> |
||||
<li>{{panel.targets}}</li> |
||||
</ul> |
||||
<mychart ng-model='data'></mychart> |
||||
<div class="chart_container flot" id="chart_container_flot"> |
||||
<div class="chart" id="chart_flot" height="300px" width="700px"></div> |
||||
<div class="legend" id="legend_flot_simple"></div> |
||||
</div> |
||||
</div> |
@ -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!'); |
||||
} |
||||
}; |
||||
}); |
||||
|
||||
}); |
Loading…
Reference in new issue