|
|
|
@ -419,16 +419,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
bindingTypes,
|
|
|
|
|
getComponent
|
|
|
|
|
) => template(
|
|
|
|
|
'<div expr19="expr19" class="toast-wrapper toast-wrapper--right"></div>',
|
|
|
|
|
'<div expr35="expr35" class="toast-wrapper toast-wrapper--right"></div>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.IF,
|
|
|
|
|
evaluate: _scope => _scope.state.items.length > 0,
|
|
|
|
|
redundantAttribute: 'expr19',
|
|
|
|
|
selector: '[expr19]',
|
|
|
|
|
redundantAttribute: 'expr35',
|
|
|
|
|
selector: '[expr35]',
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
'<div expr20="expr20"></div>',
|
|
|
|
|
'<div expr36="expr36"></div>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.EACH,
|
|
|
|
@ -436,7 +436,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
condition: null,
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
'<div expr21="expr21" class="toast__body"> </div>',
|
|
|
|
|
'<div expr37="expr37" class="toast__body"> </div>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
expressions: [
|
|
|
|
@ -458,8 +458,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr21',
|
|
|
|
|
selector: '[expr21]',
|
|
|
|
|
redundantAttribute: 'expr37',
|
|
|
|
|
selector: '[expr37]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -477,8 +477,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr20',
|
|
|
|
|
selector: '[expr20]',
|
|
|
|
|
redundantAttribute: 'expr36',
|
|
|
|
|
selector: '[expr36]',
|
|
|
|
|
itemName: 'item',
|
|
|
|
|
indexName: null,
|
|
|
|
|
evaluate: _scope => _scope.state.items
|
|
|
|
@ -689,17 +689,12 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
|
|
|
|
|
state: {
|
|
|
|
|
requestHandlers: [],
|
|
|
|
|
validator: undefined,
|
|
|
|
|
current: {
|
|
|
|
|
name: '',
|
|
|
|
|
url: '',
|
|
|
|
|
requestHandlers: '',
|
|
|
|
|
actionHandlers: '',
|
|
|
|
|
options: {
|
|
|
|
|
|
|
|
|
|
validator: undefined
|
|
|
|
|
},
|
|
|
|
|
timer: ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onBeforeMount()
|
|
|
|
|
{
|
|
|
|
|
this.resetCurrent()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -744,7 +739,14 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
_stores_taskForm_js__WEBPACK_IMPORTED_MODULE_1__["default"].on('open', (data) => {
|
|
|
|
|
|
|
|
|
|
this.resetCurrent()
|
|
|
|
|
this.state.isOpen = true
|
|
|
|
|
|
|
|
|
|
if (data) {
|
|
|
|
|
this.state.current = data
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.update()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -752,6 +754,29 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
this.getActionHandlers()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
resetCurrent()
|
|
|
|
|
{
|
|
|
|
|
this.state.current = {
|
|
|
|
|
name: '',
|
|
|
|
|
url: '',
|
|
|
|
|
requestHandlers: '',
|
|
|
|
|
actionHandlers: '',
|
|
|
|
|
options: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
timer: ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* getting available RequestHandlers
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
getRequestHandlers()
|
|
|
|
|
{
|
|
|
|
|
fetch('/api/v1/handler/request', {
|
|
|
|
@ -764,6 +789,11 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* getting available ActionHandlers
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
getActionHandlers()
|
|
|
|
|
{
|
|
|
|
|
fetch('/api/v1/handler/action', {
|
|
|
|
@ -777,8 +807,10 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* send data to server
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* @param {object} event
|
|
|
|
|
* @param {object} data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
handleSuccess(event, data)
|
|
|
|
@ -787,7 +819,10 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
|
|
|
|
|
fetch('/api/v1/task', {
|
|
|
|
|
'method': 'POST',
|
|
|
|
|
'body': JSON.stringify(data)
|
|
|
|
|
'body': JSON.stringify(data),
|
|
|
|
|
'headers': {
|
|
|
|
|
'Content-Type': 'application/json'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then((response) => response.json())
|
|
|
|
|
.then((response) => {
|
|
|
|
@ -798,6 +833,14 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
// add id to current
|
|
|
|
|
this.state.current.id = response.data.id
|
|
|
|
|
this.update()
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
|
// stop loading
|
|
|
|
|
this.state.isLoading = false
|
|
|
|
|
|
|
|
|
|
// show error message
|
|
|
|
|
_stores_notification__WEBPACK_IMPORTED_MODULE_2__["default"].danger('Error! Server has a Error, Request can not proceed!')
|
|
|
|
|
this.update()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -809,7 +852,7 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
bindingTypes,
|
|
|
|
|
getComponent
|
|
|
|
|
) => template(
|
|
|
|
|
'<app-sidebar expr22="expr22" form-id="app-task-form"></app-sidebar>',
|
|
|
|
|
'<app-sidebar expr19="expr19" form-id="app-task-form"></app-sidebar>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.TAG,
|
|
|
|
@ -819,14 +862,14 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
slots: [
|
|
|
|
|
{
|
|
|
|
|
id: 'title',
|
|
|
|
|
html: '<span slot="title"><virtual expr23="expr23"></virtual><virtual expr24="expr24"></virtual></span>',
|
|
|
|
|
html: '<span slot="title"><virtual expr20="expr20"></virtual><virtual expr21="expr21"></virtual></span>',
|
|
|
|
|
|
|
|
|
|
bindings: [
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.IF,
|
|
|
|
|
evaluate: _scope => _scope.state.current.id,
|
|
|
|
|
redundantAttribute: 'expr23',
|
|
|
|
|
selector: '[expr23]',
|
|
|
|
|
evaluate: _scope => _scope.state.current._id,
|
|
|
|
|
redundantAttribute: 'expr20',
|
|
|
|
|
selector: '[expr20]',
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
null,
|
|
|
|
@ -868,9 +911,9 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.IF,
|
|
|
|
|
evaluate: _scope => !_scope.state.current.id,
|
|
|
|
|
redundantAttribute: 'expr24',
|
|
|
|
|
selector: '[expr24]',
|
|
|
|
|
evaluate: _scope => !_scope.state.current._id,
|
|
|
|
|
redundantAttribute: 'expr21',
|
|
|
|
|
selector: '[expr21]',
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
null,
|
|
|
|
@ -897,12 +940,12 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'form',
|
|
|
|
|
html: '<form expr25="expr25" id="app-task-form" class="form" slot="form"><div class="field-group"><label class="field-label">\n name\n <input expr26="expr26" class="field-text" name="name" type="text"/><field-error expr27="expr27" name="name"></field-error></label></div><div class="field-group"><label class="field-label">\n url\n <input expr28="expr28" class="field-text" name="url" type="text"/><field-error expr29="expr29" name="url"></field-error></label></div><div class="field-group"><label class="field-label">\n requestHandlers\n <select class="field-choice" name="requestHandler"><option></option><option expr30="expr30"></option></select><field-error expr31="expr31" name="requestHandlers"></field-error></label></div><div class="field-group"><label class="field-label">\n actionHandlers\n <select class="field-choice" name="action"><option></option><option expr32="expr32"></option></select><field-error expr33="expr33" name="actionHandlers"></field-error></label></div><div class="field-group"><label class="field-label">\n options\n <input expr34="expr34" type="text" name="options" class="field-text"/><field-error expr35="expr35" name="options"></field-error></label></div><div class="field-group"><label class="field-label">\n timer\n <input expr36="expr36" type="text" name="timer" class="field-text"/><field-error expr37="expr37" name="timer"></field-error></label></div></form>',
|
|
|
|
|
html: '<form expr22="expr22" id="app-task-form" class="form" slot="form"><div class="field-group"><label class="field-label">\n name\n <input expr23="expr23" class="field-text" name="name" type="text"/><field-error expr24="expr24" name="name"></field-error></label></div><div class="field-group"><label class="field-label">\n url\n <input expr25="expr25" class="field-text" name="url" type="text"/><field-error expr26="expr26" name="url"></field-error></label></div><div class="field-group"><label class="field-label">\n requestHandlers\n <select class="field-choice" name="requestHandler"><option></option><option expr27="expr27"></option></select><field-error expr28="expr28" name="requestHandlers"></field-error></label></div><div class="field-group"><label class="field-label">\n actionHandlers\n <select class="field-choice" name="action"><option></option><option expr29="expr29"></option></select><field-error expr30="expr30" name="actionHandlers"></field-error></label></div><div class="field-group"><label class="field-label">\n options\n <input expr31="expr31" type="text" name="options" class="field-text"/><field-error expr32="expr32" name="options"></field-error></label></div><div class="field-group"><label class="field-label">\n timer\n <input expr33="expr33" type="text" name="timer" class="field-text"/><field-error expr34="expr34" name="timer"></field-error></label></div></form>',
|
|
|
|
|
|
|
|
|
|
bindings: [
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr25',
|
|
|
|
|
selector: '[expr25]',
|
|
|
|
|
redundantAttribute: 'expr22',
|
|
|
|
|
selector: '[expr22]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -913,8 +956,8 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr26',
|
|
|
|
|
selector: '[expr26]',
|
|
|
|
|
redundantAttribute: 'expr23',
|
|
|
|
|
selector: '[expr23]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -929,12 +972,12 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
evaluate: _scope => 'field-error',
|
|
|
|
|
slots: [],
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr27',
|
|
|
|
|
selector: '[expr27]'
|
|
|
|
|
redundantAttribute: 'expr24',
|
|
|
|
|
selector: '[expr24]'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr28',
|
|
|
|
|
selector: '[expr28]',
|
|
|
|
|
redundantAttribute: 'expr25',
|
|
|
|
|
selector: '[expr25]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -949,8 +992,8 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
evaluate: _scope => 'field-error',
|
|
|
|
|
slots: [],
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr29',
|
|
|
|
|
selector: '[expr29]'
|
|
|
|
|
redundantAttribute: 'expr26',
|
|
|
|
|
selector: '[expr26]'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.EACH,
|
|
|
|
@ -980,15 +1023,15 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
{
|
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
|
name: 'selected',
|
|
|
|
|
evaluate: _scope => _scope.action === _scope.state.current.requestHandler
|
|
|
|
|
evaluate: _scope => _scope.state.current.requestHandler && _scope.requestHandler.file === _scope.state.current.requestHandler.file
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr30',
|
|
|
|
|
selector: '[expr30]',
|
|
|
|
|
redundantAttribute: 'expr27',
|
|
|
|
|
selector: '[expr27]',
|
|
|
|
|
itemName: 'requestHandler',
|
|
|
|
|
indexName: null,
|
|
|
|
|
evaluate: _scope => _scope.state.requestHandlers
|
|
|
|
@ -999,8 +1042,8 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
evaluate: _scope => 'field-error',
|
|
|
|
|
slots: [],
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr31',
|
|
|
|
|
selector: '[expr31]'
|
|
|
|
|
redundantAttribute: 'expr28',
|
|
|
|
|
selector: '[expr28]'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.EACH,
|
|
|
|
@ -1030,15 +1073,15 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
{
|
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
|
name: 'selected',
|
|
|
|
|
evaluate: _scope => _scope.action === _scope.state.current.actionHandler
|
|
|
|
|
evaluate: _scope => _scope.state.current.actionHandler && _scope.actionHandler.file === _scope.state.current.actionHandler.file
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr32',
|
|
|
|
|
selector: '[expr32]',
|
|
|
|
|
redundantAttribute: 'expr29',
|
|
|
|
|
selector: '[expr29]',
|
|
|
|
|
itemName: 'actionHandler',
|
|
|
|
|
indexName: null,
|
|
|
|
|
evaluate: _scope => _scope.state.actionHandlers
|
|
|
|
@ -1049,12 +1092,12 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
evaluate: _scope => 'field-error',
|
|
|
|
|
slots: [],
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr33',
|
|
|
|
|
selector: '[expr33]'
|
|
|
|
|
redundantAttribute: 'expr30',
|
|
|
|
|
selector: '[expr30]'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr34',
|
|
|
|
|
selector: '[expr34]',
|
|
|
|
|
redundantAttribute: 'expr31',
|
|
|
|
|
selector: '[expr31]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -1069,12 +1112,12 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
evaluate: _scope => 'field-error',
|
|
|
|
|
slots: [],
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr35',
|
|
|
|
|
selector: '[expr35]'
|
|
|
|
|
redundantAttribute: 'expr32',
|
|
|
|
|
selector: '[expr32]'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr36',
|
|
|
|
|
selector: '[expr36]',
|
|
|
|
|
redundantAttribute: 'expr33',
|
|
|
|
|
selector: '[expr33]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -1089,8 +1132,8 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
evaluate: _scope => 'field-error',
|
|
|
|
|
slots: [],
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr37',
|
|
|
|
|
selector: '[expr37]'
|
|
|
|
|
redundantAttribute: 'expr34',
|
|
|
|
|
selector: '[expr34]'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
@ -1114,8 +1157,8 @@ riot__WEBPACK_IMPORTED_MODULE_5__.register('field-error', _tiny_components_valid
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr22',
|
|
|
|
|
selector: '[expr22]'
|
|
|
|
|
redundantAttribute: 'expr19',
|
|
|
|
|
selector: '[expr19]'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
@ -1178,11 +1221,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
bindingTypes,
|
|
|
|
|
getComponent
|
|
|
|
|
) => template(
|
|
|
|
|
'<button expr7="expr7" class="button m-bottom-0 m-top-5"><svg class="icon fill-text fill-text-contrast-hover m-top-1 p-right-2" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-close"/></svg> </button>',
|
|
|
|
|
'<button expr18="expr18" class="button m-bottom-0 m-top-5"><svg class="icon fill-text fill-text-contrast-hover m-top-1 p-right-2" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-close"/></svg> </button>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr7',
|
|
|
|
|
selector: '[expr7]',
|
|
|
|
|
redundantAttribute: 'expr18',
|
|
|
|
|
selector: '[expr18]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -1221,6 +1264,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
|
|
|
/* harmony export */ });
|
|
|
|
|
/* harmony import */ var _stores_taskForm_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../stores/taskForm.js */ "./js/stores/taskForm.js");
|
|
|
|
|
/* harmony import */ var _stores_notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../stores/notification */ "./js/stores/notification.js");
|
|
|
|
|
// stores
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
|
|
|
css: null,
|
|
|
|
|
|
|
|
|
@ -1244,27 +1293,46 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
*/
|
|
|
|
|
getTasks()
|
|
|
|
|
{
|
|
|
|
|
fetch('/api/task', (response) => {
|
|
|
|
|
fetch('/api/v1/task')
|
|
|
|
|
.then((response) => response.json())
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.state.tasks = response.data
|
|
|
|
|
this.update()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* delete
|
|
|
|
|
*
|
|
|
|
|
* @param {object} event
|
|
|
|
|
* @param {object} task
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
handleDelete(event, action)
|
|
|
|
|
handleDelete(event, task)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
fetch('/api/v1/task/' + task._id, {
|
|
|
|
|
'method': 'DELETE'
|
|
|
|
|
})
|
|
|
|
|
.then((response) => response.json())
|
|
|
|
|
.then((response) => {
|
|
|
|
|
_stores_notification__WEBPACK_IMPORTED_MODULE_1__["default"].success('Deleted ' + response.data.name + '!')
|
|
|
|
|
this.getTasks()
|
|
|
|
|
})
|
|
|
|
|
.catch((errors) => {
|
|
|
|
|
_stores_notification__WEBPACK_IMPORTED_MODULE_1__["default"].success('Error! ' + response.data.name + ' could not deleted!')
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* edit task, trigger form taskForm
|
|
|
|
|
*
|
|
|
|
|
* @param {object} event
|
|
|
|
|
* @param {object} task
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
handleEdit(event, action)
|
|
|
|
|
handleEdit(event, task)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
_stores_taskForm_js__WEBPACK_IMPORTED_MODULE_0__["default"].open(task)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -1274,7 +1342,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
bindingTypes,
|
|
|
|
|
getComponent
|
|
|
|
|
) => template(
|
|
|
|
|
'<div class="tasks"><table class="table table--stripped"><thead><tr><th class="table__th">\n name\n </th><th class="table__th">\n url\n </th><th class="table__th">\n requestHandler\n </th><th class="table__th">\n actions\n </th><th class="table__th">\n cron\n </th><th class="table__th"></th><tr></tr><tbody><tr expr8="expr8"></tr><tr expr18="expr18"></tr></tbody></tr></thead></table></div>',
|
|
|
|
|
'<div class="tasks"><table class="table table--stripped"><thead><tr><td class="table__th">\n state\n </td><th class="table__th">\n name\n </th><th class="table__th">\n url\n </th><th class="table__th">\n requestHandler\n </th><th class="table__th">\n actions\n </th><th class="table__th">\n cron\n </th><th class="table__th"></th><tr></tr><tbody><tr expr7="expr7"></tr><tr expr17="expr17"></tr></tbody></tr></thead></table></div>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.EACH,
|
|
|
|
@ -1282,11 +1350,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
condition: _scope => _scope.state.tasks.length > 0,
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
'<td expr9="expr9" class="table__td"> </td><td expr10="expr10" class="table__td"> </td><td expr11="expr11" class="table__td"> </td><td class="table__td"><virtual expr12="expr12"></virtual></td><td expr15="expr15" class="table__td"> </td><td class="table__td"><button expr16="expr16" class="button">\n Edit\n </button><button expr17="expr17" class="button">\n Delete\n </button></td>',
|
|
|
|
|
'<td class="table__td"></td><td expr8="expr8" class="table__td"> </td><td expr9="expr9" class="table__td"> </td><td expr10="expr10" class="table__td"> </td><td class="table__td"><virtual expr11="expr11"></virtual></td><td expr14="expr14" class="table__td"> </td><td class="table__td"><button class="button">\n Pause\n </button><button expr15="expr15" class="button">\n Edit\n </button><button expr16="expr16" class="button">\n Delete\n </button></td>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr9',
|
|
|
|
|
selector: '[expr9]',
|
|
|
|
|
redundantAttribute: 'expr8',
|
|
|
|
|
selector: '[expr8]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -1302,8 +1370,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr10',
|
|
|
|
|
selector: '[expr10]',
|
|
|
|
|
redundantAttribute: 'expr9',
|
|
|
|
|
selector: '[expr9]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -1319,8 +1387,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr11',
|
|
|
|
|
selector: '[expr11]',
|
|
|
|
|
redundantAttribute: 'expr10',
|
|
|
|
|
selector: '[expr10]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -1351,12 +1419,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
slots: [
|
|
|
|
|
{
|
|
|
|
|
id: 'default',
|
|
|
|
|
html: '<span expr13="expr13"> </span><span expr14="expr14"></span>',
|
|
|
|
|
html: '<span expr12="expr12"> </span><span expr13="expr13"></span>',
|
|
|
|
|
|
|
|
|
|
bindings: [
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr13',
|
|
|
|
|
selector: '[expr13]',
|
|
|
|
|
redundantAttribute: 'expr12',
|
|
|
|
|
selector: '[expr12]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -1374,8 +1442,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.IF,
|
|
|
|
|
evaluate: _scope => _scope.actions.options,
|
|
|
|
|
redundantAttribute: 'expr14',
|
|
|
|
|
selector: '[expr14]',
|
|
|
|
|
redundantAttribute: 'expr13',
|
|
|
|
|
selector: '[expr13]',
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
' ',
|
|
|
|
@ -1406,15 +1474,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr12',
|
|
|
|
|
selector: '[expr12]',
|
|
|
|
|
redundantAttribute: 'expr11',
|
|
|
|
|
selector: '[expr11]',
|
|
|
|
|
itemName: 'action',
|
|
|
|
|
indexName: null,
|
|
|
|
|
evaluate: _scope => _scope.task.actions
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr15',
|
|
|
|
|
selector: '[expr15]',
|
|
|
|
|
redundantAttribute: 'expr14',
|
|
|
|
|
selector: '[expr14]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -1430,8 +1498,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr16',
|
|
|
|
|
selector: '[expr16]',
|
|
|
|
|
redundantAttribute: 'expr15',
|
|
|
|
|
selector: '[expr15]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -1442,8 +1510,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr17',
|
|
|
|
|
selector: '[expr17]',
|
|
|
|
|
redundantAttribute: 'expr16',
|
|
|
|
|
selector: '[expr16]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -1456,8 +1524,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr8',
|
|
|
|
|
selector: '[expr8]',
|
|
|
|
|
redundantAttribute: 'expr7',
|
|
|
|
|
selector: '[expr7]',
|
|
|
|
|
itemName: 'task',
|
|
|
|
|
indexName: null,
|
|
|
|
|
evaluate: _scope => _scope.state.tasks
|
|
|
|
@ -1465,8 +1533,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.IF,
|
|
|
|
|
evaluate: _scope => _scope.state.tasks.length === 0,
|
|
|
|
|
redundantAttribute: 'expr18',
|
|
|
|
|
selector: '[expr18]',
|
|
|
|
|
redundantAttribute: 'expr17',
|
|
|
|
|
selector: '[expr17]',
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
'<td class="table__td center" colspan="6">\n Nothing found\n </td>',
|
|
|
|
|