Skip to content
Snippets Groups Projects
Commit 3460300a authored by Janis Streib's avatar Janis Streib :owl:
Browse files

ADD: create macauth clients

parent a8f0e265
No related branches found
No related tags found
No related merge requests found
Pipeline #273633 passed with warnings
......@@ -51,7 +51,7 @@
<template v-slot:head(buttons)>
<b-button block variant="outline-success"
:id="'button-create-client-' + bcd.name"
@click="createClient">
@click="createClient(bcd)">
<font-awesome-icon :icon="['fas', 'plus']"/>
</b-button>
<b-tooltip :target="'button-create-client-' + bcd.name" triggers="hover"
......@@ -96,6 +96,10 @@
</b-collapse>
</b-card>
</template>
<DBEditor object_fq_name="macauth.client" :object_function="db_editor_object_function"
modal_id="dbeditor_macauth" :old_data="db_editor_old_data" :presets="db_editor_presets"
:non_optionals_order="['bcd_name', 'mac_addr', 'description']"
></DBEditor>
</Loading>
</div>
</template>
......@@ -104,12 +108,16 @@
import Loading from "../../components/Loading"
import MACAuth from "@/api-services/macauth.service"
import ApiUtil from '@/util/apiutil'
import DBEditor from "@/components/DBEditor";
export default {
name: 'macauth',
components: {Loading},
components: {DBEditor, Loading},
data() {
return {
db_editor_object_function: 'create',
db_editor_old_data: {},
db_editor_presets: {},
bcds: null,
clients_by_bcd: null,
macauth_fields: [
......@@ -133,12 +141,12 @@ export default {
},
{
key: 'last_login_node',
label: 'Letzer Login Node',
label: 'Letzer Login-Node',
sortable: true
},
{
key: 'last_login_port',
label: 'Letzer Login Port',
label: 'Letzer Login-Port',
sortable: true
},
'buttons'
......@@ -177,8 +185,11 @@ export default {
}
return new Date(Date.parse(value)).toLocaleString('de-DE')
},
createClient() {
alert('TODO: DBEditor create new client')
createClient(bcd) {
this.db_editor_function = 'create'
this.db_editor_old_data = {}
this.db_editor_presets = {'bcd_name': bcd.name}
this.$root.$emit('bv::show::modal', 'dbeditor_macauth')
},
editClient() {
alert('TODO: DBEditor edit client')
......@@ -198,4 +209,4 @@ export default {
.fullwidth .btn {
flex: 1
}
</style>
\ No newline at end of file
</style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment