Browse Source

Fixed icon name TMP --> bottle

Signed-off-by: chanhoonseng <chanhoonseng3101@gmail.com>
chanhoonseng 7 years ago
parent
commit
5e94480c91
2 changed files with 51 additions and 0 deletions
  1. 27 0
      designer.html
  2. 24 0
      status.html

+ 27 - 0
designer.html

@@ -188,6 +188,32 @@
 {% else %}
 {% end %}
 
+{% if data['style'][key]['icon'] == "bottle" %}
+<div style='position: absolute; top: {{ data['style'][key]['top'] }}; left:{{ data['style'][key]['left'] }}; width:{{ data['style'][key]['width'] }}px; height:{{ data['style'][key]['height'] }}px;'
+{% if "linkhtml" in data['style'][key] %}
+ data-linkhtml="{{ data['style'][key]['linkhtml'] }}"
+{% else %}
+{% end %}
+{% if "on_condition" in data['style'][key] %}
+ data-onexpression="{{ data['style'][key]['on_condition'] }}"
+{% else %}
+{% end %}
+{% if "off_condition" in data['style'][key] %}
+ data-offexpression="{{ data['style'][key]['off_condition'] }}"
+{% else %}
+{% end %}
+{% if "icon" in data['style'][key] %}
+ data-icon="{{ data['style'][key]['icon'] }}"
+{% else %}
+{% end %}
+ data-type="{{ data['style'][key]['type'] }}" data-off="{{ data['style'][key]['off'] }}" data-on="{{ data['style'][key]['on'] }}" class='varbox' id="{{ key }}">
+<img width='100%' height='100%' src='{{ static_url("bottle_inactive.svg") }}'></img>
+</div>
+{% else %}
+{% end %}
+{% else %}
+{% end %}
+
 
 {% if data['style'][key]['type'] == "integer-to-string" %}
 <div style='position: absolute; top: {{ data['style'][key]['top'] }}; left:{{
@@ -252,6 +278,7 @@
   <option value="commbit">commbit</option>
   <option value="alarm">alarm</option>
   <option value="TMP">TMP</option>
+  <option value="bottle">bottle</option>
 </select>
 <span class="info">Attribute</span>
 <select id="varattr" style="font-size:16pt;">

+ 24 - 0
status.html

@@ -210,6 +210,30 @@ data-type="{{ data['style'][key]['type'] }}" data-icon="{{ data['style'][key]['i
 </div>
 {% end %}
 
+{% if data['style'][key]['icon'] == "bottle" %}
+{% if "ref" in data['style'][key] %}
+<div tooltip="{{ data['style'][key]['ref'] }}"
+{% else %}
+<div tooltip="{{ key }}"
+{% end %}
+style='position: absolute; top: {{ data['style'][key]['top'] }}; left:{{ data['style'][key]['left'] }}; width:{{ data['style'][key]['width'] }}px; height:{{ data['style'][key]['height'] }}px;'
+{% if data['style'][key]['linkhtml'] == 'true' %}
+{% if "server" in data %}
+onclick="window.open( '{{ data["server"] }}#module=graph&{{ data['varname'][data['style'][key]['ref']] }}&experiment=-&window=86400&module=graph&virtual=srctree&srctree=&infomod=legend', '_blank');"
+{% else %}
+{% end %}
+{% else %}
+{% end %}
+{% if "ref" in data['style'][key] %}
+data-type="{{ data['style'][key]['type'] }}" data-icon="{{ data['style'][key]['icon'] }}" data-off="{{ data['style'][key]['off'] }}" data-offexpression="{{ data['style'][key]['off_condition'] }}" data-on="{{ data['style'][key]['on'] }}" data-onexpression="{{ data['style'][key]['on_condition'] }}" class='databox' id="{{ key }}">
+<img width='100%' height='100%' src='{{ static_url("bottle_inactive.svg") }}'></img>
+</div>
+{% else %}
+data-type="{{ data['style'][key]['type'] }}" data-icon="{{ data['style'][key]['icon'] }}" data-off="{{ data['style'][key]['off'] }}" data-offexpression="{{ data['style'][key]['off_condition'] }}" data-on="{{ data['style'][key]['on'] }}" data-onexpression="{{ data['style'][key]['on_condition'] }}" class='databox' id="{{ key }}">
+<img width='100%' height='100%' src='{{ static_url("bottle_inactive.svg") }}'></img>
+</div>
+{% end %}
+
 {% else %}
 {% end %}
 {% else %}