instanceInspect.html 7.26 KB
Newer Older
Łukasz Nowak's avatar
Łukasz Nowak committed
1
{% extends "layout.html" %}
2 3 4
{% block title %}Instance inspection{% endblock %}
{% block head %}
  {{ super() }}
5
  <link href="{{ url_for('static', filename='css/jqueryTabs.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
6
  <script src="{{ url_for('static', filename='js/jquery/jqueryTabs.js') }}" type="text/javascript" charset="utf-8"></script>
7
  <script src="{{ url_for('static', filename='js/ace/ace.js') }}" type="text/javascript" charset="utf-8"></script>
8 9 10 11
  <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>
12 13
  <link href="{{ url_for('static', filename='css/gsFileManager.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
  <script src="{{ url_for('static', filename='js/jquery/gsFileManager.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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
      <div id="tab1" class="tabContents">
      <p>This tab show all process generated by slapgrid for your application. You can click on the process name to display log.</p>
      {% if supervisor %}
      <table cellpadding="0" cellspacing="0" width="100%" id="supervisordcontent">
        <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>
          <td  class='first'><b><a href="{{ url_for('tailProcess', process=item[0]) }}">{{ item[0]}}</a></b></td>
          <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 %}
      </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 48 49
      {% else %}
      <h2>No process to display, please run your instance</h2>
      {%endif%}
50
        </div><!-- end tab1 -->
51
      <div id="tab2" class="tabContents">
52
      {% if slap_status %}
53
      <p>Uses parameters below to run your application</p>
54 55 56 57 58
      <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
          <div id="bcontent{{item[0]}}">
Alain Takoudjou's avatar
Alain Takoudjou committed
65
            <table cellpadding="0" cellspacing="0" width="577">
66
            <tr>
67 68
               <th>Parameter Name</th><th>Parameter Value</th>
            </tr>
69 70
            {% for k in item[1] %}
            <tr>
Alain Takoudjou's avatar
Alain Takoudjou committed
71
               <td class="propertie first">{{k}}</td><td align='left'><span class="slapvalues">{{item[1][k]}}</span></td>
72
            </tr>
73
            {% endfor %}
74
            </table>
75
          </div>
76
        {% else %}
77 78 79 80 81
          <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>
82
        {% endfor %}
83 84 85 86 87 88
      </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
        </ul>
92 93 94 95 96
      </div>
      <div class="clear"></div><br/>
      {% else %}
        <h2>No response. Please run Software Instance!</h2>
      {%endif%}
97
        </div><!-- end tab2 -->
98
      <div id="tab3" class="tabContents">
99
      <div id="softwareType">
100
        <h2 class='title'>Software Type of main instance</h2>
101
        <input style="margin-top:5px;" type="text" name="software_type" id="software_type" size="35" value="Software Type here..." />
102 103 104 105 106
      </div>
      <br/>
      <div id="parameterkw">
        <h2 class='hight'>Partitions Parameter</h2>
        <div class="slidebox">
107
          <table class="small" cellpadding="0" cellspacing="0" width="100%" id="partitionParameter">
108
            <tr id="row_1">
109 110 111 112
              <th width="150">Parameter Name</th><th>Parameter Value</th><th width="49">
                <a href="#" class="link" id="add_attribute">[new]</a>
              </th>
            </tr>
113 114 115
          </table>
        </div>
      </div>
116 117
      <br/>
      <div>
118 119 120 121
        <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>
122
        </div><!-- end tab3 -->
123
      <div id="tab4" class="tabContents">
124 125 126 127 128 129 130 131 132 133 134 135
      <!--<h2>File content for all your partitions</h2>
      <div id="fileTree" class="file_tree_tabs" title="Double click to open file"></div>-->
      {%if file_path != "" %}
        <div id="fileNavigator"></div>
        <br/>
        <a href="#" id="reloadfiles" class="lshare simple">Reload Files</a>
      {%else%}
        <h2>Your partitions content is empty yet!
          <br/>please run your software instance
          and look for file result here.
        </h2>
      {%endif%}
136
        </div><!-- end tab4 -->
137 138
    </div>
</div>
139
<!-- This contains the hidden content for inline calls -->
140
<a id='inlineInstance' style='display:none' href="#inline_instance">Inline HTML</a>
141
<div style='display:none'>
142
<div id='inline_instance' style='padding:10px; background:#fff;'>
143 144 145

</div>
</div>
146
{{instance}}
Łukasz Nowak's avatar
Łukasz Nowak committed
147
{% endblock %}
Alain Takoudjou's avatar
Alain Takoudjou committed
148