diff --git a/ui/src/components/TaskList/FormDialog.vue b/ui/src/components/TaskList/FormDialog.vue index 1a143b3..bd4d260 100644 --- a/ui/src/components/TaskList/FormDialog.vue +++ b/ui/src/components/TaskList/FormDialog.vue @@ -10,110 +10,235 @@ v-bind="activatorProps" > - - - - - - - + + + Fetch data from a repository + - - - - - - - - - - - - Interval + + + {{ 'mdi-' + item.title.toLowerCase() }} + + {{ item.title }} + + + - - - - + - - - - - - + v-model="formData.uri" + label="Repository URL" + color="primary" + density="compact" + :rules="rules.required" + /> + + + + Select the data that you want to analyze + + + + Schedule interval + + + + + + + + + + seconds + + + + + + + - + + diff --git a/ui/src/views/Task/ListView.vue b/ui/src/views/Task/ListView.vue index a678fa6..bfaa0cf 100644 --- a/ui/src/views/Task/ListView.vue +++ b/ui/src/views/Task/ListView.vue @@ -52,12 +52,14 @@ export default { methods: { async createTask(formData) { try { - const response = await API.scheduler.create(formData) + const responses = await Promise.all(formData.map((task) => API.scheduler.create(task))) + Object.assign(this.snackbar, { open: true, color: 'success', - text: response.data.message + text: responses.map((response) => response.data.message).join(', ') }) + this.fetchTasks(this.currentPage) } catch (error) { Object.assign(this.snackbar, {