@@ -29,8 +29,16 def cgs_conf(request, id_conf): | |||||
29 | status = response[-1] |
|
29 | status = response[-1] | |
30 | #print r.text |
|
30 | #print r.text | |
31 | #"icon" could be: "alert" or "okay" |
|
31 | #"icon" could be: "alert" or "okay" | |
32 | if "okay" in icon or "alert" in icon: |
|
32 | # Si hay alerta pero esta conectado | |
|
33 | if "alert" in icon: | |||
|
34 | if "Starting Up" in status: #No Esta conectado | |||
|
35 | kwargs['connected'] = False | |||
|
36 | else: | |||
|
37 | kwargs['connected'] = True | |||
|
38 | elif "okay" in icon: | |||
33 | kwargs['connected'] = True |
|
39 | kwargs['connected'] = True | |
|
40 | else: | |||
|
41 | kwargs['connected'] = False | |||
34 |
|
42 | |||
35 | if not kwargs['connected']: |
|
43 | if not kwargs['connected']: | |
36 | messages.error(request, message=status) |
|
44 | messages.error(request, message=status) |
General Comments 0
You need to be logged in to leave comments.
Login now