mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-15 21:05:48 -04:00
18 lines
539 B
JavaScript
18 lines
539 B
JavaScript
var NzbDroneCell = require('../../Cells/NzbDroneCell');
|
|
var moment = require('moment');
|
|
|
|
module.exports = NzbDroneCell.extend({
|
|
className : 'task-interval-cell',
|
|
render : function(){
|
|
this.$el.empty();
|
|
var interval = this.model.get('interval');
|
|
var duration = moment.duration(interval, 'minutes').humanize().replace(/an?(?=\s)/, '1');
|
|
if(interval === 0) {
|
|
this.$el.html('disabled');
|
|
}
|
|
else {
|
|
this.$el.html(duration);
|
|
}
|
|
return this;
|
|
}
|
|
}); |