blob: 6e14ffdda5af1f1de2a3dc980ab6448a098d2095 [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" id="viewruleContent">
<div class="row">
<h5 class="over-title margin-bottom-15">View Measure</h5>
</div><!--//row-->
<div class="row">
<div class="col-sm-6 col-xs-12">
<div id="viewruleDefinition" class="viewrule-content">
<div class="row">
<label class="col-xs-4">
Measure Name:
</label>
<div class="col-xs-8 " style="color: #fff">
{{ruleData.name}}
</div>
</div>
<div class="row">
<label class="col-xs-4">
Measure Description:
</label>
<div class="col-xs-8 " style="color: #fff">
{{ruleData.description}}
</div>
</div>
<div class="row">
<label class="col-xs-4">
Measure Type:
</label>
<div class="col-xs-8 " style="color: #fff">
{{ruleData.type|strmap:'modeltype'}}
</div>
</div>
<div class="row">
<label for="systemSelector" class="col-xs-4">
Organization:
</label>
<div class="col-xs-8 " style="color: #fff">
{{ruleData.organization|strmap:'modelsystem'}}
</div>
</div>
<div class="row">
<label class="col-xs-4">
DataAsset:
</label>
<div class="col-xs-8" style="color: #fff">
{{sourceTable}}&nbsp;&nbsp;{{targetTable}}
</div>
</div>
<div class="row">
<label class="col-xs-4">
Owner:
</label>
<div class="col-xs-8" style="color: #fff">
{{ruleData.owner}}
</div>
</div>
</div>
</div>
</div><!--//row-->
<div class="container-fluid" ng-show="ruleData.basic.status==1" >
<br/>
<label style="color:#B2C831">This measure is ready to deploy now, if you are the owner, please click the deploy button after you verify all the information.</label>
<button ng-click="confirmDeploy()" ng-disabled="(ntAccount!=ruleData.basic.owner && !adminAccess)" class="btn btn-primary pull-right"> Deploy</button>
</p>
</div>
<br/>
<div ng-if="ruleData.type=='accuracy'"><!--Accuracy-->
<h5 class="row">Mapping rules</h5>
<div class="">
<p>{{ruleData.evaluateRule.rules}}</p>
<p>
<label style="color:#B2C831">Accuracy Calculation Formula as Below:</label>
</p>
<div class="col-md-12 col-lg-12 col-sm-12" style="color:#fff;font-size:16px;display: flex;align-items: center">
<div class="" style="text-align:right;display:block;float:left;width:20%;">
Accuracy Rate(%) =
</div>
<div class="" style="text-align:center;display:block;float:left;margin:0 10px 0 10px">
<div class="formula-text-up" style="border-bottom:1px solid;">
Total Count of Matched records between <span class="badge">{{sourceLength}}</span> <span style="color:green;">{{targetTable}}</span> and <span class="badge">{{sourceLength}}</span> <span style="color:green;">{{sourceTable}}</span> fields
</div>
<div class="">
Total Count of records in <span style="color:green;font-weight:bold;">{{targetDB}}&nbsp;&nbsp;{{targetTable}}</span>
</div>
</div>
<div class="" style="text-align:left;display:block;float:left;width:10%;">
x 100%
</div>
</div>
</div>
</div>
<div ng-if="ruleData.basic.type==1"><!--Validity-->
<h5 class="row">Validity metrics</h5>
<div class="">
<div id="viewrule-definition" class="viewrule-content">
<div class="row">
<label class="col-xs-4">
Validity type:
</label>
<div class="col-xs-8 " style="color: #fff">
{{ruleData.extra.vaType|strmap:'vatype'}}
</div>
</div>
<div class="row">
<label class="col-xs-4">
Selected column:
</label>
<div class="col-xs-8 " style="color: #fff">
{{ruleData.extra.column}}
</div>
</div>
</div>
</div>
</div>
<div ng-if="ruleData.basic.type==2"><!--Anomaly Detection-->
<h5 class="row">Key information</h5>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div id="viewrule-definition" class="viewrule-content">
<div class="row">
<label class="col-xs-4">
Detection type:
</label>
<div class="col-xs-8 " style="color: #fff">
{{ruleData.extra.anType|strmap:'antype'}}
</div>
</div>
<div class="row-fluid">
<img ng-if="ruleData.extra.anType==1" src="/img/yoy.png" style="max-height: 300px;width:100%"/>
<img ng-if="ruleData.extra.anType==2" src="/img/bollinger.png" style="max-height: 400px;width:100%"/>
<img ng-if="ruleData.extra.anType==3" src="/img/mad.png" style="max-height: 300px;width:100%"/>
</div>
</div>
</div>
</div>
</div>
<div ng-if="ruleData.basic.type==3"><!--Publish Metrics-->
<h5 class="row">Publish Metrics URL</h5>
<div id="viewrule-definition" class="viewrule-content">
<div class="row">
<label class="col-xs-4">
Publish URL:
</label>
<div class="col-xs-8" style="color: #fff">
{{ruleData.extra.publishUrl}}
</div>
</div>
<div class="row">
<label class="col-xs-4">
Publish data format:
</label>
<div class="col-xs-8" style="color: #fff">
<pre style="background-color:transparent;color:inherit;border:none">Method: POST
Endpoint: {{ruleData.extra.publishUrl}}
Body:
{
"metricName": "{{ruleData.basic.name}}",
"timestamp": 1463373496583,
"value": 99.9
}</pre>
</div>
</div>
</div>
</div>
</div>