Pyros applications
Version 34 (Paul Carensac, 06/06/2016 01:18 pm)
1 | 1 | Paul Carensac | h1. Pyros applications |
---|---|---|---|
2 | 1 | Paul Carensac | |
3 | 2 | Paul Carensac | List and details of all the pyros applications. |
4 | 2 | Paul Carensac | |
5 | 17 | Paul Carensac | {{>toc}} |
6 | 17 | Paul Carensac | |
7 | 2 | Paul Carensac | --- |
8 | 2 | Paul Carensac | |
9 | 2 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}pyrosapp% |
10 | 2 | Paul Carensac | |
11 | 3 | Paul Carensac | h3. Purpose |
12 | 2 | Paul Carensac | |
13 | 2 | Paul Carensac | * Contains all the database Models |
14 | 2 | Paul Carensac | * Basic tests in tests.py |
15 | 2 | Paul Carensac | * Backoffice configuration in admin.py |
16 | 2 | Paul Carensac | |
17 | 3 | Paul Carensac | h3. Notes |
18 | 2 | Paul Carensac | |
19 | 2 | Paul Carensac | * Will be progressively deleted while models being displaced |
20 | 2 | Paul Carensac | |
21 | 2 | Paul Carensac | --- |
22 | 2 | Paul Carensac | |
23 | 2 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}dashboard% |
24 | 2 | Paul Carensac | |
25 | 3 | Paul Carensac | h3. Purpose |
26 | 2 | Paul Carensac | |
27 | 2 | Paul Carensac | * Interface for all external users |
28 | 2 | Paul Carensac | * Leads to displays and actions for all the pyros modules (users, requests, system execution, ...) |
29 | 2 | Paul Carensac | |
30 | 4 | Paul Carensac | h3. Evolution |
31 | 4 | Paul Carensac | |
32 | 4 | Paul Carensac | * Creating application |
33 | 4 | Paul Carensac | |
34 | 4 | Paul Carensac | * manage.py startapp dashboard |
35 | 5 | Paul Carensac | * added 'dashboard' in settings.py -> INSTALLED_APPS |
36 | 5 | Paul Carensac | * created a urls.py file in dashboard module |
37 | 5 | Paul Carensac | * added _url(r'^dashboard/', include('dashboard.urls'))_ in pyros/urls.py -> urlpatterns |
38 | 5 | Paul Carensac | * created templates/ and templates/dashboard/ folders in dashboard module |
39 | 5 | Paul Carensac | |
40 | 5 | Paul Carensac | * Main page |
41 | 5 | Paul Carensac | |
42 | 5 | Paul Carensac | * added 'home' view in views.py |
43 | 5 | Paul Carensac | * linked 'home' view to 8000/dashboard URL |
44 | 5 | Paul Carensac | * created a template for the homepage in templates/dashboard/ (with bootstrap) |
45 | 5 | Paul Carensac | * created views, views linking (urls.py) and templates for the dashboard modules |
46 | 5 | Paul Carensac | * redirected mainpage buttons to Admin interface (temporary) |
47 | 4 | Paul Carensac | |
48 | 22 | Paul Carensac | * System page (logs) |
49 | 22 | Paul Carensac | |
50 | 22 | Paul Carensac | * Retrieve logs from the db |
51 | 26 | Paul Carensac | * Print logs and automatically update every second via an ajax request |
52 | 22 | Paul Carensac | |
53 | 3 | Paul Carensac | h3. Notes |
54 | 2 | Paul Carensac | |
55 | 2 | Paul Carensac | * The buttons lead to the Admin interface for the moment |
56 | 7 | Paul Carensac | * Added bootstrap3 module (see Installation) |
57 | 7 | Paul Carensac | * Added Django Template Editor (see Eclipse configuration) |
58 | 2 | Paul Carensac | |
59 | 3 | Paul Carensac | h3. TODO |
60 | 2 | Paul Carensac | |
61 | 2 | Paul Carensac | * Create the backoffice views as the modules are integrated in pyros |
62 | 2 | Paul Carensac | * Think about a system of permissions |
63 | 2 | Paul Carensac | |
64 | 2 | Paul Carensac | --- |
65 | 8 | Paul Carensac | |
66 | 8 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}scheduler% |
67 | 8 | Paul Carensac | |
68 | 8 | Paul Carensac | h3. Purpose |
69 | 8 | Paul Carensac | |
70 | 8 | Paul Carensac | * Creates the planning with the OBSERVABLE sequences |
71 | 8 | Paul Carensac | * Give acces to a web page to see the current planning |
72 | 8 | Paul Carensac | |
73 | 8 | Paul Carensac | h3. Evolution |
74 | 8 | Paul Carensac | |
75 | 8 | Paul Carensac | * Creating application |
76 | 8 | Paul Carensac | |
77 | 8 | Paul Carensac | * manage.py startapp scheduler |
78 | 8 | Paul Carensac | * added 'scheduler' in settings.py -> INSTALLED_APPS |
79 | 8 | Paul Carensac | * created a urls.py file in scheduler module |
80 | 8 | Paul Carensac | * added _url(r'^scheduler/', include('scheduler.urls'))_ in pyros/urls.py -> urlpatterns |
81 | 8 | Paul Carensac | * created templates/ and templates/scheduler/ folders in scheduler module |
82 | 8 | Paul Carensac | |
83 | 9 | Paul Carensac | * Model modifications |
84 | 1 | Paul Carensac | |
85 | 9 | Paul Carensac | * Schedule |
86 | 9 | Paul Carensac | |
87 | 9 | Paul Carensac | * Remove day_start |
88 | 9 | Paul Carensac | * Remove day_stop |
89 | 9 | Paul Carensac | * Add plan_start |
90 | 13 | Paul Carensac | * Add plan_end |
91 | 9 | Paul Carensac | * Enum system for the status |
92 | 9 | Paul Carensac | * ScheduleHistory |
93 | 9 | Paul Carensac | |
94 | 9 | Paul Carensac | * Remove day_start |
95 | 9 | Paul Carensac | * Remove day_stop |
96 | 9 | Paul Carensac | * Add plan_start |
97 | 13 | Paul Carensac | * Add plan_end |
98 | 9 | Paul Carensac | * Sequence |
99 | 9 | Paul Carensac | |
100 | 9 | Paul Carensac | * Remove exec_start |
101 | 9 | Paul Carensac | * Remove exec_stop |
102 | 9 | Paul Carensac | * Add tsp |
103 | 9 | Paul Carensac | * Add tep |
104 | 9 | Paul Carensac | * Add jd1 |
105 | 9 | Paul Carensac | * Add jd2 |
106 | 9 | Paul Carensac | * Add deltaTL |
107 | 9 | Paul Carensac | * Add deltaTR |
108 | 9 | Paul Carensac | * Add t_prefered |
109 | 9 | Paul Carensac | * Changed duration from Float to DecimalField (more precise) |
110 | 15 | Paul Carensac | * Add overhead |
111 | 15 | Paul Carensac | |
112 | 10 | Paul Carensac | * manage.py makemigrations sheduler ; manage.py migrate |
113 | 10 | Paul Carensac | |
114 | 10 | Paul Carensac | * Creation of Scheduler and Interval classes in models.py |
115 | 10 | Paul Carensac | |
116 | 10 | Paul Carensac | * Implementation of the Interval class |
117 | 10 | Paul Carensac | |
118 | 12 | Paul Carensac | * Implementation of the Scheduler's 'make_schedule' function (and children). This is the only entry point for now. This function creates the planning (organizes the observable sequences). |
119 | 9 | Paul Carensac | |
120 | 14 | Paul Carensac | * Creation of the web interface |
121 | 14 | Paul Carensac | |
122 | 14 | Paul Carensac | * Added current_schedule.html in template/scheduler folder |
123 | 14 | Paul Carensac | * Created view and url linking to this template (with current planning retrieving) |
124 | 14 | Paul Carensac | |
125 | 14 | Paul Carensac | * Creation of the simulator |
126 | 14 | Paul Carensac | |
127 | 14 | Paul Carensac | * Created a second entry point in the Scheduler class (with a few minor adaptations to handle SIMULATION mode) |
128 | 14 | Paul Carensac | * Created a simulator module in the scheduler |
129 | 14 | Paul Carensac | |
130 | 14 | Paul Carensac | * Added the MyHTMLParser class (easy implementation of HTMLParser) |
131 | 23 | Paul Carensac | * Added Simulator class. It parses a file given in parametr to retrieve sequences and create a schedule |
132 | 14 | Paul Carensac | * Created a second view linked to schedule/simulation to show simulation results |
133 | 1 | Paul Carensac | |
134 | 29 | Paul Carensac | * Supression du système d'agent et ajout de la tâche (celery) de scheduling |
135 | 29 | Paul Carensac | |
136 | 23 | Paul Carensac | * Main update 19/05/2016 : overheads & historic system |
137 | 23 | Paul Carensac | |
138 | 23 | Paul Carensac | * Deleted ScheduleHistory |
139 | 23 | Paul Carensac | * Transformed the Sequence - Schedule relation to ManyToMany |
140 | 23 | Paul Carensac | * Moved the scheduling information into the M2M relationship class (shs = ScheduleHasSequences) |
141 | 23 | Paul Carensac | * Added a static overhead into scheduling (can be set from the calling code, through scheduler.max_overhead = blabla(float)) |
142 | 23 | Paul Carensac | |
143 | 23 | Paul Carensac | h3. Tests |
144 | 23 | Paul Carensac | |
145 | 30 | Paul Carensac | * Some tests in test.py to test the different functionalities of the scheduler. These tests include the simulation. |
146 | 24 | Paul Carensac | * A simulator at localhost:8000/scheduler/simulation, taking sequences from scheduler/sequences_cador.html |
147 | 24 | Paul Carensac | |
148 | 8 | Paul Carensac | h3. Notes |
149 | 1 | Paul Carensac | |
150 | 1 | Paul Carensac | * Priorities and quotas are default-calculated (for the moment) |
151 | 9 | Paul Carensac | * What is the 'flag' attribute in the Schedule model ? |
152 | 1 | Paul Carensac | |
153 | 9 | Paul Carensac | h3. TODO |
154 | 13 | Paul Carensac | |
155 | 9 | Paul Carensac | * Determine plan_start & plan_end |
156 | 9 | Paul Carensac | * Priority and quota computing |
157 | 1 | Paul Carensac | * Re-scheduling |
158 | 9 | Paul Carensac | * Blank space filling |
159 | 23 | Paul Carensac | * Change t_prefered handling (place in nearest interval instead of first-before) |
160 | 18 | Paul Carensac | |
161 | 18 | Paul Carensac | --- |
162 | 18 | Paul Carensac | |
163 | 18 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}alert_manager% |
164 | 18 | Paul Carensac | |
165 | 18 | Paul Carensac | h3. Purpose |
166 | 18 | Paul Carensac | |
167 | 18 | Paul Carensac | * Listen to VOEvent network |
168 | 18 | Paul Carensac | * Sort interesting events |
169 | 18 | Paul Carensac | * Create requests according to these events |
170 | 18 | Paul Carensac | * Manage the requests created via the alerts |
171 | 18 | Paul Carensac | |
172 | 18 | Paul Carensac | h3. Evolution |
173 | 18 | Paul Carensac | |
174 | 18 | Paul Carensac | * Creating application |
175 | 18 | Paul Carensac | |
176 | 18 | Paul Carensac | * See scheduler documentation above |
177 | 18 | Paul Carensac | |
178 | 18 | Paul Carensac | * Implementation of the agent system |
179 | 18 | Paul Carensac | |
180 | 18 | Paul Carensac | * Created agent.py whith a "class AlertManagerAgent(Agent):" inside |
181 | 18 | Paul Carensac | * Overriding agent's 'work' and 'shutdown' method |
182 | 18 | Paul Carensac | * Added message(s) to agent.actions_by_message dictionnary, with the functions associated to these messages |
183 | 18 | Paul Carensac | * Added the Agent's launch system in apps.py |
184 | 18 | Paul Carensac | |
185 | 18 | Paul Carensac | * Implementation of the VOEventListener Thread |
186 | 18 | Paul Carensac | |
187 | 18 | Paul Carensac | * Created a "class VOEventListener(Thread):" in agent.py |
188 | 18 | Paul Carensac | * Overriding the run method |
189 | 18 | Paul Carensac | |
190 | 28 | Paul Carensac | * 19/05/2016 : deleted the agent system (deleted from the applications below too) |
191 | 1 | Paul Carensac | |
192 | 27 | Paul Carensac | * Added some VOEvents in events_to_send |
193 | 27 | Paul Carensac | |
194 | 27 | Paul Carensac | * Installed Comet (see in [[Technical components]] section) |
195 | 1 | Paul Carensac | |
196 | 28 | Paul Carensac | * Created 2 celery tasks in tesks.py : alert_listener and change_obs_strategy |
197 | 28 | Paul Carensac | |
198 | 28 | Paul Carensac | * Added alert_listener launch at server start |
199 | 28 | Paul Carensac | |
200 | 28 | Paul Carensac | * Implemented alert_listener : it waits for an event file to be created in events_received, then read it and creates a request |
201 | 28 | Paul Carensac | |
202 | 28 | Paul Carensac | * Added a simulator system ( see section Tests below ) |
203 | 28 | Paul Carensac | |
204 | 28 | Paul Carensac | h3. Tests |
205 | 28 | Paul Carensac | |
206 | 28 | Paul Carensac | * Simulator : |
207 | 28 | Paul Carensac | |
208 | 28 | Paul Carensac | * You first need to set settings.SIMULATION to True (in pyros/settings.py) |
209 | 28 | Paul Carensac | * Start celery workers (scripts/start_celery_workers.sh) |
210 | 28 | Paul Carensac | * Start server (manage.py runserver) |
211 | 28 | Paul Carensac | * Go to localhost:8000/alert_manager/simulation, and press the button ! |
212 | 28 | Paul Carensac | * This will read into the simulation_sequences file. |
213 | 28 | Paul Carensac | |
214 | 28 | Paul Carensac | * Test AlertListenerTests.test_alert_reception : |
215 | 28 | Paul Carensac | |
216 | 28 | Paul Carensac | * Tests if the alert_listener is working well. |
217 | 28 | Paul Carensac | * +Be careful :+ this will act on the production database, and will start the entire alert workflow |
218 | 28 | Paul Carensac | * To start it : script/celery_test.sh alert_manager |
219 | 28 | Paul Carensac | |
220 | 27 | Paul Carensac | h3. Notes |
221 | 1 | Paul Carensac | |
222 | 28 | Paul Carensac | * The request created by alert_listener is hard-coded |
223 | 28 | Paul Carensac | |
224 | 18 | Paul Carensac | h3. TODO |
225 | 1 | Paul Carensac | |
226 | 28 | Paul Carensac | * Analysis of VOEvents to create real requests |
227 | 28 | Paul Carensac | * change_obs_strategy task |
228 | 18 | Paul Carensac | |
229 | 18 | Paul Carensac | --- |
230 | 18 | Paul Carensac | |
231 | 20 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}analyzer% |
232 | 18 | Paul Carensac | |
233 | 18 | Paul Carensac | h3. Purpose |
234 | 18 | Paul Carensac | |
235 | 18 | Paul Carensac | * Analyze the images taken by the observation manager |
236 | 18 | Paul Carensac | |
237 | 18 | Paul Carensac | h3. Evolution |
238 | 18 | Paul Carensac | |
239 | 18 | Paul Carensac | * Creating application |
240 | 18 | Paul Carensac | |
241 | 18 | Paul Carensac | * See scheduler documentation above |
242 | 18 | Paul Carensac | |
243 | 18 | Paul Carensac | * Implementation of the agent system |
244 | 18 | Paul Carensac | |
245 | 18 | Paul Carensac | * See alert_manager above |
246 | 18 | Paul Carensac | * 'shutdown' method is not implemented here because the Agent's default one is enough |
247 | 18 | Paul Carensac | |
248 | 18 | Paul Carensac | h3. Notes |
249 | 18 | Paul Carensac | |
250 | 18 | Paul Carensac | h3. TODO |
251 | 18 | Paul Carensac | |
252 | 18 | Paul Carensac | --- |
253 | 18 | Paul Carensac | |
254 | 19 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}majordome% |
255 | 18 | Paul Carensac | |
256 | 18 | Paul Carensac | h3. Purpose |
257 | 18 | Paul Carensac | |
258 | 18 | Paul Carensac | h3. Evolution |
259 | 18 | Paul Carensac | |
260 | 18 | Paul Carensac | * Creating application |
261 | 18 | Paul Carensac | |
262 | 18 | Paul Carensac | * See scheduler documentation above |
263 | 18 | Paul Carensac | |
264 | 21 | Paul Carensac | * Implementation of the agent system |
265 | 1 | Paul Carensac | |
266 | 21 | Paul Carensac | * See alert_manager above |
267 | 21 | Paul Carensac | |
268 | 21 | Paul Carensac | * Implementation of the MajordomeExecutor Thread |
269 | 21 | Paul Carensac | |
270 | 21 | Paul Carensac | * Created a "class MajordomeExecutor(Thread):" in agent.py |
271 | 21 | Paul Carensac | * Overriding the run method |
272 | 21 | Paul Carensac | |
273 | 21 | Paul Carensac | |
274 | 18 | Paul Carensac | h3. Notes |
275 | 18 | Paul Carensac | |
276 | 18 | Paul Carensac | h3. TODO |
277 | 18 | Paul Carensac | |
278 | 18 | Paul Carensac | --- |
279 | 18 | Paul Carensac | |
280 | 19 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}monitoring% |
281 | 18 | Paul Carensac | |
282 | 18 | Paul Carensac | h3. Purpose |
283 | 18 | Paul Carensac | |
284 | 18 | Paul Carensac | h3. Evolution |
285 | 18 | Paul Carensac | |
286 | 18 | Paul Carensac | * Creating application |
287 | 1 | Paul Carensac | |
288 | 18 | Paul Carensac | * See scheduler documentation above |
289 | 1 | Paul Carensac | |
290 | 21 | Paul Carensac | * Implementation of the agent system |
291 | 1 | Paul Carensac | |
292 | 21 | Paul Carensac | * See alert_manager above |
293 | 21 | Paul Carensac | * 'shutdown' method is not implemented here because the Agent's default one is enough |
294 | 21 | Paul Carensac | |
295 | 18 | Paul Carensac | |
296 | 18 | Paul Carensac | h3. Notes |
297 | 18 | Paul Carensac | |
298 | 18 | Paul Carensac | h3. TODO |
299 | 18 | Paul Carensac | |
300 | 18 | Paul Carensac | --- |
301 | 19 | Paul Carensac | |
302 | 18 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}observation_manager% |
303 | 18 | Paul Carensac | |
304 | 18 | Paul Carensac | h3. Purpose |
305 | 18 | Paul Carensac | |
306 | 18 | Paul Carensac | h3. Evolution |
307 | 18 | Paul Carensac | |
308 | 1 | Paul Carensac | * Creating application |
309 | 18 | Paul Carensac | |
310 | 1 | Paul Carensac | * See scheduler documentation above |
311 | 1 | Paul Carensac | |
312 | 21 | Paul Carensac | * Implementation of the agent system |
313 | 1 | Paul Carensac | |
314 | 21 | Paul Carensac | * See alert_manager above |
315 | 21 | Paul Carensac | |
316 | 21 | Paul Carensac | * Implementation of the ObservationExecutor Thread |
317 | 21 | Paul Carensac | |
318 | 21 | Paul Carensac | * Created a "class ObservationExecutor(Thread):" in agent.py |
319 | 21 | Paul Carensac | * Overriding the run method |
320 | 21 | Paul Carensac | |
321 | 18 | Paul Carensac | |
322 | 18 | Paul Carensac | h3. Notes |
323 | 18 | Paul Carensac | |
324 | 18 | Paul Carensac | h3. TODO |
325 | 18 | Paul Carensac | |
326 | 19 | Paul Carensac | --- |
327 | 18 | Paul Carensac | |
328 | 18 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}routine_manager% |
329 | 18 | Paul Carensac | |
330 | 18 | Paul Carensac | h3. Purpose |
331 | 18 | Paul Carensac | |
332 | 18 | Paul Carensac | h3. Evolution |
333 | 18 | Paul Carensac | |
334 | 18 | Paul Carensac | * Creating application |
335 | 18 | Paul Carensac | |
336 | 18 | Paul Carensac | * See scheduler documentation above |
337 | 18 | Paul Carensac | |
338 | 18 | Paul Carensac | |
339 | 18 | Paul Carensac | h3. Notes |
340 | 18 | Paul Carensac | |
341 | 18 | Paul Carensac | h3. TODO |
342 | 18 | Paul Carensac | |
343 | 19 | Paul Carensac | --- |
344 | 18 | Paul Carensac | |
345 | 18 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}user_manager% |
346 | 18 | Paul Carensac | |
347 | 18 | Paul Carensac | h3. Purpose |
348 | 18 | Paul Carensac | |
349 | 31 | Paul Carensac | * Handle user create / delete / login / logout |
350 | 31 | Paul Carensac | * Allow to see user profile and make password recovery |
351 | 31 | Paul Carensac | |
352 | 18 | Paul Carensac | h3. Evolution |
353 | 18 | Paul Carensac | |
354 | 18 | Paul Carensac | * Creating application |
355 | 18 | Paul Carensac | |
356 | 18 | Paul Carensac | * See scheduler documentation above |
357 | 18 | Paul Carensac | |
358 | 32 | Paul Carensac | * Taking and adapting templates from Alexandru project |
359 | 32 | Paul Carensac | |
360 | 32 | Paul Carensac | * User creation |
361 | 32 | Paul Carensac | |
362 | 32 | Paul Carensac | * Form in admin.py |
363 | 33 | Paul Carensac | * Functions to verify if email doesn't exist and if passwords match |
364 | 33 | Paul Carensac | * Added check to pass login page if user is already autheticated |
365 | 33 | Paul Carensac | * Restricted access to all pyros views to authenticated users (except from user creation and login) with @login_required |
366 | 18 | Paul Carensac | |
367 | 18 | Paul Carensac | h3. Notes |
368 | 18 | Paul Carensac | |
369 | 18 | Paul Carensac | h3. TODO |
370 | 31 | Paul Carensac | |
371 | 31 | Paul Carensac | * Password recovery |
372 | 31 | Paul Carensac | * Profile page |
373 | 31 | Paul Carensac | * User validation by administrator / commission |
374 | 18 | Paul Carensac | |
375 | 18 | Paul Carensac | --- |
376 | 18 | Paul Carensac | |
377 | 20 | Paul Carensac | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}common% |
378 | 18 | Paul Carensac | |
379 | 18 | Paul Carensac | h3. Purpose |
380 | 18 | Paul Carensac | |
381 | 18 | Paul Carensac | * Regroups common data and functions shared by applications |
382 | 18 | Paul Carensac | |
383 | 18 | Paul Carensac | h3. Content |
384 | 18 | Paul Carensac | |
385 | 25 | Paul Carensac | * RequestBuilder - class to build and save in DB the requests |
386 | 18 | Paul Carensac | |
387 | 25 | Paul Carensac | * You can start a request, then add sequences, albums and plans, given their parent class (ex: you need to give a sequence id to create an album) |
388 | 25 | Paul Carensac | * Each function returns the ID of the element it created (to give it to the children classes) |
389 | 25 | Paul Carensac | * To save a request, you need to use validate_request |
390 | 18 | Paul Carensac | |
391 | 18 | Paul Carensac | h3. Notes |
392 | 25 | Paul Carensac | |
393 | 25 | Paul Carensac | * Will probably contain the DB models at last ... |
394 | 18 | Paul Carensac | |
395 | 18 | Paul Carensac | h3. TODO |