mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.7 KiB
100 lines
2.7 KiB
4 years ago
|
<template>
|
||
|
<div>
|
||
|
<v-toolbar height="32" class="elevation-0">
|
||
3 years ago
|
<v-spacer />
|
||
3 years ago
|
<v-btn color="primary" small outlined @click="loadHook">
|
||
|
<v-icon small class="mr-1" color="primary"> mdi-reload </v-icon>
|
||
3 years ago
|
<!-- Reload -->
|
||
|
{{ $t('general.reload') }}
|
||
4 years ago
|
</v-btn>
|
||
3 years ago
|
<v-btn color="primary" small outlined @click="save">
|
||
|
<v-icon small class="mr-1" color="primary"> save </v-icon>
|
||
3 years ago
|
<!-- Save -->
|
||
|
{{ $t('general.save') }}
|
||
4 years ago
|
</v-btn>
|
||
|
</v-toolbar>
|
||
|
<v-container fluid>
|
||
|
<v-row>
|
||
|
<v-col cols="6" offset="3">
|
||
|
<v-card class="d-100">
|
||
|
<v-container fluid>
|
||
3 years ago
|
<v-card-title class="justify-center"> Auth Hook </v-card-title>
|
||
4 years ago
|
<v-row>
|
||
|
<v-col cols="12">
|
||
3 years ago
|
<v-text-field v-model="data.url" dense label="URL" type="url" class="caption" />
|
||
4 years ago
|
</v-col>
|
||
|
</v-row>
|
||
|
</v-container>
|
||
|
</v-card>
|
||
|
</v-col>
|
||
|
</v-row>
|
||
|
</v-container>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
3 years ago
|
name: 'AuthHooks',
|
||
|
props: {
|
||
3 years ago
|
nodes: Object,
|
||
4 years ago
|
},
|
||
|
data: () => ({
|
||
3 years ago
|
data: {},
|
||
4 years ago
|
}),
|
||
3 years ago
|
async created() {
|
||
3 years ago
|
await this.loadHook();
|
||
4 years ago
|
},
|
||
|
methods: {
|
||
3 years ago
|
async loadHook() {
|
||
3 years ago
|
this.data = await this.$store.dispatch('sqlMgr/ActSqlOp', [
|
||
|
{
|
||
|
dbAlias: this.nodes.dbAlias,
|
||
|
},
|
||
|
'xcAuthHookGet',
|
||
|
]);
|
||
4 years ago
|
},
|
||
3 years ago
|
async save() {
|
||
4 years ago
|
try {
|
||
3 years ago
|
await this.$store.dispatch('sqlMgr/ActSqlOp', [
|
||
|
{
|
||
|
dbAlias: this.nodes.dbAlias,
|
||
|
},
|
||
|
'xcAuthHookSet',
|
||
|
this.data,
|
||
|
]);
|
||
|
this.$toast.success('Auth hook details updated successfully').goAway(3000);
|
||
4 years ago
|
} catch (e) {
|
||
3 years ago
|
console.log(e);
|
||
|
this.$toast.error('Some error occurred').goAway(3000);
|
||
4 years ago
|
}
|
||
3 years ago
|
},
|
||
|
},
|
||
|
};
|
||
4 years ago
|
</script>
|
||
|
|
||
3 years ago
|
<style scoped></style>
|
||
4 years ago
|
<!--
|
||
|
/**
|
||
|
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
|
||
|
*
|
||
|
* @author Naveen MR <oof1lab@gmail.com>
|
||
|
* @author Pranav C Balan <pranavxc@gmail.com>
|
||
|
*
|
||
|
* @license GNU AGPL version 3 or any later version
|
||
|
*
|
||
|
* This program is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU Affero General Public License as
|
||
|
* published by the Free Software Foundation, either version 3 of the
|
||
|
* License, or (at your option) any later version.
|
||
|
*
|
||
|
* This program is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU Affero General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Affero General Public License
|
||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
*
|
||
|
*/
|
||
|
-->
|