Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
scc-net
netvs
netvs-core
Commits
f42163d1
Commit
f42163d1
authored
Jan 28, 2021
by
janis.streib
🦉
Browse files
ADD: legacy blaming badge (closes
#214
)
parent
8022e002
Pipeline
#130348
passed with stages
in 4 minutes and 28 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
frontend/src/views/dnsvs/BCDRecords.vue
View file @
f42163d1
...
...
@@ -3,7 +3,11 @@
<Loading
:data=
"[range]"
>
<template
v-if=
"range"
>
<!-- TODO: Fix Loading.. this shouldn't be necessary -->
<h1
class=
"my-4"
>
{{
range
.
name
}}
<small
class=
"text-muted"
>
Broadcastdomain
</small>
{{
range
.
name
}}
<small
class=
"text-muted"
>
Broadcastdomain
<b-badge
variant=
"success"
title=
"Der Broadcastdomain sind sowohl IPv4- alsauch IPv6-Subnetze zugeteilt."
pill
v-if=
"bcd_is_dual_stack"
>
Dualstack
</b-badge>
</small>
</h1>
<div
style=
"margin-bottom: 1.5rem"
>
<b-button
variant=
"outline-primary"
@
click=
"editBCD"
>
...
...
@@ -315,6 +319,9 @@
</b-td>
<b-td>
<RRDataView
:item=
"item"
></RRDataView>
<b-badge
href=
"#"
@
click=
"createItem('AAAA', '', item.fqdn)"
v-if=
"bcd_is_dual_stack && record_type == 'A' && !fqdnHasAAAA(item.fqdn)"
variant=
"danger"
>
Kein
AAAA-Record!
</b-badge>
</b-td>
<b-td>
<
template
v-if=
"item.ttl != null"
>
{{
item
.
ttl
}}
s
</
template
>
...
...
@@ -451,6 +458,8 @@ export default {
parent_ous
:
null
,
reserved_addrs
:
null
,
records
:
null
,
records_by_fqdn
:
{},
bcd_is_dual_stack
:
false
,
record_types
:
null
,
record_types_by_name
:
null
,
collapse_states
:
[
true
],
...
...
@@ -515,6 +524,14 @@ export default {
}
},
methods
:
{
fqdnHasAAAA
(
fqdn
)
{
for
(
const
r
of
this
.
records_by_fqdn
[
fqdn
])
{
if
(
r
.
type
===
'
AAAA
'
)
{
return
true
}
}
return
false
},
bulkDelete
(
rec_type
)
{
for
(
const
b
of
this
.
records
[
rec_type
])
{
if
(
this
.
records_checked
[
rec_type
+
'
_
'
+
b
.
fqdn
+
'
_
'
+
b
.
data
])
{
...
...
@@ -638,13 +655,14 @@ export default {
this
.
object_title
=
'
FQDN
'
+
item
.
value
this
.
$root
.
$emit
(
'
bv::show::modal
'
,
'
edit_fqdn
'
)
},
createItem
:
function
(
record_type
,
data
)
{
createItem
:
function
(
record_type
,
data
,
fqdn
)
{
this
.
db_editor_function
=
'
create
'
this
.
db_editor_old_data
=
{}
const
recobj
=
this
.
record_types_by_name
[
record_type
]
||
null
this
.
db_editor_presets
=
{
type
:
record_type
,
data
:
data
,
fqdn
:
fqdn
,
target_is_singleton
:
recobj
===
null
?
false
:
recobj
.
target_is_singleton_dflt
,
target_is_reverse_unique
:
recobj
===
null
?
false
:
recobj
.
target_is_reverse_unique_dflt
}
...
...
@@ -694,7 +712,16 @@ export default {
this
.
parent_oe2mgr
=
apiutil
.
dict_of_lists_by_value_of_array
(
rangeResponse
.
data
[
14
],
'
ou_short_name
'
)
this
.
parent_oe_mgr
=
apiutil
.
dict_by_value_of_array
(
rangeResponse
.
data
[
15
],
'
login_name
'
)
this
.
vlans
=
rangeResponse
.
data
[
16
]
let
had_v4
=
false
let
had_v6
=
false
for
(
const
sub
of
this
.
subnets
)
{
if
(
sub
.
type
===
'
4
'
)
{
had_v4
=
true
}
else
{
had_v6
=
true
}
}
this
.
bcd_is_dual_stack
=
had_v4
&&
had_v6
const
recordQuery
=
await
RangeService
.
getRecords
(
this
.
$store
.
state
.
netdb_axios_config
,
this
.
$route
.
params
.
name
)
this
.
fqdns
=
apiutil
.
dict_by_value_of_array
(
recordQuery
.
data
[
1
],
'
value
'
)
this
.
record_types_by_name
=
apiutil
.
dict_by_value_of_array
(
recordQuery
.
data
[
3
],
'
name
'
)
...
...
@@ -718,6 +745,7 @@ export default {
type
:
selections
}
this
.
records
=
apiutil
.
dict_of_lists_by_value_of_array
(
recordQuery
.
data
[
0
],
'
type
'
)
this
.
records_by_fqdn
=
apiutil
.
dict_of_lists_by_value_of_array
(
recordQuery
.
data
[
0
],
'
fqdn
'
)
for
(
const
t
of
Object
.
keys
(
this
.
records
))
{
this
.
$root
.
$set
(
this
.
sort_by
,
t
,
'
data
'
)
this
.
$root
.
$set
(
this
.
sort_dir
,
t
,
'
ascending
'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment