* More icons for agents.

* Provides a human-readable name on the agent list.
* Hopefully updated linkies to right place.
This commit is contained in:
halex
2007-09-01 11:15:21 +00:00
parent 15368ea26c
commit 88c2facbf4
8 changed files with 38 additions and 4 deletions
+6 -1
View File
@@ -215,7 +215,12 @@ dist_img_DATA := \
src/www/img/system-users.png \
src/www/img/user.png \
src/www/img/user-desktop.png \
src/www/img/agent-control.png
src/www/img/agent-control.png \
src/www/img/agent-bongoimap.png \
src/www/img/agent-bongomailprox.png \
src/www/img/agent-bongopluspack.png \
src/www/img/agent-bongopop3.png \
src/www/img/agent-bongosmtp.png
jsdir = $(htdocsdir)/js
+30 -1
View File
@@ -16,7 +16,9 @@ class AgentHandler(HawkeyeHandler):
# change things which eval. to False to empty elements
if config != None and config.has_key("agents"):
for agent in config["agents"]:
agent["url"] = "%(url|/)sagents/" + agent["name"]
# We can change this if needed?
agent["url"] = agent["name"]
agent["rname"] = self._humanReadableName(agent["name"])
agent["img"] = "../img/agent-" + agent["name"] + ".png"
if not agent["enabled"]:
agent["enabled"] = None
@@ -50,6 +52,33 @@ class AgentHandler(HawkeyeHandler):
# Operation completed OK.
doneop = 1
return self.index_GET(req, rp)
def _humanReadableName(self, agentname)
# TODO: Translation, once we have a system in place.
if agentname == "bongoqueue":
return "Queue"
elif agentname == "bongosmtp":
return "SMTP"
elif agentname == "bongoantispam":
return "Antispam"
elif agentname == "bongoavirus":
return "Antivirus"
elif agentname == "bongocollector":
return "Calendar collector"
elif agentname == "bongomailprox":
return "Mail proxy"
elif agentname == "bongopluspack":
return "Plus pack"
elif agentname == "bongorules":
return "Rules"
elif agentname == "bongoimap":
return "IMAP"
elif agentname == "bongopop3":
return "POP3"
elif agentname == "bongocalcmd":
return "iCal"
else:
return "Unknown agent"
def _getAgents(self, req):
config = {}
+2 -2
View File
@@ -19,8 +19,8 @@
</div>
<div tal:repeat="agent agentlist" style="float: left;">
<div class="icon">
<a tal:attributes="href agent/url"><img border="0" align="middle" src="../img/agent-unknown.png" tal:attributes="alt agent/name;src agent/img" /><span tal:content="agent/name">Unknown Agent</span></a>
<div class="icon" tal:condition="agent/enabled">
<a tal:attributes="href agent/url"><img border="0" align="middle" src="../img/agent-unknown.png" tal:attributes="alt agent/name;src agent/img" /><span tal:content="agent/rname">Unknown Agent</span></a>
</div>
</div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB