Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
TFS
controller
Commits
64c83de1
Commit
64c83de1
authored
1 year ago
by
Pablo Armingol
Browse files
Options
Downloads
Patches
Plain Diff
code cleanup
parent
ccbf8139
No related branches found
No related tags found
2 merge requests
!235
Release TeraFlowSDN 3.0
,
!161
Resolve "(TID) Visual inventory management"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/webui/service/device/routes.py
+1
-3
1 addition, 3 deletions
src/webui/service/device/routes.py
src/webui/service/templates/device/inventory.html
+10
-12
10 additions, 12 deletions
src/webui/service/templates/device/inventory.html
with
11 additions
and
15 deletions
src/webui/service/device/routes.py
+
1
−
3
View file @
64c83de1
...
@@ -158,9 +158,7 @@ def inventory(device_uuid: str):
...
@@ -158,9 +158,7 @@ def inventory(device_uuid: str):
flash
(
'
Device({:s}) not found
'
.
format
(
str
(
device_uuid
)),
'
danger
'
)
flash
(
'
Device({:s}) not found
'
.
format
(
str
(
device_uuid
)),
'
danger
'
)
device_obj
=
Device
()
device_obj
=
Device
()
context_client
.
close
()
context_client
.
close
()
return
render_template
(
'
device/inventory.html
'
,
device
=
device_obj
)
return
render_template
(
'
device/inventory.html
'
,
device
=
device_obj
,
dde
=
DeviceDriverEnum
,
dose
=
DeviceOperationalStatusEnum
)
@device.get
(
'
<path:device_uuid>/delete
'
)
@device.get
(
'
<path:device_uuid>/delete
'
)
def
delete
(
device_uuid
):
def
delete
(
device_uuid
):
...
...
This diff is collapsed.
Click to expand it.
src/webui/service/templates/device/inventory.html
+
10
−
12
View file @
64c83de1
...
@@ -78,21 +78,21 @@
...
@@ -78,21 +78,21 @@
<div
class=
"row mb-3"
>
<div
class=
"row mb-3"
>
<div
class=
"col-sm-3"
>
<div
class=
"col-sm-3"
>
<ul
id=
"myUL"
>
<ul
id=
"myUL"
>
<li><span
class=
"caret"
></span>
>
Components
</span>
<li><span
class=
"caret"
></span>
Components
</span>
<ul
class=
"nested"
>
<ul
class=
"nested"
>
{% for item in (device.components|sort(true, attribute='name'))%}
{% for item in (device.components|sort(true, attribute='name'))
%}
{%if item.parent |length
<
1
or
item.type=
='CHASSIS'
%}
{%
if item.parent |length
<
1
or
item.type=
='CHASSIS'
%}
<
li
><span
class=
"caret"
></span>
{{item.name}}
</span>
<
li
><span
class=
"caret"
></span>
{{item.name}}
</span>
<ul
class=
"nested"
>
<ul
class=
"nested"
>
{%for comp in (device.components|sort(true, attribute='name'))%}
{%
for comp in (device.components|sort(true, attribute='name'))
%}
{%if item.name == comp.parent%}
{%
if item.name == comp.parent
%}
<li>
{{comp.name}}
</li>
<li>
{{comp.name}}
</li>
{%endif%}
{%
endif
%}
{%endfor%}
{%
endfor
%}
</ul>
</ul>
</li>
</li>
{%endif%}
{%
endif
%}
{%endfor%}
{%
endfor
%}
</ul>
</ul>
</li>
</li>
</ul>
</ul>
...
@@ -148,6 +148,4 @@
...
@@ -148,6 +148,4 @@
{% endif %}
{% endif %}
</div>
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
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