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
7e6a9ed3
Commit
7e6a9ed3
authored
9 months ago
by
Sam Roberts
Browse files
Options
Downloads
Patches
Plain Diff
eap stuff still not quite working right
parent
a387c1f8
No related branches found
No related tags found
1 merge request
!13
Feature/pol1 430 EAP NRENs
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
brian_dashboard_manager/grafana/provision.py
+13
-3
13 additions, 3 deletions
brian_dashboard_manager/grafana/provision.py
brian_dashboard_manager/templating/helpers.py
+6
-2
6 additions, 2 deletions
brian_dashboard_manager/templating/helpers.py
with
19 additions
and
5 deletions
brian_dashboard_manager/grafana/provision.py
+
13
−
3
View file @
7e6a9ed3
...
...
@@ -57,6 +57,11 @@ DASHBOARDS = {
'
folder_name
'
:
'
NREN Access
'
,
'
interfaces
'
:
[]
},
'
EAP
'
:
{
'
tag
'
:
[
'
eap
'
],
'
folder_name
'
:
'
EAP
'
,
'
interfaces
'
:
[]
},
'
RE_PEER
'
:
{
'
tag
'
:
'
RE_PEER
'
,
'
folder_name
'
:
'
RE Peer
'
,
...
...
@@ -228,16 +233,21 @@ def provision_folder(token_request, folder_name, dash, services,
is_nren_legacy
=
folder_name
==
"
NREN Access LEGACY
"
is_nren
=
folder_name
==
"
NREN Access
"
is_eap
=
folder_name
==
"
EAP
"
# POL1-430
is_re_peer
=
folder_name
==
"
RE Peer
"
is_service
=
'
service_type
'
in
dash
has_aggregate_panels
=
is_nren
or
is_nren_legacy
or
is_re_peer
or
is_service
has_aggregate_panels
=
is_nren
or
is_nren_legacy
or
is_eap
or
is_re_peer
or
is_service
if
is_nren_legacy
:
data
=
get_nren_interface_data_old
(
interfaces
)
dash_data
=
get_nren_dashboard_data
(
data
,
ds_name
,
tag
)
elif
is_nren
:
data
=
get_nren_interface_data
(
services
,
interfaces
,
excluded_dashboards
)
data
=
{
k
:
v
for
k
,
v
in
get_nren_interface_data
(
services
,
interfaces
,
excluded_dashboards
).
items
()
if
'
EAP
'
not
in
v
[
'
TAGS
'
]}
dash_data
=
get_nren_dashboard_data
(
data
,
ds_name
,
tag
)
elif
is_eap
:
data
=
{
k
:
v
for
k
,
v
in
get_nren_interface_data
(
services
,
interfaces
,
excluded_dashboards
).
items
()
if
'
EAP
'
in
v
[
'
TAGS
'
]}
dash_data
=
get_nren_dashboard_data
(
data
,
ds_name
,
tag
)
elif
is_re_peer
:
data
=
get_re_peer_interface_data
(
interfaces
)
...
...
This diff is collapsed.
Click to expand it.
brian_dashboard_manager/templating/helpers.py
+
6
−
2
View file @
7e6a9ed3
...
...
@@ -251,7 +251,8 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards):
dashboard
=
result
.
setdefault
(
customer
,
{
'
AGGREGATES
'
:
[],
'
SERVICES
'
:
[],
'
PHYSICAL
'
:
[]
'
PHYSICAL
'
:
[],
'
TAGS
'
:
set
()
})
for
service
in
services
:
...
...
@@ -331,7 +332,8 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards):
dashboard
=
result
.
get
(
dashboard_name
,
{
'
AGGREGATES
'
:
[],
'
SERVICES
'
:
[],
'
PHYSICAL
'
:
[]
'
PHYSICAL
'
:
[],
'
TAGS
'
:
set
()
})
_covered_by_service
=
_check_in_aggregate
(
router
,
interface_name
)
...
...
@@ -357,6 +359,8 @@ def get_nren_interface_data(services, interfaces, excluded_dashboards):
'
hostname
'
:
host
,
'
interface
'
:
interface_name
})
for
tag
in
interface
.
get
(
'
dashboards
'
,
[]):
dashboard
[
'
TAGS
'
].
add
(
tag
)
result
[
dashboard_name
]
=
dashboard
...
...
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