summaryrefslogtreecommitdiff
path: root/interface-definitions/system-display.xml.in
blob: fbd897996222dda4357f3e9df4542a675244416f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?xml version="1.0"?>
<interfaceDefinition>
  <!--
    system display model (sdec|ezio|test)
    system display show host (cpu|cpu-all|cpu-hist|disk|load-hist|memory|proc|uptime)
                        network interface <intName> alias <alias>
                                units (bps|Bps|pps)
                        clock (big|mini|date-time)
                        title <name>

    system display time <s>
    system display hello <string>
    system display bye <string>
    system display disabled
    -->
  <node name="system">
    <children>
      <node name="display" owner="${vyos_conf_scripts_dir}/system-display.py">
        <properties>
          <help>System display LCD/VFD/LED</help>
          <priority>400</priority>
        </properties>
        <children>
          <!-- system display model (sdec|ezio) -->
          <leafNode name="model">
            <properties>
              <help>Model of the display attached to this system [REQUIRED]</help>
              <completionHelp>
                <list>sdec ezio test</list>
              </completionHelp>
              <constraint>
                <regex>(sdec|ezio|test)</regex>
              </constraint>
              <constraintErrorMessage>Invalid system display model</constraintErrorMessage>
              <valueHelp>
                <format>sdec</format>
                <description>Display model for Lanner, Watchguard, Nexcom NSA, Sophos UTM appliances with built-in SDEC LCD</description>
              </valueHelp>
              <valueHelp>
                <format>ezio</format>
                <description>Display model for Portwell, Caswell appliances with built-in EZIO-100 or EZIO-300 LCD</description>
              </valueHelp>
              <valueHelp>
                <format>test</format>
                <description>Test model for USB CrystalFonz CF533</description>
              </valueHelp>
            </properties>
          </leafNode><!--system display model-->
          <!-- system display disabled -->
          <leafNode name="disabled">
            <properties>
              <help>Disable sytem display</help>
              <valueless/>
            </properties>
          </leafNode><!--system display disabled-->
          <node name="show">
            <properties>
              <help>Select the screens for the system display [REQUIRED]</help>
            </properties>
            <children>
              <!-- system display show host (cpu|cpu-all|cpu-hist|disk|load-hist|memory|proc|uptime) -->
              <leafNode name="host">
                <properties>
                  <multi/>
                  <help>Select host screens for the system display</help>
                  <completionHelp>
                    <list>cpu cpu-all cpu-hist disk load-hist memory proc uptime</list>
                  </completionHelp>
                  <constraint>
                    <regex>(cpu|cpu-all|cpu-hist|disk|load-hist|memory|proc|uptime)</regex>
                  </constraint>
                  <constraintErrorMessage>Invalid host screen</constraintErrorMessage>
                  <valueHelp>
                    <format>cpu</format>
                    <description>Detailed CPU usage</description>
                  </valueHelp>
                  <valueHelp>
                    <format>cpu-all</format>
                    <description>CPU usage overview (one line per CPU)</description>
                  </valueHelp>
                  <valueHelp>
                    <format>cpu-hist</format>
                    <description>CPU usage histogram</description>
                  </valueHelp>
                  <valueHelp>
                    <format>disk</format>
                    <description>File systems fill level</description>
                  </valueHelp>
                  <valueHelp>
                    <format>load-hist</format>
                    <description>Load histogram</description>
                  </valueHelp>
                  <valueHelp>
                    <format>memory</format>
                    <description>Memory and swap usage</description>
                  </valueHelp>
                  <valueHelp>
                    <format>proc</format>
                    <description>Top processes by size</description>
                  </valueHelp>
                  <valueHelp>
                    <format>uptime</format>
                    <description>System uptime</description>
                  </valueHelp>
                </properties>
              </leafNode><!--system display show host-->
              <!-- system display show network -->
              <node name="network">
                <properties>
                  <help>Network settings for system display</help>
                </properties>
                <children>
                  <!-- system display show network interface <interface name> -->
                  <tagNode name="interface">
                    <properties>
                      <help>Show network traffic on the system display [Max 3 interfaces]</help>
                      <completionHelp>
                        <script>${vyos_completion_dir}/list_interfaces.py -b</script>
                      </completionHelp>
                    </properties>
                    <children>
                      <leafNode name="alias">
                        <properties>
                          <help>Interface alias</help>
                          <constraint>
                            <regex>[A-Za-z0-9]{1,10}</regex>
                          </constraint>
                          <constraintErrorMessage>Invalid alias, must be 1 to 10 char or digit</constraintErrorMessage>
                        </properties>
                      </leafNode>
                    </children>
                  </tagNode><!--system display show network interface-->
                  <!-- system display show network units -->
                  <leafNode name="units">
                    <properties>
                      <help>Unit for network details</help>
                      <completionHelp>
                        <list>bps Bps pps</list>
                      </completionHelp>
                      <constraint>
                        <regex>(bps|Bps|pps)</regex>
                      </constraint>
                      <constraintErrorMessage>Invalid network detail unit</constraintErrorMessage>
                      <valueHelp>
                        <format>bps</format>
                        <description>Bit(s) per second</description>
                      </valueHelp>
                      <valueHelp>
                        <format>Bps</format>
                        <description>Byte(s) per second</description>
                      </valueHelp>
                      <valueHelp>
                        <format>pps</format>
                        <description>Packet(s) per second</description>
                      </valueHelp>
                    </properties>
                  </leafNode><!--system display show network units-->
                </children>
              </node><!--system display show network-->
              <!-- system display show clock (Big|Mini|Date-Time) -->
              <leafNode name="clock">
                <properties>
                  <!--multi-->
                  <help>Show a clock on the system display</help>
                  <completionHelp>
                    <list>big mini date-time</list>
                  </completionHelp>
                  <constraint>
                    <regex>(big|mini|date-time)</regex>
                  </constraint>
                  <constraintErrorMessage>Invalid clock format</constraintErrorMessage>
                  <valueHelp>
                    <format>big</format>
                    <description>Multi-line clock</description>
                  </valueHelp>
                  <valueHelp>
                    <format>mini</format>
                    <description>Minimal clock</description>
                  </valueHelp>
                  <valueHelp>
                    <format>date-time</format>
                    <description>Clock with Date and Time </description>
                  </valueHelp>
                </properties>
              </leafNode><!--system display show clock-->
              <!-- system display show title  -->
              <leafNode name="title">
                <properties>
                  <help>Screen title to show on the system display</help>
                    <constraint>
                      <regex>[A-Za-z0-9]{1,16}</regex>
                    </constraint>
                    <constraintErrorMessage>Invalid title, must be 1 to 16 char or digit</constraintErrorMessage>
                </properties>
              </leafNode><!--system display show title-->
            </children>
          </node><!--system display show-->
          <!-- system display time -->
          <leafNode name="time">
            <properties>
              <help>Time in sec to show each screen on the system display</help>
              <valueHelp>
                <format>1-30</format>
                <description>Numer of seconds</description>
              </valueHelp>
              <constraint>
                <validator name="numeric" argument="--range 1-30"/>
              </constraint>
            </properties>
          </leafNode><!--system display time-->
          <!-- system display hello  -->
          <leafNode name="hello">
            <properties>
              <help>Message to show when system display first starts</help>
                <constraint>
                  <regex>.{1,16}</regex>
                </constraint>
                <constraintErrorMessage>Hello message must be 1 to 16 char</constraintErrorMessage>
            </properties>
          </leafNode><!--system display hello-->
          <!-- system display bye  -->
          <leafNode name="bye">
            <properties>
              <help>Message to show when system display stops</help>
                <constraint>
                  <regex>.{1,16}</regex>
                </constraint>
                <constraintErrorMessage>Bye  message must be 1 to 16 char</constraintErrorMessage>
            </properties>
          </leafNode><!--system display bye-->
        </children>
      </node><!--system display-->
    </children>
  </node><!--system-->
</interfaceDefinition>