Commit b425171e authored by janis.streib's avatar janis.streib 🦉
Browse files

UPD: macfinder: mnarginaly better error hendling

parent 136069c2
Pipeline #130085 passed with stages
in 5 minutes and 47 seconds
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="macfinder"> <div class="macfinder">
<h1>Macfinder</h1> <h1>Macfinder</h1>
<b-form @submit="createJob"> <b-form @submit="createJob">
<b-form-group label="Broadcastdomain"> <b-form-group invalid-feedback="Ungültige BCD" :state="search_bcd !== null" label="Broadcastdomain">
<vue-bootstrap-typeahead <vue-bootstrap-typeahead
:data="bcds" :data="bcds"
v-model="bcd_query" v-model="bcd_query"
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
></vue-bootstrap-typeahead> ></vue-bootstrap-typeahead>
</b-form-group> </b-form-group>
<b-form-group label="MAC-Adresse" description="Beliebiges Format möglich"> <b-form-group label="MAC-Adresse" description="Beliebiges Format möglich">
<b-input v-model="search_mac" placeholder="MAC-Adresse"></b-input> <b-input required v-model="search_mac" placeholder="MAC-Adresse"></b-input>
</b-form-group> </b-form-group>
<b-button type="submit" class="float-right" variant="outline-success"> <b-button type="submit" class="float-right" variant="outline-success">
<font-awesome-icon icon="search"></font-awesome-icon> <font-awesome-icon icon="search"></font-awesome-icon>
...@@ -129,6 +129,9 @@ export default { ...@@ -129,6 +129,9 @@ export default {
}, },
async createJob(ev) { async createJob(ev) {
ev.preventDefault() ev.preventDefault()
if (!this.search_bcd) {
return false
}
this.search_mac = this.bcd_query = '' this.search_mac = this.bcd_query = ''
await MacfinderService.createJob(this.search_bcd.name, this.search_mac) await MacfinderService.createJob(this.search_bcd.name, this.search_mac)
await this.refresh() await this.refresh()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment