diff --git a/www/webapp/src/components/Field/RRSetType.vue b/www/webapp/src/components/Field/RRSetType.vue index ed63b1a35..bee39a1e7 100644 --- a/www/webapp/src/components/Field/RRSetType.vue +++ b/www/webapp/src/components/Field/RRSetType.vue @@ -3,7 +3,8 @@ :label="label" :disabled="disabled || readonly" :error-messages="errorMessages" - hint="You can also enter other types. For a full list, check the documentation." + :hint="hint" + :placeholder="placeholder" :persistent-hint="!readonly" :value="value" :items="types" @@ -33,6 +34,14 @@ export default { type: Boolean, required: false, }, + hint: { + type: String, + default: 'You can also enter other types. For a full list, check the documentation.', + }, + placeholder: { + type: String, + default: undefined, + }, required: { type: Boolean, default: false, @@ -63,6 +72,7 @@ export default { methods: { input(event) { this.$emit('input', event); + this.$emit('dirty'); }, }, }; diff --git a/www/webapp/src/router/index.js b/www/webapp/src/router/index.js index 123fb6429..0ef2cf03a 100644 --- a/www/webapp/src/router/index.js +++ b/www/webapp/src/router/index.js @@ -125,6 +125,12 @@ const routes = [ component: () => import('@/views/CrudListToken.vue'), meta: {guest: false}, }, + { + path: '/tokens/:tokenId/policies', + name: 'tokenPolicies', + component: () => import('@/views/CrudListTokenPolicy.vue'), + meta: {guest: false}, + }, { path: '/domains', name: 'domains', diff --git a/www/webapp/src/views/CrudListToken.vue b/www/webapp/src/views/CrudListToken.vue index ca50b712d..cc3536ec1 100644 --- a/www/webapp/src/views/CrudListToken.vue +++ b/www/webapp/src/views/CrudListToken.vue @@ -6,10 +6,23 @@ import GenericCheckbox from "@/components/Field/GenericCheckbox.vue"; import RecordList from "@/components/Field/RecordList.vue"; import GenericSwitchbox from "@/components/Field/GenericSwitchbox.vue"; import TimeAgo from "@/components/Field/TimeAgo.vue"; +import {mdiShieldLock} from "@mdi/js"; export default { name: 'CrudListToken', extends: CrudList, + computed: { + actions() { + return { + policies: { + go: (item) => this.$router.push({ name: 'tokenPolicies', params: { tokenId: item.id }, query: item.name ? { name: item.name } : {} }), + if: this.showAdvanced, + icon: mdiShieldLock, + tooltip: 'Policies', + }, + }; + }, + }, data() { return { creatable: true, diff --git a/www/webapp/src/views/CrudListTokenPolicy.vue b/www/webapp/src/views/CrudListTokenPolicy.vue new file mode 100644 index 000000000..e7578100d --- /dev/null +++ b/www/webapp/src/views/CrudListTokenPolicy.vue @@ -0,0 +1,106 @@ +