move window.__config to an Angular constant; refactor AngularViewArray -> ViewArray + ViewArrayFactory

This commit is contained in:
alecmerdler 2017-01-21 00:14:37 -08:00
parent 615e233671
commit eea2a18c3f
16 changed files with 316 additions and 231 deletions

View file

@ -13,7 +13,7 @@ angular.module('quay').directive('buildLogsView', function () {
'useTimestamps': '=useTimestamps',
'buildUpdated': '&buildUpdated'
},
controller: function($scope, $element, $interval, $sanitize, ansi2html, AngularViewArray,
controller: function($scope, $element, $interval, $sanitize, ansi2html, ViewArrayFactory,
AngularPollChannel, ApiService, Restangular, UtilService) {
var result = $element.find('#copyButton').clipboardCopy();
@ -53,7 +53,7 @@ angular.module('quay').directive('buildLogsView', function () {
var entry = logs[i];
var type = entry['type'] || 'entry';
if (type == 'command' || type == 'phase' || type == 'error') {
entry['logs'] = AngularViewArray.create();
entry['logs'] = ViewArrayFactory.create();
entry['index'] = $scope.logStartIndex + i;
$scope.logEntries.push(entry);

View file

@ -13,7 +13,7 @@ angular.module('quay').directive('imageFeatureView', function () {
'image': '=image',
'isEnabled': '=isEnabled'
},
controller: function($scope, $element, Config, ApiService, VulnerabilityService, AngularViewArray, ImageMetadataService, TableService) {
controller: function($scope, $element, Config, ApiService, VulnerabilityService, ViewArrayFactory, ImageMetadataService, TableService) {
$scope.options = {
'filter': null,
'predicate': 'fixableScore',

View file

@ -13,7 +13,7 @@ angular.module('quay').directive('imageVulnerabilityView', function () {
'image': '=image',
'isEnabled': '=isEnabled'
},
controller: function($scope, $element, Config, ApiService, VulnerabilityService, AngularViewArray, ImageMetadataService, TableService) {
controller: function($scope, $element, Config, ApiService, VulnerabilityService, ViewArrayFactory, ImageMetadataService, TableService) {
$scope.options = {
'filter': null,
'fixableVulns': false,