instanceInspect.html 7.72 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="application/javascript" charset="utf-8"></script>
7
  <link href="{{ url_for('static', filename='css/colorbox.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
8 9
  <script src="{{ url_for('static', filename='js/jquery/jquery.colorbox-min.js') }}" type="application/javascript" charset="utf-8"></script>
  <script src="{{ url_for('static', filename='js/scripts/inspectInstance.js') }}" type="application/javascript" charset="utf-8"></script>
10
  <link href="{{ url_for('static', filename='css/gsFileManager.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
11
  <script src="{{ url_for('static', filename='js/jquery/gsFileManager.js') }}" type="application/javascript" charset="utf-8"></script>
12
{% endblock %}
Łukasz Nowak's avatar
Łukasz Nowak committed
13
{% block body %}
14
<input type='hidden' name='root' id='root' value='{%if file_path != "" %}{{file_path}}{%endif%}' />
15
<input type="hidden" name="partition_amount" id="partitionAmount" value="{{ partition_amount }}" />
16
<div id="tabContainer">
17
    <ul>
18 19 20
      <li><a href="#tab1" class="active">Process</a></li>
      <li><a href="#tab2">Connection Information</a></li>
      <li><a href="#tab3" id="parameterTab">Parameters</a></li>
21
      <li><a href="#tab4" id="instancetabfiles">Partitions Content</a></li>
22
      <li><a href="#tab5">Monitoring</a></li>
23 24
    </ul><!-- //Tab buttons -->
    <div class="tabDetails">
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
      <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/>
41 42 43 44
      <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/>
45 46 47
      {% else %}
      <h2>No process to display, please run your instance</h2>
      {%endif%}
48
        </div><!-- end tab1 -->
49
      <div id="tab2" class="tabContents">
50
      {% if slap_status %}
51
      <p>Uses parameters below to run your application</p>
52
      <div class="menu-box-right">
53 54 55 56
      <div style="background:#fff; padding:10px;">
        {% for item in slap_status %}
        <div id="box{{item[0]}}" style="display:none;">
        {% if item[1] %}
57
          <h2><span style="float:left; margin-left:10px;" id="{{item[0]}}title">Slap Response for {{item[0]}}</span>
Marco Mariani's avatar
Marco Mariani committed
58
            <a href="#" id="{{item[0]}}Parameter" rel="{{item[0]}}" class="lshare simple" style="float:right" title='Restart all partition processes'>Restart</a>
59 60
            <a href="#" id="{{item[0]}}Files" rel="{{item[0]}}" class="lshare simple no-right-border" style="float:right">Files</a>
          </h2>
61
          <div class="clear"></div><br/>
62
          <div id="bcontent{{item[0]}}">
63
            <table cellpadding="0" cellspacing="0" width="100%">
64
            <tr>
65 66
               <th>Parameter Name</th><th>Parameter Value</th>
            </tr>
67
            {% for k in item[1]|sort %}
68
            <tr>
69
               <td class="propertie first">{{k}}</td><td align='left'><span class="slapvalues">{{item[1][k]}}</span></td>
70
            </tr>
71
            {% endfor %}
72
            </table>
73
          </div>
74
        {% else %}
75 76 77 78 79
          <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>
80
        {% endfor %}
81 82
      </div>
      </div>
83
      <div class="menu-box-left">
84 85 86
        <ul id="slappart">
          {% for item in slap_status %}
            <li><input type="radio" name="slapresponse" id="{{item[0]}}" value="{{item[0]}}" />
87 88
              <label for="{{item[0]}}" {% if item[1] %}style="font-weight:bold"{%endif%}>{{item[0]}}</label></li>
          {% endfor %}
89
        </ul>
90 91 92 93 94
      </div>
      <div class="clear"></div><br/>
      {% else %}
        <h2>No response. Please run Software Instance!</h2>
      {%endif%}
95
        </div><!-- end tab2 -->
96
      <div id="tab3" class="tabContents">
97
      <div id="softwareType">
98
        <h2 class='title'>Software Type of main instance</h2>
99
        <input style="margin-top:5px;" type="text" name="software_type" id="software_type" size="35" value="Software Type here..." />
100 101 102
      </div>
      <br/>
      <div id="parameterkw">
103
        <h2 class='title'>Partitions Parameter</h2>
104
        <div class="slidebox">
105
          <table class="small" cellpadding="0" cellspacing="0" width="100%" id="partitionParameter">
106
            <tr id="row_1">
107 108 109 110
              <th width="150">Parameter Name</th><th>Parameter Value</th><th width="49">
                <a href="#" class="link" id="add_attribute">[new]</a>
              </th>
            </tr>
111 112 113
          </table>
        </div>
      </div>
114 115
      <br/>
      <div>
116 117 118 119
        <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>
120
        </div><!-- end tab3 -->
121
      <div id="tab4" class="tabContents">
122 123 124 125 126 127 128 129 130 131 132 133
      <!--<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%}
134
        </div><!-- end tab4 -->
135 136 137 138 139 140 141 142 143 144
      <div id="tab5" class="tabContents">
        <h2>Monitoring interface</h2>
        <div class="clear"></div>
        <p>By clicking on the next link, you can access to the monitoring interface of the instance running inside the webrunner.</p>
        <div class="clear"></div>
        <p><b>Notice</b> that you have to extend the stack monitor in your software release (as explained <a href="http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/stack/monitor/README.txt?js=1">here</a>) for this weblink to work.
        <div class="clear"></div>
        <p><b><a href="{{ g.instance_monitoring_url }}" target="_blank">{{ g.instance_monitoring_url }}</a></b></p>
        <div class="clear"></div>
      </div><!-- end tab5 -->
145 146
    </div>
</div>
147
<!-- This contains the hidden content for inline calls -->
148
<a id='inlineInstance' style='display:none' href="#inline_instance">Inline HTML</a>
149
<div style='display:none'>
150
<div id='inline_instance' style='padding:10px; background:#fff;'>
151 152 153

</div>
</div>
Łukasz Nowak's avatar
Łukasz Nowak committed
154
{% endblock %}
155