forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
catalog.js
54 lines (53 loc) · 1.48 KB
/
catalog.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
'use strict';
angular.module('openshiftConsole')
.directive("catalogCategory", function () {
return {
restrict: "E",
scope: {
categoryLabel: "@",
builders: "=",
templates: "=",
project: "@",
itemLimit: "@",
filterTag: "="
},
templateUrl: "views/catalog/_catalog-category.html",
controller: function($scope) {
$scope.builderID = function(builder) {
return builder.imageStream.metadata.uid + ":" + builder.imageStreamTag;
};
}
};
})
.directive('catalogTemplate', function() {
return {
restrict: 'E',
// Replace the catalog-template element so that the tiles are all equal height as flexbox items.
// Otherwise, you have to add the CSS tile classes to catalog-template.
replace: true,
scope: {
template: '=',
project: '@',
filterTag: "="
},
templateUrl: 'views/catalog/_template.html'
};
})
.directive('catalogImage', function() {
return {
restrict: 'E',
// Replace the catalog-template element so that the tiles are all equal height as flexbox items.
// Otherwise, you have to add the CSS tile classes to catalog-template.
replace: true,
scope: {
image: '=',
imageStream: '=',
imageTag: '=',
version: '=',
project: '@',
filterTag: "=",
isBuilder: "=?"
},
templateUrl: 'views/catalog/_image.html'
};
});