/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pyserver/html_server.py

  • Committer: Vasilii Chernov
  • Date: 2016-03-03 14:38:32 UTC
  • mto: This revision was merged to the branch mainline in revision 372.
  • Revision ID: vchernov@inr.ru-20160303143832-0rlinjoy3zczhjt2
1. Pcipywrap: add persistent locking wrappings
2. html-server: 
   - add scripts tab
   - change tab view to jQuery tabs

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
   return render_template('property_info.html',
161
161
                          value = value,
162
162
                          branch = branch,
163
 
                          properties = prop_info,
164
 
                          json = json
 
163
                          properties = prop_info
 
164
                         )
 
165
                         
 
166
@app.route("/scripts_info")
 
167
def get_scripts_list():
 
168
   #get properties info
 
169
   prop_info = 0  
 
170
   try:
 
171
      r = requests.get(url_for('process_json_command', 
 
172
                               command = 'get_scripts_list', 
 
173
                               _external = True))
 
174
                               
 
175
      if(r.json().get('status') == 'error'):
 
176
         return 'Error: ' + r.json()['description']
 
177
         
 
178
      scripts_info = r.json()['scripts']
 
179
      
 
180
   except Exception as e:
 
181
      return str(e)
 
182
 
 
183
   return render_template('scripts_info.html',
 
184
                          scripts = scripts_info
165
185
                         )
166
186
                         
167
187
@app.route("/")