Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
brian-dashboard-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
brian
brian-dashboard-manager
Commits
5860a698
Commit
5860a698
authored
3 years ago
by
Bjarke Madsen
Browse files
Options
Downloads
Patches
Plain Diff
Add multicast panels
parent
adedc1c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
brian_dashboard_manager/templating/helpers.py
+14
-2
14 additions, 2 deletions
brian_dashboard_manager/templating/helpers.py
brian_dashboard_manager/templating/nren_access.py
+2
-0
2 additions, 0 deletions
brian_dashboard_manager/templating/nren_access.py
with
16 additions
and
2 deletions
brian_dashboard_manager/templating/helpers.py
+
14
−
2
View file @
5860a698
...
...
@@ -303,9 +303,19 @@ def get_panel_fields(panel, panel_type, datasource):
egress
=
[
'
Egress Traffic
'
,
'
Egress 95th Percentile
'
]
is_v6
=
panel_type
==
'
IPv6
'
is_multicast
=
panel_type
==
'
multicast
'
is_error
=
panel_type
==
'
errors
'
in_field
=
'
ingressv6
'
if
is_v6
else
'
ingress
'
out_field
=
'
egressv6
'
if
is_v6
else
'
egress
'
in_field
=
'
ingressv6
'
if
is_v6
else
\
'
ingressMulticast
'
if
is_multicast
else
'
ingress
'
out_field
=
'
egressv6
'
if
is_v6
else
\
'
egressMulticast
'
if
is_multicast
else
'
egress
'
if
is_multicast
:
def
add_multicast
(
label
):
return
'
Multicast
'
+
label
ingress
=
list
(
map
(
add_multicast
,
ingress
))
egress
=
list
(
map
(
add_multicast
,
egress
))
fields
=
[
*
product
(
ingress
,
[
in_field
]),
*
product
(
egress
,
[
out_field
])]
...
...
@@ -333,6 +343,8 @@ def get_dashboard_data(data, datasource, tag, errors=False):
if
panel
.
get
(
'
has_v6
'
,
False
):
result
.
append
(
get_panel_fields
(
{
**
panel
,
**
next
(
gridPos
)},
'
IPv6
'
,
datasource
))
result
.
append
(
get_panel_fields
(
{
**
panel
,
**
next
(
gridPos
)},
'
multicast
'
,
datasource
))
if
errors
:
result
.
append
(
get_panel_fields
(
{
**
panel
,
**
next
(
gridPos
)},
'
errors
'
,
datasource
))
...
...
This diff is collapsed.
Click to expand it.
brian_dashboard_manager/templating/nren_access.py
+
2
−
0
View file @
5860a698
...
...
@@ -73,6 +73,8 @@ def get_panel_definitions(panels, datasource, errors=False):
if
panel
.
get
(
'
has_v6
'
,
False
):
result
.
append
(
get_panel_fields
(
{
**
panel
,
**
next
(
gridPos
)},
'
IPv6
'
,
datasource
))
result
.
append
(
get_panel_fields
(
{
**
panel
,
**
next
(
gridPos
)},
'
multicast
'
,
datasource
))
if
errors
:
result
.
append
(
get_panel_fields
(
{
**
panel
,
**
next
(
gridPos
)},
'
errors
'
,
datasource
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment