portainer/app/edge/components/groups-datatable/groupsDatatableController.js

20 lines
582 B
JavaScript

import angular from 'angular';
class EdgeGroupsDatatableController {
constructor($scope, $controller) {
const allowSelection = this.allowSelection;
angular.extend(this, $controller('GenericDatatableController', { $scope: $scope }));
this.allowSelection = allowSelection.bind(this);
}
/**
* Override this method to allow/deny selection
*/
allowSelection(item) {
return !item.HasEdgeStack;
}
}
angular.module('portainer.edge').controller('EdgeGroupsDatatableController', EdgeGroupsDatatableController);
export default EdgeGroupsDatatableController;