{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
}}
<div class="panel panel-default">
  <div class="panel-heading">
    <h3>Saved Script Migration
    </h3>
  </div>
  <div class="panel-body">
    <div class="row">
      <div class="col-sm-3">
        User Name
        <font size="3" color="red"> *
        </font>
      </div>
      <div class="col-sm-3">
        {{ember-selectize content=model.usersdetail  optionValuePath="content.username" optionLabelPath="content.username" value=usernamehue placeholder="Select an userName" }}
      </div>
    </div>
    <br>
    <div class="row">
      <div class="col-sm-3">
        Instance Name
        <font size="3" color="red"> *
        </font>
      </div>
      <div class="col-sm-3">
        {{ember-selectize content=model.piginstancedetail  optionValuePath="content.instanceName" optionLabelPath="content.instanceName" value=instancename  placeholder="Select an Instance name" }}
      </div>
    </div>
    <br>
    <div class="row">
      <div class="col-sm-3">
        Start Date
      </div>
      <div class="col-sm-9">
        {{date-picker size="35" date=startdate valueFormat='YYYY-MM-DD' name="startdate" id="startdate" value=startdate}}
      </div>
    </div>
    <br>
    <div class="row">
      <div class="col-sm-3">
        End Date
      </div>
      <div class="col-sm-9">
        {{date-picker size="35" date=enddate valueFormat='YYYY-MM-DD' name="enddate" id="enddate" value=enddate}}
      </div>
    </div>
    <br>
    <div class="row">
      <div class="col-sm-3">
        <button class="btn btn-success" {{action 'submitResult'}} disabled={{jobstatus}}>Submit
        </button>
      </div>
      <div class="col-sm-3">
        {{#if jobstatus}}
          <h5>
            <font color="green">Job has been Submitted.
            </font>
          </h5>
        {{/if}}
      </div>
    </div>
    <br>
    <div class="row">
      <div class="col-sm-9">
        {{#if jobstatus}}
          <br>
          <div class="progress" id="progressbar" style="">
            <div id="progressbarhivesavedquery" class="progress-bar" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="50"  style="width:{{progressBar}}%">
            </div>
          </div>
        {{/if}}
      </div>
    </div>
    <div class="row">
      <div class="col-sm-9">
        {{#if completionStatus}}
          <h2>Migration Report
          </h2>
          <table class="table table-hover">
            <thead>
            <tr>
              <th>Parameters</th>
              <th>Status</th>
            </tr>
            </thead>
            <tbody>
            <tr>
              <td>Number of Query Transferred</td>
              <td>{{numberOfQueryTransfered}}</td>
            </tr>
            <tr>
              <td>Total Number of Queries</td>
              <td>{{totalNoQuery}}</td>
            </tr>
            <tr>
              <td>Total Time Taken</td>
              <td>{{totalTimeTaken}}ms</td>
            </tr>
            <tr>
              <td>Hue User Name(Source)</td>
              <td>{{Username}}</td>
            </tr>
            <tr>
              <td>Ambari Instance Name(Target)</td>
              <td>{{instanceName}}</td>
            </tr>
            </tbody>
          </table>
        {{/if}}
      </div>
    </div>
  </div>
</div>
