add script default args and reworked the script dropdowns to include categories
This commit is contained in:
@@ -67,6 +67,22 @@
|
||||
map-options
|
||||
/>
|
||||
</q-card-section>
|
||||
<q-card-section class="row">
|
||||
<div class="col-2">Script Arguments:</div>
|
||||
<q-select
|
||||
label="(press Enter after typing each argument)"
|
||||
class="col-10"
|
||||
filled
|
||||
v-model="script.args"
|
||||
use-input
|
||||
use-chips
|
||||
multiple
|
||||
dense
|
||||
hide-dropdown-icon
|
||||
input-debounce="0"
|
||||
new-value-mode="add"
|
||||
/>
|
||||
</q-card-section>
|
||||
<q-card-section class="row">
|
||||
<div class="col-4">Default Timeout (seconds)</div>
|
||||
<q-input
|
||||
@@ -104,6 +120,7 @@ export default {
|
||||
shell: "powershell",
|
||||
category: null,
|
||||
default_timeout: 90,
|
||||
args: [],
|
||||
},
|
||||
shellOptions: [
|
||||
{ label: "Powershell", value: "powershell" },
|
||||
@@ -133,6 +150,7 @@ export default {
|
||||
formData.append("shell", this.script.shell);
|
||||
formData.append("description", this.script.description);
|
||||
formData.append("default_timeout", this.script.default_timeout);
|
||||
formData.append("args", this.script.args);
|
||||
|
||||
this.$axios
|
||||
.post("/scripts/scripts/", formData)
|
||||
@@ -144,6 +162,7 @@ export default {
|
||||
})
|
||||
.catch(e => {
|
||||
this.$q.loading.hide();
|
||||
console.log({ e });
|
||||
this.notifyError(e.response.data.non_field_errors, 4000);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user