@@ -0,0 +1,35 | |||
|
1 | {% extends "base.html" %} | |
|
2 | {% load bootstrap3 %} | |
|
3 | {% load static %} | |
|
4 | {% load main_tags %} | |
|
5 | ||
|
6 | {% block content-title %}{{title}}{% endblock %} | |
|
7 | {% block content-suptitle %}{{suptitle}}{% endblock %} | |
|
8 | ||
|
9 | {% block content %} | |
|
10 | {% if form.is_multipart %} | |
|
11 | <form class="form" enctype="multipart/form-data" method="post" action="{{action}}"> | |
|
12 | {% else %} | |
|
13 | <form class="form" method="post" action="{{action}}"> | |
|
14 | {% endif %} | |
|
15 | {% csrf_token %} | |
|
16 | {% bootstrap_form form layout='horizontal' size='medium' %} | |
|
17 | <div style="clear: both;"></div> | |
|
18 | <br> | |
|
19 | {% if extra_button %} | |
|
20 | <div class="pull-left"> | |
|
21 | <button type="button" class="btn btn-primary" id="bt_{{extra_button}}">{{extra_button}}</button> | |
|
22 | </div> | |
|
23 | {% endif %} | |
|
24 | {% if button %} | |
|
25 | <div class="pull-right"> | |
|
26 | <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button> | |
|
27 | <button type="submit" class="btn btn-primary">{{button}}</button> | |
|
28 | </div> | |
|
29 | {% endif %} | |
|
30 | </form> | |
|
31 | {% endblock %} | |
|
32 | ||
|
33 | {% block sidebar%} | |
|
34 | {% include "sidebar_devices.html" %} | |
|
35 | {% endblock %} |
@@ -63,7 +63,7 class ExperimentForm(forms.ModelForm): | |||
|
63 | 63 | |
|
64 | 64 | class Meta: |
|
65 | 65 | model = Experiment |
|
66 | exclude = [''] | |
|
66 | exclude = ['status'] | |
|
67 | 67 | |
|
68 | 68 | class LocationForm(forms.ModelForm): |
|
69 | 69 | class Meta: |
@@ -71,6 +71,10 class Location(models.Model): | |||
|
71 | 71 | def __unicode__(self): |
|
72 | 72 | return u'%s' % self.name |
|
73 | 73 | |
|
74 | def get_absolute_url(self): | |
|
75 | return reverse('url_device', args=[str(self.id)]) | |
|
76 | ||
|
77 | ||
|
74 | 78 | class DeviceType(models.Model): |
|
75 | 79 | |
|
76 | 80 | name = models.CharField(max_length = 10, choices = DEV_TYPES, default = 'rc') |
@@ -99,10 +103,12 class Device(models.Model): | |||
|
99 | 103 | def __unicode__(self): |
|
100 | 104 | return u'%s | %s' % (self.name, self.ip_address) |
|
101 | 105 | |
|
102 | def get_status(self): | |
|
103 | ||
|
106 | def get_status(self): | |
|
104 | 107 | return self.status |
|
105 | 108 | |
|
109 | def get_absolute_url(self): | |
|
110 | return reverse('url_device', args=[str(self.id)]) | |
|
111 | ||
|
106 | 112 | |
|
107 | 113 | class Campaign(models.Model): |
|
108 | 114 | |
@@ -121,6 +127,9 class Campaign(models.Model): | |||
|
121 | 127 | def __unicode__(self): |
|
122 | 128 | return u'%s' % (self.name) |
|
123 | 129 | |
|
130 | def get_absolute_url(self): | |
|
131 | return reverse('url_campaign', args=[str(self.id)]) | |
|
132 | ||
|
124 | 133 | |
|
125 | 134 | class RunningExperiment(models.Model): |
|
126 | 135 | radar = models.OneToOneField('Location', on_delete=models.CASCADE) |
@@ -145,6 +154,10 class Experiment(models.Model): | |||
|
145 | 154 | def __unicode__(self): |
|
146 | 155 | return u'%s' % (self.name) |
|
147 | 156 | |
|
157 | @property | |
|
158 | def radar(self): | |
|
159 | return self.location | |
|
160 | ||
|
148 | 161 | def clone(self, **kwargs): |
|
149 | 162 | |
|
150 | 163 | confs = Configuration.objects.filter(experiment=self, type=0) |
@@ -201,6 +214,9 class Experiment(models.Model): | |||
|
201 | 214 | |
|
202 | 215 | return color |
|
203 | 216 | |
|
217 | def get_absolute_url(self): | |
|
218 | return reverse('url_experiment', args=[str(self.id)]) | |
|
219 | ||
|
204 | 220 | |
|
205 | 221 | class Configuration(PolymorphicModel): |
|
206 | 222 |
@@ -1,32 +1,12 | |||
|
1 | {% extends "base.html" %} | |
|
1 | {% extends "base_edit.html" %} | |
|
2 | 2 | {% load bootstrap3 %} |
|
3 | 3 | {% load static %} |
|
4 | 4 | {% load main_tags %} |
|
5 | ||
|
5 | 6 | {% block extra-head %} |
|
6 | 7 | <link href="{% static 'css/bootstrap-datetimepicker.min.css' %}" media="screen" rel="stylesheet"> |
|
7 | 8 | {% endblock %} |
|
8 | 9 | |
|
9 | {% block camp-active %}active{% endblock %} | |
|
10 | ||
|
11 | {% block content-title %}{{title}}{% endblock %} | |
|
12 | {% block content-suptitle %}{{suptitle}}{% endblock %} | |
|
13 | ||
|
14 | {% block content %} | |
|
15 | <form class="form" method="post" action=""> | |
|
16 | {% csrf_token %} | |
|
17 | {% bootstrap_form form layout='horizontal' size='medium' %} | |
|
18 | <div style="clear: both;"></div> | |
|
19 | {% if button %} | |
|
20 | <br> | |
|
21 | <button type="submit" class="btn btn-primary pull-right">{{button}}</button> | |
|
22 | {% endif %} | |
|
23 | </form> | |
|
24 | {% endblock %} | |
|
25 | ||
|
26 | {% block sidebar%} | |
|
27 | {% include "sidebar_devices.html" %} | |
|
28 | {% endblock %} | |
|
29 | ||
|
30 | 10 | {% block extra-js%} |
|
31 | 11 | <script src="{% static 'js/moment.min.js' %}"></script> |
|
32 | 12 | <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script> |
@@ -6,25 +6,21 | |||
|
6 | 6 | {% block content %} |
|
7 | 7 | |
|
8 | 8 | <form action="" method="post" class="form">{% csrf_token %} |
|
9 |
{% if |
|
|
10 | <input name="next" type="hidden" value="{{ next }}" /> | |
|
11 | {% endif %} | |
|
12 | {% if delete_view %} | |
|
13 | {% if object_name %} | |
|
14 | <h3>Are you sure you wish to delete {{ object_name }} from {{ object }}?</h3> | |
|
15 | {% else %} | |
|
9 | {% if delete %} | |
|
16 | 10 | <h3>Are you sure you wish to delete: {{ object }}?</h3> |
|
17 | {% endif %} | |
|
18 | 11 | {% else %} |
|
19 | 12 | <h4>Are you sure you wish to proceed?</h4> |
|
20 | 13 | {% endif %} |
|
21 |
{% if message %}< |
|
|
14 | {% if message %}<p>{{ message }}</p>{% endif %} | |
|
22 | 15 | <br> |
|
16 | <div class="pull-right"> | |
|
23 | 17 | <button class="btn btn-primary" type="submit"> |
|
24 | 18 | <span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Yes |
|
25 | 19 | </button> |
|
26 | 20 | <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}"> |
|
27 | 21 | <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> No |
|
28 | 22 | </button> |
|
23 | </div> | |
|
29 | 24 | </form> |
|
25 | ||
|
30 | 26 | {% endblock %} |
@@ -1,29 +1,1 | |||
|
1 | {% extends "base.html" %} | |
|
2 | {% load bootstrap3 %} | |
|
3 | {% load static %} | |
|
4 | {% load main_tags %} | |
|
5 | {% block extra-head %} | |
|
6 | <link href="{% static 'css/bootstrap-datetimepicker.min.css' %}" media="screen" rel="stylesheet"> | |
|
7 | {% endblock %} | |
|
8 | ||
|
9 | {% block dev-active %}active{% endblock %} | |
|
10 | ||
|
11 | {% block content-title %}{{title}}{% endblock %} | |
|
12 | {% block content-suptitle %}{{suptitle}}{% endblock %} | |
|
13 | ||
|
14 | {% block content %} | |
|
15 | <form class="form" method="post" action=""> | |
|
16 | {% csrf_token %} | |
|
17 | {% bootstrap_form form layout='horizontal' size='medium' %} | |
|
18 | <div style="clear: both;"></div> | |
|
19 | <br> | |
|
20 | <button type="submit" class="btn btn-primary pull-right">{{button}}</button> | |
|
21 | </form> | |
|
22 | {% endblock %} | |
|
23 | ||
|
24 | {% block sidebar%} | |
|
25 | {% include "sidebar_devices.html" %} | |
|
26 | {% endblock %} | |
|
27 | ||
|
28 | {% block extra-js%} | |
|
29 | {% endblock %} No newline at end of file | |
|
1 | {% extends "base_edit.html" %} No newline at end of file |
@@ -17,40 +17,6 | |||
|
17 | 17 | {% bootstrap_form form layout='horizontal' size='medium' %} |
|
18 | 18 | <div style="clear: both;"></div> |
|
19 | 19 | <br> |
|
20 | {% if configurations %} | |
|
21 | <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> | |
|
22 | <div class="panel panel-default"> | |
|
23 | <div class="panel-heading" role="tab" id="headingTwo"> | |
|
24 | <h4 class="panel-title"> | |
|
25 | <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseThree"> | |
|
26 | Device Configurations | |
|
27 | </a> | |
|
28 | </h4> | |
|
29 | </div> | |
|
30 | <div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo"> | |
|
31 | <div class="panel-body"> | |
|
32 | <table class="table table-hover"> | |
|
33 | <tr> | |
|
34 | <th>#</th> | |
|
35 | {% for key in configuration_keys %} | |
|
36 | <th>{{ key|title }}</th> | |
|
37 | {% endfor%} | |
|
38 | </tr> | |
|
39 | {% for item in configurations %} | |
|
40 | <tr class="clickable-row" data-href="{{item.get_absolute_url}}"> | |
|
41 | <td>{{ forloop.counter }}</td> | |
|
42 | {% for key in configuration_keys %} | |
|
43 | <td>{{ item|value:key }}</td> | |
|
44 | {% endfor %} | |
|
45 | </tr> | |
|
46 | {% endfor %} | |
|
47 | </table> | |
|
48 | </div> | |
|
49 | </div> | |
|
50 | </div> | |
|
51 | </div> | |
|
52 | {% endif %} | |
|
53 | ||
|
54 | 20 | {% if button %} |
|
55 | 21 | <br> |
|
56 | 22 | <button type="submit" class="btn btn-primary pull-right">{{button}}</button> |
@@ -41,11 +41,13 CONF_MODELS = { | |||
|
41 | 41 | 'usrp': USRPConfiguration, |
|
42 | 42 | } |
|
43 | 43 | |
|
44 | ||
|
44 | 45 | def index(request): |
|
45 | 46 | kwargs = {} |
|
46 | 47 | |
|
47 | 48 | return render(request, 'index.html', kwargs) |
|
48 | 49 | |
|
50 | ||
|
49 | 51 | def locations(request): |
|
50 | 52 | |
|
51 | 53 | locations = Location.objects.all().order_by('name') |
@@ -61,6 +63,7 def locations(request): | |||
|
61 | 63 | |
|
62 | 64 | return render(request, 'locations.html', kwargs) |
|
63 | 65 | |
|
66 | ||
|
64 | 67 | def location(request, id_loc): |
|
65 | 68 | |
|
66 | 69 | location = get_object_or_404(Location, pk=id_loc) |
@@ -95,6 +98,7 def location_new(request): | |||
|
95 | 98 | |
|
96 | 99 | return render(request, 'location_edit.html', kwargs) |
|
97 | 100 | |
|
101 | ||
|
98 | 102 | def location_edit(request, id_loc): |
|
99 | 103 | |
|
100 | 104 | location = get_object_or_404(Location, pk=id_loc) |
@@ -117,6 +121,7 def location_edit(request, id_loc): | |||
|
117 | 121 | |
|
118 | 122 | return render(request, 'location_edit.html', kwargs) |
|
119 | 123 | |
|
124 | ||
|
120 | 125 | def location_delete(request, id_loc): |
|
121 | 126 | |
|
122 | 127 | location = get_object_or_404(Location, pk=id_loc) |
@@ -127,12 +132,19 def location_delete(request, id_loc): | |||
|
127 | 132 | location.delete() |
|
128 | 133 | return redirect('url_locations') |
|
129 | 134 | |
|
130 |
|
|
|
135 | messages.error(request, 'Not enough permission to delete this object') | |
|
136 | return redirect(location.get_absolute_url()) | |
|
131 | 137 | |
|
132 | kwargs = {'object':location, 'loc_active':'active', | |
|
133 | 'url_cancel':'url_location', 'id_item':id_loc} | |
|
138 | kwargs = { | |
|
139 | 'title': 'Delete', | |
|
140 | 'suptitle': 'Location', | |
|
141 | 'object': location, | |
|
142 | 'previous': location.get_absolute_url(), | |
|
143 | 'delete': True | |
|
144 | } | |
|
134 | 145 | |
|
135 |
return render(request, ' |
|
|
146 | return render(request, 'confirm.html', kwargs) | |
|
147 | ||
|
136 | 148 | |
|
137 | 149 | def devices(request): |
|
138 | 150 | |
@@ -150,6 +162,7 def devices(request): | |||
|
150 | 162 | |
|
151 | 163 | return render(request, 'devices.html', kwargs) |
|
152 | 164 | |
|
165 | ||
|
153 | 166 | def device(request, id_dev): |
|
154 | 167 | |
|
155 | 168 | device = get_object_or_404(Device, pk=id_dev) |
@@ -163,6 +176,7 def device(request, id_dev): | |||
|
163 | 176 | |
|
164 | 177 | return render(request, 'device.html', kwargs) |
|
165 | 178 | |
|
179 | ||
|
166 | 180 | def device_new(request): |
|
167 | 181 | |
|
168 | 182 | if request.method == 'GET': |
@@ -183,6 +197,7 def device_new(request): | |||
|
183 | 197 | |
|
184 | 198 | return render(request, 'device_edit.html', kwargs) |
|
185 | 199 | |
|
200 | ||
|
186 | 201 | def device_edit(request, id_dev): |
|
187 | 202 | |
|
188 | 203 | device = get_object_or_404(Device, pk=id_dev) |
@@ -195,7 +210,7 def device_edit(request, id_dev): | |||
|
195 | 210 | |
|
196 | 211 | if form.is_valid(): |
|
197 | 212 | form.save() |
|
198 |
return redirect( |
|
|
213 | return redirect(device.get_absolute_url()) | |
|
199 | 214 | |
|
200 | 215 | kwargs = {} |
|
201 | 216 | kwargs['form'] = form |
@@ -205,6 +220,7 def device_edit(request, id_dev): | |||
|
205 | 220 | |
|
206 | 221 | return render(request, 'device_edit.html', kwargs) |
|
207 | 222 | |
|
223 | ||
|
208 | 224 | def device_delete(request, id_dev): |
|
209 | 225 | |
|
210 | 226 | device = get_object_or_404(Device, pk=id_dev) |
@@ -215,12 +231,19 def device_delete(request, id_dev): | |||
|
215 | 231 | device.delete() |
|
216 | 232 | return redirect('url_devices') |
|
217 | 233 | |
|
218 |
|
|
|
234 | messages.error(request, 'Not enough permission to delete this object') | |
|
235 | return redirect(device.get_absolute_url()) | |
|
219 | 236 | |
|
220 | kwargs = {'object':device, 'dev_active':'active', | |
|
221 | 'url_cancel':'url_device', 'id_item':id_dev} | |
|
237 | kwargs = { | |
|
238 | 'title': 'Delete', | |
|
239 | 'suptitle': 'Device', | |
|
240 | 'object': device, | |
|
241 | 'previous': device.get_absolute_url(), | |
|
242 | 'delete': True | |
|
243 | } | |
|
222 | 244 | |
|
223 |
return render(request, ' |
|
|
245 | return render(request, 'confirm.html', kwargs) | |
|
246 | ||
|
224 | 247 | |
|
225 | 248 | def campaigns(request): |
|
226 | 249 | |
@@ -237,6 +260,7 def campaigns(request): | |||
|
237 | 260 | |
|
238 | 261 | return render(request, 'campaigns.html', kwargs) |
|
239 | 262 | |
|
263 | ||
|
240 | 264 | def campaign(request, id_camp): |
|
241 | 265 | |
|
242 | 266 | campaign = get_object_or_404(Campaign, pk=id_camp) |
@@ -246,12 +270,10 def campaign(request, id_camp): | |||
|
246 | 270 | |
|
247 | 271 | kwargs = {} |
|
248 | 272 | kwargs['campaign'] = campaign |
|
249 | kwargs['campaign_keys'] = ['name', 'start_date', 'end_date', 'tags', 'description'] | |
|
250 | ||
|
251 | keys = ['id', 'name', 'start_time', 'end_time'] | |
|
273 | kwargs['campaign_keys'] = ['template', 'name', 'start_date', 'end_date', 'tags', 'description'] | |
|
252 | 274 | |
|
253 |
kwargs['experiment |
|
|
254 | kwargs['experiments'] = experiments.values(*keys) | |
|
275 | kwargs['experiments'] = experiments | |
|
276 | kwargs['experiment_keys'] = ['name', 'radar', 'start_time', 'end_time'] | |
|
255 | 277 | |
|
256 | 278 | kwargs['title'] = 'Campaign' |
|
257 | 279 | kwargs['suptitle'] = 'Details' |
@@ -261,6 +283,7 def campaign(request, id_camp): | |||
|
261 | 283 | |
|
262 | 284 | return render(request, 'campaign.html', kwargs) |
|
263 | 285 | |
|
286 | ||
|
264 | 287 | def campaign_new(request): |
|
265 | 288 | |
|
266 | 289 | kwargs = {} |
@@ -310,6 +333,7 def campaign_new(request): | |||
|
310 | 333 | |
|
311 | 334 | return render(request, 'campaign_edit.html', kwargs) |
|
312 | 335 | |
|
336 | ||
|
313 | 337 | def campaign_edit(request, id_camp): |
|
314 | 338 | |
|
315 | 339 | campaign = get_object_or_404(Campaign, pk=id_camp) |
@@ -332,6 +356,7 def campaign_edit(request, id_camp): | |||
|
332 | 356 | |
|
333 | 357 | return render(request, 'campaign_edit.html', kwargs) |
|
334 | 358 | |
|
359 | ||
|
335 | 360 | def campaign_delete(request, id_camp): |
|
336 | 361 | |
|
337 | 362 | campaign = get_object_or_404(Campaign, pk=id_camp) |
@@ -347,12 +372,19 def campaign_delete(request, id_camp): | |||
|
347 | 372 | |
|
348 | 373 | return redirect('url_campaigns') |
|
349 | 374 | |
|
350 |
|
|
|
375 | messages.error(request, 'Not enough permission to delete this object') | |
|
376 | return redirect(campaign.get_absolute_url()) | |
|
351 | 377 | |
|
352 | kwargs = {'object':campaign, 'camp_active':'active', | |
|
353 | 'url_cancel':'url_campaign', 'id_item':id_camp} | |
|
378 | kwargs = { | |
|
379 | 'title': 'Delete', | |
|
380 | 'suptitle': 'Campaign', | |
|
381 | 'object': campaign, | |
|
382 | 'previous': campaign.get_absolute_url(), | |
|
383 | 'delete': True | |
|
384 | } | |
|
354 | 385 | |
|
355 |
return render(request, ' |
|
|
386 | return render(request, 'confirm.html', kwargs) | |
|
387 | ||
|
356 | 388 | |
|
357 | 389 | def experiments(request): |
|
358 | 390 | |
@@ -371,6 +403,7 def experiments(request): | |||
|
371 | 403 | |
|
372 | 404 | return render(request, 'experiments.html', kwargs) |
|
373 | 405 | |
|
406 | ||
|
374 | 407 | def experiment(request, id_exp): |
|
375 | 408 | |
|
376 | 409 | experiment = get_object_or_404(Experiment, pk=id_exp) |
@@ -441,6 +474,7 def experiment_new(request, id_camp=None): | |||
|
441 | 474 | |
|
442 | 475 | return render(request, 'experiment_edit.html', kwargs) |
|
443 | 476 | |
|
477 | ||
|
444 | 478 | def experiment_edit(request, id_exp): |
|
445 | 479 | |
|
446 | 480 | experiment = get_object_or_404(Experiment, pk=id_exp) |
@@ -463,6 +497,7 def experiment_edit(request, id_exp): | |||
|
463 | 497 | |
|
464 | 498 | return render(request, 'experiment_edit.html', kwargs) |
|
465 | 499 | |
|
500 | ||
|
466 | 501 | def experiment_delete(request, id_exp): |
|
467 | 502 | |
|
468 | 503 | experiment = get_object_or_404(Experiment, pk=id_exp) |
@@ -479,6 +514,7 def experiment_delete(request, id_exp): | |||
|
479 | 514 | |
|
480 | 515 | return render(request, 'item_delete.html', kwargs) |
|
481 | 516 | |
|
517 | ||
|
482 | 518 | def dev_confs(request): |
|
483 | 519 | |
|
484 | 520 | configurations = Configuration.objects.all().order_by('type', 'device__device_type', 'experiment') |
@@ -498,6 +534,7 def dev_confs(request): | |||
|
498 | 534 | |
|
499 | 535 | return render(request, 'dev_confs.html', kwargs) |
|
500 | 536 | |
|
537 | ||
|
501 | 538 | def dev_conf(request, id_conf): |
|
502 | 539 | |
|
503 | 540 | conf = get_object_or_404(Configuration, pk=id_conf) |
@@ -544,7 +581,8 def dev_conf_new(request, id_exp=0, id_dev=0): | |||
|
544 | 581 | kwargs['button'] = 'Create' |
|
545 | 582 | |
|
546 | 583 | return render(request, 'dev_conf_edit.html', kwargs) |
|
547 | ||
|
584 | ||
|
585 | ||
|
548 | 586 | def dev_conf_edit(request, id_conf): |
|
549 | 587 | |
|
550 | 588 | conf = get_object_or_404(Configuration, pk=id_conf) |
@@ -575,6 +613,7 def dev_conf_edit(request, id_conf): | |||
|
575 | 613 | |
|
576 | 614 | return render(request, '%s_conf_edit.html' %conf.device.device_type.name, kwargs) |
|
577 | 615 | |
|
616 | ||
|
578 | 617 | def dev_conf_start(request, id_conf): |
|
579 | 618 | |
|
580 | 619 | conf = get_object_or_404(Configuration, pk=id_conf) |
@@ -592,6 +631,7 def dev_conf_start(request, id_conf): | |||
|
592 | 631 | |
|
593 | 632 | return redirect(conf.get_absolute_url()) |
|
594 | 633 | |
|
634 | ||
|
595 | 635 | def dev_conf_stop(request, id_conf): |
|
596 | 636 | |
|
597 | 637 | conf = get_object_or_404(Configuration, pk=id_conf) |
@@ -609,6 +649,7 def dev_conf_stop(request, id_conf): | |||
|
609 | 649 | |
|
610 | 650 | return redirect(conf.get_absolute_url()) |
|
611 | 651 | |
|
652 | ||
|
612 | 653 | def dev_conf_status(request, id_conf): |
|
613 | 654 | |
|
614 | 655 | conf = get_object_or_404(Configuration, pk=id_conf) |
@@ -649,6 +690,7 def dev_conf_write(request, id_conf): | |||
|
649 | 690 | |
|
650 | 691 | return redirect(conf.get_absolute_url()) |
|
651 | 692 | |
|
693 | ||
|
652 | 694 | def dev_conf_read(request, id_conf): |
|
653 | 695 | |
|
654 | 696 | conf = get_object_or_404(Configuration, pk=id_conf) |
@@ -690,6 +732,7 def dev_conf_read(request, id_conf): | |||
|
690 | 732 | |
|
691 | 733 | return render(request, '%s_conf_edit.html' %conf.device.device_type.name, kwargs) |
|
692 | 734 | |
|
735 | ||
|
693 | 736 | def dev_conf_import(request, id_conf): |
|
694 | 737 | |
|
695 | 738 | conf = get_object_or_404(Configuration, pk=id_conf) |
@@ -739,6 +782,7 def dev_conf_import(request, id_conf): | |||
|
739 | 782 | |
|
740 | 783 | return render(request, 'dev_conf_import.html', kwargs) |
|
741 | 784 | |
|
785 | ||
|
742 | 786 | def dev_conf_export(request, id_conf): |
|
743 | 787 | |
|
744 | 788 | conf = get_object_or_404(Configuration, pk=id_conf) |
@@ -773,6 +817,7 def dev_conf_export(request, id_conf): | |||
|
773 | 817 | |
|
774 | 818 | return render(request, 'dev_conf_export.html', kwargs) |
|
775 | 819 | |
|
820 | ||
|
776 | 821 | def dev_conf_delete(request, id_conf): |
|
777 | 822 | |
|
778 | 823 | conf = get_object_or_404(Configuration, pk=id_conf) |
@@ -865,6 +910,7 def operation(request, id_camp=None): | |||
|
865 | 910 | |
|
866 | 911 | return render(request, 'operation.html', kwargs) |
|
867 | 912 | |
|
913 | ||
|
868 | 914 | def operation_search(request, id_camp=None): |
|
869 | 915 | |
|
870 | 916 |
General Comments 0
You need to be logged in to leave comments.
Login now