Display Bytes in Memory,

- SearchMultipleInput novy subor
This commit is contained in:
2020-03-26 13:54:58 +01:00
parent 9e9bc5841e
commit c062fb38bb
3 changed files with 61 additions and 4 deletions

View File

@@ -16,6 +16,7 @@ export default {
xlabel: 'Dátum',
labels: ['Dátum','Celkom','Pouzita','Volna'],
ylabel: 'Bytes',
labelsKMG2: true,
fillGraph: true
},
series: [],

View File

@@ -0,0 +1,57 @@
<template>
<div>
<div class="form-group">
<label for="ssel1">Typ:</label>
<select v-model="type" class="form-control" id="ssel1">
<option>Užívateľ</option>
<option>Meno PC</option>
<option>Ip adresa</option>
</select>
</div>
<vue-suggestion :items="items"
v-model="item"
:setLabel="setLabel"
:itemTemplate="itemTemplate"
@changed="inputChange"
@selected="itemSelected">
</vue-suggestion>
</div>
</template>
<script>
import itemTemplate from './item-template.vue';
export default {
data () {
return {
item: {},
type: null,
items: [
],
itemTemplate,
}
},
methods: {
itemSelected (item) {
this.item = item;
},
setLabel (item) {
return item.computer;
},
inputChange (text) {
axios.get("search/multicomplete", {
params: {
type: this.type,
term: text,
}
})
.then((response) => {
this.items = response.data;
})
.catch(function (error) {
console.log(error);
});
},
},
};
</script>