diff --git a/src/sysmgr.py b/src/sysmgr.py index 7709f97..f972c55 100755 --- a/src/sysmgr.py +++ b/src/sysmgr.py @@ -1,7 +1,7 @@ import re, string, os -editableParms = ["ADMIN_EMAIL_ADDRESS","LOG_LEVEL"] +editableParms = ["LOG_LEVEL"] configPath = {"docklet": os.environ.get("DOCKLET_CONF")+"/docklet.conf", "container": os.environ.get("DOCKLET_CONF")+"/container.conf"} #configPath = {"docklet": "../conf/docklet.conf", @@ -43,11 +43,11 @@ class SystemManager(): for line in lines: [linekind, lineparm, lineval] = parse_line(line) if lineparm in editableParms: - editable = 1 + editable = 1 # edit it in settings.py else: editable = 0 if linekind == "default": - conf[lineparm] = {"val": "novalidvaluea", "default": lineval, + conf[lineparm] = {"val": "novalidvaluea", "default": lineval, "history": [], "editable": editable, "details": ""} for line in lines: [linekind, lineparm, lineval] = parse_line(line) @@ -59,7 +59,7 @@ class SystemManager(): editable = 1 else: editable = 0 - conf[lineparm] = {"val": lineval, "default": lineval, + conf[lineparm] = {"val": lineval, "default": lineval, "history": [], "editable": editable, "details": ""} for line in lines: [linekind, lineparm, lineval] = parse_line(line) @@ -69,7 +69,7 @@ class SystemManager(): for seg in segs: if parm in seg: conf[parm]["details"] = seg - result[field] = [({'parm': parm, 'val': conf[parm]['val'], + result[field] = [({'parm': parm, 'val': conf[parm]['val'], 'default': conf[parm]['default'], "history": conf[parm]['history'], "editable": conf[parm]['editable'], "details": conf[parm]['details']}) for parm in sorted(conf.keys())] configFile = open(configPath["container"]) @@ -89,7 +89,7 @@ class SystemManager(): line = lines[i] [linekind, lineparm, lineval] = parse_line(line) if linekind == "active" and lineparm == parm: - lines[i] = "## " + parm + "=" + lineval + "\n" + lines[i] = "## " + parm + "=" + lineval + "\n" lines.insert(i, parm + "=" + val + "\n") if i == 0 or not parm in lines[i-1] or not "=" in lines[i-1]: lines.insert(i, "# " + parm + "=" + lineval + "\n") @@ -176,7 +176,7 @@ class SystemManager(): line = lines[i] if activePattern.match(line) != None and not "#" in line: segs = line.replace("\n", "").split("=") - lines[i] = segs[0].strip() + "=" + conf[segs[0].strip()]["default"] + "\n" + lines[i] = segs[0].strip() + "=" + conf[segs[0].strip()]["default"] + "\n" elif historyPattern.match(line) != None and not "==" in line: lines[i] = "" configFile = open(configPath[field], "w") @@ -187,4 +187,3 @@ class SystemManager(): #sysmgr = SystemManager() #print(sysmgr.getParmList()) - diff --git a/web/templates/admin.html b/web/templates/admin.html index f21e716..015d5a4 100644 --- a/web/templates/admin.html +++ b/web/templates/admin.html @@ -154,7 +154,7 @@ {{ group['quotas'][quota['name']] }} {% endfor %} Edit  - {% if group['name'] in [ "root", "primary", "admin", "foundation" ] %} + {% if group['name'] in [ "root", "primary", "admin", "foundation" ] %} Delete  {% else %} Delete  @@ -334,7 +334,7 @@ {% if parm["val"] == "novalidvaluea" %} No Valid Value - {% elif parm["val"]|length > 20 %} + {% elif parm["val"]|length > 20 %} {{ parm["val"]|truncate(20) }} {% else %} {{ parm["val"] }} diff --git a/web/templates/settings.html b/web/templates/settings.html index de85c47..48bb565 100644 --- a/web/templates/settings.html +++ b/web/templates/settings.html @@ -34,7 +34,7 @@

when an activating request is sent, an e-mail will be sent to this address to remind the admin.

if this address is "", no email will be sent to admin.

- +