mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
New: Scheduled tasks shwon in UI under System
This commit is contained in:
parent
879035b28a
commit
2b0ddb6131
14 changed files with 310 additions and 8 deletions
41
src/UI/System/Task/ExecuteTaskCell.js
Normal file
41
src/UI/System/Task/ExecuteTaskCell.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'Cells/NzbDroneCell',
|
||||
'Commands/CommandController'
|
||||
], function (NzbDroneCell, CommandController) {
|
||||
return NzbDroneCell.extend({
|
||||
|
||||
className: 'execute-task-cell',
|
||||
|
||||
events: {
|
||||
'click .x-execute' : '_executeTask'
|
||||
},
|
||||
|
||||
render: function () {
|
||||
|
||||
this.$el.empty();
|
||||
|
||||
var task = this.model.get('name');
|
||||
|
||||
this.$el.html(
|
||||
'<i class="icon-cogs x-execute" title="Execute {0}"></i>'.format(task)
|
||||
);
|
||||
|
||||
CommandController.bindToCommand({
|
||||
element: this.$el.find('.x-execute'),
|
||||
command: {
|
||||
name : task
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
_executeTask: function () {
|
||||
CommandController.Execute(this.model.get('name'), {
|
||||
name : this.model.get('name')
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue