mirror of https://github.com/portainer/portainer
fix(support-details): fix a js error
parent
6fd5ddc802
commit
42a357f863
|
@ -1,9 +1,7 @@
|
||||||
angular.module('portainer.app').component('productItem', {
|
angular.module('portainer.app').component('productItem', {
|
||||||
templateUrl: 'app/portainer/components/product-list/product-item/productItem.html',
|
templateUrl: 'app/portainer/components/product-list/product-item/productItem.html',
|
||||||
controller: 'ProductItemController',
|
|
||||||
bindings: {
|
bindings: {
|
||||||
model: '<',
|
model: '<',
|
||||||
currentDate: '<',
|
|
||||||
goTo: '<'
|
goTo: '<'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
angular.module('portainer.app')
|
|
||||||
.controller('ProductItemController', ['$state',
|
|
||||||
function ($state) {
|
|
||||||
|
|
||||||
var ctrl = this;
|
|
||||||
ctrl.$onInit = $onInit;
|
|
||||||
ctrl.goToExtensionView = goToExtensionView;
|
|
||||||
|
|
||||||
function goToExtensionView() {
|
|
||||||
$state.go('portainer.extensions.extension', { id: ctrl.model.Id });
|
|
||||||
}
|
|
||||||
|
|
||||||
function $onInit() {
|
|
||||||
if (ctrl.currentDate === ctrl.model.License.Expiration) {
|
|
||||||
ctrl.model.Expired = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}]);
|
|
|
@ -4,7 +4,5 @@ angular.module('portainer.app').component('productList', {
|
||||||
titleText: '@',
|
titleText: '@',
|
||||||
products: '<',
|
products: '<',
|
||||||
goTo: '<'
|
goTo: '<'
|
||||||
// extensions: '<',
|
|
||||||
// currentDate: '<'
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
<div class="blocklist">
|
<div class="blocklist">
|
||||||
<product-item ng-repeat="product in $ctrl.products"
|
<product-item ng-repeat="product in $ctrl.products"
|
||||||
model="product"
|
model="product"
|
||||||
current-date="$ctrl.currentDate"
|
|
||||||
go-to="$ctrl.goTo"
|
go-to="$ctrl.goTo"
|
||||||
></product-item>
|
></product-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue