<!--
* 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.
-->

<script type="text/ng-template" id="jobSubmit.html">
    <div class="modal-header">
        <h4 tooltip="submit">CUBE BUILD CONFIRM</h4>
    </div>
    <div class="modal-body" style="background-color: white">
        <div ng-if="metaModel.model.partition_desc.partition_date_column" class="row">
            <div class="col-md-2"></div>
            <div class="col-md-8">
                <div class="row">
                    <table class="table table-striped list">
                        <tbody>
                        <tr>
                            <td>PARTITION DATE COLUMN</td>
                            <td>{{metaModel.model.partition_desc.partition_date_column}}</td>
                        </tr>
                        <tr>
                            <td>Start Date (Include)</td>
                            <td>

                              <div class="dropdown" style="width: 98%;">
                                <a class="dropdown-toggle" id="dropdown1" role="button" data-toggle="dropdown" data-target="#" href="#">
                                  <div class="input-group"><input type="text" class="form-control" date-timepicker-timezone data-ng-model="jobBuildRequest.startTime" >
                                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                  </div>
                                </a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                  <datetimepicker  data-ng-model="jobBuildRequest.startTime" data-datetimepicker-config="{ dropdownSelector: '#dropdown1' }"/>
                                </ul>
                              </div>


                            </td>
                        </tr>
                        <tr>
                          <td width="50%;">End Date (Exclude)</td>
                          <td width="50%;">
                            <!--<input type="text" datepicker-popup="yyyy-MM-dd" class="input-sm" style="width: 98%" datepicker-timezone-->
                            <!--ng-model="jobBuildRequest.endTime"-->
                            <!--placeholder="Click to choose END date..." is-open="opened" />-->

                            <div class="dropdown" style="width: 98%;">
                              <a class="dropdown-toggle" id="dropdown2" role="button" data-toggle="dropdown" data-target="#" href="#">
                                <div class="input-group"><input type="text" class="form-control" date-timepicker-timezone data-ng-model="jobBuildRequest.endTime">
                                  <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                </div>
                              </a>
                              <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                <datetimepicker  data-ng-model="jobBuildRequest.endTime" data-datetimepicker-config="{ dropdownSelector: '#dropdown2' }"/>
                              </ul>
                            </div>

                          </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <div ng-if="message">
                    <span class="text-warning">{{message}}</span>
                </div>
            </div>
            <div class="col-md-2"></div>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-success" ng-click="rebuild()" ng-disabled="jobBuildRequest.endTime<=0">Submit</button>
        <button class="btn btn-primary" ng-click="cancel()">Close</button>
    </div>
</script>
