<div class='row row-flex box-me'>
  <div class='col-xs-4 text-center'>
    <h2>Motor Speed</h2>
    <div class="gauge-box">
        <div data-labelheight="10" style="height: 170px; background: transparent; margin: 0 auto;" id="gauge-vfdspeedfdbk" data-chart="solidgauge" data-nodename="vfdipp.vfdspeedfdbk" data-units="Hz" data-min="0" data-max="100" data-colors="0.1:#DF5353,0.5:#DDDF0D,0.9:#55BF3B" data-valuefontsize="18px"></div>
        <span data-timeupdate="vfdspeedfdbk"><%= channels["vfdipp.vfdspeedfdbk"].timestamp %></span>
    </div>
  </div>
  <div class='col-xs-8'>
    <div style="height:300px" id="chart-vfdspeedfdbk" data-chart="chart" data-nodename1="vfdipp.vfdspeedfdbk" data-datalabel1="Speed" data-daysofhistory="2"  data-chartlabel="Motor Speed" data-ylabel="" data-xlabel="Date" data-units=" Hz"></div>
  </div>
</div>

<% if (channels["vfdipp.downholetoolenabled"].value == 1) {%>

    <div class='row row-flex box-me'>
      <div class='col-xs-4 text-center'>
        <h2>Downhole Pressure</h2>
        <div class="gauge-box">
            <div data-labelheight="10" style="height: 170px; background: transparent; margin: 0 auto;" id="gauge-dhintakepressure" data-chart="solidgauge" data-nodename="vfdipp.dhintakepressure" data-units="PSI" data-min="0" data-max="400" data-colors="0.1:#DF5353,0.5:#DDDF0D,0.9:#55BF3B" data-valuefontsize="18px"></div>
            <span data-timeupdate="dhintakepressure"><%= channels["vfdipp.dhintakepressure"].timestamp %></span>
        </div>
      </div>
      <div class='col-xs-8'>
        <div style="height:300px" id="chart-dhintakepressure" data-chart="chart" data-nodename1="vfdipp.dhintakepressure" data-datalabel1="Downhole Pressure" data-daysofhistory="2"  data-chartlabel="DH Intake Pressure" data-ylabel="" data-xlabel="Date" data-units=" PSI"></div>
      </div>
    </div>

    <div class='row row-flex box-me'>
      <div class='col-xs-4 text-center'>
        <h2>Downhole Temperature</h2>
        <div class="gauge-box">
            <div data-labelheight="10" style="height: 170px; background: transparent; margin: 0 auto;" id="gauge-dhintaketemperature" data-chart="solidgauge" data-nodename="vfdipp.dhintaketemperature" data-units=" &deg; F" data-min="0" data-max="400" data-colors="0.1:#DF5353,0.5:#DDDF0D,0.9:#55BF3B" data-valuefontsize="18px"></div>
            <span data-timeupdate="dhintaketemperature"><%= channels["vfdipp.dhintaketemperature"].timestamp %></span>
        </div>
      </div>
      <div class='col-xs-8'>
        <div style="height:300px" id="chart-dhintaketemperature" data-chart="chart" data-nodename1="vfdipp.dhintaketemperature" data-datalabel1="Downhole Temperature" data-daysofhistory="2"  data-chartlabel="DH Intake Temperature" data-ylabel="" data-xlabel="Date" data-units=" &deg; F"></div>
      </div>
    </div>
<% } %>

<% if (channels["vfdipp.tubingpressuretransducerenabled"].value == 1) {%>

    <div class='row row-flex box-me'>
      <div class='col-xs-4 text-center'>
        <h2>Downhole Pressure</h2>
        <div class="gauge-box">
            <div data-labelheight="10" style="height: 170px; background: transparent; margin: 0 auto;" id="gauge-tubingpressure" data-chart="solidgauge" data-nodename="vfdipp.tubingpressure" data-units="PSI" data-min="0" data-max="400" data-colors="0.1:#DF5353,0.5:#DDDF0D,0.9:#55BF3B" data-valuefontsize="18px"></div>
            <span data-timeupdate="tubingpressure"><%= channels["vfdipp.tubingpressure"].timestamp %></span>
        </div>
      </div>
      <div class='col-xs-8'>
        <div style="height:300px" id="chart-tubingpressure" data-chart="chart" data-nodename1="vfdipp.tubingpressure" data-datalabel1="Tubing Pressure" data-daysofhistory="2"  data-chartlabel="Tubing Pressure" data-ylabel="" data-xlabel="Date" data-units=" PSI"></div>
      </div>
    </div>
<% } %>


<div class='row row-flex box-me'>
  <div class='col-xs-4 text-center'>
    <h2>Output Current</h2>
    <div class="gauge-box">
        <div data-labelheight="10" style="height: 170px; background: transparent; margin: 0 auto;" id="gauge-vfdoutputcurrent" data-chart="solidgauge" data-nodename="vfdipp.vfdoutputcurrent" data-units="A" data-min="0" data-max="<%= channels["vfdipp.vfdnameplatefla"].value %>" data-colors="0.1:#DF5353,0.5:#DDDF0D,0.9:#55BF3B" data-valuefontsize="18px"></div>
        <span data-timeupdate="vfdoutputcurrent"><%= channels["vfdipp.vfdoutputcurrent"].timestamp %></span>
    </div>
  </div>
  <div class='col-xs-8'>
    <div style="height:300px" id="chart-vfdoutputcurrent" data-chart="chart" data-nodename1="vfdipp.vfdoutputcurrent" data-datalabel1="Output Current" data-daysofhistory="2"  data-chartlabel="Output Current" data-ylabel="" data-xlabel="Date" data-units=" A"></div>
  </div>
</div>

<div class='row row-flex box-me'>
  <div class='col-xs-4 text-center'>
    <h2>Output Voltage</h2>
    <div class="gauge-box">
        <div data-labelheight="10" style="height: 170px; background: transparent; margin: 0 auto;" id="gauge-vfdoutputvoltage" data-chart="solidgauge" data-nodename="vfdipp.vfdoutputvoltage" data-units="V" data-min="0" data-max="600" data-colors="0.1:#DF5353,0.5:#DDDF0D,0.9:#55BF3B" data-valuefontsize="18px"></div>
        <span data-timeupdate="vfdoutputvoltage"><%= channels["vfdipp.vfdoutputvoltage"].timestamp %></span>
    </div>
  </div>
  <div class='col-xs-8'>
    <div style="height:300px" id="chart-vfdoutputvoltage" data-chart="chart" data-nodename1="vfdipp.vfdoutputvoltage" data-datalabel1="Output Voltage" data-daysofhistory="2"  data-chartlabel="Output Voltage" data-ylabel="" data-xlabel="Date" data-units=" V"></div>
  </div>
</div>

<div class='row row-flex box-me'>
  <div class='col-xs-4 text-center'>
    <h2>DC Bus Voltage</h2>
    <div class="gauge-box">
        <div data-labelheight="10" style="height: 170px; background: transparent; margin: 0 auto;" id="gauge-vfddcbusvoltage" data-chart="solidgauge" data-nodename="vfdipp.vfddcbusvoltage" data-units="V" data-min="0" data-max="700" data-colors="0.1:#DF5353,0.5:#DDDF0D,0.9:#55BF3B" data-valuefontsize="18px"></div>
        <span data-timeupdate="vfddcbusvoltage"><%= channels["vfdipp.vfddcbusvoltage"].timestamp %></span>
    </div>
  </div>
  <div class='col-xs-8'>
    <div style="height:300px" id="chart-vfddcbusvoltage" data-chart="chart" data-nodename1="vfdipp.vfddcbusvoltage" data-datalabel1="DC Bus Voltage" data-daysofhistory="2"  data-chartlabel="DC Bus Voltage" data-ylabel="" data-xlabel="Date" data-units=" V"></div>
  </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;
    }

    .pad15 {
        margin: 15px 15px;
    }

    .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;
    }

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

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