<div class="text-center"><h1>LIVE VALUES</h1></div>
<div class='row row-flex'>
    <div class='col-xs-4 text-center box-me'>
        <div class="gauge-box">
            <table class="table">
                <tbody>
                    <tr>
                        <td>
                            <h2>Start Permissive</h2>
                        </td>

                        <td>
                            <h2>
                                <% if (channels["ipp.startpermissive"].value == 1){ %>
                                    <span class="label label-success">OK</span>
                                <% } else { %>
                                    <span class="label label-danger">NOT OK</span>
                                <% } %>
                            </h2>
                        </td>
                    </tr>

                    <tr>
                        <td>Overload Relay</td>
                        <td>
                            <% if (channels["ipp.sptrip"].value == 1){ %>
                                <span class="label label-success">OK</span>
                            <% } else { %>
                                <span class="label label-danger">NOT OK</span>
                            <% } %>
                        </td>
                    </tr>

                    <tr>
                        <td>Mode</td>
                        <td>
                            <% if (channels["ipp.spmode"].value == 1){ %>
                                <span class="label label-success">OK</span>
                            <% } else { %>
                                <span class="label label-danger">NOT OK</span>
                            <% } %>
                        </td>
                    </tr>

                    <tr>
                        <td>DH Pressure</td>
                        <td>
                            <% if (channels["ipp.sppressure"].value == 1){ %>
                                <span class="label label-success">OK</span>
                            <% } else { %>
                                <span class="label label-danger">NOT OK</span>
                            <% } %>
                        </td>
                    </tr>

                    <tr>
                        <td>DH Temperature</td>
                        <td>
                            <% if (channels["ipp.sptemperature"].value == 1){ %>
                                <span class="label label-success">OK</span>
                            <% } else { %>
                                <span class="label label-danger">NOT OK</span>
                            <% } %>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class='col-xs-4 text-center box-me'>
        <div class="gauge-box">
            <table class="table">
                <tbody>
                    <tr>
                        <td>
                            <h2>Run Permissive</h2>
                        </td>

                        <td>
                            <h2>
                                <% if (channels["ipp.runpermissive"].value == 1){ %>
                                    <span class="label label-success">OK</span>
                                <% } else { %>
                                    <span class="label label-danger">NOT OK</span>
                                <% } %>
                            </h2>
                        </td>
                    </tr>

                    <tr>
                        <td>Overload Relay</td>
                        <td>
                            <% if (channels["ipp.rptrip"].value == 1){ %>
                                <span class="label label-success">OK</span>
                            <% } else { %>
                                <span class="label label-danger">NOT OK</span>
                            <% } %>
                        </td>
                    </tr>

                    <tr>
                        <td>Mode</td>
                        <td>
                            <% if (channels["ipp.rpmode"].value == 1){ %>
                                <span class="label label-success">OK</span>
                            <% } else { %>
                                <span class="label label-danger">NOT OK</span>
                            <% } %>
                        </td>
                    </tr>

                    <tr>
                        <td>DH Pressure</td>
                        <td>
                            <% if (channels["ipp.rppressure"].value == 1){ %>
                                <span class="label label-success">OK</span>
                            <% } else { %>
                                <span class="label label-danger">NOT OK</span>
                            <% } %>
                        </td>
                    </tr>

                    <tr>
                        <td>DH Temperature</td>
                        <td>
                            <% if (channels["ipp.rptemperature"].value == 1){ %>
                                <span class="label label-success">OK</span>
                            <% } else { %>
                                <span class="label label-danger">NOT OK</span>
                            <% } %>
                        </td>
                    </tr>

                    <tr>
                        <td>Tubing Pressure</td>
                        <td>
                            <% if (channels["ipp.rptubingpressure"].value == 1){ %>
                                <span class="label label-success">OK</span>
                            <% } else { %>
                                <span class="label label-danger">NOT OK</span>
                            <% } %>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>

<div class="row row-flex">
    <div class="col-md-6">
        <button href="#" data-channelId="<%= channels["ipp.e300tripstatus"].channelId %>" class="data-table btn btn-theme" title="Trip History"><i style='margin-left: 0.5em; cursor: pointer' class="fa fa-th-list icon-theme"></i> Trip History</button>
    </div>

    <div class="col-md-6">
        <button href="#" data-channelId="<%= channels["ipp.e300warningstatus"].channelId %>" class="data-table btn btn-theme" title="Trip History"><i style='margin-left: 0.5em; cursor: pointer' class="fa fa-th-list icon-theme"></i> Warning History</button>
    </div>
</div>



<style>
  .box-me {
    position: relative;
    padding: 0.5em;
    padding-bottom: 1.5em;
    border: 1px solid #eee;
    /*margin: 1em 0;*/
  }
  .box-me .gauge-box {
    margin-top: -0.25em;
  }
  .box-me h2 {
      text-transform: uppercase;
      font-size: 14px;
      color: #666;
      font-weight: 400;
      letter-spacing: 1px;
      z-index: 100;
  }
  .dynamic-chart-form {
    background-color: whiteSmoke;
    padding: 1em 0.5em;
    margin-top: 1em;
  }

  .fill-vertically {
      height:261px;
  }

  #systemStatusTimelineContainer h2 {
  text-transform: uppercase;
  font-size: 14px;
  color: #666;
  font-weight: 400;
  letter-spacing: 1px;
  z-index: 100;
  }

.row-flex {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display:         flex;
    flex-wrap: wrap;
}
.row-flex > [class*='col-'] {
    display: flex;
    flex-direction: column;
}
</style>
