Changeset 4445
- Timestamp:
- 19/11/08 11:57:16 (11 years ago)
- Location:
- TI05-delivery/ows_framework/trunk/ows_server/ows_server
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/editatom.py
r4420 r4445 244 244 inputs = request.params 245 245 c.atom = Atom(xmlString=str(x), ndgObject = self.ndgObject, **dict(inputs)) 246 247 # save the current atom - to avoid this needing be recreated by the 248 # asynch viewDeployments call 249 session['currentAtom'] = c.atom 250 session.save() 246 251 logging.info("Data model set up") 247 252 -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/retrieve.py
r4442 r4445 77 77 response.status_code = 400 78 78 return render('error') 79 79 80 80 try: 81 status,x=interface.GetXML(uri,outputSchema=self.outputSchema, useCache=False) 82 c.xmlh=x 83 c.atom = Atom(xmlString=str(x), ndgObject = self.uri) 81 # NB, we should have stored the current atom data - so look this up now 82 atom = session.get('currentAtom') 83 if atom: 84 c.atom = atom 85 else: 86 status,x=interface.GetXML(uri,outputSchema=self.outputSchema, useCache=False) 87 c.xmlh=x 88 c.atom = Atom(xmlString=str(x), ndgObject = self.uri) 89 90 # NB, there are two routes through here - if we're viewing a data entity, 91 # the deployment links are available directly from the atom; if not we 92 # need to look them up 93 lookupIndirectReferences = False 94 if c.atom.isDeployable(): 95 lookupIndirectReferences = True 84 96 85 97 dr = DocumentRetrieve(self.cf.get('NDG_EXIST','local'), 86 98 pwfile=self.cf.get('NDG_EXIST','passwordFile')) 87 c.atom.lookupDeploymentsInfo(dr) 99 c.atom.lookupDeploymentsInfo(dr, lookupIndirectReferences = \ 100 lookupIndirectReferences) 88 101 return render('genshi', 'deployments_data') 89 102 … … 154 167 uri = self.uri) 155 168 templateType = "genshi" 169 # store the atom for easy re-use by asynch calls 170 # - primarily for the viewDeployments() method here 171 session['currentAtom'] = c.atom 172 session.save() 156 173 157 174 elif viewFormat == ndgObject.MOLES_DOC_TYPE: -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/public/js/queueDeployments.js
r4283 r4445 5 5 6 6 var MyApp = { 7 NAME : ' Deployments - loading',7 NAME : 'Loading deployments info...', 8 8 9 9 q : new Y.Queue(), -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/atom_editor.html
r4443 r4445 34 34 <div py:if="c.atom.isDE()" py:replace="Associations('Associated Data Granules', c.atom.getLinksOfType(g.vtd.GRANULE_TERM), c.addGranuleLink, c.saveAssoc)"/> 35 35 <div py:if="c.atom.isDE()" py:replace="Associations('Associated Deployments', c.atom.getLinksOfType(g.vtd.DEPLOYMENT_TERM), c.addDeploymentLink, c.saveAssoc)"/> 36 <div class="metadataSection" py:if="c.atom.isDeployable()"> 37 <div class="headingblock" id="deploymentsPlaceholder" /> 38 </div> 36 39 <span py:if="not c.atom.isDeployment()" py:strip=""> 37 40 <span py:if="not c.saveLink" py:strip=""> -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/atom_functions.html
r4443 r4445 576 576 </table> 577 577 </form> 578 <div class="headingblock" py:if="c. isDeployment and not editLink" id="deploymentsPlaceholder" />578 <div class="headingblock" py:if="c.atom.isDE() and c.isDeployment and not editLink" id="deploymentsPlaceholder" /> 579 579 <table py:if="not links"><tr><td> 580 580 No data specified at present
Note: See TracChangeset
for help on using the changeset viewer.