Changeset 3842
- Timestamp:
- 01/05/08 16:57:51 (13 years ago)
- Location:
- TI05-delivery/ows_framework/trunk/ows_server
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TI05-delivery/ows_framework/trunk/ows_server/ndgDiscovery.config
r3417 r3842 11 11 # the following is the server on which this browse/discovery instance runs! 12 12 #server: http://localhost 13 server: http://localhost:8080 13 #server: http://superglue.badc.rl.ac.uk:8083 14 ## This is the proxied server root 15 server: http://superglue.badc.rl.ac.uk/ndg-test 14 16 15 17 # … … 22 24 # this is the physical file location of the layout directory on this machine 23 25 # 24 layoutdir: / home/bnl/sandboxes/ndg/TI07-MOLES/trunk/PythonCode/wsgi/26 layoutdir: /usr/local/ows_server_deployment/layout 25 27 # 26 28 # this should never be changed 27 29 # 28 layout: /layout/ 29 icondir: /layout/icons/ 30 # 31 mailserver: outbox.rl.ac.uk 30 ##!NOTE: These are changed to reflect the proxy prefix 31 layout: /ndg-test/layout/ 32 icondir: /ndg-test/layout/icons/ 33 # 34 mailserver: xxxoutbox.rl.ac.uk 32 35 metadataMaintainer: b.n.lawrence@rl.ac.uk 33 repository: http://localhost:808036 repository: %(server)s 34 37 tbrecipient: b.n.lawrence@rl.ac.uk 35 38 … … 48 51 [layout] 49 52 ###### user customisable: 50 localLink: http:// ndg.nerc.ac.uk/53 localLink: http://superglue.badc.rl.ac.uk/ndg-test/ 51 54 localImage: %(layout)sndg_logo_circle.gif 52 55 localAlt: visit badc 53 56 ###### ought to be the end of the customisations 54 ndgLink: http:// ndg.nerc.ac.uk/57 ndgLink: http://superglue.badc.rl.ac.uk/ndg-test/ 55 58 ndgImage: %(layout)sndg_logo_circle.gif 56 59 ndgAlt: visit ndg … … 136 139 # This is an application certificate ... (which may be a machine certificate) 137 140 # X.509 certificate sent with outbound signed messages 138 wssCertFilePath: secpem/Junk-cert.pem141 wssCertFilePath: ./certs/Junk-cert.pem 139 142 140 143 # Private key used to sign messages 141 144 # This is an application certificate ... (which may be a machine certificate) 142 wssKeyFilePath: secpem/Junk-key.pem145 wssKeyFilePath: ./certs/Junk-key.pem 143 146 144 147 # Password for private key - comment out if the file is not password protected … … 147 150 # Space separated list of CA cert. files to validate certs against when 148 151 # verifying responses 149 wssCACertFilePathList: secpem/cacert.pem152 wssCACertFilePathList: ./certs/cacert.pem 150 153 151 154 # SSL Connections … … 154 157 # must verify against at least one of these otherwise the connection is 155 158 # dropped. 156 sslCACertFilePathList: secpem/cacert.pem159 sslCACertFilePathList: ./certs/cacert.pem 157 160 158 161 # Set an alternate CommonName to match with peer cert for SSL … … 168 171 169 172 # verification of X.509 cert back to CA 170 acCACertFilePathList: secpem/cacert.pem173 acCACertFilePathList: ./secpem/cacert.pem 171 174 172 175 [RELATED] -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/routing.py
r3659 r3842 47 47 map.connect('viewItems',controller='viewItems',action='index') 48 48 map.connect('removeViewItem',controller='viewItems',action='index') 49 map.connect('addSelectedItem/:entryid/: kmlurl/:wmcurl/:title/:divid',50 controller='selectedItems',action='addSelectedItem' ,kmlurl='',wmcurl='')49 map.connect('addSelectedItem/:entryid/:divid', 50 controller='selectedItems',action='addSelectedItem') 51 51 map.connect('unSelectItem/:entryid/:divid', controller='selectedItems',action='unSelectItem') 52 52 map.connect('removeSelectedItem/:entryid',controller='selectedItems',action='removeSelectedItem') -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/selectedItems.py
r3701 r3842 19 19 import copy 20 20 import urllib 21 22 import logging 23 log = logging.getLogger(__name__) 21 24 22 25 class SelecteditemsController(BaseController): … … 55 58 wmcURLs = [] 56 59 for item in session['selectedItems']: 60 log.debug('SelectedItem: kmlList = %s, wmcList = %s' % ( 61 `item.kmlList`, `item.wmcList`)) 62 57 63 if (item.wmcURL): 58 64 wmcURLs.append(item.wmcURL) … … 130 136 131 137 132 def addSelectedItem(self,entryid, kmlurl,wmcurl,title,divid):138 def addSelectedItem(self,entryid,divid): 133 139 """ 134 140 Add a selected item to the session 135 141 - if this is the first item, then display the selections tab 136 142 @param entryid: Entry ID of related DIF record 137 @param kmlurl: Endpoint of KML doc relating to selected item, if it exists138 @param wmcurl: WMC Endpoint of selected item, if it exists139 @param title: Title of selected item140 143 @param divid: The div ID relating to the selected item in the results tab 141 144 """ 142 145 146 # URLs are unsafe to be added to the URL path_info so get them from the query_string 147 kmlurl = request.params['kmlurl'] 148 wmcurl = request.params['wmcurl'] 149 title = request.params['title'] 150 151 log.debug('addSelectedItem(%s, %s, %s, %s, %s)' % ( 152 `entryid`, `kmlurl`, `wmcurl`, `title`, `divid`)) 153 143 154 item = selectedItem.SelectedItem(entryid, title, kmlurl, wmcurl) 155 156 log.debug('SelectedItem: kmlList = %s, wmcList = %s' % ( 157 `item.kmlList`, `item.wmcList`)) 144 158 145 159 selections = [item,] … … 225 239 action="addSelectedItem", 226 240 entryid=deletedItem.entryID, 227 kmlurl= urllib.quote(str(deletedItem.kmlURL),''),228 wmcurl= urllib.quote(str(deletedItem.wmcURL),''),241 kmlurl=deletedItem.kmlURL, 242 wmcurl=deletedItem.wmcURL, 229 243 title=deletedItem.title, 230 244 divid=divid))) -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/DIF.py
r3661 r3842 188 188 # via AJAX 189 189 if contentType.find('KML') > 0: 190 # NB, adding the ' ' to quote forces forward slashes to be replaced191 # with unicode equivalent 192 self.kmlURL.append(urllib.quote(serviceURL,' '))190 # NB, adding the '%' to quote forces forward slashes to be replaced 191 # with unicode equivalent but doesn't escape escape sequences. 192 self.kmlURL.append(urllib.quote(serviceURL,'%')) 193 193 elif contentType.find('WEB MAP CONTEXT') > 0: 194 self.wmcURL.append(urllib.quote(serviceURL,' '))194 self.wmcURL.append(urllib.quote(serviceURL,'%')) 195 195 196 196 if self.ndgObject is None: -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/Utilities.py
r3605 r3842 129 129 130 130 def EnumerateString(string): 131 '''Takes a string, and if it's got a number on the end, increments it,131 """ Takes a string, and if it's got a number on the end, increments it, 132 132 otherwise adds a number on the end, used to differentiate strings which 133 would otherwise be identical '''133 would otherwise be identical """ 134 134 def addNum(matchObj): 135 135 s=matchObj.group() … … 200 200 201 201 202 def urlListEncode(urlList): 203 """ 204 Encode a list of URLs so that they can be embedded in another URL 205 """ 206 return '|'.join(urllib.quote(x, '%') for x in urlList) 207 208 def urlListDecode(string): 209 """ 210 Decode an encoded list of URLs. 211 """ 212 return [urllib.unquote(x) for x in string.split('|')] 213 214 202 215 203 216 import unittest -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/selectedItem.py
r3701 r3842 11 11 12 12 from ows_server.models import Utilities 13 import logging 13 14 15 log = logging.getLogger(__name__) 14 16 15 17 class SelectedItem: … … 23 25 @param wmcURL: WMC Endpoint of selected item, if it exists 24 26 """ 27 25 28 self.entryID = entryID 26 29 self.title = title 27 30 self.kmlURL = kmlURL 28 31 self.wmcURL = wmcURL 29 self.kmlList = Utilities.recreateListFromUnicode(kmlURL) 30 self.wmcList = Utilities.recreateListFromUnicode(wmcURL) 31 32 #self.kmlList = Utilities.recreateListFromUnicode(kmlURL) 33 #self.wmcList = Utilities.recreateListFromUnicode(wmcURL) 34 if kmlURL: 35 self.kmlList = Utilities.urlListDecode(kmlURL) 36 else: 37 self.kmlList = [] 38 if wmcURL: 39 self.wmcList = Utilities.urlListDecode(wmcURL) 40 else: 41 self.wmcList = [] 42 43 44 log.debug('SelectedItem: kmlURL = %s, wmcURL = %s, kmlList = %s, wmcList = %s' % 45 tuple(repr(x) for x in (self.kmlURL, self.wmcURL, self.kmlList, self.wmcList))) -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/public/layout/ndg2.css
r3700 r3842 21 21 /* Top Banner Div */ 22 22 23 /* 24 * !WARNING: the background image needs setting to match any proxy configuration. 25 */ 26 23 27 #header { 24 28 height: 100px; … … 27 31 border: solid #333333; 28 32 border-width: 0 0 2px 0; 29 background-image:url(/ layout/header_image.jpg);background-position:right;background-repeat:repeat-x;}33 background-image:url(/ndg-test/layout/header_image.jpg);background-position:right;background-repeat:repeat-x;} 30 34 31 35 #logo{ -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/meta.kid
r3644 r3842 1 1 <!-- This is a bunch of named functions for using when displaying metadata --> 2 <?python 3 4 from ows_server.models.Utilities import urlListEncode 5 6 ?> 7 2 8 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 3 9 … … 200 206 </td> 201 207 <!-- check if the DIF has already been selected --> 202 208 <?python 203 209 selected=False 204 210 select_td_id='select_td_id_%s'%d.entryID … … 207 213 if item.entryID == d.entryID: 208 214 selected=True 215 select_url = h.url_for(controller="selectedItems", 216 action="addSelectedItem", 217 entryid=d.entryID, 218 divid=select_td_id, 219 kmlurl = urlListEncode(d.kmlURL), 220 wmcurl = urlListEncode(d.wmcURL), 221 title = d.name) 222 209 223 ?> 210 224 … … 222 236 ${XML(h.link_to_remote("Select", 223 237 dict(update=select_td_id, 224 url=h.url_for(controller="selectedItems", 225 action="addSelectedItem", 226 entryid=d.entryID, 227 kmlurl=d.kmlURL, 228 wmcurl=d.wmcURL, 229 title=d.name, 230 divid=select_td_id))))} 238 url=select_url 239 )))} 231 240 </span> 232 241 </td> -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/viewItems.kid
r3700 r3842 1 1 <html py:extends="'ndgPage.kid','meta.kid'" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 2 2 <head> 3 <link type="text/css" rel="stylesheet" href=" /layout/ddc_style.css"/>4 <link type="text/css" rel="stylesheet" href=" /layout/ddc_vis.css"/>3 <link type="text/css" rel="stylesheet" href="$g.server/layout/ddc_style.css"/> 4 <link type="text/css" rel="stylesheet" href="$g.server/layout/ddc_vis.css"/> 5 5 6 6 <!-- BEGIN: Yahoo Interface Library --> 7 7 <link type="text/css" rel="stylesheet" 8 href=" /js/yui/treeview/assets/skins/sam/treeview.css"/>8 href="$g.server/js/yui/treeview/assets/skins/sam/treeview.css"/> 9 9 10 10 <!-- Dependency source files --> 11 <script src = " js/yui/yahoo/yahoo-min.js" ></script>12 <script src = " js/yui/event/event-min.js" ></script>11 <script src = "$g.server/js/yui/yahoo/yahoo-min.js" ></script> 12 <script src = "$g.server/js/yui/event/event-min.js" ></script> 13 13 14 14 <!-- TreeView source file --> 15 <script src = " js/yui/treeview/treeview-min.js" ></script>15 <script src = "$g.server/js/yui/treeview/treeview-min.js" ></script> 16 16 17 17 <!-- TreeView Menu Style --> 18 <link rel="stylesheet" type="text/css" href=" /js/yui/treeview/assets/treeview-menu.css"/>18 <link rel="stylesheet" type="text/css" href="$g.server/js/yui/treeview/assets/treeview-menu.css"/> 19 19 20 <link rel="stylesheet" type="text/css" href=" /js/yui/fonts/fonts-min.css?_yuiversion=2.5.0" />21 <script type="text/javascript" src=" /js/yui/utilities/utilities.js?_yuiversion=2.5.0"></script>20 <link rel="stylesheet" type="text/css" href="$g.server/js/yui/fonts/fonts-min.css?_yuiversion=2.5.0" /> 21 <script type="text/javascript" src="$g.server/js/yui/utilities/utilities.js?_yuiversion=2.5.0"></script> 22 22 23 <script type="text/javascript" src="/js/yui/yahoo-dom-event/yahoo-dom-event.js" ></script> 24 <script type="text/javascript" src="/js/yui/dragdrop/dragdrop-min.js" ></script> 25 <link type="text/css" rel="stylesheet" href="/layout/drag_drop_style.css"/> 26 <script src = "js/dragAndDrop.js" ></script> 27 23 <script type="text/javascript" src="$g.server/js/yui/yahoo-dom-event/yahoo-dom-event.js" ></script> 24 <script type="text/javascript" src="$g.server/js/yui/dragdrop/dragdrop-min.js" ></script> 25 <link type="text/css" rel="stylesheet" href="$g.server/layout/drag_drop_style.css"/> 26 <script src = "$g.server/js/dragAndDrop.js" ></script> 28 27 29 28 <!-- END: Yahoo Interface Library --> 30 29 31 30 <!-- BEGIN: WMSC library --> 32 <link type="text/css" rel="stylesheet" href=" /layout/control.css"/>31 <link type="text/css" rel="stylesheet" href="$g.server/layout/control.css"/> 33 32 34 33 <script src="$g.server/js/wmsc.js"></script> 35 34 <script src="$g.server/js/prototype.js"></script> 36 <script src="http://www.openlayers.org/api/ OpenLayers.js"></script>35 <script src="http://www.openlayers.org/api/2.4/OpenLayers.js"></script> 37 36 <script src="$g.server/js/openlayers-x.js"/> 38 37 <script src="$g.server/js/dimensionControl.js"/> … … 54 53 <for py:for="i in session['viewItems']" class="dataset" py:strip="True"> 55 54 <span py:if="i.wmcURL" py:strip="True"> 56 layerControl.addWebMapContext( '${i.wmcURL}');55 layerControl.addWebMapContext("${i.wmcURL}"); 57 56 </span> 58 57 </for> … … 142 141 Select a dataset to expand it and make its map layers visible; these can then be selected to add to the 'Layer' 143 142 panel for visualisation.<br/> 144 Remove datasets from the display by clicking their <img src=" js/img/close.gif" /> icon.143 Remove datasets from the display by clicking their <img src="$g.server/js/img/close.gif" /> icon. 145 144 </div> 146 145 </div> … … 152 151 to the bottom.<br/> 153 152 NB, if the topmost layer (i.e. the bottom layer in the below list) has legend data available then this will be displayed under the completed map.<br/> 154 Remove layers from the displayed map by clicking their <img src=" js/img/close.gif" /> icon.153 Remove layers from the displayed map by clicking their <img src="$g.server/js/img/close.gif" /> icon. 155 154 </div> 156 155 </div>
Note: See TracChangeset
for help on using the changeset viewer.