Merge "Remove all remaining references to stackviz template."

This commit is contained in:
Jenkins 2015-09-14 23:05:06 +00:00 committed by Gerrit Code Review
commit bebd12df03
16 changed files with 4 additions and 366 deletions

3
.gitignore vendored
View File

@ -1,6 +1,5 @@
# Project-specific ignores
.idea
stackviz/static/components/*
node_modules
build
app/js/templates.js
@ -59,4 +58,4 @@ ChangeLog
*~
.*.swp
.*sw?
/nbproject/private/
/nbproject/private/

View File

@ -1,4 +1,4 @@
stackviz Style Commandments
openstack-health Style Commandments
===============================================
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/

View File

@ -10,10 +10,6 @@ function HomeCtrl(datasetService) {
// ViewModel
var vm = this;
datasetService.list().then(function(response) {
vm.tempest = response.data.tempest;
});
}
controllersModule.controller('HomeCtrl', HomeCtrl);

View File

@ -1,17 +0,0 @@
'use strict';
var controllersModule = require('./_index');
/**
* @ngInject
*/
function SunburstCtrl() {
// ViewModel
var vm = this;
vm.title = 'Sunburst';
}
controllersModule.controller('SunburstCtrl', SunburstCtrl);

View File

@ -1,21 +0,0 @@
'use strict';
var controllersModule = require('./_index');
/**
* @ngInject
*/
function TimelineCtrl($stateParams, datasetService) {
// ViewModel
var vm = this;
datasetService.get($stateParams.datasetId).then(function(dataset) {
vm.dataset = dataset;
}, function(reason) {
vm.error = "Unable to load dataset: " + reason;
});
}
controllersModule.controller('TimelineCtrl', TimelineCtrl);

View File

@ -1,33 +0,0 @@
'use strict';
var directivesModule = require('./_index.js');
/**
* @ngInject
*/
function sunburst() {
var link = function(scope, el, attrs) {
var init = function() {
// TODO d3 init
};
var update = function() {
// TODO d3 update
};
scope.$on('windowResize', function() {
// TODO handle resize
});
};
return {
restrict: 'EA',
scope: {
'dataset': '&'
},
link: link
};
}
directivesModule.directive('sunburst', sunburst);

View File

@ -1,24 +0,0 @@
'use strict';
var directivesModule = require('./_index.js');
/**
* @ngInject
*/
function tempestSummary() {
var controller = function($scope, $attrs, datasetService) {
// TODO get extra data here
// (may require raw details, or extra metadata inside config.json)
};
return {
restrict: 'EA',
scope: {
'dataset': '='
},
controller: controller,
templateUrl: 'directives/tempest-summary.html'
};
}
directivesModule.directive('tempestSummary', tempestSummary);

View File

@ -1,35 +0,0 @@
'use strict';
var directivesModule = require('./_index.js');
var d3 = require('d3');
/**
* @ngInject
*/
function timeline() {
var link = function(scope, el, attrs) {
var init = function() {
// TODO d3 init
};
var update = function() {
// TODO d3 update
};
scope.$on('windowResize', function() {
// TODO handle resize
});
};
return {
restrict: 'EA',
scope: {
'dataset': '='
},
link: link
};
}
directivesModule.directive('timeline', timeline);

View File

@ -11,18 +11,6 @@ function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) {
controller: 'HomeCtrl as home',
templateUrl: 'home.html',
title: 'Home'
})
.state('timeline', {
url: '/timeline/{datasetId:int}',
controller: 'TimelineCtrl as timeline',
templateUrl: 'timeline.html',
title: 'Timeline'
})
.state('sunburst', {
url: '/sunburst/{datasetId:int}',
controller: 'SunburstCtrl as sunburst',
templateUrl: 'sunburst.html',
title: 'Sunburst'
});
$urlRouterProvider.otherwise('/');

View File

@ -1,73 +0,0 @@
'use strict';
var servicesModule = require('./_index.js');
/**
* @ngInject
*/
function DatasetService($q, $http) {
var service = {};
service.list = function() {
return $http({
cache: true,
url: 'data/config.json',
method: 'GET'
});
};
service.get = function(id) {
return $q(function(resolve, reject) {
service.list().then(function(response) {
for (let entry of response.data.tempest) {
if (entry.id === id) {
resolve(entry);
return;
}
}
reject("Dataset not found with ID: " + id);
}, function(reason) {
reject(reason);
});
});
};
service.raw = function(dataset) {
return $http({
cache: true,
url: dataset.raw,
method: 'GET'
});
};
service.details = function(dataset) {
return $http({
cache: true,
url: dataset.details,
method: 'GET'
});
};
service.tree = function(dataset) {
return $http({
cache: true,
url: dataset.tree,
method: 'GET'
});
};
service.dstat = function(dataset) {
return $http({
cache: true,
url: dataset.dstat,
method: 'GET'
});
};
return service;
}
servicesModule.service('datasetService', DatasetService);

View File

@ -1,58 +0,0 @@
var binaryMinIndex = function(min, array, func) {
"use strict";
var left = 0;
var right = array.length - 1;
while (left < right) {
var mid = Math.floor((left + right) / 2);
if (min < func(array[mid])) {
right = mid - 1;
} else if (min > func(array[mid])) {
left = mid + 1;
} else {
right = mid;
}
}
if (left >= array.length) {
return array.length - 1;
} else if (func(array[left]) <= min) {
return left;
} else {
return left - 1;
}
};
var binaryMaxIndex = function(max, array, func) {
"use strict";
var left = 0;
var right = array.length - 1;
while (left < right) {
var mid = Math.floor((left + right) / 2);
if (max < func(array[mid])) {
right = mid - 1;
} else if (max > func(array[mid])) {
left = mid + 1;
} else {
right = mid;
}
}
if (right < 0) {
return 0;
} else if (func(array[right]) <= max) {
return right + 1; // exclusive index
} else {
return right;
}
};
module.exports = {
binaryMinIndex: binaryMinIndex,
binaryMaxIndex: binaryMaxIndex
};

View File

@ -1,18 +0,0 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{{ dataset.name }}</h3>
</div>
<div class="panel-body">
More details go here
</div>
<div class="panel-footer clearfix">
<div class="btn-group pull-right">
<a type="button"
class="btn btn-default"
ui-sref="timeline({datasetId: dataset.id})">Timeline</a>
<a type="button"
class="btn btn-default"
ui-sref="sunburst({datasetId: dataset.id})">Suburst</a>
</div>
</div>
</div>

View File

@ -2,37 +2,4 @@
<li>
<a ui-sref="home"><fa name="pie-chart" fw></fa> Overview</a>
</li>
<li dropdown>
<a href dropdown-toggle>
<fa name="bar-chart-o" fw></fa> Tempest <fa name="caret-down"></fa>
</a>
<ul class="dropdown-menu">
<li>
<a ui-sref="sunburst">
<fa name="clock-o" fw></fa> Sunburst
</a>
</li>
<li>
<a ui-sref="timeline">
<fa name="calendar" fw></fa> Timeline
</a>
</li>
<li>
<a href="#"><fa name="bar-chart-o" fw></fa> Aggregate Results</a>
</li>
</ul>
</li>
<li dropdown>
<a href dropdown-toggle>
<fa name="bar-chart-o" fw></fa> Upstream <fa name="caret-down"></fa>
</a>
<ul class="dropdown-menu">
<li>
<a href="#"><fa name="bar-chart-o" fw></fa> Test Stats</a>
</li>
<li>
<a href="#"><fa name="clock-o" fw></fa> Run Data</a>
</li>
</ul>
</li>
</ul>

View File

@ -1,13 +0,0 @@
<header class="bs-header">
<div class="container">
<h1 class="page-header">{{ sunburst.title }}</h1>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-lg-12">
Sunburst stub, TODO.
</div>
</div>
</div>

View File

@ -1,19 +0,0 @@
<header class="bs-header">
<div class="container">
<h1 class="page-header">Timeline: {{ timeline.dataset.name }}</h1>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="alert alert-danger" ng-if="!!timeline.error">
{{ timeline.error }}
</div>
Timeline stub, TODO.
<timeline dataset="timeline.dataset"></timeline>
</div>
</div>
</div>

View File

@ -1,9 +1,9 @@
.. stackviz documentation master file, created by
.. openstack-health documentation master file, created by
sphinx-quickstart on Tue Jul 9 22:26:36 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to stackviz's documentation!
Welcome to openstack-health's documentation!
========================================================
Contents:
@ -22,4 +22,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`