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
3ba78b69
Commit
3ba78b69
authored
Aug 26, 2020
by
janis.streib
🦉
Browse files
ADD: navbar support for js-only-mods
parent
2407f5ab
Pipeline
#106651
passed with stages
in 7 minutes and 47 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
frontend/src/components/Navbar.vue
View file @
3ba78b69
...
@@ -13,9 +13,12 @@
...
@@ -13,9 +13,12 @@
<!-- Collect the nav links, forms, and other content for toggling -->
<!-- Collect the nav links, forms, and other content for toggling -->
<b-collapse
is-nav
id=
"navbarNavDropdown"
ref=
"navdropdown"
>
<b-collapse
is-nav
id=
"navbarNavDropdown"
ref=
"navdropdown"
>
<b-navbar-nav>
<b-navbar-nav>
<b-nav-item
v-if=
"$sysinfo_mods
_by_name[
'dnsvs'
]
"
to=
"/dnsvs/"
<b-nav-item
v-if=
"$sysinfo_
js_
mods
.includes(
'dnsvs'
)
"
to=
"/dnsvs/"
:active=
"$route.path.startsWith('/dnsvs/')"
>
DNSVS
:active=
"$route.path.startsWith('/dnsvs/')"
>
DNSVS
</b-nav-item>
</b-nav-item>
<b-nav-item
v-if=
"$sysinfo_js_mods.includes('macauth')"
to=
"/macauth/"
:active=
"$route.path.startsWith('/macauth/')"
>
MACAuth
</b-nav-item>
<b-nav-item
v-if=
"$sysinfo_mods_by_name['dhcp_leases']"
to=
"/dhcp-leases/"
<b-nav-item
v-if=
"$sysinfo_mods_by_name['dhcp_leases']"
to=
"/dhcp-leases/"
:active=
"$route.path.startsWith('/dhcp-leases/')"
>
DHCP-Leases
:active=
"$route.path.startsWith('/dhcp-leases/')"
>
DHCP-Leases
</b-nav-item>
</b-nav-item>
...
...
frontend/src/main.js
View file @
3ba78b69
...
@@ -289,6 +289,7 @@ SystemInfoService.getAll().then((sysinfo) => {
...
@@ -289,6 +289,7 @@ SystemInfoService.getAll().then((sysinfo) => {
mods_by_name
[
sysinfo
.
data
.
mods
[
i
].
name
]
=
sysinfo
.
data
.
mods
[
i
]
mods_by_name
[
sysinfo
.
data
.
mods
[
i
].
name
]
=
sysinfo
.
data
.
mods
[
i
]
}
}
Vue
.
prototype
.
$sysinfo_mods_by_name
=
mods_by_name
Vue
.
prototype
.
$sysinfo_mods_by_name
=
mods_by_name
Vue
.
prototype
.
$sysinfo_js_mods
=
sysinfo
.
data
.
js_mods
let
v
=
new
Vue
({
let
v
=
new
Vue
({
router
,
router
,
store
,
store
,
...
...
Write
Preview
Markdown
is supported
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