##// END OF EJS Templates
Se añadió y corrigió la aplicación de colores por change beam
Renato Huallpa -
r394:63661266e9fd
parent child
Show More
@@ -0,0 +1,414
1 {% extends "dev_conf.html" %} {% load static %} {% load django_bootstrap5 %} {% load main_tags %}
2 {% block extra-head %}
3 <style>
4 .abs {
5 width: auto;
6 display: inline-block;
7 text-align: center;
8 }
9
10 .abs td {
11 padding: 4px;
12 }
13
14 .module td {
15 padding: 4px 15px 4px 15px;
16 font-weight: bold;
17 border: 1px solid
18 }
19
20 .legend {
21 margin-left: 15px;
22 display: inline-block;
23 border: 2px solid;
24 vertical-align: top;
25 }
26
27 .legend th {
28 border-bottom: 1px dashed;
29 font-weight: bold;
30 vertical-align: center;
31 text-align: center;
32 }
33
34 .legend td {
35 padding: 2px;
36 text-align: center;
37 font-weight: bold;
38 }
39
40 </style>
41 {% endblock %}
42
43
44 {% block extra-menu-actions %}
45 <li>
46 <a href="{{ dev_conf.get_absolute_url_plot }}" target="_blank">
47 <span class="far fa-image" aria-hidden="true"></span> View Patterns </a>
48 </li>
49 {% endblock %}
50
51
52 {% block extra-content %}
53 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
54 <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/4.4.1/socket.io.min.js">
55 </script>
56
57
58 {% if beams %}
59 <h4>Beams:</h4>
60 <div class="container">
61 <ul class="nav nav-pills">
62 {% for beam in beams %}
63 <li class="nav-item">
64 <a {%if beam.pk == active_beam %} class="nav-link active" {% else %} class="nav-link" {% endif %} data-toggle="pill" href="#menu{{forloop.counter}}">{{forloop.counter}}</a>
65 </li>
66 {% endfor %}
67 </ul>
68
69 <div class="tab-content">
70 {% for beam in beams %}
71 <div id="menu{{forloop.counter}}" class="tab-pane fade {%if beam.pk == active_beam %}in active show{% endif %}">
72 <h3>{%if beam.pk == active_beam %}Active Beam: {%endif%}{{beam.name}}</h3>
73 <table id="abs_pattern{{forloop.counter}}" class="abs">
74 <tr>
75 <td>
76 <b>North Quarter</b>
77 <table class="module">
78 <tr>
79 <td title='{{module_messages.1}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="1" {%else%} {{color_status.1}} {%endif%}{%endif%}> {{beam.get_upvalues.0}}</span></td>
80 <td title='{{module_messages.2}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="2" {%else%} {{color_status.2}} {%endif%}{%endif%}> {{beam.get_upvalues.1}}</span></td>
81 <td title='{{module_messages.3}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="3" {%else%} {{color_status.3}} {%endif%}{%endif%}> {{beam.get_upvalues.2}}</span></td>
82 <td title='{{module_messages.4}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="4" {%else%} {{color_status.4}} {%endif%}{%endif%}> {{beam.get_upvalues.3}}</span></td>
83 </tr>
84 <tr>
85 <td title='{{module_messages.1}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="101" {%else%} {{color_status.1}} {%endif%}{%endif%}> {{beam.get_downvalues.0}}</span></td>
86 <td title='{{module_messages.2}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="102" {%else%} {{color_status.2}} {%endif%}{%endif%}> {{beam.get_downvalues.1}}</span></td>
87 <td title='{{module_messages.3}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="103" {%else%} {{color_status.3}} {%endif%}{%endif%}> {{beam.get_downvalues.2}}</span></td>
88 <td title='{{module_messages.4}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="104" {%else%} {{color_status.4}} {%endif%}{%endif%}> {{beam.get_downvalues.3}}</span></td>
89 </tr>
90 <tr>
91 <td title='{{module_messages.9}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="9" {%else%} {{color_status.9}} {%endif%}{%endif%}> {{beam.get_upvalues.8}}</span></td>
92 <td title='{{module_messages.10}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="10" {%else%} {{color_status.10}} {%endif%} {%endif%}>{{beam.get_upvalues.9}}</span></td>
93 <td title='{{module_messages.11}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="11" {%else%} {{color_status.11}} {%endif%} {%endif%}>{{beam.get_upvalues.10}}</span></td>
94 <td title='{{module_messages.12}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="12" {%else%} {{color_status.12}} {%endif%} {%endif%}>{{beam.get_upvalues.11}}</span></td>
95 </tr>
96 <tr>
97 <td title='{{module_messages.9}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="109" {%else%} {{color_status.9}} {%endif%}{%endif%}> {{beam.get_downvalues.8}}</span></td>
98 <td title='{{module_messages.10}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="110" {%else%} {{color_status.10}} {%endif%} {%endif%}>{{beam.get_downvalues.9}}</span></td>
99 <td title='{{module_messages.11}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="111" {%else%} {{color_status.11}} {%endif%} {%endif%}>{{beam.get_downvalues.10}}</span></td>
100 <td title='{{module_messages.12}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="112" {%else%} {{color_status.12}} {%endif%} {%endif%}>{{beam.get_downvalues.11}}</span></td>
101 </tr>
102 <tr>
103 <td title='{{module_messages.17}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="17" {%else%} {{color_status.17}} {%endif%} {%endif%}>{{beam.get_upvalues.16}}</span></td>
104 <td title='{{module_messages.18}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="18" {%else%} {{color_status.18}} {%endif%} {%endif%}>{{beam.get_upvalues.17}}</span></td>
105 <td title='{{module_messages.19}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="19" {%else%} {{color_status.19}} {%endif%} {%endif%}>{{beam.get_upvalues.18}}</span></td>
106 <td title='{{module_messages.20}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="20" {%else%} {{color_status.20}} {%endif%} {%endif%}>{{beam.get_upvalues.19}}</span></td>
107 </tr>
108 <tr>
109 <td title='{{module_messages.17}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="117" {%else%} {{color_status.17}} {%endif%} {%endif%}>{{beam.get_downvalues.16}}</span></td>
110 <td title='{{module_messages.18}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="118" {%else%} {{color_status.18}} {%endif%} {%endif%}>{{beam.get_downvalues.17}}</span></td>
111 <td title='{{module_messages.19}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="119" {%else%} {{color_status.19}} {%endif%} {%endif%}>{{beam.get_downvalues.18}}</span></td>
112 <td title='{{module_messages.20}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="120" {%else%} {{color_status.20}} {%endif%} {%endif%}>{{beam.get_downvalues.19}}</span></td>
113 </tr>
114 <tr>
115 <td title='{{module_messages.25}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="25" {%else%} {{color_status.25}} {%endif%} {%endif%}>{{beam.get_upvalues.24}}</span></td>
116 <td title='{{module_messages.26}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="26" {%else%} {{color_status.26}} {%endif%} {%endif%}>{{beam.get_upvalues.25}}</span></td>
117 <td title='{{module_messages.27}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="27" {%else%} {{color_status.27}} {%endif%} {%endif%}>{{beam.get_upvalues.26}}</span></td>
118 <td title='{{module_messages.28}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="28" {%else%} {{color_status.28}} {%endif%} {%endif%}>{{beam.get_upvalues.27}}</span></td>
119 </tr>
120 <tr>
121 <td title='{{module_messages.25}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="125" {%else%} {{color_status.25}} {%endif%} {%endif%}>{{beam.get_downvalues.24}}</span></td>
122 <td title='{{module_messages.26}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="126" {%else%} {{color_status.26}} {%endif%} {%endif%}>{{beam.get_downvalues.25}}</span></td>
123 <td title='{{module_messages.27}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="127" {%else%} {{color_status.27}} {%endif%} {%endif%}>{{beam.get_downvalues.26}}</span></td>
124 <td title='{{module_messages.28}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="128" {%else%} {{color_status.28}} {%endif%} {%endif%}>{{beam.get_downvalues.27}}</span></td>
125 </tr>
126 </table>
127 </td>
128 <td>
129 <b>East Quarter</b>
130 <table class="module">
131 <tr>
132 <td title='{{module_messages.5}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="5" {%else%} {{color_status.5}} {%endif%}{%endif%}> {{beam.get_upvalues.4}}</span></td>
133 <td title='{{module_messages.6}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="6" {%else%} {{color_status.6}} {%endif%}{%endif%}> {{beam.get_upvalues.5}}</span></td>
134 <td title='{{module_messages.7}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="7" {%else%} {{color_status.7}} {%endif%}{%endif%}> {{beam.get_upvalues.6}}</span></td>
135 <td title='{{module_messages.8}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="8" {%else%} {{color_status.8}} {%endif%}{%endif%}> {{beam.get_upvalues.7}}</span></td>
136 </tr>
137 <tr>
138 <td title='{{module_messages.5}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="105" {%else%} {{color_status.5}} {%endif%}{%endif%}> {{beam.get_downvalues.4}}</span></td>
139 <td title='{{module_messages.6}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="106" {%else%} {{color_status.6}} {%endif%}{%endif%}> {{beam.get_downvalues.5}}</span></td>
140 <td title='{{module_messages.7}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="107" {%else%} {{color_status.7}} {%endif%}{%endif%}> {{beam.get_downvalues.6}}</span></td>
141 <td title='{{module_messages.8}}'> <span {%if beam.pk == active_beam %} {%if mqtt%} id="108" {%else%} {{color_status.8}} {%endif%}{%endif%}> {{beam.get_downvalues.7}}</span></td>
142 </tr>
143 <tr>
144 <td title='{{module_messages.13}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="13" {%else%} {{color_status.13}} {%endif%} {%endif%}>{{beam.get_upvalues.12}}</span></td>
145 <td title='{{module_messages.14}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="14" {%else%} {{color_status.14}} {%endif%} {%endif%}>{{beam.get_upvalues.13}}</span></td>
146 <td title='{{module_messages.15}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="15" {%else%} {{color_status.15}} {%endif%} {%endif%}>{{beam.get_upvalues.14}}</span></td>
147 <td title='{{module_messages.16}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="16" {%else%} {{color_status.16}} {%endif%} {%endif%}>{{beam.get_upvalues.15}}</span></td>
148 </tr>
149 <tr>
150 <td title='{{module_messages.13}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="113" {%else%} {{color_status.13}} {%endif%} {%endif%}>{{beam.get_downvalues.12}}</span></td>
151 <td title='{{module_messages.14}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="114" {%else%} {{color_status.14}} {%endif%} {%endif%}>{{beam.get_downvalues.13}}</span></td>
152 <td title='{{module_messages.15}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="115" {%else%} {{color_status.15}} {%endif%} {%endif%}>{{beam.get_downvalues.14}}</span></td>
153 <td title='{{module_messages.16}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="116" {%else%} {{color_status.16}} {%endif%} {%endif%}>{{beam.get_downvalues.15}}</span></td>
154 </tr>
155 <tr>
156 <td title='{{module_messages.21}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="21" {%else%} {{color_status.21}} {%endif%} {%endif%}>{{beam.get_upvalues.20}}</span></td>
157 <td title='{{module_messages.22}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="22" {%else%} {{color_status.22}} {%endif%} {%endif%}>{{beam.get_upvalues.21}}</span></td>
158 <td title='{{module_messages.23}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="23" {%else%} {{color_status.23}} {%endif%} {%endif%}>{{beam.get_upvalues.22}}</span></td>
159 <td title='{{module_messages.24}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="24" {%else%} {{color_status.24}} {%endif%} {%endif%}>{{beam.get_upvalues.23}}</span></td>
160 </tr>
161 <tr>
162 <td title='{{module_messages.21}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="121" {%else%} {{color_status.21}} {%endif%} {%endif%}>{{beam.get_downvalues.20}}</span></td>
163 <td title='{{module_messages.22}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="122" {%else%} {{color_status.22}} {%endif%} {%endif%}>{{beam.get_downvalues.21}}</span></td>
164 <td title='{{module_messages.23}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="123" {%else%} {{color_status.23}} {%endif%} {%endif%}>{{beam.get_downvalues.22}}</span></td>
165 <td title='{{module_messages.24}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="124" {%else%} {{color_status.24}} {%endif%} {%endif%}>{{beam.get_downvalues.23}}</span></td>
166 </tr>
167 <tr>
168 <td title='{{module_messages.29}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="29" {%else%} {{color_status.29}} {%endif%} {%endif%}>{{beam.get_upvalues.28}}</span></td>
169 <td title='{{module_messages.30}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="30" {%else%} {{color_status.30}} {%endif%} {%endif%}>{{beam.get_upvalues.29}}</span></td>
170 <td title='{{module_messages.31}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="31" {%else%} {{color_status.31}} {%endif%} {%endif%}>{{beam.get_upvalues.30}}</span></td>
171 <td title='{{module_messages.32}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="32" {%else%} {{color_status.32}} {%endif%} {%endif%}>{{beam.get_upvalues.31}}</span></td>
172 </tr>
173 <tr>
174 <td title='{{module_messages.29}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="129" {%else%} {{color_status.29}} {%endif%} {%endif%}>{{beam.get_downvalues.28}}</span></td>
175 <td title='{{module_messages.30}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="130" {%else%} {{color_status.30}} {%endif%} {%endif%}>{{beam.get_downvalues.29}}</span></td>
176 <td title='{{module_messages.31}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="131" {%else%} {{color_status.31}} {%endif%} {%endif%}>{{beam.get_downvalues.30}}</span></td>
177 <td title='{{module_messages.32}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="132" {%else%} {{color_status.32}} {%endif%} {%endif%}>{{beam.get_downvalues.31}}</span></td>
178 </tr>
179 </table>
180 </td>
181 </tr>
182 <tr>
183 <td>
184 <b>West Quarter</b>
185 <table class="module">
186 <tr>
187 <td title='{{module_messages.33}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="33" {%else%} {{color_status.33}} {%endif%} {%endif%}>{{beam.get_upvalues.32}}</span></td>
188 <td title='{{module_messages.34}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="34" {%else%} {{color_status.34}} {%endif%} {%endif%}>{{beam.get_upvalues.33}}</span></td>
189 <td title='{{module_messages.35}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="35" {%else%} {{color_status.35}} {%endif%} {%endif%}>{{beam.get_upvalues.34}}</span></td>
190 <td title='{{module_messages.36}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="36" {%else%} {{color_status.36}} {%endif%} {%endif%}>{{beam.get_upvalues.35}}</span></td>
191 </tr>
192 <tr>
193 <td title='{{module_messages.33}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="133" {%else%} {{color_status.33}} {%endif%} {%endif%}>{{beam.get_downvalues.32}}</span></td>
194 <td title='{{module_messages.34}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="134" {%else%} {{color_status.34}} {%endif%} {%endif%}>{{beam.get_downvalues.33}}</span></td>
195 <td title='{{module_messages.35}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="135" {%else%} {{color_status.35}} {%endif%} {%endif%}>{{beam.get_downvalues.34}}</span></td>
196 <td title='{{module_messages.36}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="136" {%else%} {{color_status.36}} {%endif%} {%endif%}>{{beam.get_downvalues.35}}</span></td>
197 </tr>
198 <tr>
199 <td title='{{module_messages.41}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="41" {%else%} {{color_status.41}} {%endif%} {%endif%}>{{beam.get_upvalues.40}}</span></td>
200 <td title='{{module_messages.42}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="42" {%else%} {{color_status.42}} {%endif%} {%endif%}>{{beam.get_upvalues.41}}</span></td>
201 <td title='{{module_messages.43}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="43" {%else%} {{color_status.43}} {%endif%} {%endif%}>{{beam.get_upvalues.42}}</span></td>
202 <td title='{{module_messages.44}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="44" {%else%} {{color_status.44}} {%endif%} {%endif%}>{{beam.get_upvalues.43}}</span></td>
203 </tr>
204 <tr>
205 <td title='{{module_messages.41}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="141" {%else%} {{color_status.41}} {%endif%} {%endif%}>{{beam.get_downvalues.40}}</span></td>
206 <td title='{{module_messages.42}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="142" {%else%} {{color_status.42}} {%endif%} {%endif%}>{{beam.get_downvalues.41}}</span></td>
207 <td title='{{module_messages.43}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="143" {%else%} {{color_status.43}} {%endif%} {%endif%}>{{beam.get_downvalues.42}}</span></td>
208 <td title='{{module_messages.44}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="144" {%else%} {{color_status.44}} {%endif%} {%endif%}>{{beam.get_downvalues.43}}</span></td>
209 </tr>
210 <tr>
211 <td title='{{module_messages.49}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="49" {%else%} {{color_status.49}} {%endif%} {%endif%}>{{beam.get_upvalues.48}}</span></td>
212 <td title='{{module_messages.51}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="50" {%else%} {{color_status.50}} {%endif%} {%endif%}>{{beam.get_upvalues.49}}</span></td>
213 <td title='{{module_messages.52}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="51" {%else%} {{color_status.51}} {%endif%} {%endif%}>{{beam.get_upvalues.50}}</span></td>
214 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="52" {%else%} {{color_status.52}} {%endif%} {%endif%}>{{beam.get_upvalues.51}}</span></td>
215 </tr>
216 <tr>
217 <td title='{{module_messages.49}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="149" {%else%} {{color_status.49}} {%endif%} {%endif%}>{{beam.get_downvalues.48}}</span></td>
218 <td title='{{module_messages.50}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="150" {%else%} {{color_status.50}} {%endif%} {%endif%}>{{beam.get_downvalues.49}}</span></td>
219 <td title='{{module_messages.51}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="151" {%else%} {{color_status.51}} {%endif%} {%endif%}>{{beam.get_downvalues.50}}</span></td>
220 <td title='{{module_messages.52}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="152" {%else%} {{color_status.52}} {%endif%} {%endif%}>{{beam.get_downvalues.51}}</span></td>
221 </tr>
222 <tr>
223 <td title='{{module_messages.57}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="57" {%else%} {{color_status.57}} {%endif%} {%endif%}>{{beam.get_upvalues.56}}</span></td>
224 <td title='{{module_messages.58}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="58" {%else%} {{color_status.58}} {%endif%} {%endif%}>{{beam.get_upvalues.57}}</span></td>
225 <td title='{{module_messages.59}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="59" {%else%} {{color_status.59}} {%endif%} {%endif%}>{{beam.get_upvalues.58}}</span></td>
226 <td title='{{module_messages.60}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="60" {%else%} {{color_status.60}} {%endif%} {%endif%}>{{beam.get_upvalues.59}}</span></td>
227 </tr>
228 <tr>
229 <td title='{{module_messages.57}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="157" {%else%} {{color_status.57}} {%endif%} {%endif%}>{{beam.get_downvalues.56}}</span></td>
230 <td title='{{module_messages.58}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="158" {%else%} {{color_status.58}} {%endif%} {%endif%}>{{beam.get_downvalues.57}}</span></td>
231 <td title='{{module_messages.59}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="159" {%else%} {{color_status.59}} {%endif%} {%endif%}>{{beam.get_downvalues.58}}</span></td>
232 <td title='{{module_messages.60}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="160" {%else%} {{color_status.60}} {%endif%} {%endif%}>{{beam.get_downvalues.59}}</span></td>
233 </tr>
234 </table>
235 </td>
236 <td>
237 <b>South Quarter</b>
238 <table class="module">
239 <tr>
240 <td title='{{module_messages.37}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="37" {%else%} {{color_status.37}} {%endif%} {%endif%}>{{beam.get_upvalues.36}}</span></td>
241 <td title='{{module_messages.38}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="38" {%else%} {{color_status.38}} {%endif%} {%endif%}>{{beam.get_upvalues.37}}</span></td>
242 <td title='{{module_messages.39}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="39" {%else%} {{color_status.39}} {%endif%} {%endif%}>{{beam.get_upvalues.38}}</span></td>
243 <td title='{{module_messages.40}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="40" {%else%} {{color_status.40}} {%endif%} {%endif%}>{{beam.get_upvalues.39}}</span></td>
244 </tr>
245 <tr>
246 <td title='{{module_messages.37}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="137" {%else%} {{color_status.37}} {%endif%} {%endif%}>{{beam.get_downvalues.36}}</span></td>
247 <td title='{{module_messages.38}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="138" {%else%} {{color_status.38}} {%endif%} {%endif%}>{{beam.get_downvalues.37}}</span></td>
248 <td title='{{module_messages.39}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="139" {%else%} {{color_status.39}} {%endif%} {%endif%}>{{beam.get_downvalues.38}}</span></td>
249 <td title='{{module_messages.40}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="140" {%else%} {{color_status.40}} {%endif%} {%endif%}>{{beam.get_downvalues.39}}</span></td>
250 </tr>
251 <tr>
252 <td title='{{module_messages.45}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="45" {%else%} {{color_status.45}} {%endif%} {%endif%}>{{beam.get_upvalues.44}}</span></td>
253 <td title='{{module_messages.46}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="46" {%else%} {{color_status.46}} {%endif%} {%endif%}>{{beam.get_upvalues.45}}</span></td>
254 <td title='{{module_messages.47}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="47" {%else%} {{color_status.47}} {%endif%} {%endif%}>{{beam.get_upvalues.46}}</span></td>
255 <td title='{{module_messages.48}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="48" {%else%} {{color_status.48}} {%endif%} {%endif%}>{{beam.get_upvalues.47}}</span></td>
256 </tr>
257 <tr>
258 <td title='{{module_messages.45}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="145" {%else%} {{color_status.45}} {%endif%} {%endif%}>{{beam.get_downvalues.44}}</span></td>
259 <td title='{{module_messages.46}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="146" {%else%} {{color_status.46}} {%endif%} {%endif%}>{{beam.get_downvalues.45}}</span></td>
260 <td title='{{module_messages.47}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="147" {%else%} {{color_status.47}} {%endif%} {%endif%}>{{beam.get_downvalues.46}}</span></td>
261 <td title='{{module_messages.48}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="148" {%else%} {{color_status.48}} {%endif%} {%endif%}>{{beam.get_downvalues.47}}</span></td>
262 </tr>
263 <tr>
264 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="53" {%else%} {{color_status.53}} {%endif%} {%endif%}>{{beam.get_upvalues.52}}</span></td>
265 <td title='{{module_messages.54}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="54" {%else%} {{color_status.54}} {%endif%} {%endif%}>{{beam.get_upvalues.53}}</span></td>
266 <td title='{{module_messages.55}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="55" {%else%} {{color_status.55}} {%endif%} {%endif%}>{{beam.get_upvalues.54}}</span></td>
267 <td title='{{module_messages.56}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="56" {%else%} {{color_status.56}} {%endif%} {%endif%}>{{beam.get_upvalues.55}}</span></td>
268 </tr>
269 <tr>
270 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="153" {%else%} {{color_status.53}} {%endif%} {%endif%}>{{beam.get_downvalues.52}}</span></td>
271 <td title='{{module_messages.54}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="154" {%else%} {{color_status.54}} {%endif%} {%endif%}>{{beam.get_downvalues.53}}</span></td>
272 <td title='{{module_messages.55}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="155" {%else%} {{color_status.55}} {%endif%} {%endif%}>{{beam.get_downvalues.54}}</span></td>
273 <td title='{{module_messages.56}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="156" {%else%} {{color_status.56}} {%endif%} {%endif%}>{{beam.get_downvalues.55}}</span></td>
274 </tr>
275 <tr>
276 <td title='{{module_messages.61}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="61" {%else%} {{color_status.61}} {%endif%} {%endif%}>{{beam.get_upvalues.60}}</span></td>
277 <td title='{{module_messages.62}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="62" {%else%} {{color_status.62}} {%endif%} {%endif%}>{{beam.get_upvalues.61}}</span></td>
278 <td title='{{module_messages.63}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="63" {%else%} {{color_status.63}} {%endif%} {%endif%}>{{beam.get_upvalues.62}}</span></td>
279 <td title='{{module_messages.64}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="64" {%else%} {{color_status.64}} {%endif%} {%endif%}>{{beam.get_upvalues.63}}</span></td>
280 </tr>
281 <tr>
282 <td title='{{module_messages.61}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="161" {%else%} {{color_status.61}} {%endif%} {%endif%}>{{beam.get_downvalues.60}}</span></td>
283 <td title='{{module_messages.62}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="162" {%else%} {{color_status.62}} {%endif%} {%endif%}>{{beam.get_downvalues.61}}</span></td>
284 <td title='{{module_messages.63}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="163" {%else%} {{color_status.63}} {%endif%} {%endif%}>{{beam.get_downvalues.62}}</span></td>
285 <td title='{{module_messages.64}}'><span {%if beam.pk == active_beam %} {%if mqtt%} id="164" {%else%} {{color_status.64}} {%endif%} {%endif%}>{{beam.get_downvalues.63}}</span></td>
286 </tr>
287 </table>
288 </td>
289 </tr>
290 </table>
291
292 <!-- <meta id="configuraciones_down" data-playlist="{{ beam.get_downvalues }}">
293 <meta id="configuraciones_up" data-playlist="{{ beam.get_upvalues }}">
294 <meta id="sda" data-toggle="" -->
295
296 {% if beam.id == active_beam %}
297 <table class="legend">
298 <tr>
299 <th>Legend</th>
300 </tr>
301 <tr>
302 <td class="text-warning">Connected</td>
303 </tr>
304 <tr>
305 <td class="text-success">Running</td>
306 </tr>
307 <tr>
308 <td class="text-info">Mismath</td>
309 </tr>
310 <tr>
311 <td class="text-danger">Disconnected</td>
312 </tr>
313 </table>
314 {% else %}
315 <div style="vertical-align: top; display:inline-block;">
316 <button id="send_beam{{forloop.counter}}" type="button" class="btn btn-default">
317 <span class="fas fa-external-link-square-alt" aria-hidden="true"></span>
318 Change Beam</button>
319 <br><br><br>
320 <button id="change_beam_mqtt{{forloop.counter}}" type="button" class="btn btn-default">
321 <span class="fas fa-external-link-square-alt" aria-hidden="true"></span>
322 Change Beam MQTT</button>
323 </div>
324 {% endif %}
325 </div>
326 {% endfor %}
327 </div>
328 </div>
329
330
331 {% else %}
332 <p style="color:#b4bcc2; margin-left: 5%;">
333 <i>No Beams...</i>
334 </p>
335 {% endif %}
336 {% endblock extra-content %}
337
338 {% block extra-js%}
339 <script>
340 $(document).ready(function () {
341
342 var socket = io.connect('http://' + document.domain + ':' + location.port);
343
344 socket.on('connect', function(data) {
345 console.log('Connecting... OK');
346 })
347
348 socket.on('abs_ws', function(data) {
349 console.log('ingresamos');
350 console.log(data.msg);
351 var text = data['msg'];
352 // $('#chatLog').val(text);
353
354 if(data.msg=="b\'Hola\'"){console.log('Hola_amigo')};
355 })
356
357 socket.on('beams_ack', function(data) {
358 // console.log('beams_ack');
359 var text = data['msg'];
360
361 for (let i=1; i<=64;i++){
362
363 var elemento = document.getElementById(text[i-1]);
364 var elemento2 = document.getElementById(text[i-1]+100);
365 if (text[i-1]<=64){
366 // console.log("1")
367 // elemento=document.getElementById(text[i-1]);
368 elemento.style.color="green";
369 elemento.style.fontWeight = "bold";
370 elemento2.style.color="green";
371 elemento2.style.fontWeight = "bold";}
372 else if (text[i-1]>64){
373 elemento=document.getElementById(text[i-1]-64);
374 elemento2=document.getElementById(text[i-1]-64+100);
375 elemento.style.color="blue";
376 elemento.style.fontWeight = "bold";
377 elemento2.style.color="blue";
378 elemento2.style.fontWeight = "bold"}
379 else {
380 elemento.style.color="red";
381 elemento.style.fontWeight = "bold";
382 elemento2.style.color="red";
383 elemento2.style.fontWeight = "bold"}
384 }
385 if(data.msg=="b\'Hola\'"){console.log('Hola_amigo')};
386 })
387
388
389 {% for beam in beams %}
390
391 {% if dev_conf.operation_mode == 1 %}
392 $("#send_beam{{forloop.counter}}").prop('disabled', true)
393 $("#change_beam_mqtt{{forloop.counter}}").prop('disabled', true)
394 {% else %}
395 $("#send_beam{{forloop.counter}}").click(function () {
396 document.location = "{% url 'url_send_beam' dev_conf.id beam.id %}";
397 });
398
399 change_beam_mqtt_btn=$("#change_beam_mqtt{{forloop.counter}}")
400 change_beam_mqtt_btn.click(function () {
401 document.location = "{% url 'url_change_beam_mqtt' dev_conf.id beam.id %}";
402 });
403
404 {% endif %}
405
406 {% endfor %}
407
408
409 });
410
411 </script>
412
413
414 {% endblock %}
@@ -836,16 +836,15 class ABSConfiguration(Configuration):
836
836
837 def change_beam_mqtt(self, beam_pos):
837 def change_beam_mqtt(self, beam_pos):
838 """
838 """
839 This function connects to a multicast group and sends the beam number
839 This function connects send through mqtt the order of change_beam (id of beam).
840 to all abs modules.
841 """
840 """
842 print ('Send beam')
841 print ('Change beam MQTT')
843 print (self.active_beam)
842 print (self.active_beam)
844 beams = ABSBeam.objects.filter(abs_conf=self)
843 beams = ABSBeam.objects.filter(abs_conf=self)
845 #print beams[self.active_beam-1].module_6bits(0)
844 #print beams[self.active_beam-1].module_6bits(0)
846 active = ABSActive.objects.get(pk=1)
845 active = ABSActive.objects.get(pk=1)
847 if active.conf != self:
846 if active.conf != self:
848 self.message = 'La configuracion actual es la del siguiente enlace %s.' % active.conf.get_absolute_url()
847 self.message = 'La configuracion actual es la del siguiente enlace %s.' % active.conf.get_absolute_mqtt_url()
849 self.message += "\n"
848 self.message += "\n"
850 self.message += 'Se debe realizar un write en esta configuracion para luego obtener un status valido.'
849 self.message += 'Se debe realizar un write en esta configuracion para luego obtener un status valido.'
851
850
@@ -907,6 +906,8 class ABSConfiguration(Configuration):
907 # pass
906 # pass
908
907
909 # sock.close()
908 # sock.close()
909 mqtt_client.publish('abs/change_beam',str(beam_pos))
910
910
911
911 #Start DDS-RC-JARS
912 #Start DDS-RC-JARS
912 if confdds:
913 if confdds:
@@ -918,7 +919,6 class ABSConfiguration(Configuration):
918 confjars.start_device()
919 confjars.start_device()
919
920
920 self.message = "ABS Beam has been changed"
921 self.message = "ABS Beam has been changed"
921 self.module_status = ''.join(status)
922 self.save()
922 self.save()
923 return True
923 return True
924
924
@@ -56,7 +56,7
56
56
57
57
58 {% if beams %}
58 {% if beams %}
59 <h4>Beams:</h4>
59 <h4>Beams MQTT:</h4>
60 <div class="container">
60 <div class="container">
61 <ul class="nav nav-pills">
61 <ul class="nav nav-pills">
62 {% for beam in beams %}
62 {% for beam in beams %}
@@ -76,52 +76,52
76 <b>North Quarter</b>
76 <b>North Quarter</b>
77 <table class="module">
77 <table class="module">
78 <tr>
78 <tr>
79 <td title='{{module_messages.1}}'><span id="1" {%if beam.pk == active_beam %} {{color_status.1}} {%endif%}>{{beam.get_upvalues.0}}</span></td>
79 <td title='{{module_messages.1}}'><span {%if beam.pk == active_beam %} id="1" {%endif%}>{{beam.get_upvalues.0}}</span></td>
80 <td title='{{module_messages.2}}'><span id="2" {%if beam.pk == active_beam %} {{color_status.2}} {%endif%}>{{beam.get_upvalues.1}}</span></td>
80 <td title='{{module_messages.2}}'><span {%if beam.pk == active_beam %} id="2" {%endif%}>{{beam.get_upvalues.1}}</span></td>
81 <td title='{{module_messages.3}}'><span id="3" {%if beam.pk == active_beam %} {{color_status.3}} {%endif%}>{{beam.get_upvalues.2}}</span></td>
81 <td title='{{module_messages.3}}'><span {%if beam.pk == active_beam %} id="3" {%endif%}>{{beam.get_upvalues.2}}</span></td>
82 <td title='{{module_messages.4}}'><span id="4" {%if beam.pk == active_beam %} {{color_status.4}} {%endif%}>{{beam.get_upvalues.3}}</span></td>
82 <td title='{{module_messages.4}}'><span {%if beam.pk == active_beam %} id="4" {%endif%}>{{beam.get_upvalues.3}}</span></td>
83 </tr>
83 </tr>
84 <tr>
84 <tr>
85 <td title='{{module_messages.1}}'><span id="101" {%if beam.pk == active_beam %} {{color_status.1}} {%endif%}>{{beam.get_downvalues.0}}</span></td>
85 <td title='{{module_messages.1}}'><span {%if beam.pk == active_beam %} id="101" {%endif%}>{{beam.get_downvalues.0}}</span></td>
86 <td title='{{module_messages.2}}'><span id="102" {%if beam.pk == active_beam %} {{color_status.2}} {%endif%}>{{beam.get_downvalues.1}}</span></td>
86 <td title='{{module_messages.2}}'><span {%if beam.pk == active_beam %} id="102" {%endif%}>{{beam.get_downvalues.1}}</span></td>
87 <td title='{{module_messages.3}}'> <span id="103" {%if beam.pk == active_beam %} {{color_status.3}} {%endif%}>{{beam.get_downvalues.2}}</span></td>
87 <td title='{{module_messages.3}}'> <span {%if beam.pk == active_beam %} id="103" {%endif%}>{{beam.get_downvalues.2}}</span></td>
88 <td title='{{module_messages.4}}'> <span id="104" {%if beam.pk == active_beam %} {{color_status.4}} {%endif%}>{{beam.get_downvalues.3}}</span></td>
88 <td title='{{module_messages.4}}'> <span {%if beam.pk == active_beam %} id="104" {%endif%}>{{beam.get_downvalues.3}}</span></td>
89 </tr>
89 </tr>
90 <tr>
90 <tr>
91 <td title='{{module_messages.9}}'> <span id="9" {%if beam.pk == active_beam %} {{color_status.9}} {%endif%}>{{beam.get_upvalues.8}}</span></td>
91 <td title='{{module_messages.9}}'> <span {%if beam.pk == active_beam %} id="9" {%endif%}>{{beam.get_upvalues.8}}</span></td>
92 <td title='{{module_messages.10}}'><span id="10" {%if beam.pk == active_beam %} {{color_status.10}} {%endif%}>{{beam.get_upvalues.9}}</span></td>
92 <td title='{{module_messages.10}}'><span {%if beam.pk == active_beam %} id="10" {%endif%}>{{beam.get_upvalues.9}}</span></td>
93 <td title='{{module_messages.11}}'><span id="11" {%if beam.pk == active_beam %} {{color_status.11}} {%endif%}>{{beam.get_upvalues.10}}</span></td>
93 <td title='{{module_messages.11}}'><span {%if beam.pk == active_beam %} id="11" {%endif%}>{{beam.get_upvalues.10}}</span></td>
94 <td title='{{module_messages.12}}'><span id="12" {%if beam.pk == active_beam %} {{color_status.12}} {%endif%}>{{beam.get_upvalues.11}}</span></td>
94 <td title='{{module_messages.12}}'><span {%if beam.pk == active_beam %} id="12" {%endif%}>{{beam.get_upvalues.11}}</span></td>
95 </tr>
95 </tr>
96 <tr>
96 <tr>
97 <td title='{{module_messages.9}}'> <span id="109" {%if beam.pk == active_beam %} {{color_status.9}} {%endif%}>{{beam.get_downvalues.8}}</span></td>
97 <td title='{{module_messages.9}}'> <span {%if beam.pk == active_beam %} id="109" {%endif%}>{{beam.get_downvalues.8}}</span></td>
98 <td title='{{module_messages.10}}'><span id="110" {%if beam.pk == active_beam %} {{color_status.10}} {%endif%}>{{beam.get_downvalues.9}}</span></td>
98 <td title='{{module_messages.10}}'><span {%if beam.pk == active_beam %} id="110" {%endif%}>{{beam.get_downvalues.9}}</span></td>
99 <td title='{{module_messages.11}}'><span id="111" {%if beam.pk == active_beam %} {{color_status.11}} {%endif%}>{{beam.get_downvalues.10}}</span></td>
99 <td title='{{module_messages.11}}'><span {%if beam.pk == active_beam %} id="111" {%endif%}>{{beam.get_downvalues.10}}</span></td>
100 <td title='{{module_messages.12}}'><span id="112" {%if beam.pk == active_beam %} {{color_status.12}} {%endif%}>{{beam.get_downvalues.11}}</span></td>
100 <td title='{{module_messages.12}}'><span {%if beam.pk == active_beam %} id="112" {%endif%}>{{beam.get_downvalues.11}}</span></td>
101 </tr>
101 </tr>
102 <tr>
102 <tr>
103 <td title='{{module_messages.17}}'><span id="17" {%if beam.pk == active_beam %} {{color_status.17}} {%endif%}>{{beam.get_upvalues.16}}</span></td>
103 <td title='{{module_messages.17}}'><span {%if beam.pk == active_beam %} id="17" {%endif%}>{{beam.get_upvalues.16}}</span></td>
104 <td title='{{module_messages.18}}'><span id="18" {%if beam.pk == active_beam %} {{color_status.18}} {%endif%}>{{beam.get_upvalues.17}}</span></td>
104 <td title='{{module_messages.18}}'><span {%if beam.pk == active_beam %} id="18" {%endif%}>{{beam.get_upvalues.17}}</span></td>
105 <td title='{{module_messages.19}}'><span id="19" {%if beam.pk == active_beam %} {{color_status.19}} {%endif%}>{{beam.get_upvalues.18}}</span></td>
105 <td title='{{module_messages.19}}'><span {%if beam.pk == active_beam %} id="19" {%endif%}>{{beam.get_upvalues.18}}</span></td>
106 <td title='{{module_messages.20}}'><span id="20" {%if beam.pk == active_beam %} {{color_status.20}} {%endif%}>{{beam.get_upvalues.19}}</span></td>
106 <td title='{{module_messages.20}}'><span {%if beam.pk == active_beam %} id="20" {%endif%}>{{beam.get_upvalues.19}}</span></td>
107 </tr>
107 </tr>
108 <tr>
108 <tr>
109 <td title='{{module_messages.17}}'><span id="117" {%if beam.pk == active_beam %} {{color_status.17}} {%endif%}>{{beam.get_downvalues.16}}</span></td>
109 <td title='{{module_messages.17}}'><span {%if beam.pk == active_beam %} id="117" {%endif%}>{{beam.get_downvalues.16}}</span></td>
110 <td title='{{module_messages.18}}'><span id="118" {%if beam.pk == active_beam %} {{color_status.18}} {%endif%}>{{beam.get_downvalues.17}}</span></td>
110 <td title='{{module_messages.18}}'><span {%if beam.pk == active_beam %} id="118" {%endif%}>{{beam.get_downvalues.17}}</span></td>
111 <td title='{{module_messages.19}}'><span id="119" {%if beam.pk == active_beam %} {{color_status.19}} {%endif%}>{{beam.get_downvalues.18}}</span></td>
111 <td title='{{module_messages.19}}'><span {%if beam.pk == active_beam %} id="119" {%endif%}>{{beam.get_downvalues.18}}</span></td>
112 <td title='{{module_messages.20}}'><span id="120" {%if beam.pk == active_beam %} {{color_status.20}} {%endif%}>{{beam.get_downvalues.19}}</span></td>
112 <td title='{{module_messages.20}}'><span {%if beam.pk == active_beam %} id="120" {%endif%}>{{beam.get_downvalues.19}}</span></td>
113 </tr>
113 </tr>
114 <tr>
114 <tr>
115 <td title='{{module_messages.25}}'><span id="25" {%if beam.pk == active_beam %} {{color_status.25}} {%endif%}>{{beam.get_upvalues.24}}</span></td>
115 <td title='{{module_messages.25}}'><span {%if beam.pk == active_beam %} id="25" {%endif%}>{{beam.get_upvalues.24}}</span></td>
116 <td title='{{module_messages.26}}'><span id="26" {%if beam.pk == active_beam %} {{color_status.26}} {%endif%}>{{beam.get_upvalues.25}}</span></td>
116 <td title='{{module_messages.26}}'><span {%if beam.pk == active_beam %} id="26" {%endif%}>{{beam.get_upvalues.25}}</span></td>
117 <td title='{{module_messages.27}}'><span id="27" {%if beam.pk == active_beam %} {{color_status.27}} {%endif%}>{{beam.get_upvalues.26}}</span></td>
117 <td title='{{module_messages.27}}'><span {%if beam.pk == active_beam %} id="27" {%endif%}>{{beam.get_upvalues.26}}</span></td>
118 <td title='{{module_messages.28}}'><span id="28" {%if beam.pk == active_beam %} {{color_status.28}} {%endif%}>{{beam.get_upvalues.27}}</span></td>
118 <td title='{{module_messages.28}}'><span {%if beam.pk == active_beam %} id="28" {%endif%}>{{beam.get_upvalues.27}}</span></td>
119 </tr>
119 </tr>
120 <tr>
120 <tr>
121 <td title='{{module_messages.25}}'><span id="125" {%if beam.pk == active_beam %} {{color_status.25}} {%endif%}>{{beam.get_downvalues.24}}</span></td>
121 <td title='{{module_messages.25}}'><span {%if beam.pk == active_beam %} id="125" {%endif%}>{{beam.get_downvalues.24}}</span></td>
122 <td title='{{module_messages.26}}'><span id="126" {%if beam.pk == active_beam %} {{color_status.26}} {%endif%}>{{beam.get_downvalues.25}}</span></td>
122 <td title='{{module_messages.26}}'><span {%if beam.pk == active_beam %} id="126" {%endif%}>{{beam.get_downvalues.25}}</span></td>
123 <td title='{{module_messages.27}}'><span id="127" {%if beam.pk == active_beam %} {{color_status.27}} {%endif%}>{{beam.get_downvalues.26}}</span></td>
123 <td title='{{module_messages.27}}'><span {%if beam.pk == active_beam %} id="127" {%endif%}>{{beam.get_downvalues.26}}</span></td>
124 <td title='{{module_messages.28}}'><span id="128" {%if beam.pk == active_beam %} {{color_status.28}} {%endif%}>{{beam.get_downvalues.27}}</span></td>
124 <td title='{{module_messages.28}}'><span {%if beam.pk == active_beam %} id="128" {%endif%}>{{beam.get_downvalues.27}}</span></td>
125 </tr>
125 </tr>
126 </table>
126 </table>
127 </td>
127 </td>
@@ -129,52 +129,52
129 <b>East Quarter</b>
129 <b>East Quarter</b>
130 <table class="module">
130 <table class="module">
131 <tr>
131 <tr>
132 <td title='{{module_messages.5}}'> <span id="5" {%if beam.pk == active_beam %} {{color_status.5}} {%endif%}>{{beam.get_upvalues.4}}</span></td>
132 <td title='{{module_messages.5}}'> <span {%if beam.pk == active_beam %} id="5" {%endif%}>{{beam.get_upvalues.4}}</span></td>
133 <td title='{{module_messages.6}}'> <span id="6" {%if beam.pk == active_beam %} {{color_status.6}} {%endif%}>{{beam.get_upvalues.5}}</span></td>
133 <td title='{{module_messages.6}}'> <span {%if beam.pk == active_beam %} id="6" {%endif%}>{{beam.get_upvalues.5}}</span></td>
134 <td title='{{module_messages.7}}'> <span id="7" {%if beam.pk == active_beam %} {{color_status.7}} {%endif%}>{{beam.get_upvalues.6}}</span></td>
134 <td title='{{module_messages.7}}'> <span {%if beam.pk == active_beam %} id="7" {%endif%}>{{beam.get_upvalues.6}}</span></td>
135 <td title='{{module_messages.8}}'> <span id="8" {%if beam.pk == active_beam %} {{color_status.8}} {%endif%}>{{beam.get_upvalues.7}}</span></td>
135 <td title='{{module_messages.8}}'> <span {%if beam.pk == active_beam %} id="8" {%endif%}>{{beam.get_upvalues.7}}</span></td>
136 </tr>
136 </tr>
137 <tr>
137 <tr>
138 <td title='{{module_messages.5}}'> <span id="105" {%if beam.pk == active_beam %} {{color_status.5}} {%endif%}>{{beam.get_downvalues.4}}</span></td>
138 <td title='{{module_messages.5}}'> <span {%if beam.pk == active_beam %} id="105" {%endif%}>{{beam.get_downvalues.4}}</span></td>
139 <td title='{{module_messages.6}}'> <span id="106" {%if beam.pk == active_beam %} {{color_status.6}} {%endif%}>{{beam.get_downvalues.5}}</span></td>
139 <td title='{{module_messages.6}}'> <span {%if beam.pk == active_beam %} id="106" {%endif%}>{{beam.get_downvalues.5}}</span></td>
140 <td title='{{module_messages.7}}'> <span id="107" {%if beam.pk == active_beam %} {{color_status.7}} {%endif%}>{{beam.get_downvalues.6}}</span></td>
140 <td title='{{module_messages.7}}'> <span {%if beam.pk == active_beam %} id="107" {%endif%}>{{beam.get_downvalues.6}}</span></td>
141 <td title='{{module_messages.8}}'> <span id="108" {%if beam.pk == active_beam %} {{color_status.8}} {%endif%}>{{beam.get_downvalues.7}}</span></td>
141 <td title='{{module_messages.8}}'> <span {%if beam.pk == active_beam %} id="108" {%endif%}>{{beam.get_downvalues.7}}</span></td>
142 </tr>
142 </tr>
143 <tr>
143 <tr>
144 <td title='{{module_messages.13}}'><span id="13" {%if beam.pk == active_beam %} {{color_status.13}} {%endif%}>{{beam.get_upvalues.12}}</span></td>
144 <td title='{{module_messages.13}}'><span {%if beam.pk == active_beam %} id="13" {%endif%}>{{beam.get_upvalues.12}}</span></td>
145 <td title='{{module_messages.14}}'><span id="14" {%if beam.pk == active_beam %} {{color_status.14}} {%endif%}>{{beam.get_upvalues.13}}</span></td>
145 <td title='{{module_messages.14}}'><span {%if beam.pk == active_beam %} id="14" {%endif%}>{{beam.get_upvalues.13}}</span></td>
146 <td title='{{module_messages.15}}'><span id="15" {%if beam.pk == active_beam %} {{color_status.15}} {%endif%}>{{beam.get_upvalues.14}}</span></td>
146 <td title='{{module_messages.15}}'><span {%if beam.pk == active_beam %} id="15" {%endif%}>{{beam.get_upvalues.14}}</span></td>
147 <td title='{{module_messages.16}}'><span id="16" {%if beam.pk == active_beam %} {{color_status.16}} {%endif%}>{{beam.get_upvalues.15}}</span></td>
147 <td title='{{module_messages.16}}'><span {%if beam.pk == active_beam %} id="16" {%endif%}>{{beam.get_upvalues.15}}</span></td>
148 </tr>
148 </tr>
149 <tr>
149 <tr>
150 <td title='{{module_messages.13}}'><span id="113" {%if beam.pk == active_beam %} {{color_status.13}} {%endif%}>{{beam.get_downvalues.12}}</span></td>
150 <td title='{{module_messages.13}}'><span {%if beam.pk == active_beam %} id="113" {%endif%}>{{beam.get_downvalues.12}}</span></td>
151 <td title='{{module_messages.14}}'><span id="114" {%if beam.pk == active_beam %} {{color_status.14}} {%endif%}>{{beam.get_downvalues.13}}</span></td>
151 <td title='{{module_messages.14}}'><span {%if beam.pk == active_beam %} id="114" {%endif%}>{{beam.get_downvalues.13}}</span></td>
152 <td title='{{module_messages.15}}'><span id="115" {%if beam.pk == active_beam %} {{color_status.15}} {%endif%}>{{beam.get_downvalues.14}}</span></td>
152 <td title='{{module_messages.15}}'><span {%if beam.pk == active_beam %} id="115" {%endif%}>{{beam.get_downvalues.14}}</span></td>
153 <td title='{{module_messages.16}}'><span id="116" {%if beam.pk == active_beam %} {{color_status.16}} {%endif%}>{{beam.get_downvalues.15}}</span></td>
153 <td title='{{module_messages.16}}'><span {%if beam.pk == active_beam %} id="116" {%endif%}>{{beam.get_downvalues.15}}</span></td>
154 </tr>
154 </tr>
155 <tr>
155 <tr>
156 <td title='{{module_messages.21}}'><span id="21" {%if beam.pk == active_beam %} {{color_status.21}} {%endif%}>{{beam.get_upvalues.20}}</span></td>
156 <td title='{{module_messages.21}}'><span {%if beam.pk == active_beam %} id="21" {%endif%}>{{beam.get_upvalues.20}}</span></td>
157 <td title='{{module_messages.22}}'><span id="22" {%if beam.pk == active_beam %} {{color_status.22}} {%endif%}>{{beam.get_upvalues.21}}</span></td>
157 <td title='{{module_messages.22}}'><span {%if beam.pk == active_beam %} id="22" {%endif%}>{{beam.get_upvalues.21}}</span></td>
158 <td title='{{module_messages.23}}'><span id="23" {%if beam.pk == active_beam %} {{color_status.23}} {%endif%}>{{beam.get_upvalues.22}}</span></td>
158 <td title='{{module_messages.23}}'><span {%if beam.pk == active_beam %} id="23" {%endif%}>{{beam.get_upvalues.22}}</span></td>
159 <td title='{{module_messages.24}}'><span id="24" {%if beam.pk == active_beam %} {{color_status.24}} {%endif%}>{{beam.get_upvalues.23}}</span></td>
159 <td title='{{module_messages.24}}'><span {%if beam.pk == active_beam %} id="24" {%endif%}>{{beam.get_upvalues.23}}</span></td>
160 </tr>
160 </tr>
161 <tr>
161 <tr>
162 <td title='{{module_messages.21}}'><span id="121" {%if beam.pk == active_beam %} {{color_status.21}} {%endif%}>{{beam.get_downvalues.20}}</span></td>
162 <td title='{{module_messages.21}}'><span {%if beam.pk == active_beam %} id="121" {%endif%}>{{beam.get_downvalues.20}}</span></td>
163 <td title='{{module_messages.22}}'><span id="122" {%if beam.pk == active_beam %} {{color_status.22}} {%endif%}>{{beam.get_downvalues.21}}</span></td>
163 <td title='{{module_messages.22}}'><span {%if beam.pk == active_beam %} id="122" {%endif%}>{{beam.get_downvalues.21}}</span></td>
164 <td title='{{module_messages.23}}'><span id="123" {%if beam.pk == active_beam %} {{color_status.23}} {%endif%}>{{beam.get_downvalues.22}}</span></td>
164 <td title='{{module_messages.23}}'><span {%if beam.pk == active_beam %} id="123" {%endif%}>{{beam.get_downvalues.22}}</span></td>
165 <td title='{{module_messages.24}}'><span id="124" {%if beam.pk == active_beam %} {{color_status.24}} {%endif%}>{{beam.get_downvalues.23}}</span></td>
165 <td title='{{module_messages.24}}'><span {%if beam.pk == active_beam %} id="124" {%endif%}>{{beam.get_downvalues.23}}</span></td>
166 </tr>
166 </tr>
167 <tr>
167 <tr>
168 <td title='{{module_messages.29}}'><span id="29" {%if beam.pk == active_beam %} {{color_status.29}} {%endif%}>{{beam.get_upvalues.28}}</span></td>
168 <td title='{{module_messages.29}}'><span {%if beam.pk == active_beam %} id="29" {%endif%}>{{beam.get_upvalues.28}}</span></td>
169 <td title='{{module_messages.30}}'><span id="30" {%if beam.pk == active_beam %} {{color_status.30}} {%endif%}>{{beam.get_upvalues.29}}</span></td>
169 <td title='{{module_messages.30}}'><span {%if beam.pk == active_beam %} id="30" {%endif%}>{{beam.get_upvalues.29}}</span></td>
170 <td title='{{module_messages.31}}'><span id="31" {%if beam.pk == active_beam %} {{color_status.31}} {%endif%}>{{beam.get_upvalues.30}}</span></td>
170 <td title='{{module_messages.31}}'><span {%if beam.pk == active_beam %} id="31" {%endif%}>{{beam.get_upvalues.30}}</span></td>
171 <td title='{{module_messages.32}}'><span id="32" {%if beam.pk == active_beam %} {{color_status.32}} {%endif%}>{{beam.get_upvalues.31}}</span></td>
171 <td title='{{module_messages.32}}'><span {%if beam.pk == active_beam %} id="32" {%endif%}>{{beam.get_upvalues.31}}</span></td>
172 </tr>
172 </tr>
173 <tr>
173 <tr>
174 <td title='{{module_messages.29}}'><span id="129" {%if beam.pk == active_beam %} {{color_status.29}} {%endif%}>{{beam.get_downvalues.28}}</span></td>
174 <td title='{{module_messages.29}}'><span {%if beam.pk == active_beam %} id="129" {%endif%}>{{beam.get_downvalues.28}}</span></td>
175 <td title='{{module_messages.30}}'><span id="130" {%if beam.pk == active_beam %} {{color_status.30}} {%endif%}>{{beam.get_downvalues.29}}</span></td>
175 <td title='{{module_messages.30}}'><span {%if beam.pk == active_beam %} id="130" {%endif%}>{{beam.get_downvalues.29}}</span></td>
176 <td title='{{module_messages.31}}'><span id="131" {%if beam.pk == active_beam %} {{color_status.31}} {%endif%}>{{beam.get_downvalues.30}}</span></td>
176 <td title='{{module_messages.31}}'><span {%if beam.pk == active_beam %} id="131" {%endif%}>{{beam.get_downvalues.30}}</span></td>
177 <td title='{{module_messages.32}}'><span id="132" {%if beam.pk == active_beam %} {{color_status.32}} {%endif%}>{{beam.get_downvalues.31}}</span></td>
177 <td title='{{module_messages.32}}'><span {%if beam.pk == active_beam %} id="132" {%endif%}>{{beam.get_downvalues.31}}</span></td>
178 </tr>
178 </tr>
179 </table>
179 </table>
180 </td>
180 </td>
@@ -184,52 +184,52
184 <b>West Quarter</b>
184 <b>West Quarter</b>
185 <table class="module">
185 <table class="module">
186 <tr>
186 <tr>
187 <td title='{{module_messages.33}}'><span id="33" {%if beam.pk == active_beam %} {{color_status.33}} {%endif%}>{{beam.get_upvalues.32}}</span></td>
187 <td title='{{module_messages.33}}'><span {%if beam.pk == active_beam %} id="33" {%endif%}>{{beam.get_upvalues.32}}</span></td>
188 <td title='{{module_messages.34}}'><span id="34" {%if beam.pk == active_beam %} {{color_status.34}} {%endif%}>{{beam.get_upvalues.33}}</span></td>
188 <td title='{{module_messages.34}}'><span {%if beam.pk == active_beam %} id="34" {%endif%}>{{beam.get_upvalues.33}}</span></td>
189 <td title='{{module_messages.35}}'><span id="35" {%if beam.pk == active_beam %} {{color_status.35}} {%endif%}>{{beam.get_upvalues.34}}</span></td>
189 <td title='{{module_messages.35}}'><span {%if beam.pk == active_beam %} id="35" {%endif%}>{{beam.get_upvalues.34}}</span></td>
190 <td title='{{module_messages.36}}'><span id="36" {%if beam.pk == active_beam %} {{color_status.36}} {%endif%}>{{beam.get_upvalues.35}}</span></td>
190 <td title='{{module_messages.36}}'><span {%if beam.pk == active_beam %} id="36" {%endif%}>{{beam.get_upvalues.35}}</span></td>
191 </tr>
191 </tr>
192 <tr>
192 <tr>
193 <td title='{{module_messages.33}}'><span id="133" {%if beam.pk == active_beam %} {{color_status.33}} {%endif%}>{{beam.get_downvalues.32}}</span></td>
193 <td title='{{module_messages.33}}'><span {%if beam.pk == active_beam %} id="133" {%endif%}>{{beam.get_downvalues.32}}</span></td>
194 <td title='{{module_messages.34}}'><span id="134" {%if beam.pk == active_beam %} {{color_status.34}} {%endif%}>{{beam.get_downvalues.33}}</span></td>
194 <td title='{{module_messages.34}}'><span {%if beam.pk == active_beam %} id="134" {%endif%}>{{beam.get_downvalues.33}}</span></td>
195 <td title='{{module_messages.35}}'><span id="135" {%if beam.pk == active_beam %} {{color_status.35}} {%endif%}>{{beam.get_downvalues.34}}</span></td>
195 <td title='{{module_messages.35}}'><span {%if beam.pk == active_beam %} id="135" {%endif%}>{{beam.get_downvalues.34}}</span></td>
196 <td title='{{module_messages.36}}'><span id="136" {%if beam.pk == active_beam %} {{color_status.36}} {%endif%}>{{beam.get_downvalues.35}}</span></td>
196 <td title='{{module_messages.36}}'><span {%if beam.pk == active_beam %} id="136" {%endif%}>{{beam.get_downvalues.35}}</span></td>
197 </tr>
197 </tr>
198 <tr>
198 <tr>
199 <td title='{{module_messages.41}}'><span id="41" {%if beam.pk == active_beam %} {{color_status.41}} {%endif%}>{{beam.get_upvalues.40}}</span></td>
199 <td title='{{module_messages.41}}'><span {%if beam.pk == active_beam %} id="41" {%endif%}>{{beam.get_upvalues.40}}</span></td>
200 <td title='{{module_messages.42}}'><span id="42" {%if beam.pk == active_beam %} {{color_status.42}} {%endif%}>{{beam.get_upvalues.41}}</span></td>
200 <td title='{{module_messages.42}}'><span {%if beam.pk == active_beam %} id="42" {%endif%}>{{beam.get_upvalues.41}}</span></td>
201 <td title='{{module_messages.43}}'><span id="43" {%if beam.pk == active_beam %} {{color_status.43}} {%endif%}>{{beam.get_upvalues.42}}</span></td>
201 <td title='{{module_messages.43}}'><span {%if beam.pk == active_beam %} id="43" {%endif%}>{{beam.get_upvalues.42}}</span></td>
202 <td title='{{module_messages.44}}'><span id="44" {%if beam.pk == active_beam %} {{color_status.44}} {%endif%}>{{beam.get_upvalues.43}}</span></td>
202 <td title='{{module_messages.44}}'><span {%if beam.pk == active_beam %} id="44" {%endif%}>{{beam.get_upvalues.43}}</span></td>
203 </tr>
203 </tr>
204 <tr>
204 <tr>
205 <td title='{{module_messages.41}}'><span id="141" {%if beam.pk == active_beam %} {{color_status.41}} {%endif%}>{{beam.get_downvalues.40}}</span></td>
205 <td title='{{module_messages.41}}'><span {%if beam.pk == active_beam %} id="141" {%endif%}>{{beam.get_downvalues.40}}</span></td>
206 <td title='{{module_messages.42}}'><span id="142" {%if beam.pk == active_beam %} {{color_status.42}} {%endif%}>{{beam.get_downvalues.41}}</span></td>
206 <td title='{{module_messages.42}}'><span {%if beam.pk == active_beam %} id="142" {%endif%}>{{beam.get_downvalues.41}}</span></td>
207 <td title='{{module_messages.43}}'><span id="143" {%if beam.pk == active_beam %} {{color_status.43}} {%endif%}>{{beam.get_downvalues.42}}</span></td>
207 <td title='{{module_messages.43}}'><span {%if beam.pk == active_beam %} id="143" {%endif%}>{{beam.get_downvalues.42}}</span></td>
208 <td title='{{module_messages.44}}'><span id="144" {%if beam.pk == active_beam %} {{color_status.44}} {%endif%}>{{beam.get_downvalues.43}}</span></td>
208 <td title='{{module_messages.44}}'><span {%if beam.pk == active_beam %} id="144" {%endif%}>{{beam.get_downvalues.43}}</span></td>
209 </tr>
209 </tr>
210 <tr>
210 <tr>
211 <td title='{{module_messages.49}}'><span id="49" {%if beam.pk == active_beam %} {{color_status.49}} {%endif%}>{{beam.get_upvalues.48}}</span></td>
211 <td title='{{module_messages.49}}'><span {%if beam.pk == active_beam %} id="49" {%endif%}>{{beam.get_upvalues.48}}</span></td>
212 <td title='{{module_messages.51}}'><span id="50" {%if beam.pk == active_beam %} {{color_status.50}} {%endif%}>{{beam.get_upvalues.49}}</span></td>
212 <td title='{{module_messages.51}}'><span {%if beam.pk == active_beam %} id="50" {%endif%}>{{beam.get_upvalues.49}}</span></td>
213 <td title='{{module_messages.52}}'><span id="51" {%if beam.pk == active_beam %} {{color_status.51}} {%endif%}>{{beam.get_upvalues.50}}</span></td>
213 <td title='{{module_messages.52}}'><span {%if beam.pk == active_beam %} id="51" {%endif%}>{{beam.get_upvalues.50}}</span></td>
214 <td title='{{module_messages.53}}'><span id="52" {%if beam.pk == active_beam %} {{color_status.52}} {%endif%}>{{beam.get_upvalues.51}}</span></td>
214 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} id="52" {%endif%}>{{beam.get_upvalues.51}}</span></td>
215 </tr>
215 </tr>
216 <tr>
216 <tr>
217 <td title='{{module_messages.49}}'><span id="149" {%if beam.pk == active_beam %} {{color_status.49}} {%endif%}>{{beam.get_downvalues.48}}</span></td>
217 <td title='{{module_messages.49}}'><span {%if beam.pk == active_beam %} id="149" {%endif%}>{{beam.get_downvalues.48}}</span></td>
218 <td title='{{module_messages.50}}'><span id="150" {%if beam.pk == active_beam %} {{color_status.50}} {%endif%}>{{beam.get_downvalues.49}}</span></td>
218 <td title='{{module_messages.50}}'><span {%if beam.pk == active_beam %} id="150" {%endif%}>{{beam.get_downvalues.49}}</span></td>
219 <td title='{{module_messages.51}}'><span id="151" {%if beam.pk == active_beam %} {{color_status.51}} {%endif%}>{{beam.get_downvalues.50}}</span></td>
219 <td title='{{module_messages.51}}'><span {%if beam.pk == active_beam %} id="151" {%endif%}>{{beam.get_downvalues.50}}</span></td>
220 <td title='{{module_messages.52}}'><span id="152" {%if beam.pk == active_beam %} {{color_status.52}} {%endif%}>{{beam.get_downvalues.51}}</span></td>
220 <td title='{{module_messages.52}}'><span {%if beam.pk == active_beam %} id="152" {%endif%}>{{beam.get_downvalues.51}}</span></td>
221 </tr>
221 </tr>
222 <tr>
222 <tr>
223 <td title='{{module_messages.57}}'><span id="57" {%if beam.pk == active_beam %} {{color_status.57}} {%endif%}>{{beam.get_upvalues.56}}</span></td>
223 <td title='{{module_messages.57}}'><span {%if beam.pk == active_beam %} id="57" {%endif%}>{{beam.get_upvalues.56}}</span></td>
224 <td title='{{module_messages.58}}'><span id="58" {%if beam.pk == active_beam %} {{color_status.58}} {%endif%}>{{beam.get_upvalues.57}}</span></td>
224 <td title='{{module_messages.58}}'><span {%if beam.pk == active_beam %} id="58" {%endif%}>{{beam.get_upvalues.57}}</span></td>
225 <td title='{{module_messages.59}}'><span id="59" {%if beam.pk == active_beam %} {{color_status.59}} {%endif%}>{{beam.get_upvalues.58}}</span></td>
225 <td title='{{module_messages.59}}'><span {%if beam.pk == active_beam %} id="59" {%endif%}>{{beam.get_upvalues.58}}</span></td>
226 <td title='{{module_messages.60}}'><span id="60" {%if beam.pk == active_beam %} {{color_status.60}} {%endif%}>{{beam.get_upvalues.59}}</span></td>
226 <td title='{{module_messages.60}}'><span {%if beam.pk == active_beam %} id="60" {%endif%}>{{beam.get_upvalues.59}}</span></td>
227 </tr>
227 </tr>
228 <tr>
228 <tr>
229 <td title='{{module_messages.57}}'><span id="157" {%if beam.pk == active_beam %} {{color_status.57}} {%endif%}>{{beam.get_downvalues.56}}</span></td>
229 <td title='{{module_messages.57}}'><span {%if beam.pk == active_beam %} id="157" {%endif%}>{{beam.get_downvalues.56}}</span></td>
230 <td title='{{module_messages.58}}'><span id="158" {%if beam.pk == active_beam %} {{color_status.58}} {%endif%}>{{beam.get_downvalues.57}}</span></td>
230 <td title='{{module_messages.58}}'><span {%if beam.pk == active_beam %} id="158" {%endif%}>{{beam.get_downvalues.57}}</span></td>
231 <td title='{{module_messages.59}}'><span id="159" {%if beam.pk == active_beam %} {{color_status.59}} {%endif%}>{{beam.get_downvalues.58}}</span></td>
231 <td title='{{module_messages.59}}'><span {%if beam.pk == active_beam %} id="159" {%endif%}>{{beam.get_downvalues.58}}</span></td>
232 <td title='{{module_messages.60}}'><span id="160" {%if beam.pk == active_beam %} {{color_status.60}} {%endif%}>{{beam.get_downvalues.59}}</span></td>
232 <td title='{{module_messages.60}}'><span {%if beam.pk == active_beam %} id="160" {%endif%}>{{beam.get_downvalues.59}}</span></td>
233 </tr>
233 </tr>
234 </table>
234 </table>
235 </td>
235 </td>
@@ -237,52 +237,52
237 <b>South Quarter</b>
237 <b>South Quarter</b>
238 <table class="module">
238 <table class="module">
239 <tr>
239 <tr>
240 <td title='{{module_messages.37}}'><span id="37" {%if beam.pk == active_beam %} {{color_status.37}} {%endif%}>{{beam.get_upvalues.36}}</span></td>
240 <td title='{{module_messages.37}}'><span {%if beam.pk == active_beam %} id="37" {%endif%}>{{beam.get_upvalues.36}}</span></td>
241 <td title='{{module_messages.38}}'><span id="38" {%if beam.pk == active_beam %} {{color_status.38}} {%endif%}>{{beam.get_upvalues.37}}</span></td>
241 <td title='{{module_messages.38}}'><span {%if beam.pk == active_beam %} id="38" {%endif%}>{{beam.get_upvalues.37}}</span></td>
242 <td title='{{module_messages.39}}'><span id="39" {%if beam.pk == active_beam %} {{color_status.39}} {%endif%}>{{beam.get_upvalues.38}}</span></td>
242 <td title='{{module_messages.39}}'><span {%if beam.pk == active_beam %} id="39" {%endif%}>{{beam.get_upvalues.38}}</span></td>
243 <td title='{{module_messages.40}}'><span id="40" {%if beam.pk == active_beam %} {{color_status.40}} {%endif%}>{{beam.get_upvalues.39}}</span></td>
243 <td title='{{module_messages.40}}'><span {%if beam.pk == active_beam %} id="40" {%endif%}>{{beam.get_upvalues.39}}</span></td>
244 </tr>
244 </tr>
245 <tr>
245 <tr>
246 <td title='{{module_messages.37}}'><span id="137" {%if beam.pk == active_beam %} {{color_status.37}} {%endif%}>{{beam.get_downvalues.36}}</span></td>
246 <td title='{{module_messages.37}}'><span {%if beam.pk == active_beam %} id="137" {%endif%}>{{beam.get_downvalues.36}}</span></td>
247 <td title='{{module_messages.38}}'><span id="138" {%if beam.pk == active_beam %} {{color_status.38}} {%endif%}>{{beam.get_downvalues.37}}</span></td>
247 <td title='{{module_messages.38}}'><span {%if beam.pk == active_beam %} id="138" {%endif%}>{{beam.get_downvalues.37}}</span></td>
248 <td title='{{module_messages.39}}'><span id="139" {%if beam.pk == active_beam %} {{color_status.39}} {%endif%}>{{beam.get_downvalues.38}}</span></td>
248 <td title='{{module_messages.39}}'><span {%if beam.pk == active_beam %} id="139" {%endif%}>{{beam.get_downvalues.38}}</span></td>
249 <td title='{{module_messages.40}}'><span id="140" {%if beam.pk == active_beam %} {{color_status.40}} {%endif%}>{{beam.get_downvalues.39}}</span></td>
249 <td title='{{module_messages.40}}'><span {%if beam.pk == active_beam %} id="140" {%endif%}>{{beam.get_downvalues.39}}</span></td>
250 </tr>
250 </tr>
251 <tr>
251 <tr>
252 <td title='{{module_messages.45}}'><span id="45" {%if beam.pk == active_beam %} {{color_status.45}} {%endif%}>{{beam.get_upvalues.44}}</span></td>
252 <td title='{{module_messages.45}}'><span {%if beam.pk == active_beam %} id="45" {%endif%}>{{beam.get_upvalues.44}}</span></td>
253 <td title='{{module_messages.46}}'><span id="46" {%if beam.pk == active_beam %} {{color_status.46}} {%endif%}>{{beam.get_upvalues.45}}</span></td>
253 <td title='{{module_messages.46}}'><span {%if beam.pk == active_beam %} id="46" {%endif%}>{{beam.get_upvalues.45}}</span></td>
254 <td title='{{module_messages.47}}'><span id="47" {%if beam.pk == active_beam %} {{color_status.47}} {%endif%}>{{beam.get_upvalues.46}}</span></td>
254 <td title='{{module_messages.47}}'><span {%if beam.pk == active_beam %} id="47" {%endif%}>{{beam.get_upvalues.46}}</span></td>
255 <td title='{{module_messages.48}}'><span id="48" {%if beam.pk == active_beam %} {{color_status.48}} {%endif%}>{{beam.get_upvalues.47}}</span></td>
255 <td title='{{module_messages.48}}'><span {%if beam.pk == active_beam %} id="48" {%endif%}>{{beam.get_upvalues.47}}</span></td>
256 </tr>
256 </tr>
257 <tr>
257 <tr>
258 <td title='{{module_messages.45}}'><span id="145" {%if beam.pk == active_beam %} {{color_status.45}} {%endif%}>{{beam.get_downvalues.44}}</span></td>
258 <td title='{{module_messages.45}}'><span {%if beam.pk == active_beam %} id="145" {%endif%}>{{beam.get_downvalues.44}}</span></td>
259 <td title='{{module_messages.46}}'><span id="146" {%if beam.pk == active_beam %} {{color_status.46}} {%endif%}>{{beam.get_downvalues.45}}</span></td>
259 <td title='{{module_messages.46}}'><span {%if beam.pk == active_beam %} id="146" {%endif%}>{{beam.get_downvalues.45}}</span></td>
260 <td title='{{module_messages.47}}'><span id="147" {%if beam.pk == active_beam %} {{color_status.47}} {%endif%}>{{beam.get_downvalues.46}}</span></td>
260 <td title='{{module_messages.47}}'><span {%if beam.pk == active_beam %} id="147" {%endif%}>{{beam.get_downvalues.46}}</span></td>
261 <td title='{{module_messages.48}}'><span id="148" {%if beam.pk == active_beam %} {{color_status.48}} {%endif%}>{{beam.get_downvalues.47}}</span></td>
261 <td title='{{module_messages.48}}'><span {%if beam.pk == active_beam %} id="148" {%endif%}>{{beam.get_downvalues.47}}</span></td>
262 </tr>
262 </tr>
263 <tr>
263 <tr>
264 <td title='{{module_messages.53}}'><span id="53" {%if beam.pk == active_beam %} {{color_status.53}} {%endif%}>{{beam.get_upvalues.52}}</span></td>
264 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} id="53" {%endif%}>{{beam.get_upvalues.52}}</span></td>
265 <td title='{{module_messages.54}}'><span id="54" {%if beam.pk == active_beam %} {{color_status.54}} {%endif%}>{{beam.get_upvalues.53}}</span></td>
265 <td title='{{module_messages.54}}'><span {%if beam.pk == active_beam %} id="54" {%endif%}>{{beam.get_upvalues.53}}</span></td>
266 <td title='{{module_messages.55}}'><span id="55" {%if beam.pk == active_beam %} {{color_status.55}} {%endif%}>{{beam.get_upvalues.54}}</span></td>
266 <td title='{{module_messages.55}}'><span {%if beam.pk == active_beam %} id="55" {%endif%}>{{beam.get_upvalues.54}}</span></td>
267 <td title='{{module_messages.56}}'><span id="56" {%if beam.pk == active_beam %} {{color_status.56}} {%endif%}>{{beam.get_upvalues.55}}</span></td>
267 <td title='{{module_messages.56}}'><span {%if beam.pk == active_beam %} id="56" {%endif%}>{{beam.get_upvalues.55}}</span></td>
268 </tr>
268 </tr>
269 <tr>
269 <tr>
270 <td title='{{module_messages.53}}'><span id="153" {%if beam.pk == active_beam %} {{color_status.53}} {%endif%}>{{beam.get_downvalues.52}}</span></td>
270 <td title='{{module_messages.53}}'><span {%if beam.pk == active_beam %} id="153" {%endif%}>{{beam.get_downvalues.52}}</span></td>
271 <td title='{{module_messages.54}}'><span id="154" {%if beam.pk == active_beam %} {{color_status.54}} {%endif%}>{{beam.get_downvalues.53}}</span></td>
271 <td title='{{module_messages.54}}'><span {%if beam.pk == active_beam %} id="154" {%endif%}>{{beam.get_downvalues.53}}</span></td>
272 <td title='{{module_messages.55}}'><span id="155" {%if beam.pk == active_beam %} {{color_status.55}} {%endif%}>{{beam.get_downvalues.54}}</span></td>
272 <td title='{{module_messages.55}}'><span {%if beam.pk == active_beam %} id="155" {%endif%}>{{beam.get_downvalues.54}}</span></td>
273 <td title='{{module_messages.56}}'><span id="156" {%if beam.pk == active_beam %} {{color_status.56}} {%endif%}>{{beam.get_downvalues.55}}</span></td>
273 <td title='{{module_messages.56}}'><span {%if beam.pk == active_beam %} id="156" {%endif%}>{{beam.get_downvalues.55}}</span></td>
274 </tr>
274 </tr>
275 <tr>
275 <tr>
276 <td title='{{module_messages.61}}'><span id="61" {%if beam.pk == active_beam %} {{color_status.61}} {%endif%}>{{beam.get_upvalues.60}}</span></td>
276 <td title='{{module_messages.61}}'><span {%if beam.pk == active_beam %} id="61" {%endif%}>{{beam.get_upvalues.60}}</span></td>
277 <td title='{{module_messages.62}}'><span id="62" {%if beam.pk == active_beam %} {{color_status.62}} {%endif%}>{{beam.get_upvalues.61}}</span></td>
277 <td title='{{module_messages.62}}'><span {%if beam.pk == active_beam %} id="62" {%endif%}>{{beam.get_upvalues.61}}</span></td>
278 <td title='{{module_messages.63}}'><span id="63" {%if beam.pk == active_beam %} {{color_status.63}} {%endif%}>{{beam.get_upvalues.62}}</span></td>
278 <td title='{{module_messages.63}}'><span {%if beam.pk == active_beam %} id="63" {%endif%}>{{beam.get_upvalues.62}}</span></td>
279 <td title='{{module_messages.64}}'><span id="64" {%if beam.pk == active_beam %} {{color_status.64}} {%endif%}>{{beam.get_upvalues.63}}</span></td>
279 <td title='{{module_messages.64}}'><span {%if beam.pk == active_beam %} id="64" {%endif%}>{{beam.get_upvalues.63}}</span></td>
280 </tr>
280 </tr>
281 <tr>
281 <tr>
282 <td title='{{module_messages.61}}'><span id="161" {%if beam.pk == active_beam %} {{color_status.61}} {%endif%}>{{beam.get_downvalues.60}}</span></td>
282 <td title='{{module_messages.61}}'><span {%if beam.pk == active_beam %} id="161" {%endif%}>{{beam.get_downvalues.60}}</span></td>
283 <td title='{{module_messages.62}}'><span id="162" {%if beam.pk == active_beam %} {{color_status.62}} {%endif%}>{{beam.get_downvalues.61}}</span></td>
283 <td title='{{module_messages.62}}'><span {%if beam.pk == active_beam %} id="162" {%endif%}>{{beam.get_downvalues.61}}</span></td>
284 <td title='{{module_messages.63}}'><span id="163" {%if beam.pk == active_beam %} {{color_status.63}} {%endif%}>{{beam.get_downvalues.62}}</span></td>
284 <td title='{{module_messages.63}}'><span {%if beam.pk == active_beam %} id="163" {%endif%}>{{beam.get_downvalues.62}}</span></td>
285 <td title='{{module_messages.64}}'><span id="164" {%if beam.pk == active_beam %} {{color_status.64}} {%endif%}>{{beam.get_downvalues.63}}</span></td>
285 <td title='{{module_messages.64}}'><span {%if beam.pk == active_beam %} id="164" {%endif%}>{{beam.get_downvalues.63}}</span></td>
286 </tr>
286 </tr>
287 </table>
287 </table>
288 </td>
288 </td>
@@ -299,13 +299,10
299 <th>Legend</th>
299 <th>Legend</th>
300 </tr>
300 </tr>
301 <tr>
301 <tr>
302 <td class="text-warning">Connected</td>
302 <td class="text-success">Running and Match</td>
303 </tr>
303 </tr>
304 <tr>
304 <tr>
305 <td class="text-success">Running</td>
305 <td class="text-info">Mismatch</td>
306 </tr>
307 <tr>
308 <td class="text-info">Mismath</td>
309 </tr>
306 </tr>
310 <tr>
307 <tr>
311 <td class="text-danger">Disconnected</td>
308 <td class="text-danger">Disconnected</td>
@@ -340,6 +337,8
340 $(document).ready(function () {
337 $(document).ready(function () {
341
338
342 // var elemento = document.getElementById("4");
339 // var elemento = document.getElementById("4");
340 // console.log(beam.pk);
341 // console.log(active_beam);
343
342
344 var socket = io.connect('http://' + document.domain + ':' + location.port);
343 var socket = io.connect('http://' + document.domain + ':' + location.port);
345
344
@@ -357,7 +356,7
357 })
356 })
358
357
359 socket.on('beams_ack', function(data) {
358 socket.on('beams_ack', function(data) {
360 console.log('beams_ack');
359 // console.log('beams_ack');
361 var text = data['msg'];
360 var text = data['msg'];
362
361
363 for (let i=1; i<=64;i++){
362 for (let i=1; i<=64;i++){
@@ -365,7 +364,7
365 var elemento = document.getElementById(text[i-1]);
364 var elemento = document.getElementById(text[i-1]);
366 var elemento2 = document.getElementById(text[i-1]+100);
365 var elemento2 = document.getElementById(text[i-1]+100);
367 if (text[i-1]<=64){
366 if (text[i-1]<=64){
368 console.log("1")
367 // console.log("1")
369 // elemento=document.getElementById(text[i-1]);
368 // elemento=document.getElementById(text[i-1]);
370 elemento.style.color="green";
369 elemento.style.color="green";
371 elemento.style.fontWeight = "bold";
370 elemento.style.fontWeight = "bold";
@@ -374,9 +373,9
374 else if (text[i-1]>64){
373 else if (text[i-1]>64){
375 elemento=document.getElementById(text[i-1]-64);
374 elemento=document.getElementById(text[i-1]-64);
376 elemento2=document.getElementById(text[i-1]-64+100);
375 elemento2=document.getElementById(text[i-1]-64+100);
377 elemento.style.color="yellow";
376 elemento.style.color="blue";
378 elemento.style.fontWeight = "bold";
377 elemento.style.fontWeight = "bold";
379 elemento2.style.color="yellow";
378 elemento2.style.color="blue";
380 elemento2.style.fontWeight = "bold"}
379 elemento2.style.fontWeight = "bold"}
381 else {
380 else {
382 elemento.style.color="red";
381 elemento.style.color="red";
@@ -387,7 +386,7
387
386
388
387
389
388
390 console.log(text[0])
389 // console.log(text[0])
391
390
392
391
393 // $('#chatLog').val(text);
392 // $('#chatLog').val(text);
@@ -408,9 +407,9
408
407
409 change_beam_mqtt_btn=$("#change_beam_mqtt{{forloop.counter}}")
408 change_beam_mqtt_btn=$("#change_beam_mqtt{{forloop.counter}}")
410 change_beam_mqtt_btn.click(function () {
409 change_beam_mqtt_btn.click(function () {
411 info="change_beam_mqtt{{forloop.counter}}"
410 // info="change_beam_mqtt{{forloop.counter}}"
412 socket.emit('change_beam',{data:info});
411 // socket.emit('change_beam',{data:info});
413 document.location = "{% url 'url_send_beam_mqtt' dev_conf.id beam.id %}";
412 document.location = "{% url 'url_change_beam_mqtt' dev_conf.id beam.id %}";
414 });
413 });
415
414
416 {% endif %}
415 {% endif %}
@@ -4,12 +4,13 from apps.abs import views
4
4
5 urlpatterns = (
5 urlpatterns = (
6 path('<int:id_conf>/', views.abs_conf, name='url_abs_conf'),
6 path('<int:id_conf>/', views.abs_conf, name='url_abs_conf'),
7 path('<int:id_conf>/mqtt', views.abs_conf_mqtt, name='url_abs_conf_mqtt'),
7 path('<int:id_conf>/edit/', views.abs_conf_edit, name='url_edit_abs_conf'),
8 path('<int:id_conf>/edit/', views.abs_conf_edit, name='url_edit_abs_conf'),
8 path('alert/', views.abs_conf_alert, name='url_alert_abs_conf'),
9 path('alert/', views.abs_conf_alert, name='url_alert_abs_conf'),
9 path('<int:id_conf>/import/', views.import_file, name='url_import_abs_conf'),
10 path('<int:id_conf>/import/', views.import_file, name='url_import_abs_conf'),
10 #url(r'^(?P<id_conf>-?\d+)/status/', views.abs_conf, {'status_request':True},name='url_status_abs_conf'),
11 #url(r'^(?P<id_conf>-?\d+)/status/', views.abs_conf, {'status_request':True},name='url_status_abs_conf'),
11 path('<int:id_conf>/change_beam/<int:id_beam>/', views.send_beam, name='url_send_beam'),
12 path('<int:id_conf>/change_beam/<int:id_beam>/', views.send_beam, name='url_send_beam'),
12 path('<int:id_conf>/change_beam/<int:id_beam>/', views.change_beam_mqtt, name='url_send_beam_mqtt'),
13 path('<int:id_conf>/change_beam_mqtt/<int:id_beam>/', views.change_beam_mqtt, name='url_change_beam_mqtt'),
13 path('<int:id_conf>/plot/', views.plot_patterns, name='url_plot_abs_patterns'),
14 path('<int:id_conf>/plot/', views.plot_patterns, name='url_plot_abs_patterns'),
14 path('<int:id_conf>/plot/<int:id_beam>/', views.plot_patterns, name='url_plot_abs_patterns2'),
15 path('<int:id_conf>/plot/<int:id_beam>/', views.plot_patterns, name='url_plot_abs_patterns2'),
15 path('<int:id_conf>/plot/<int:id_beam>/<slug:antenna>/pattern.png/', views.plot_pattern, name='url_plot_beam'),
16 path('<int:id_conf>/plot/<int:id_beam>/<slug:antenna>/pattern.png/', views.plot_pattern, name='url_plot_beam'),
@@ -173,7 +173,43 def abs_conf(request, id_conf):
173
173
174 return render(request, 'abs_conf.html', kwargs)
174 return render(request, 'abs_conf.html', kwargs)
175
175
176 def abs_conf_mqtt(request, id_conf):
177 print("Estoy en abs_conf_mqtt",flush=True)
178 conf = get_object_or_404(ABSConfiguration, pk=id_conf)
179 beams = ABSBeam.objects.filter(abs_conf=conf)
180 #------------Colors for Active Beam:-------------
181 all_status = {}
182 module_messages = json.loads(conf.module_messages)
183
184 kwargs = {}
185 kwargs['connected_modules'] = str(conf.connected_modules())+'/64'
186 kwargs['dev_conf'] = conf
187
188 if conf.operation_mode == 0:
189 kwargs['dev_conf_keys'] = ['label', 'operation_mode']
190 else:
191 kwargs['dev_conf_keys'] = ['label', 'operation_mode', 'operation_value']
192
193 kwargs['title'] = 'ABS Configuration'
194 kwargs['suptitle'] = 'Details'
195 kwargs['button'] = 'Edit Configuration'
196
197 if conf.active_beam != 0:
198 kwargs['active_beam'] = int(conf.active_beam)
176
199
200 kwargs['mqtt']=True
201 kwargs['beams'] = beams
202 kwargs['modules_status'] = all_status
203 kwargs['module_messages'] = module_messages
204 ###### SIDEBAR ######
205 kwargs.update(sidebar(conf=conf))
206 print("conf.active_beam: {}",format(conf.active_beam))
207
208 # print(conf.beam.pk)
209
210 return render(request, 'abs_conf_mqtt.html', kwargs)
211 # // console.log(beam.pk);
212 # // console.log(active_beam);
177 # def abs_conf_mqtt(request, id_conf):
213 # def abs_conf_mqtt(request, id_conf):
178 # # socket.on('beams_ack',function(data){
214 # # socket.on('beams_ack',function(data){
179 # ack=data;
215 # ack=data;
@@ -197,7 +233,7 def abs_conf_edit(request, id_conf):
197 if form.is_valid():
233 if form.is_valid():
198 conf = form.save(commit=False)
234 conf = form.save(commit=False)
199 conf.save()
235 conf.save()
200 return redirect('url_abs_conf', id_conf=conf.id)
236 return redirect('url_abs_conf_mqtt', id_conf=conf.id)
201
237
202 ###### SIDEBAR ######
238 ###### SIDEBAR ######
203 kwargs = {}
239 kwargs = {}
@@ -210,6 +246,7 def abs_conf_edit(request, id_conf):
210 kwargs['title'] = 'Device Configuration'
246 kwargs['title'] = 'Device Configuration'
211 kwargs['suptitle'] = 'Edit'
247 kwargs['suptitle'] = 'Edit'
212 kwargs['button'] = 'Save'
248 kwargs['button'] = 'Save'
249 kwargs['mqtt']=True
213
250
214 kwargs['edit'] = True
251 kwargs['edit'] = True
215
252
@@ -295,7 +332,7 def send_beam(request, id_conf, id_beam):
295 kwargs = {
332 kwargs = {
296 'title': 'ABS',
333 'title': 'ABS',
297 'suptitle': conf.label,
334 'suptitle': conf.label,
298 'message': 'Are you sure you want to change ABS Beam to: {}?'.format(beam.name),
335 'message': 'Are you sure you want to change ABS Beam through SEND BEAM to: {}?'.format(beam.name),
299 'delete': False
336 'delete': False
300 }
337 }
301 kwargs['menu_configurations'] = 'active'
338 kwargs['menu_configurations'] = 'active'
@@ -305,8 +342,10 def send_beam(request, id_conf, id_beam):
305 def change_beam_mqtt(request, id_conf, id_beam):
342 def change_beam_mqtt(request, id_conf, id_beam):
306
343
307 conf = get_object_or_404(ABSConfiguration, pk=id_conf)
344 conf = get_object_or_404(ABSConfiguration, pk=id_conf)
345 print("conf: {}".format(conf),flush=True)
308
346
309 abs = Configuration.objects.filter(pk=conf.device.conf_active).first()
347 abs = Configuration.objects.filter(pk=conf.device.conf_active).first()
348 print("abs: {}".format(abs),flush=True)
310 if abs!=conf:
349 if abs!=conf:
311 url = '#' if abs is None else abs.get_absolute_url()
350 url = '#' if abs is None else abs.get_absolute_url()
312 label = 'None' if abs is None else abs.label
351 label = 'None' if abs is None else abs.label
@@ -317,7 +356,7 def change_beam_mqtt(request, id_conf, id_beam):
317 label
356 label
318 ))
357 ))
319 )
358 )
320 return redirect(conf.get_absolute_url())
359 return redirect(conf.get_absolute_mqtt_url())
321
360
322 beams = ABSBeam.objects.filter(abs_conf=conf)
361 beams = ABSBeam.objects.filter(abs_conf=conf)
323 beam = get_object_or_404(ABSBeam, pk=id_beam)
362 beam = get_object_or_404(ABSBeam, pk=id_beam)
@@ -326,7 +365,7 def change_beam_mqtt(request, id_conf, id_beam):
326
365
327 beams_list = ABSBeam.objects.filter(abs_conf=conf)
366 beams_list = ABSBeam.objects.filter(abs_conf=conf)
328 conf.active_beam = id_beam
367 conf.active_beam = id_beam
329
368
330 i = 0
369 i = 0
331 for b in beams_list:
370 for b in beams_list:
332 if b.id == int(id_beam):
371 if b.id == int(id_beam):
@@ -335,41 +374,16 def change_beam_mqtt(request, id_conf, id_beam):
335 i += 1
374 i += 1
336 beam_pos = i + 1 #Estandarizar
375 beam_pos = i + 1 #Estandarizar
337
376
338 print('{} Position {}'.format(beam.name,str(beam_pos)))
377 print('{} Position {}'.format(beam.name,str(beam_pos)),flush=True)
339 conf.change_beam_mqtt(beam_pos)
378 conf.change_beam_mqtt(beam_pos)
340
341 module_messages = json.loads(conf.module_messages)
342 kwargs = {}
343 kwargs['connected_modules'] = str(conf.connected_modules())+'/64'
344 kwargs['dev_conf'] = conf
345
346 if conf.operation_mode == 0:
347 kwargs['dev_conf_keys'] = ['label', 'operation_mode']
348 else:
349 kwargs['dev_conf_keys'] = ['label', 'operation_mode', 'operation_value']
350
351 kwargs['title'] = 'ABS Configuration'
352 kwargs['suptitle'] = 'Details'
353 kwargs['button'] = 'Edit Configuration'
354 if conf.active_beam != 0:
355 kwargs['active_beam'] = int(conf.active_beam)
356
357
358 kwargs['beams'] = beams
359 # kwargs['modules_status'] = all_status
360 # kwargs['color_status'] = color_status
361
362
363 kwargs['module_messages'] = module_messages
364
365 ###### SIDEBAR ######
366 kwargs.update(sidebar(conf=conf))
367
379
368 # return redirect('url_abs_conf', conf.id)
380 # return redirect('url_abs_conf', conf.id)
369 return render(request, 'abs_conf_mqtt.html',kwargs)
381 return redirect('url_abs_conf_mqtt', conf.id)
382 # return render(request, 'abs_conf_mqtt.html',kwargs)
370
383
371 kwargs = {
384 kwargs = {
372 'title': 'ABS',
385 'title': 'ABS',
386 'mqtt':True,
373 'suptitle': conf.label,
387 'suptitle': conf.label,
374 'message': 'Are you sure you want to change ABS Beam through MQTT to: {}?'.format(beam.name),
388 'message': 'Are you sure you want to change ABS Beam through MQTT to: {}?'.format(beam.name),
375 'delete': False
389 'delete': False
@@ -547,11 +561,11 def abs_send_beam_up(sid, message):
547 def abs_send_beam_down(sid, message):
561 def abs_send_beam_down(sid, message):
548 mqtt_client.publish('abs/beams_down', message['data'])
562 mqtt_client.publish('abs/beams_down', message['data'])
549
563
550 @sio.event
564 # @sio.event
551 def change_beam(sid,message):
565 # def change_beam(sid,message):
552 data=str(message['data'])
566 # data=str(message['data'])
553 data=data[16]
567 # data=data[16]
554 mqtt_client.publish('abs/change_beam',data)
568 # mqtt_client.publish('abs/change_beam',data)
555
569
556
570
557
571
@@ -815,6 +815,12 class Configuration(PolymorphicModel):
815
815
816 def get_absolute_url(self):
816 def get_absolute_url(self):
817 return reverse('url_%s_conf' % self.device.device_type.name, args=[str(self.id)])
817 return reverse('url_%s_conf' % self.device.device_type.name, args=[str(self.id)])
818
819 def get_absolute_mqtt_url(self):
820 if self.device.device_type.name=='abs':
821 return reverse('url_%s_conf_mqtt' % self.device.device_type.name, args=[str(self.id)])
822 else:
823 return reverse('url_%s_conf' % self.device.device_type.name, args=[str(self.id)])
818
824
819 def get_absolute_url_edit(self):
825 def get_absolute_url_edit(self):
820 return reverse('url_edit_%s_conf' % self.device.device_type.name, args=[str(self.id)])
826 return reverse('url_edit_%s_conf' % self.device.device_type.name, args=[str(self.id)])
@@ -40,7 +40,7
40 {% endfor%}
40 {% endfor%}
41 </tr>
41 </tr>
42 {% for object in objects %}
42 {% for object in objects %}
43 <tr class="clickable-row" data-href="{{object.get_absolute_url}}">
43 <tr class="clickable-row" data-href="{{object.get_absolute_mqtt_url}}">
44 <td>{{ forloop.counter|add:offset }}</td>
44 <td>{{ forloop.counter|add:offset }}</td>
45 {% for key in keys %}
45 {% for key in keys %}
46 {% if key == 'actions' %}
46 {% if key == 'actions' %}
@@ -1588,13 +1588,11 def dev_conf_write_mqtt(request,id_conf):
1588 # kwargs['modules_status'] = all_status
1588 # kwargs['modules_status'] = all_status
1589 # kwargs['color_status'] = color_status
1589 # kwargs['color_status'] = color_status
1590
1590
1591
1592 kwargs['module_messages'] = module_messages
1591 kwargs['module_messages'] = module_messages
1593
1592
1594 ###### SIDEBAR ######
1593 ###### SIDEBAR ######
1595 kwargs.update(sidebar(conf=conf))
1594 kwargs.update(sidebar(conf=conf))
1596
1595
1597
1598 return render(request, 'abs_conf_mqtt.html',kwargs)
1596 return render(request, 'abs_conf_mqtt.html',kwargs)
1599
1597
1600 kwargs = {
1598 kwargs = {
General Comments 0
You need to be logged in to leave comments. Login now