blob: bcc5bf4408030e5a962b6cb7844f27a9603c0119 [file] [log] [blame]
<!--
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="container-fluid">
<div class="row">
<h5 class="over-title margin-bottom-15">Create DQ Model</h5>
</div><!--//row-->
<div class="row">
<form name="Form" id="form" novalidate>
<div id="wizard" class="swMain" >
<ul>
<li>
<a href="" class="onlyone selected" >
<div class="stepNumber">
1
</div>
<span class="stepDesc text-small"> Configuration </span>
</a>
</ul>
<div id="step-1" ng-show="currentStep == 1" class="formStep" >
<label class="stepDesc">Please setup the model 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">
Model Name<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="form.basic.name" name="ruleName" placeholder="Please input the measure name" required ng-pattern="'([0-9a-zA-Z\\_\\-])+'">
<span class="error text-small block " ng-if="Form.ruleName.$dirty && Form.ruleName.$error.required">Model Name is required</span>
<span class="error text-small block " ng-if="Form.ruleName.$dirty && Form.ruleName.$error.pattern">Only letter, number, "-" and "_" are allowed</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">
Model Definition:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
<input type="text" class="form-control" ng-model="form.basic.desc" placeholder="Please input detail description of your model">
</div>
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12">
<div class="form-group">
<label for="typeSelector" class="col-md-2 col-lg-2 col-sm-2 control-label">
Model Type:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
<select id="typeSelector" class="form-control" ng-model="form.basic.type" ng-init="form.basic.type='3'" disabled required>
<option ng-repeat="row in ruleTypes" value="{{$index}}" >{{row}}</option>
</select>
</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">
Organization<span class="symbol required"></span>:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
<select id="systemSelector" class="form-control" ng-model="form.basic.system" ng-init="form.basic.system='-1'" ng-change="sysChange()" required>
<option value="-1">Please select...</option>
<option ng-repeat="row in ruleSystems" 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">
DataAsset:
</label>
<div class="col-md-10 col-lg-10 col-sm-10">
<!-- <input type="text" class="form-control" ng-model="form.basic.dataaset"> -->
<select id="assetSelector" class="form-control" ng-model="form.basic.dataaset">
<option value="">Please select...(optional)</option>
<option ng-repeat="row in assets" value="{{row.name}}" >{{row.name}}</option>
</select>
</div>
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12">
<div class="form-group" ng-class="{'has-error':Form.threshold.$invalid}">
<label class="col-md-2 col-lg-2 col-sm-2 control-label">
Threshold:
</label>
<div class="col-md-10 col-lg-10 col-sm-10">
<input type="number" class="form-control" ng-model="form.basic.threshold" name="threshold">
<span class="error text-small block" ng-if="Form.threshold.$error.number">Only number is allowed</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">
Schedule Type:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
<select class="form-control" ng-init="form.basic.scheduleType='1'" ng-model="form.basic.scheduleType" ng-init="form.basic.scheduleType='0'">
<option ng-repeat="row in scheduleTypes" value="{{$index}}" >{{row}}</option>
</select>
</div>
</div>
</div>
<div class="col-md-12 col-lg-12 col-sm-12">
<div class="form-group" ng-class="{'has-error':Form.email.$dirty&&Form.email.$invalid, 'has-success':Form.email.$valid}">
<label class="col-md-2 col-lg-2 col-sm-2 control-label">
Notification email<span class="symbol required"></span>:
</label>
<div class="col-md-10 col-lg-10 col-sm-10">
<input type="email" class="form-control" ng-model="form.basic.email" name="email" ng-required="currentStep==1" placeholder="Please input valid email address" ng-pattern="'^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$'">
<span class="error text-small block" ng-if="Form.email.$dirty&&Form.email.$invalid">Please, enter a valid email address.</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">
Owner:
</label>
<div class="col-md-10 col-lg-10 col-sm-10">
<input type="text" class="form-control" ng-model="form.basic.owner" ng-init="form.basic.owner=ntAccount" disabled>
</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">
Publish URL:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 has-error">
<input type="text" class="form-control" ng-model="form.publishUrl" ng-init="form.publishUrl='https://bark.vip.ebay.com/api/v1/metrics/&lt;name&gt;'" disabled>
<span class="error text-small block" >Please remember this URL which is used to publish your metrics</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">
Publish data format:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
<pre style="background-color:transparent;color:inherit;border:none">Method: POST
Endpoint: {{form.publishUrl}}
Body:
{
"metricName": "{{form.basic.name}}",
"timestamp": 1463373496583,
"value": 99.9
}</pre>
</div>
</div>
</div>
</div>
<div class="createrule-hint">
<p>
<i class="fa fa-info-circle"></i> After submitted, please go to "<a class="bark-link" href='#/measures
'>Models</a>" to check the model status
</p>
</div>
</fieldset>
</div>
<div class="form-group btn-container" >
<button class="btn btn-primary btn-o next-step btn-wide pull-right" ng-click="form.submit(Form)">
Submit
</button>
</div>
</div>
</div>
<div class="modal fade" id="confirm-pu" 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 model with the below information?</h4>
</div>
<div class="modal-body">
<ng-include src="'/pages/measures/confirmation-pu.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>
</div>
</form>
</div><!--//row-->
</div>