
Adds additional information to the stackviz-export and stackviz-front technical documents. Info about `stackviz-export` output files is now included in the corresponding document. Directive and service descriptions were added to stackviz-front, alongside inline comments in the appropriate .js files. Due to the unique structure of GitHub's RST renderer, includes will no longer be used in the main README. Change-Id: Iaebf1f1c3b5e4cbb4ea5e262f85672bc082bbe2f
55 lines
1.5 KiB
JavaScript
55 lines
1.5 KiB
JavaScript
'use strict';
|
|
|
|
var directivesModule = require('./_index.js');
|
|
|
|
/**
|
|
* @ngInject
|
|
*/
|
|
function testDetailsSearch() {
|
|
|
|
/**
|
|
* @ngInject
|
|
*/
|
|
var controller =
|
|
/**
|
|
* Responsible for calling the `parsePythonLogging` filter function in
|
|
* `TestDetailsController` when the log level buttons change state. The
|
|
* `filter` function is passed from `test-details` to `test-details-search`
|
|
* when the directive is initially instantiated.
|
|
*/
|
|
function($scope, $element) {
|
|
var self = this;
|
|
this.open = false;
|
|
this.showINFO = true;
|
|
this.showDEBUG = true;
|
|
this.showWARNING = true;
|
|
this.showERROR = true;
|
|
|
|
// Wrapper for parent controller's filter function.
|
|
var update = function() {
|
|
$scope.filter(self.showINFO, self.showDEBUG, self.showWARNING, self.showERROR);
|
|
};
|
|
|
|
// Watchers to signal update function upon button state change.
|
|
$scope.$watch(function() { return self.query; }, update);
|
|
$scope.$watch(function() { return self.showINFO; }, update);
|
|
$scope.$watch(function() { return self.showDEBUG; }, update);
|
|
$scope.$watch(function() { return self.showWARNING; }, update);
|
|
$scope.$watch(function() { return self.showERROR; }, update);
|
|
};
|
|
|
|
return {
|
|
restrict: 'EA',
|
|
require: ['^testDetailsSearch','^testDetails'],
|
|
scope: {
|
|
'filter': '='
|
|
},
|
|
controller: controller,
|
|
controllerAs: 'search',
|
|
templateUrl: 'directives/test-details-search.html',
|
|
transclude: true
|
|
};
|
|
}
|
|
|
|
directivesModule.directive('testDetailsSearch', testDetailsSearch);
|