Plus de log access (apache x'en charge) + amlioration des log intranet
darcs-hash:20061120130620-f46e9-bd15d792ac8ae0785f0d233172090e6d975e43e8.gz
This commit is contained in:
parent
2aa2d53be7
commit
191bf79296
5 changed files with 38 additions and 30 deletions
|
@ -15,7 +15,7 @@ import cherrypy, sys, os, datetime
|
|||
from time import strftime, localtime, time
|
||||
# libraries crans
|
||||
sys.path.append('/usr/scripts/gestion/')
|
||||
|
||||
import crans.cp
|
||||
if (cherrypy.config.configMap["global"]["server.environment"] == "development"):
|
||||
from ldap_crans_test import *
|
||||
# print("mesmachines : unsing test ldap : env=" + cherrypy.config.configMap["global"]["server.environment"])
|
||||
|
@ -162,13 +162,14 @@ class root:
|
|||
if mach.proprietaire().compte() != cherrypy.session['uid']:
|
||||
del adh, mach
|
||||
raise Exception(u"L'uid de l'adherent ne correspond mas au proprietaire de la machine.")
|
||||
mach.nom(nouveauNom)
|
||||
anciennom = mach.nom()
|
||||
nouveauNom = mach.nom(nouveauNom)
|
||||
mach.save()
|
||||
del mach
|
||||
except ValueError, e:
|
||||
raise e
|
||||
#return {'error':str(e)}
|
||||
cherrypy.log("Changer nom machine : %s" % nouveauNom, "MESMACHINES")
|
||||
crans.cp.log("Changer nom machine : %s->%s" % (anciennom, nouveauNom), "MESMACHINES")
|
||||
return {'message':u"Modification réussie", 'mid':mid}
|
||||
AJAXChangerNom.exposed = True
|
||||
|
||||
|
@ -183,12 +184,14 @@ class root:
|
|||
if mach.proprietaire().compte() != cherrypy.session['uid']:
|
||||
del adh, mach
|
||||
raise Exception(u"L'uid de l'adherent ne correspond mas au proprietaire de la machine.")
|
||||
anciennemac = mach.mac()
|
||||
nommachine = mach.nom()
|
||||
mach.mac(nouvelleMAC)
|
||||
mach.save()
|
||||
del mach
|
||||
except ValueError, e:
|
||||
return {'error':e.args[0]}
|
||||
cherrypy.log("Change mac machine", "MESMACHINES")
|
||||
crans.cp.log("Change mac machine %s : %s->%s" % (nommachine, anciennemac, nouvelleMAC), "MESMACHINES")
|
||||
return {'message':u"Modification réussie", 'mid':mid}
|
||||
AJAXchangerMAC.exposed = True
|
||||
|
||||
|
@ -208,7 +211,7 @@ class root:
|
|||
mach.delete()
|
||||
except ValueError, e:
|
||||
return {'error':e.args[0]}
|
||||
cherrypy.log("Machine supprimee", "MACHINES")
|
||||
crans.cp.log("Machine supprimee", "MACHINES")
|
||||
return {'message':u"Machine supprimée"}
|
||||
AJAXSupprimerMachine.exposed = True
|
||||
|
||||
|
@ -234,7 +237,7 @@ class root:
|
|||
except ValueError, e:
|
||||
del m
|
||||
return {'error':e.args[0].replace("\n","\\n")}
|
||||
cherrypy.log("Nouvelle machine %s" % nomNouvelleMachine, "MACHINES")
|
||||
crans.cp.log("Nouvelle machine %s" % nomNouvelleMachine, "MACHINES")
|
||||
return {'message':u"Machine enregistrée avec succès"}
|
||||
AJAXCreerMachine.exposed = True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue