Merge "Update url and return data for metrics api"
This commit is contained in:
commit
eeb7b83972
File diff suppressed because one or more lines are too long
|
@ -68,12 +68,14 @@
|
|||
useInteractiveGuideline="true"
|
||||
toolTipContent="toolTipContentFunction()"
|
||||
xAxisTickFormat="xAxisTickFormatFunction()"
|
||||
yAxisTickFormat="yAxisTickFormatFunction()"
|
||||
margin="{left:50,top:50,bottom:50,right:50}"
|
||||
forceY="[0]"
|
||||
showLegend="true"
|
||||
objectEquality="true"
|
||||
legendWidth="200"
|
||||
legendHeight="100">
|
||||
legendHeight="100"
|
||||
noData="No Data Available">
|
||||
<svg></svg>
|
||||
</nvd3-line-chart>
|
||||
|
||||
|
|
|
@ -117,12 +117,12 @@ define(['angularAnimate', 'angularUiTree', 'nvd3Directive'], function() {
|
|||
// TODO
|
||||
});
|
||||
|
||||
$scope.metrics = [];
|
||||
/*$scope.metrics = [];
|
||||
dataService.monitorMetrics().success(function(data) {
|
||||
$scope.metrics = data;
|
||||
}).error(function(response) {
|
||||
// TODO
|
||||
});
|
||||
});*/
|
||||
|
||||
$scope.metricsName = [];
|
||||
dataService.monitorMetricsName().success(function(data) {
|
||||
|
@ -178,6 +178,12 @@ define(['angularAnimate', 'angularUiTree', 'nvd3Directive'], function() {
|
|||
}
|
||||
};
|
||||
|
||||
$scope.yAxisTickFormatFunction = function(){
|
||||
return function(d){
|
||||
return d3.format(',d')(d);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.toolTipContentFunction = function() {
|
||||
return function(key, x, y, e, graph) {
|
||||
return 'Super New Tooltip' +
|
||||
|
|
|
@ -230,21 +230,21 @@ define(['angular','uiBootstrap'], function(ng, uiBootstrap) {
|
|||
return $http.get(settings.monitoringUrlBase + '/proxy/' + px_url);
|
||||
};
|
||||
*/
|
||||
this.monitorMetrics = function() {
|
||||
/*this.monitorMetrics = function() {
|
||||
// This returns a flat json list of metrics currently or historically have been collected
|
||||
// /monit/api/metrics
|
||||
return $http.get(settings.monitoringUrlBase + '/metrics');
|
||||
};
|
||||
};*/
|
||||
|
||||
this.monitorMetricsName = function() {
|
||||
|
||||
return $http.get(settings.monitoringUrlBase + '/metricsName');
|
||||
return $http.get(settings.monitoringUrlBase + '/metricnames');
|
||||
};
|
||||
|
||||
this.monitorMetricsTree = function() {
|
||||
// This will also order the metrics in a tree
|
||||
// /monit/api/metricstree
|
||||
return $http.get(settings.monitoringUrlBase + '/metricstree');
|
||||
return $http.get(settings.monitoringUrlBase + '/metrictree');
|
||||
};
|
||||
|
||||
this.monitorHostMetric = function(clusterId, hostName, metricName) {
|
||||
|
|
|
@ -595,10 +595,10 @@ define(['angular', 'ganttChart'], function(angular, ganttChart) {
|
|||
|
||||
//var hostnames = scope.hosts;
|
||||
var taskStatus = {
|
||||
"SUCCESSFUL": "bar-successful",
|
||||
"CRITICAL": "bar-failed",
|
||||
"WARNING": "bar-warning",
|
||||
"UNKNOWN": "bar-unknown"
|
||||
"successful": "bar-successful",
|
||||
"critical": "bar-failed",
|
||||
"warning": "bar-warning",
|
||||
"unknown": "bar-unknown"
|
||||
};
|
||||
|
||||
tasks.sort(function(a, b) {
|
||||
|
|
Loading…
Reference in New Issue