git://git.onelab.eu
/
monitor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add a CVS Format link to the advanced query page
[monitor.git]
/
web
/
MonitorWeb
/
monitorweb
/
templates
/
links.py
diff --git
a/web/MonitorWeb/monitorweb/templates/links.py
b/web/MonitorWeb/monitorweb/templates/links.py
index
0c9203d
..
dbcc4b5
100644
(file)
--- a/
web/MonitorWeb/monitorweb/templates/links.py
+++ b/
web/MonitorWeb/monitorweb/templates/links.py
@@
-1,10
+1,17
@@
from monitor import config
from monitor import config
+import turbogears as tg
import urllib
import urllib
+def plc_myops_uri():
+ return "https://" + config.MONITOR_HOSTNAME
+def plc_mail_uri(ticketid):
+ return config.RT_WEB_SERVER + "/Ticket/Display.html?id=" + str(ticketid)
def plc_node_uri(hostname):
def plc_node_uri(hostname):
- return "https://" + config.PLC_WWW_HOSTNAME + "/db/nodes/index.php?nodepattern=" + str(hostname)
+ return "https://" + config.PLC_WWW_HOSTNAME + "/db/nodes/index.php?pattern=" + str(hostname)
+def plc_node_uri_id(node_id):
+ return "https://" + config.PLC_WWW_HOSTNAME + "/db/nodes/index.php?id=" + str(node_id)
def plc_site_uri(loginbase):
def plc_site_uri(loginbase):
- return "https://" + config.PLC_WWW_HOSTNAME + "/db/sites/index.php?
site_
pattern=" + str(loginbase)
+ return "https://" + config.PLC_WWW_HOSTNAME + "/db/sites/index.php?pattern=" + str(loginbase)
def plc_site_uri_id(site_id):
return "https://" + config.PLC_WWW_HOSTNAME + "/db/sites/index.php?id=" + str(site_id)
def plc_pcu_uri_id(pcu_id):
def plc_site_uri_id(site_id):
return "https://" + config.PLC_WWW_HOSTNAME + "/db/sites/index.php?id=" + str(site_id)
def plc_pcu_uri_id(pcu_id):
@@
-37,8
+44,8
@@
def query_to_path(**kwargs):
tgpath += '?' + query_string
return tgpath
tgpath += '?' + query_string
return tgpath
-def link(base,
ext=True,
**kwargs):
- if
ext
:
+def link(base, **kwargs):
+ if
config.embedded
:
str = "?query=" + base + query_to_path(**kwargs)
else:
str = tg.url(base, **kwargs)
str = "?query=" + base + query_to_path(**kwargs)
else:
str = tg.url(base, **kwargs)