d27c01fb6a
This enables a new "artifact"-based configuration file format, intended to work natively with the deployer and to aid future efforts to visualize additional data sources. Among other tweaks, dataset indices are no longer used as the primary differentiator between data files, and instead artifact names (such as `testrepository.subunit`) are used to group related artfacts of various types, such as 'subunit', 'subunit-stats', and 'subunit-details'. Additionally, datasets and artifacts now have access to substantially more metadata about the job that generated the output data. In future patches, this metadata will be used to display and link to additional information about visualized data. This metadata is made available automatically by the deployer, and can be optionally gathered from environment variables when using `stackviz-export` via a new `--env` flag. Change-Id: I3e16cc314624a1b7b4f6bf43fa4d5cdeedcdba0c
34 lines
659 B
JavaScript
34 lines
659 B
JavaScript
'use strict';
|
|
|
|
var controllersModule = require('./_index');
|
|
|
|
/**
|
|
* @ngInject
|
|
*/
|
|
function HomeCtrl($scope, $state, datasetService) {
|
|
|
|
// ViewModel
|
|
var vm = this;
|
|
vm.focus = $state.params.artifactName;
|
|
|
|
datasetService.groups().then(function(groups) {
|
|
vm.groups = groups;
|
|
|
|
if (!vm.focus) {
|
|
vm.focus = groups[0];
|
|
}
|
|
});
|
|
|
|
// update the page url as the focus id changes, but don't reload
|
|
$scope.$watch(function() {
|
|
return vm.focus;
|
|
}, function(value, old) {
|
|
if (value !== old) {
|
|
$state.go('home', { artifactName: value }, { notify: false });
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
controllersModule.controller('HomeController', HomeCtrl);
|