Commit b425171e authored by Janis Streib's avatar Janis Streib 🦉

UPD: macfinder: mnarginaly better error hendling

parent 136069c2
Pipeline #130085 passed with stages
in 5 minutes and 47 seconds
......@@ -2,7 +2,7 @@
<div class="macfinder">
<h1>Macfinder</h1>
<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
:data="bcds"
v-model="bcd_query"
......@@ -12,7 +12,7 @@
></vue-bootstrap-typeahead>
</b-form-group>
<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-button type="submit" class="float-right" variant="outline-success">
<font-awesome-icon icon="search"></font-awesome-icon>
......@@ -129,6 +129,9 @@ export default {
},
async createJob(ev) {
ev.preventDefault()
if (!this.search_bcd) {
return false
}
this.search_mac = this.bcd_query = ''
await MacfinderService.createJob(this.search_bcd.name, this.search_mac)
await this.refresh()
......
Markdown is supported
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