Changeset 8529
- Timestamp:
- 27 May 2012, 00:28:10 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r8515 r8529 1203 1203 show_button = _(u'Show') 1204 1204 1205 def update(self, show=None, logname=None, back=None): 1206 session = ISession(self.request)['waeup.kofa'] 1205 def update(self, back=None): 1207 1206 if back is not None: 1208 1207 self.redirect(self.url(self.context)) 1209 return1210 if logname is not None:1211 session['logname'] = logname1212 if show is not None:1213 self.redirect(self.url(self.context, '@@show'))1214 1208 return 1215 1209 self.files = self.context.getLogFiles() … … 1224 1218 search_button = _('Search') 1225 1219 back_button = _('Back') 1220 placeholder = _('Enter a regular expression here...') 1226 1221 1227 1222 def label(self): 1228 1223 return "Logfile %s" % self.filename 1229 1224 1230 def update(self, back=None, query=None ):1225 def update(self, back=None, query=None, logname=None): 1231 1226 if os.name != 'posix': 1232 1227 self.flash( … … 1235 1230 self.redirect(self.url(self.context, '@@logs')) 1236 1231 return 1237 session = ISession(self.request)['waeup.kofa']1238 logname = session.get('logname', None)1239 1232 if back is not None or logname is None: 1240 1233 self.redirect(self.url(self.context, '@@logs')) 1241 1234 return 1242 1235 self.filename = logname 1243 form = self.request.form 1244 self.query = '' 1245 query = form.get('query') 1236 self.query = query 1246 1237 if search is None or not query: 1247 1238 return 1248 self.query = query1249 1239 try: 1250 self. grepresult = ''.join(1240 self.result = ''.join( 1251 1241 self.context.queryLogfiles(logname, query)) 1252 1242 except ValueError: 1253 self.flash(_('Not a valid search expression.' )) 1243 self.flash(_('Invalid search expression.')) 1244 return 1245 if not self.result: 1246 self.flash(_('No search results found.')) 1254 1247 return 1255 1248 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport4page.pt
r7811 r8529 17 17 <input class="btn primary" type="submit" name="finish" 18 18 tal:attributes="value view/back_button" /> 19 </form> 20 <form method="POST" i18n:domain="waeup.kofa" action="@@show"> 19 21 <input class="btn" type="submit" name="showlog" 20 22 tal:attributes="value view/show_button" /> 23 <input type="hidden" name="logname" tal:attributes="value string:datacenter.log" /> 21 24 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterlogspage.pt
r7811 r8529 3 3 Currently no log files are available. 4 4 </p> 5 <table tal:condition="files" class=" condensed-table">5 <table tal:condition="files" class="table condensed-table"> 6 6 <thead> 7 7 <tr> … … 20 20 tal:attributes="class python: repeat['file'].odd() and 'odd' or 'even'"> 21 21 <td class="text-center"> 22 <form method="POST"> 23 <input i18n:translate="" type="submit" class="btn primary" name="show" 24 tal:attributes="value view/show_button" /> 25 <input type="hidden" name="logname" tal:attributes="value file/name" /> 22 <form method="POST" action="@@show"> 23 <input i18n:translate="" type="submit" class="btn primary" 24 name="show" tal:attributes="value view/show_button" /> 25 <input type="hidden" name="logname" 26 tal:attributes="value file/name" /> 26 27 </form></td> 27 28 <td tal:content="file/name">file.name</td> … … 32 33 </table> 33 34 <form method="POST"> 35 <button class="btn primary"> 36 <img tal:attributes="src static/actionicon_reload.png" /> 37 <span i18n:translate="">Reload Page</span> 38 </button> 34 39 <input i18n:translate="" type="submit" class="btn" name="back" 35 40 tal:attributes="value view/back_button"/> -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterlogsshowfilepage.pt
r7749 r8529 1 <form method="post" >1 <form method="post" class="form-horizontal"> 2 2 <input type="text" name="query" 3 tal:attributes="value view/query" /> 4 <input class="btn primary" type="submit" name="search" 5 tal:attributes="value view/search_button"/> 6 <input class="btn" type="submit" name="back" 7 tal:attributes="value view/back_button"/> 3 tal:attributes="value view/query; placeholder view/placeholder" /> 4 <input class="btn primary" type="submit" name="search" 5 tal:attributes="value view/search_button" /> 6 <input class="btn" type="submit" name="back" 7 tal:attributes="value view/back_button" /> 8 <input type="hidden" name="logname" 9 tal:attributes="value view/filename" /> 8 10 </form> 9 11 10 <div tal:condition="view/ grepresult|nothing">11 <pre tal:content="structure view/ grepresult">12 <div tal:condition="view/result|nothing"> 13 <pre tal:content="structure view/result"> 12 14 GREPRESULT 13 15 </pre>
Note: See TracChangeset for help on using the changeset viewer.