Project

General

Profile

Anomalie #5321

Mode Debug automatiquement désactivé lors d'un saveConfig ou discardConfig

Added by Ghislain Loaec about 7 years ago. Updated almost 7 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Start date:
06/03/2013
Due date:
06/07/2013
% Done:

100%

Spent time:
Distribution:
EOLE 2.4

Description

Mode Debug est automatiquement mis à false lorsque que l'on sauvegarde la config ou qu'on annule les modifications.

Associated revisions

Revision 93a6cac4 (diff)
Added by Bruno Boiget almost 7 years ago

correction de la perte des options de mode/debug après sauvegarde de la configuration

fixes #5321

Revision 4cc15467 (diff)
Added by Johan Cwiklinski over 1 year ago

Escape JS, fix #5321

History

#1 Updated by Daniel Dehennin about 7 years ago

Cela pose aussi souci avec le mode expert.

La sauvegarde de la configuration reset le mode à normal mais le javascript n’est pas au courant.

En mettant du log dans eolegenconfig.views.variables() et eolegenconfig.lib.is_category() j’obtiens la session suivante :

  1. Premier chargement, mode normal
    2013-05-14 15:49:50,726: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:49:50] "GET /genconfig/categories/general/variables HTTP/1.0" 200 6264 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    2013-05-14 15:49:50,715: root - Category name 'general'
    2013-05-14 15:49:50,715: root - ID 'toto'
    2013-05-14 15:49:50,720: root - Category names are '['general', 'services', 'messagerie', 'interface_0', 'eole_sso']'
    
  2. Passage en mode expert
    2013-05-14 15:50:37,748: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:50:37] "PUT /genconfig/modes/expert HTTP/1.0" 200 47 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    2013-05-14 15:50:38,138: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:50:38] "GET /genconfig/categories HTTP/1.0" 200 624 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    2013-05-14 15:50:38,505: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:50:38] "GET /genconfig/categories/general/variables HTTP/1.0" 200 6264 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    2013-05-14 15:50:38,489: root - Category name 'general'
    2013-05-14 15:50:38,490: root - ID 'toto'
    2013-05-14 15:50:38,494: root - Category names are '['general', 'services', 'messagerie', 'systeme', 'certifs_ssl', 'sshd', 'interface_0', 'reseau_avance', 'ead_web', 'eole_sso']'
    
  3. Sélection de certifs_ssl
    2013-05-14 15:50:41,472: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:50:41] "GET /genconfig/categories/certifs_ssl/variables HTTP/1.0" 200 3761 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    2013-05-14 15:50:41,456: root - Category name 'certifs_ssl'
    2013-05-14 15:50:41,456: root - ID 'toto'
    2013-05-14 15:50:41,461: root - Category names are '['general', 'services', 'messagerie', 'systeme', 'certifs_ssl', 'sshd', 'interface_0', 'reseau_avance', 'ead_web', 'eole_sso']'
    
  4. On met une valeur à certifs_ssl
    2013-05-14 15:50:52,549: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:50:52] "POST /genconfig/validate HTTP/1.0" 200 35 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    2013-05-14 15:50:59,222: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:50:59] "PUT /genconfig/variables/ssl_country_name HTTP/1.0" 200 327 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    2013-05-14 15:50:59,546: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:50:59] "GET /genconfig/categories HTTP/1.0" 200 624 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    2013-05-14 15:50:59,873: root - Category name 'certifs_ssl'
    2013-05-14 15:50:59,873: root - ID 'toto'
    2013-05-14 15:50:59,878: root - Category names are '['general', 'services', 'messagerie', 'systeme', 'certifs_ssl', 'sshd', 'interface_0', 'reseau_avance', 'ead_web', 'eole_sso']'
    2013-05-14 15:50:59,882: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:50:59] "GET /genconfig/categories/certifs_ssl/variables HTTP/1.0" 200 3762 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    
  5. Sauvergarde de la configuration
    2013-05-14 15:51:11,593: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:51:11] "POST /save HTTP/1.0" 200 2 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    2013-05-14 15:51:11,560: restkit.client - Start to perform request: 127.0.0.1:8000 GET /reload_config
    2013-05-14 15:51:11,561: restkit.client - create new connection
    2013-05-14 15:51:11,561: restkit.client - Send headers: ['GET /reload_config HTTP/1.1\r\n', 'Host: 127.0.0.1:8000\r\n', 'User-Agent: restkit/3.3.2\r\n', 'Accept-Encoding: identity\r\n']
    2013-05-14 15:51:11,565: restkit.client - Start to parse response
    2013-05-14 15:51:11,592: restkit.client - Got response: 200 OK
    2013-05-14 15:51:11,592: restkit.client - headers: [IOrderedDict([('Date', 'Tue, 14 May 2013 13:51:11 GMT'), ('Content-Length', '31'), ('Content-Type', 'application/json'), ('Server', 'CherryPy/3.2.2')])]
    2013-05-14 15:51:11,592: restkit.client - return response class
    2013-05-14 15:51:11,592: restkit.conn - release connection
    2013-05-14 15:51:12,042: root - Category name 'general'
    2013-05-14 15:51:12,042: root - ID 'toto'
    2013-05-14 15:51:12,065: root - Category names are '['general', 'services', 'messagerie', 'interface_0', 'eole_sso']'
    2013-05-14 15:51:12,070: gunicorn.access - 127.0.0.1 - - [14/May/2013:15:51:12] "GET /genconfig/categories/general/variables HTTP/1.0" 200 6264 "http://192.168.230.190:7000/genconfig/" "Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0 Iceweasel/20.0" 
    2013-05-14 15:51:43,386: root - Category name 'certifs_ssl'
    2013-05-14 15:51:43,387: root - ID 'toto'
    2013-05-14 15:51:43,392: root - Category names are '['general', 'services', 'messagerie', 'interface_0', 'eole_sso']'
    

#2 Updated by Emmanuel GARETTE about 7 years ago

Le "mode debug" et "mode expert" est conservé, pour l'instant dans tiramisu. Ce n'est pas le bonne endroit (puisqu'éphémère).

Quand on aura un login et une session utilisateur on le conservera dans la session utilisateur.

#3 Updated by Bruno Boiget almost 7 years ago

le mode et l'option debug sont maintenant conservés dans l'objet session_tiramisu.

- en cas de sauvegarde, la configuration est supprimée et recrée, puis le mode et l'option debug sont réappliqués sur la configuration
- en cas de clic sur 'annuler les modifications', l'ensemble des informations est supprimée, et on revient en mode normal / debug désactivé

#4 Updated by Bruno Boiget almost 7 years ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 0 to 100

#5 Updated by Joël Cuissinat almost 7 years ago

  • Due date set to 06/07/2013
  • Status changed from Résolu to Fermé
  • Assigned To set to Bruno Boiget
  • Target version set to Eole 2.4-dev-3
  • Start date set to 06/03/2013

OK avec eole-genconfig 2.4.0-37

Also available in: Atom PDF