instanceInspect.html 7.01 KB
Newer Older
Łukasz Nowak's avatar
Łukasz Nowak committed
1
{% extends "layout.html" %}
2 3 4 5
{% block title %}Instance inspection{% endblock %}
{% block head %}
  {{ super() }}
  <link href="{{ url_for('static', filename='css/jqueryFileTree.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
6
  <script src="{{ url_for('static', filename='js/jquery/jqueryFileTree.js') }}" type="text/javascript" charset="utf-8"></script>
7
  <link href="{{ url_for('static', filename='css/jqueryTabs.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
8 9 10 11 12 13
  <script src="{{ url_for('static', filename='js/jquery/jqueryTabs.js') }}" type="text/javascript" charset="utf-8"></script>
  <script src="{{ url_for('static', filename='js/ace/ace-uncompressed.js') }}" type="text/javascript" charset="utf-8"></script>
  <script src="{{ url_for('static', filename='js/ace/theme-crimson_editor.js') }}" type="text/javascript" charset="utf-8"></script>
  <link href="{{ url_for('static', filename='css/colorbox.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
  <script src="{{ url_for('static', filename='js/jquery/jquery.colorbox-min.js') }}" type="text/javascript" charset="utf-8"></script>
  <script src="{{ url_for('static', filename='js/scripts/inspectInstance.js') }}" type="text/javascript" charset="utf-8"></script>
14
{% endblock %}
Łukasz Nowak's avatar
Łukasz Nowak committed
15
{% block body %}
16
<input type='hidden' name='root' id='root' value='{%if file_path != "" %}{{file_path}}{%endif%}' />
17
<input type="hidden" name="partition_amount" id="partitionAmount" value="{{ partition_amount }}" />
18
<h2>Instance inspection</h2><br/>
19 20
<div id="tabContaier">
    <ul>
21
      <li><a href="#tab1" class="active">Slapgrid Supervisor</a></li>
22
      <li><a href="#tab2">SLAP Response</a></li>
23
      <li><a href="#tab3" id="parameterTab">Parameters</a></li>
24
      <li><a href="#tab4" id="instancetabfiles">Partitions Content</a></li>
25 26
    </ul><!-- //Tab buttons -->
    <div class="tabDetails">
27
    	<div id="tab1" class="tabContents">
28
	    <p>This tab show all process generated by slapgrid for your application. You can click on the process name to display log.</p>
29
	    {% if supervisor %}
30
	    <table cellpadding="0" cellspacing="0" width="100%" id="supervisordcontent">
31 32 33 34 35
	      <tr>
		      <th>Partition and Process name</th><th>Status</th><th>Process PID </th><th> UpTime</th><th></th>
	      </tr>
	    {% for item in supervisor %}
	      <tr>
36
		      <td  class='first'><b><a href="{{ url_for('tailProcess', process=item[0]) }}">{{ item[0]}}</a></b></td>
37 38 39 40 41
		      <td align="center"><a href="{{ url_for('startStopProccess', process=item[0], action=item[1]) }}">{{ item[1]}}</a></td>
		      <td align="center">{{ item[3]}}</td><td>{{ item[5]}}</td>
		      <td align="center"><a href="{{ url_for('startStopProccess', process=item[0], action='RESTART') }}">Restart</a></td>
	      </tr>
	    {% endfor %}
42
	    </table><br/>
43 44 45 46
      <a href="#" id="refresh" class="lshare simple no-right-border" style="float:left">Refresh Status</a>
      <a href="{{ url_for('stopAllPartition') }}" class="lshare simple" style="float:left">Stop all process</a>
      <img class="waitting" id="imgwaitting" src="{{ url_for('static', filename='images/waiting.gif') }}" alt="" />
      <div class="clear"></div><br/>
47
	    {% else %}
48
	    <h2>No process to display, please run your instance</h2>
49
	    {%endif%}
50 51 52 53 54 55 56 57 58
        </div><!-- end tab1 -->
    	<div id="tab2" class="tabContents">
      {% if slap_status %}
	    <p>Uses parameters below to run your application</p>
      <div class="menu-box-right" style="width: 597px;">
      <div style="background:#fff; padding:10px;">
        {% for item in slap_status %}
        <div id="box{{item[0]}}" style="display:none;">
        {% if item[1] %}
59
          <h2><span style="float:left; margin-left:10px;" id="{{item[0]}}title">Slap Response for {{item[0]}}</span>
60
            <a href="#" id="{{item[0]}}Parameter" rel="{{item[0]}}" class="lshare simple" style="float:right" title='Restart all partition process'>Restart</a>
61 62
            <a href="#" id="{{item[0]}}Files" rel="{{item[0]}}" class="lshare simple no-right-border" style="float:right">Files</a>
          </h2>
63
          <div class="clear"></div><br/>
64 65
          <div id="bcontent{{item[0]}}">
            <table cellpadding="0" cellspacing="0" width="100%">
66 67 68 69 70 71 72 73
            <tr>
        	     <th>Parameter Name</th><th>Parameter Value</th>
      	    </tr>
            {% for k in item[1] %}
            <tr>
               <td class="propertie first">{{k}}</td><td align='left'>{{item[1][k]}}</td>
      	    </tr>
            {% endfor %}
74
            </table>
75
          </div>
76
        {% else %}
77 78 79 80 81 82 83 84 85 86 87 88
          <h2>Empty Partition</h2></br>
          <center><img alt="" src="{{ url_for('static', filename='images/empty.png') }}" /></center>
          <br/><h2>Partition {{item[0]}} is still empty</h2>
        {%endif%}
        </div>
  	    {% endfor %}
      </div>
      </div>
      <div class="menu-box-left" style="width: 110px;">
        <ul id="slappart">
          {% for item in slap_status %}
            <li><input type="radio" name="slapresponse" id="{{item[0]}}" value="{{item[0]}}" />
89 90
              <label for="{{item[0]}}" {% if item[1] %}style="font-weight:bold"{%endif%}>{{item[0]}}</label></li>
          {% endfor %}
91 92 93 94 95 96
	      </ul>
      </div>
      <div class="clear"></div><br/>
      {% else %}
        <h2>No response. Please run Software Instance!</h2>
      {%endif%}
97 98
        </div><!-- end tab2 -->
    	<div id="tab3" class="tabContents">
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
      <div id="softwareType">
        <h2 class='hight'>Software Type parameter</h2>
        <div class="slidebox">
          <label for="software_type">Software Type </label>
          <input type="text" name="software_type" id="software_type" size="35" value="Software Type here..." />
        </div>
      </div>
      <br/>
      <div id="parameterkw">
        <h2 class='hight'>Partitions Parameter</h2>
        <div class="slidebox">
    	    <table class="small" cellpadding="0" cellspacing="0" width="100%" id="partitionParameter">
            <tr id="row_1">
    		      <th width="150">Parameter Name</th><th>Parameter Value</th><th width="49">
      	        <a href="#" class="link" id="add_attribute">[new]</a>
    		      </th>
    	      </tr>
          </table>
        </div>
      </div>
119 120
      <br/>
      <div>
121 122 123 124
        <a id="updateParameters" class="lshare simple no-right-border" style="float:left">Update Values</a>
        <a href="#" id="xmlview" class="lshare simple"  style="float:left">Load XML</a>
      </div>
      <div class="clear"></div>
125
        </div><!-- end tab3 -->
126 127
      <div id="tab4" class="tabContents">
      <h2>File content for all your partitions</h2>
128
      <div id="fileTree" class="file_tree_tabs" title="Double click to open file"></div>
129 130 131
      <br/>
      <a href="#" id="reloadfiles" class="lshare simple">Reload Files</a>
        </div><!-- end tab4 -->
132 133
    </div>
</div>
134 135 136 137 138 139 140
<!-- This contains the hidden content for inline calls -->
<a class='inline' style='display:none' href="#inline_content">Inline HTML</a>
<div style='display:none'>
<div id='inline_content' style='padding:10px; background:#fff;'>

</div>
</div>
141
{{instance}}
Łukasz Nowak's avatar
Łukasz Nowak committed
142
{% endblock %}