diff --git a/.dredd/hooks/helpers.go b/.dredd/hooks/helpers.go index 8bc8877d2..0a7922494 100644 --- a/.dredd/hooks/helpers.go +++ b/.dredd/hooks/helpers.go @@ -211,7 +211,7 @@ func addSchedule() *db.Schedule { func addTask() *db.Task { t := db.Task{ ProjectID: userProject.ID, - TemplateID: int(templateID), + TemplateID: templateID, Status: "testing", UserID: &userPathTestUser.ID, Created: db.GetParsedTime(time.Now()), diff --git a/web/src/components/TaskForm.vue b/web/src/components/TaskForm.vue index a9d8d254d..99621a254 100644 --- a/web/src/components/TaskForm.vue +++ b/web/src/components/TaskForm.vue @@ -91,47 +91,10 @@ - - - - - -
- -
-
- - @@ -141,12 +104,13 @@ import ItemFormBase from '@/components/ItemFormBase'; import axios from 'axios'; -import { codemirror } from 'vue-codemirror'; +// import { codemirror } from 'vue-codemirror'; import 'codemirror/lib/codemirror.css'; import 'codemirror/mode/vue/vue.js'; import 'codemirror/addon/lint/json-lint.js'; import 'codemirror/addon/display/placeholder.js'; import TaskParamsForm from '@/components/TaskParamsForm.vue'; +import ArgsPicker from '@/components/ArgsPicker.vue'; export default { mixins: [ItemFormBase], @@ -155,8 +119,9 @@ export default { sourceTask: Object, }, components: { + ArgsPicker, TaskParamsForm, - codemirror, + // codemirror, }, data() { return { @@ -173,9 +138,15 @@ export default { lint: true, indentWithTabs: false, }, - advancedOptions: false, + // advancedOptions: false, }; }, + computed: { + args() { + return JSON.parse(this.item.arguments || '[]'); + }, + }, + watch: { needReset(val) { if (val) { @@ -197,7 +168,12 @@ export default { } }, }, + methods: { + setArgs(args) { + this.item.arguments = JSON.stringify(args || []); + }, + getTaskMessage(task) { let buildTask = task; @@ -248,7 +224,7 @@ export default { this.item.params = {}; } - this.advancedOptions = this.item.arguments != null; + // this.advancedOptions = this.item.arguments != null; this.template = (await axios({ keys: 'get', diff --git a/web/src/lang/en.js b/web/src/lang/en.js index 11d4a9fb6..50dcb8ca8 100644 --- a/web/src/lang/en.js +++ b/web/src/lang/en.js @@ -1,4 +1,6 @@ export default { + 'Check interval': 'Check interval', + Schedule: 'Schedule', backup: 'Backup', downloadTheProjectBackupFile: 'Download the project backup file (in json)', restoreProject: 'Restore Project...',