blob: 5c05e08f0bfd1732ce6b9f358b0fc43c81ecbc38 [file] [log] [blame]
<!--
Licensed 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="container-fluid">
<div class="row">
<h5 class="over-title margin-bottom-15">Create Job</h5>
</div><!--//row-->
<div class="row">
<form name="Form" id="form" novalidate>
<div class="formStep" >
<label class="stepDesc">Please setup the job required information</label>
<div class="container-fluid">
<!-- schema definition list -->
<div class="col-md-12 col-lg-12 col-sm-12">
<fieldset>
<legend>
Required Information
</legend>
<div class="y-scrollable">
<div class="col-md-12 col-lg-12 col-sm-12">
<div class="form-group" ng-class="{'has-error':Form.ruleName.$dirty&&Form.ruleName.$invalid, 'has-success':Form.ruleName.$valid}">
<label class="col-md-2 col-lg-2 col-sm-2 control-label">
Source Partition<span class="symbol required"></span>:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
<input type="text" class="form-control" ng-model="sourcePat" name="ruleName" placeholder="Please input the source partition, such as 'YYYYMMdd-HH'." required
ng-pattern="/YYYYMMdd-HH/i"
ng-maxlength='11'>
<span class="error text-small block " ng-if="Form.ruleName.$dirty && Form.ruleName.$error.pattern">Please input partition like 'YYYYMMdd-HH'</span>
</div>
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12">
<div class="form-group">
<label class="col-md-2 col-lg-2 col-sm-2 control-label">
Target Partition:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
<input type="text" class="form-control" ng-model="targetPat" placeholder="Please input target partition of your job, such as 'YYYYMMdd-HH'." ng-pattern="/YYYYMMdd-HH/i" ng-maxlength='11'>
</div>
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12">
<div class="form-group">
<label for="measureSelector" class="col-md-2 col-lg-2 col-sm-2 control-label">
Measure Name:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
<select id="measureSelector" class="form-control" ng-model="measure" required>
<option ng-repeat="row in Measures" value="{{$index}}" >{{row}}</option>
</select>
</div>
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12">
<div class="form-group">
<label class="col-md-2 col-lg-2 col-sm-2 control-label">
Start At:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
<input type="text" class="form-control" ng-model="jobStartTime" placeholder="The time of start. eg: 20170101 00:00:00">
</div>
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12">
<div class="form-group">
<label for="systemSelector" class="col-md-2 col-lg-2 col-sm-2 control-label">
Interval:
</label>
<div class="col-md-5 col-lg-5 col-sm-5 ">
<input type="text" id="systemSelector" class="form-control" ng-model="periodTime" required placeholder="How often it works"
onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"
onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
</div>
<div class="col-md-5 col-lg-5 col-sm-5 ">
<select id="timeSelector" class="form-control" ng-model="timeType" required>
<!--<option value="hours" >hours</option>-->
<!--<option value="minutes" >minutes</option>-->
<!--<option value="seconds" >seconds</option>-->
<option ng-repeat="time in Times" >{{time}}</option>
</select>
</div>
</div>
</div>
</div>
<div style="color:#b2c831">
<p>
<i class="fa fa-info-circle"></i> After submitted, please go to "<a class="bark-link" href="#!/jobs">Jobs</a>" to check the job status
</p>
</div>
</fieldset>
</div>
<div class="form-group btn-container" >
<button class="btn btn-primary btn-o back-step btn-wide pull-left" ng-click="form.prev(Form)">
<i class="fa fa-arrow-circle-left"></i> Back
</button>
<button class="btn btn-primary btn-o next-step btn-wide pull-right" ng-click="form.submit(Form)">
<!-- <button class="btn btn-primary btn-o next-step btn-wide pull-right" data-toggle="modal" data-target="#confirm"> -->
Submit
</button>
</div>
</div>
</div>
<div class="modal fade" id="confirm-job" role="dialog">
<div class="modal-dialog modal-xg modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Save the job with the below information?</h4>
</div>
<div class="modal-body">
<ng-include src="'/pages/jobs/confirmation-ac.html'"/>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" ng-click="form.save()">Save</button>
</div>
</div>
</div>
</div>
</form>
</div><!--//row-->
</div>