summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorfmertz <fireboxled@gmail.com>2020-06-28 21:21:27 +0000
committerfmertz <fireboxled@gmail.com>2020-07-05 14:57:52 +0000
commit440d0fb1115bbfb428132ef91804ae213ffca30f (patch)
treeb26e5139c517ad91c34a9e290af6469847178733 /data
parentf3e0a409ee01e1b3ffa0c9a267434a7725f61231 (diff)
downloadvyos-1x-440d0fb1115bbfb428132ef91804ae213ffca30f.tar.gz
vyos-1x-440d0fb1115bbfb428132ef91804ae213ffca30f.zip
system display: T2564: py code cleanup
* src/conf_mode/system-display.py cleanup use of dictionary * data/templates/system-display/lcdproc.conf.tmpl cleanup, removed extra DateTime
Diffstat (limited to 'data')
-rw-r--r--data/templates/system-display/lcdproc.conf.tmpl12
1 files changed, 4 insertions, 8 deletions
diff --git a/data/templates/system-display/lcdproc.conf.tmpl b/data/templates/system-display/lcdproc.conf.tmpl
index 2fe491e63..92aee8efe 100644
--- a/data/templates/system-display/lcdproc.conf.tmpl
+++ b/data/templates/system-display/lcdproc.conf.tmpl
@@ -37,7 +37,6 @@ ReportToSyslog=true
DisplayName="{%- if show['title'] %}{{ show['title'] }}{%- else %}VyOS{%- endif %}"
{%- if show['host'] %}
-{#%- for s in show['host'] %#}
[CPU]
# Show screen
@@ -77,7 +76,6 @@ Active={%- if 'proc' in show['host'] %}true{%- else %}false{%- endif %}
[Disk]
# Show screen
Active={%- if 'disk' in show['host'] %}true{%- else %}false{%- endif %}
-{#%- endfor %#}
{%- else %} {# if show['host'] #}
{# Turn off sections that default active #}
@@ -90,8 +88,6 @@ Active=false
[Load]
Active=false
-[TimeDate]
-Active=false
{%- endif %} {# if show['host'] #}
[TimeDate]
@@ -118,10 +114,10 @@ TimeFormat="%H:%M"
Active={%- if show['network']['interface'] %}true{%- else %}false{%- endif %}
{%- for i in show['network']['interface'] %}
# Show stats for Interface {{ i }}
-Interface0={{ i }}
+Interface{{ loop.index0 }}={{ i }}
{%- if show['network']['interface'][i]['alias'] %}
# Interface alias name to display [default: <interface name>]
-Alias0={{ show['network']['interface'][i]['alias'] }}
+Alias{{ loop.index0 }}={{ show['network']['interface'][i]['alias'] }}
{%- endif %}
{%- endfor %}
@@ -139,7 +135,7 @@ unit=bit
#transfer=TRUE
{%- endif %} {# if show['network'] #}
-{%- else %} {# if show #}
+{%- else %}{# if show #}
{# Turn off sections that default active #}
[CPU]
@@ -153,7 +149,7 @@ Active=false
[TimeDate]
Active=false
-{%- endif %}
+{%- endif %}{# if show #}
[Battery]
# Show screen