stackviz/app/js/controllers/timeline.js
Tim Buckley d27c01fb6a Add new configuration file format
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
2016-04-21 16:21:52 -06:00

33 lines
663 B
JavaScript

'use strict';
var controllersModule = require('./_index');
/**
* @ngInject
*/
function TimelineCtrl($scope, $location, $stateParams, datasetService) {
// ViewModel
var vm = this;
vm.artifactName = $stateParams.artifactName;
vm.hoveredItem = null;
vm.selectedItem = null;
vm.preselect = $location.search().test;
$scope.$watch(function() {
return vm.selectedItem;
}, function(value) {
if (value) {
$location.search({ test: value.name });
vm.preselect = null;
} else if (vm.preselect === null) {
$location.search({ test: null });
}
});
}
controllersModule.controller('TimelineController', TimelineCtrl);