mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
#516 feat(services) - add the ability to manage cpu/mem limits
This commit is contained in:
parent
d695657711
commit
3cb96235b7
13 changed files with 353 additions and 92 deletions
22
app/directives/slider/porSliderController.js
Normal file
22
app/directives/slider/porSliderController.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
angular.module('portainer')
|
||||
.controller('porSliderController', function () {
|
||||
var ctrl = this;
|
||||
|
||||
ctrl.options = {
|
||||
floor: ctrl.floor,
|
||||
ceil: ctrl.ceil,
|
||||
step: ctrl.step,
|
||||
precision: ctrl.precision,
|
||||
showSelectionBar: true,
|
||||
translate: function(value, sliderId, label) {
|
||||
if (label === 'floor' || value === 0) {
|
||||
return 'unlimited';
|
||||
}
|
||||
return value;
|
||||
},
|
||||
onChange: function() {
|
||||
ctrl.onChange();
|
||||
}
|
||||
};
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue