Skip to content

Commit

Permalink
feat(webapp): fully support NS type, offer it in RRset type dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
peterthomassen committed Dec 7, 2020
1 parent 61d41e9 commit 52f5b7b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions webapp/src/components/Field/RRSetType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default {
'TXT',
'SPF',
'CAA',
'NS',
'TLSA',
'OPENPGPKEY',
'PTR',
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/Field/Record/MX.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { helpers, integer, between } from 'vuelidate/lib/validators';
import Record from '../Record.vue';
const hostname = helpers.regex('hostname', /^(([a-zA-Z0-9-]+\.?)+)|\.$/);
const hostname = helpers.regex('hostname', /^((([a-zA-Z0-9-]+\.?)+)|\.)$/);
const trailingDot = helpers.regex('trailingDot', /[.]$/);
const MAX16 = 65535;
Expand Down
13 changes: 12 additions & 1 deletion webapp/src/components/Field/Record/NS.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
<script>
import { helpers } from 'vuelidate/lib/validators';
import Record from '../Record.vue';
const hostname = helpers.regex('hostname', /^((([a-zA-Z0-9-]+\.?)+)|\.)$/);
const trailingDot = helpers.regex('trailingDot', /[.]$/);
export default {
name: 'RecordNS',
extends: Record,
data: () => ({
fields: [
{ label: 'Hostname', validations: {} },
{
label: 'Hostname',
validations: { hostname, trailingDot },
},
],
errors: {
hostname: 'Please enter a valid hostname.',
trailingDot: 'Hostname must end with a dot.',
},
}),
};
</script>

0 comments on commit 52f5b7b

Please sign in to comment.