Commits

buzmakov  committed 0a17c1d Draft

little bootstrap before tomo_results

  • Participants
  • Parent commits 18f39ab
  • Branches bootstrap

Comments (0)

Files changed (3)

File tomofrontend/web/templates/base.html

 </div>
 {% block body %}{% endblock %}
 <div class="container-fluid">
-
     <hr>
 
     <footer>
 ================================================== -->
 <!-- Placed at the end of the document so the pages load faster -->
 <script src="/static/js/jquery.js"></script>
+<script src="/static/js/google-code-prettify/prettify.js"></script>
 <script src="/static/js/bootstrap-transition.js"></script>
 <script src="/static/js/bootstrap-alert.js"></script>
 <script src="/static/js/bootstrap-modal.js"></script>
 <script src="/static/js/bootstrap-collapse.js"></script>
 <script src="/static/js/bootstrap-carousel.js"></script>
 <script src="/static/js/bootstrap-typeahead.js"></script>
+
 {% block my_scripts %} {% endblock %}
 </body>
 </html>

File tomofrontend/web/templates/tomo_info.html

             Информация об объекте {{ tomo_object['data_dir'] }}
         </p>
 
-        <div class="subnav">
+        <div class="subnav subnav-fixed">
             <ul class="nav nav-pills">
                 <li class=active><a href="#">Информация об объекте</a></li>
                 <li>
 
             <dt> Детальный статус объекта</dt>
             <dd>
-                <pre class="pre-scrollable linenums">{{ tomo_object.get_formated_status() }}</pre>
+                <pre class="pre">{{tomo_object.get_formated_status()}}</pre>
             </dd>
 
-            <dt>Tomo config: </dt>
+            <dt>Tomo config:
+
+                <button class="btn-mini btn-primary" data-toggle="collapse" data-target="#tomo_config">
+                    Hide/Show
+                </button>
+            </dt>
             <dd>
-                <pre class="pre-scrollable linenums">{{tomo_object.get_formated_config()}}</pre>
+                <div id="tomo_config" class="collapse in">
+                    <pre class="pre">{{ tomo_object.get_formated_config()}}</pre>
+                </div>
             </dd>
         </dl>
     </div>

File tomofrontend/web/web_utils.py

     def reconstruction_loop(in_queue,out_queue):
         while True:
             item=in_queue.get()
-            out_queue.put({'id':item['id'],'message':'Tomography reconstruction started',
+            if item['just_preprocess']:
+                start_message='Tomography initial images build  started'
+            else:
+                start_message='Tomography reconstruction started'
+
+            if item['just_preprocess']:
+                stop_message='Tomography initial images build done'
+            else:
+                stop_message='Tomography reconstruction done'
+
+            out_queue.put({'id':item['id'],'message':start_message,
                            'datetime':str(datetime.datetime.now())})
             do_tomo_reconstruction(item['path'],just_preprocess=item['just_preprocess'])
-            out_queue.put({'id':item['id'],'message':'Tomography reconstruction done',
+            out_queue.put({'id':item['id'],'message':stop_message,
                            'datetime':str(datetime.datetime.now())})
 
 
 
     def is_path_in_datapath(self,path):
         real_path=os.path.realpath(os.path.join(self.get_full_path(),path))
-        if real_path.find(self.get_full_path())==0:
+        if not real_path.find(self.get_full_path()):
             return True
         else:
             return False