http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pages/measures/viewrule.html ---------------------------------------------------------------------- diff --git a/ui/pages/measures/viewrule.html b/ui/pages/measures/viewrule.html deleted file mode 100644 index 6e14ffd..0000000 --- a/ui/pages/measures/viewrule.html +++ /dev/null @@ -1,214 +0,0 @@ -<!-- -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}} {{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}} {{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>
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pages/metrics/dashboard.html ---------------------------------------------------------------------- diff --git a/ui/pages/metrics/dashboard.html b/ui/pages/metrics/dashboard.html deleted file mode 100644 index b64608a..0000000 --- a/ui/pages/metrics/dashboard.html +++ /dev/null @@ -1,63 +0,0 @@ -<!-- -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 id="dashboard" class="bs-component" > - <div class="container-fluid"> - <div class="row col-lg-12" style="margin-top: 15px;"> - <div class="form-group"> - <span> - <label>Organization: </label> - <select ng-disabled="orgSelectDisabled" class="form-control" style="padding: 4px 6px;height: 30px;width: 230px;background-color: #d1d3d2;display: inline-block;margin-left: 10px;" ng-model="selectedOrgIndex" ng-change="changeOrg()"> - <option value="">-- All --</option> - <option ng-repeat="opt in originalOrgs" value="{{$index}}" ng-selected="selectedOrgIndex==$index">{{opt.name}}</option> - </select> - </span> - <span style="padding-left:30px;"> - <label>Data Asset: </label> - <select class="form-control" style="padding: 4px 6px;height: 30px;width: 230px;background-color: #d1d3d2;display: inline-block;margin-left: 10px;" ng-model="selectedAssetIndex" ng-change="changeAsset()"> - <option value="">-- All --</option> - <option ng-repeat="opt in assetOptions" value="{{$index}}">{{opt}}</option> - </select> - </span> - </div> - </div> - <div ng-repeat="outerItems in finalData"> - <div class="row" > - <div class="col-sm-12 col-md-12 col-lg-12"> - <h4>{{outerItems.name}}</h4> - </div> - </div> - <div class="row"> - - <div class="col-sm-6 col-md-4 col-xs-12 col-lg-3 chartItem" ng-repeat="items in outerItems.metrics" style="margin-bottom:30px;"> - - <div class="row-fluid" style="cursor: pointer;"> - <div id={{'thumbnail'+$parent.$index+'-'+$index}} ng-click="showBig(items)" class="thumb-chart" style="border: 2px solid;"></div> - <p class="text-right"> - <a href ng-click="getSample(items)" style="font-size: 11px;"> - <u>Download Sample</u> - </a> - </p> - </div> - </div> - </div> - - </div> - </div> - -</div> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pages/metrics/download-sample.html ---------------------------------------------------------------------- diff --git a/ui/pages/metrics/download-sample.html b/ui/pages/metrics/download-sample.html deleted file mode 100644 index c1a7440..0000000 --- a/ui/pages/metrics/download-sample.html +++ /dev/null @@ -1,52 +0,0 @@ -<!-- -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="viewsample-content" style="overflow:auto;"> - <div class="row"> - <h5 class="over-title margin-bottom-15">Download sample</h5> - </div><!--//row--> - <div class="row"> - <div class="col-lg-12 col-md-12 col-sm-12"> - <div id="viewrule-definition" class="viewrule-content"> - <div ng-if="sample.length==0">No data</div> - <div ng-if="sample.length>0" ng-repeat="item in sample"> - <span style="color: #fff"> - {{item.date | date: 'MM/dd/yy HH:mm'}} - </span> - - <span> - {{item.path}} - </span> - - <span> - <a target="_self" href="{{downloadUrl + '/' + item.path}}" download style="font-size: 11px"> - <u>Download</u> - </a> - </span> - </div> - - </div> - <p> - Click the "Download" link to download sample data. You can also find the complete data file from the path listed above, and then you can back-fill the missed data - </p> - </div> - - - </div><!--//row--> - -</div> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pages/metrics/metrics.css ---------------------------------------------------------------------- diff --git a/ui/pages/metrics/metrics.css b/ui/pages/metrics/metrics.css deleted file mode 100644 index a5eb782..0000000 --- a/ui/pages/metrics/metrics.css +++ /dev/null @@ -1,28 +0,0 @@ -/*- -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. - -*/ - -.thumb-chart:hover{ - transform: scale(1.05, 1.05); - box-shadow: 0 1px 2px 2px #ccc; -} - -.side-chart:hover { - box-shadow: 0 1px 2px 2px #ccc; -} http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pages/mydashboard/confirmation-subscribe.html ---------------------------------------------------------------------- diff --git a/ui/pages/mydashboard/confirmation-subscribe.html b/ui/pages/mydashboard/confirmation-subscribe.html deleted file mode 100644 index 2711f81..0000000 --- a/ui/pages/mydashboard/confirmation-subscribe.html +++ /dev/null @@ -1,42 +0,0 @@ -<!-- -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" style="overflow:auto;"> - <div class="row"> - <h5 class="over-title margin-bottom-15">Basic information</h5> - </div><!--//row--> - <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-md-4 col-lg-4 col-sm-4"> - Subscribe info: - </label> - - <div class="col-md-8 col-lg-8 col-sm-8 " style="color: #fff"> - <pre style="background-color: #202020; color: #fff; max-height: 500px;">{{form.data | json}}</pre> - </div> - </div> - </div> - </div> - - - </div><!--//row--> - -</div> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pages/mydashboard/mydashboard.html ---------------------------------------------------------------------- diff --git a/ui/pages/mydashboard/mydashboard.html b/ui/pages/mydashboard/mydashboard.html deleted file mode 100644 index 11df9f0..0000000 --- a/ui/pages/mydashboard/mydashboard.html +++ /dev/null @@ -1,48 +0,0 @@ -<!-- -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 id="mydashboard" class="bs-component" > - <div class="container-fluid"> - <div class="row col-lg-12" style="margin-top: 15px;"> - <!--<a class="btn btn-primary btn-o btn-wide" href="#/subscribemodel"><i class="fa fa-plus"></i> Subscribe Models</a>--> - </div> - <div ng-repeat="outerItems in dashboard"> - <div class="row" > - <div class="col-sm-12 col-md-12 col-lg-12"> - <h4>{{outerItems.name}}</h4> - </div> - </div> - <div class="row"> - - <div class="col-sm-6 col-md-4 col-xs-12 col-lg-3 chartItem" ng-repeat="items in outerItems.metrics" style="margin-bottom:30px;"> - - <div class="row-fluid" style="cursor: pointer;"> - <div id={{'thumbnail'+$parent.$index+'-'+$index}} ng-click="showBig(items)" class="thumb-chart" style="border: 2px solid;"></div> - <p class="text-right"> - <a href ng-click="getSample(items)" style="font-size: 11px;"> - <u>Download Sample</u> - </a> - </p> - </div> - </div> - </div> - - </div> - </div> - -</div> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pages/mydashboard/subscribemodel.html ---------------------------------------------------------------------- diff --git a/ui/pages/mydashboard/subscribemodel.html b/ui/pages/mydashboard/subscribemodel.html deleted file mode 100644 index 8bcf521..0000000 --- a/ui/pages/mydashboard/subscribemodel.html +++ /dev/null @@ -1,118 +0,0 @@ -<!-- -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">Subscribe Models</h5>--> - </div><!--//row--> - <div class="row"> - <form name="Form" id="form" novalidate> - <div id="wizard" class="swMain" > - <div class="formStep" > - - <div class="container-fluid"> - <!-- select db tree --> - <div class="col-md-4 col-lg-4 col-sm-4"> - <fieldset> - <legend>Please select data asset</legend> - <!-- <div class="add-dataset" style="color:#b2c831"> - <a class="bark-link" href="#/createdataasset">Cannot find your DataAsset? Click here to add</a> - </div> --> - <div angular-treeviewcheck="true" - tree-model-check="dbList" - node-id="id" - node-label="name" - node-children="children" - l1-icon="fa fa-database" - l2-icon="fa fa-table" - l3-icon="fa fa-file-text-o" - class="y-scrollable"> - </div> - </fieldset> - </div> - - <!-- schema definition list --> - <div class="col-md-8 col-lg-8 col-sm-8"> - <fieldset> - <legend> - Models - </legend> - <div class="y-scrollable"> - <div> - <label>The below are the models defined under the selected Data Assets.</label> - </div> - <div> - <table st-table="schemaCollection" class="table table-striped"> - <thead> - <tr style="background-color:#7D95CC"> - <th st-ratio="20">Model Name</th> - <th st-ratio="20">Model Type</th> - <th st-ratio="20">Organization</th> - <th st-ratio="20">Asset Name</th> - <th st-ratio="20">Description</th> - </tr> - </thead> - <tbody> - <tr ng-if="!schemaCollection || schemaCollection.length == 0"> - <td colspan="5" style="text-align:center" ><span class="highlight">Please select a data asset from the left tree first</span></td> - </tr> - <tr ng-repeat="row in schemaCollection"> - <td>{{row.modelName}}</td> - <td>{{row.modelType}}</td> - <td>{{row.systemName}}</td> - <td>{{row.assetName}}</td> - <td>{{row.desc}}</td> - </tr> - </tbody> - </table> - </div> - </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" 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">×</button> - <h4 class="modal-title">Subscribe data assets with the below information?</h4> - </div> - <div class="modal-body"> - <ng-include src="'/pages/mydashboard/confirmation-subscribe.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> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pages/template/bigchart.css ---------------------------------------------------------------------- diff --git a/ui/pages/template/bigchart.css b/ui/pages/template/bigchart.css deleted file mode 100644 index e28c50b..0000000 --- a/ui/pages/template/bigchart.css +++ /dev/null @@ -1,95 +0,0 @@ -/*- -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. - -*/ - -.big-chart-container{ - z-index:1040; - display:block; - position:fixed; - top:0; - left:0; - bottom:0; - right:0; - background-color: rgba(0,0,0,0.4); -} - -.big-chart-content{ - position: fixed; - background-color:black; - /*animation-name: animatetop; - animation-duration: 0.8s*/ -} - -.bark-close { - position: relative; - display: inline-block; - width: 30px; - height: 30px; - overflow: hidden; - background: transparent; - border: 0; -} -.bark-close:hover::before, .bark-close:hover::after { - background: #ECED25; -} -.bark-close::before, .bark-close::after { - content: ''; - position: absolute; - height: 2px; - width: 100%; - top: 50%; - left: 0; - margin-top: -1px; - background: #fff; -} -.bark-close::before { - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); -} -.bark-close::after { - -webkit-transform: rotate(-45deg); - -moz-transform: rotate(-45deg); - -ms-transform: rotate(-45deg); - -o-transform: rotate(-45deg); - transform: rotate(-45deg); -} -.bark-close.big { - -webkit-transform: scale(3); - -moz-transform: scale(3); - -ms-transform: scale(3); - -o-transform: scale(3); - transform: scale(3); -} - -.bark-close.black::before, .bark-close.black::after { - height: 8px; - margin-top: -4px; -} -.bark-close.thick::before, .bark-close.thick::after { - height: 4px; - margin-top: -2px; -} - -@keyframes animatetop { - from {top:-100px; opacity:0} - to {top:60px; opacity:1} -} http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pages/template/bigchart.html ---------------------------------------------------------------------- diff --git a/ui/pages/template/bigchart.html b/ui/pages/template/bigchart.html deleted file mode 100644 index c90803d..0000000 --- a/ui/pages/template/bigchart.html +++ /dev/null @@ -1,35 +0,0 @@ -<!-- -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 id="bigChartShow" style="display: none;"> --> - -<div id="bigChartContainer" class="big-chart-container" style="display:none;"> - <div id="bigChartShow" class="big-chart-content"> - <div class="container-fluid"> - <div class="pull-right" style="position:fixed;right:40px;top:20px;z-index:1050;"> - <button type="button" id="bigChartClose" class="bark-close thick" aria-label="Close" ng-click="closeBigChart()"> - </button> - </div> - - <div class="row"> - <div id="bigChartDiv"></div> - - </div> - </div> - </div> -</div> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pages/template/undercons.html ---------------------------------------------------------------------- diff --git a/ui/pages/template/undercons.html b/ui/pages/template/undercons.html deleted file mode 100644 index 5fb5118..0000000 --- a/ui/pages/template/undercons.html +++ /dev/null @@ -1,22 +0,0 @@ -<!-- -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 style="height:400px;line-height:400px;text-align:center;width:100%;font-size:48px"> - <img src="/img/construction.gif" style="max-height:120px;"/> - Under construction! Coming soon! -</div> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/pom.xml ---------------------------------------------------------------------- diff --git a/ui/pom.xml b/ui/pom.xml index 6c337d2..6541986 100644 --- a/ui/pom.xml +++ b/ui/pom.xml @@ -35,6 +35,8 @@ under the License. <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>1.8</java.version> + <node.version>v6.11.3</node.version> + <npm.version>3.10.10</npm.version> </properties> @@ -53,22 +55,46 @@ under the License. <build> <plugins> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>${exec-maven-plugin.version}</version> + <groupId>com.github.eirslett</groupId> + <artifactId>frontend-maven-plugin</artifactId> + <version>1.0</version> + <configuration> + <workingDirectory>angular</workingDirectory> + <installDirectory>tmp</installDirectory> + </configuration> <executions> + <!-- It will install nodejs and npm --> + <execution> + <id>install node and npm</id> + <goals> + <goal>install-node-and-npm</goal> + </goals> + <configuration> + <nodeVersion>${node.version}</nodeVersion> + <npmVersion>${npm.version}</npmVersion> + </configuration> + </execution> + + <!-- It will execute command "npm install" inside "/angular" directory --> <execution> - <id>exec-bower-install</id> - <phase>generate-sources</phase> + <id>npm install</id> + <goals> + <goal>npm</goal> + </goals> <configuration> - <executable>bower</executable> - <arguments> - <argument>install</argument> - </arguments> + <arguments>install</arguments> </configuration> + </execution> + + <!-- It will execute command "npm build" inside "/angular" directory to clean and create "/dist" directory--> + <execution> + <id>npm build</id> <goals> - <goal>exec</goal> + <goal>npm</goal> </goals> + <configuration> + <arguments>run build</arguments> + </configuration> </execution> </executions> </plugin> @@ -96,7 +122,7 @@ under the License. </nonFilteredFileExtensions> <resources> <resource> - <directory>${basedir}</directory> + <directory>${basedir}/angular/dist</directory> <excludes> <exclude>src/**</exclude> <exclude>target/**</exclude> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/sidebar.html ---------------------------------------------------------------------- diff --git a/ui/sidebar.html b/ui/sidebar.html deleted file mode 100644 index 07c9253..0000000 --- a/ui/sidebar.html +++ /dev/null @@ -1,92 +0,0 @@ -<!-- -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 id="rightbar" ng-controller="SideBarCtrl" class="" style="background-color:#262626;"> - - <div id="side-bar-stats" class="row" style="border-bottom:5px solid #060606;margin-left:0;margin-right:0"> - - <!--<div class="row-container">--> - <div class="col-xs-15 col-md-15 col-lg-6 " id="sidebar-option"> - - <div > - - <div class="sidebar-stat-center"> - <img src="/img/sidebar1.png" > - <span><a class="bark-link" href="#!/dataassets"> - <!-- {{datasets}} --> - DataAssets</a></span> - </div> - - <div class="sidebar-stat-center"> - <img src="/img/sidebar2.png"> - <span><a class="bark-link" href="#!/metrics"> - - DQ Metrics</a></span> - </div> - - </div> - - </div> - <div class="col-xs-12 col-md-12 col-lg-6"> - <div id="data-asset-pie"></div> - </div> - <!--</div>--> - </div> - - - <div id="side-bar-metrics" class="row" style="margin-top:20px;overflow-y:auto;overflow-x:hidden;margin-left:0;margin-right:0;height:1px;"> - <div ng-repeat="outerItems in finalData"> - <div class="well" style="padding:0px;background:transparent;border:0px;position:relative; "> - <!-- <img class="bullseye" src="/img/bullseye.png" title="image1" > --> - <div class="col-sm-4 col-lg-4 col-md-4 "><h4 ><a href="#!/metrics/{{outerItems.name}}"> {{outerItems.name}}</a></h4></div> - <div class="col-sm-3 col-lg-3 col-md-3 " style="display: flex;justify-content: center;height:46px;"><div ng-class="outerItems.dq >=90 ? 'led-green':'led-yellow'" style="align-self: center;"></div></div> - <!-- <div class="col-sm-5 col-lg-5 col-md-5 " style="display: flex;justify-content: center;height:46px;"><a style="align-self: center;" class="btn btn-primary" href="https://github.com/eBay/DQSolution/issues" target="_blank">Report issue</a></div> --> - </div> - <br/> - <div class="well side-bar-scroll"> - <div class="panel-group" ng-repeat="items in outerItems.metrics" style="margin-bottom:0px;background:transparent;"> - <div class="panel panel-default" style="position:relative;background:transparent;"> - <div class="panel-heading" style="background:transparent;"> - <h4 class="panel-title side-metrics"> - <a data-toggle="collapse" href={{"#"+outerItems.name+$index}} ng-init="items.tag=true" ng-click="items.tag=!items.tag;draw(items, $parent.$index, $index);" > - <i class="faChevron" ng-class="items.tag ? 'fa fa-caret-right':'fa fa-caret-down'" style="width:10px"></i> - - <i class="fa fa-line-chart faArrows"></i> - <span class="side-date">{{items.timestamp | date:'MM/dd HH:mm'}}</span> - - <span class="side-name" title="{{items.name}}">{{items.name |strShorten}}</span> - <span ng-if="items.dq <= 100" class="pull-right" ng-class="items.dqfail?'side-percent-red':'side-percent'">{{items.dq | number:2}}%</span> - <span ng-if="items.dq > 100" class="pull-right" ng-class="items.dqfail?'side-percent-red':''">{{items.dq/1000 | number:0}}K</span> - </a> - </h4> - </div> - <div id={{outerItems.name+$index}} class="panel-collapse collapse"> - <!-- <div class="panel-body"> - <highchart config="items.chartId"> - </div> --> - <div class="panel-body" style="cursor:pointer;padding:0px 15px;"> - <div id={{'chart'+$parent.$index+'-'+$index}} class="side-chart"></div> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -</div> http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/src/main/java/jar/App.java ---------------------------------------------------------------------- diff --git a/ui/src/main/java/jar/App.java b/ui/src/main/java/jar/App.java deleted file mode 100644 index 45f5ec7..0000000 --- a/ui/src/main/java/jar/App.java +++ /dev/null @@ -1,33 +0,0 @@ -/* -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. - -*/ - -package jar; - -/** - * Hello world! - * - */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); - } -} http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/src/test/java/jar/AppTest.java ---------------------------------------------------------------------- diff --git a/ui/src/test/java/jar/AppTest.java b/ui/src/test/java/jar/AppTest.java deleted file mode 100644 index 4352fb0..0000000 --- a/ui/src/test/java/jar/AppTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* -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. - -*/ - -package jar; - -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -/** - * Unit test for simple App. - */ -public class AppTest - extends TestCase -{ - /** - * Create the test case - * - * @param testName name of the test case - */ - public AppTest( String testName ) - { - super( testName ); - } - - /** - * @return the suite of tests being tested - */ - public static Test suite() - { - return new TestSuite( AppTest.class ); - } - - /** - * Rigourous Test :-) - */ - public void testApp() - { - assertTrue( true ); - } -} http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/karma.conf.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/karma.conf.js b/ui/tests/ut/karma.conf.js deleted file mode 100644 index 9dcb2dc..0000000 --- a/ui/tests/ut/karma.conf.js +++ /dev/null @@ -1,107 +0,0 @@ -/*- -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. - -*/ -// Karma configuration -// Generated on Thu Apr 07 2016 15:02:00 GMT+0800 (China Standard Time) -//http://monicalent.com/blog/2015/02/11/karma-tests-angular-js-require-j/ - -module.exports = function(config) { - config.set({ - - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '../../', - - - // frameworks to use - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['jasmine', 'requirejs'], - - - files: [ - 'tests/ut/test-main.js', - {pattern:'bower_components/**/*.js', included:false}, - {pattern:'node_modules/angular-mocks/angular-mocks.js', included:false}, - {pattern: 'js/**/*.js', included: false}, - {pattern: 'tests/**/*spec.js', included: false} - ], - - - // list of files to exclude - exclude: [ - 'js/main.js', - 'js/bs.js', - 'js/routes.js', - 'bower_components/**/*test*/**/*.js', - 'bower_components/**/*spec.js', - // 'node_modules/**/*spec.js', - // 'node_modules/**/*spec*/**/*.js', - // 'node_modules/**/*test.js' - ], - - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - 'js/**/*.js':['coverage'] - }, - - coverageReporter: { - type:'lcov', - dir: 'tests/ut/test-coverage' - }, - - - // test results reporter to use - // possible values: 'dots', 'progress' - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - // reporters: ['progress'], - reporters: ['mocha', 'coverage', 'progress'], - - - // web server port - port: 9876, - - - // enable / disable colors in the output (reporters and logs) - colors: true, - - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_DEBUG, - - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - - - // start these browsers - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['Chrome'], - - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: false, - - // Concurrency level - // how many browser should be started simultaneous - concurrency: Infinity - }) -} http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/createjob-ac-ctrl.spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/createjob-ac-ctrl.spec.js b/ui/tests/ut/specs/controllers/createjob-ac-ctrl.spec.js deleted file mode 100644 index 39e7f6b..0000000 --- a/ui/tests/ut/specs/controllers/createjob-ac-ctrl.spec.js +++ /dev/null @@ -1,63 +0,0 @@ -/*- -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. - -*/ - -define(['angular', 'angularMocks', 'js/controllers/createjob-ac-ctrl'], - function(angular, mocks, CreateJobACCtrl) { - describe('Test /js/controllers/createjob-ac-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $scope, $rootScope, $controller, $httpBackend, $config, $location, toaster, $timeout, $route; - - beforeEach(inject(function(_$rootScope_ , _$controller_, _$httpBackend_, _$config_, _$location_, _$timeout_){ - $rootScope = _$rootScope_; - $controller = _$controller_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $location = _$location_; - $timeout = _$timeout_; - toaster = {}; - $route = {}; - })); - - beforeEach(function(){ - $scope = $rootScope.$new(); - controller = $controller('CreateJobACCtrl', {$scope: $scope, $route: $route, toaster: toaster }); - }); - - describe("if the controller of CreateJobACCtrl exists",function(){ - it('controller exists', function(){ - expect(controller).toBeDefined(); - }); - }) - - describe("check if createRowCollection",function(){ - - it('createRowCollection', function(){ - expect($scope.rowCollection).not.toEqual([]); - }); - - }) - - - }); - } -) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/createrule-ac-ctrl.spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/createrule-ac-ctrl.spec.js b/ui/tests/ut/specs/controllers/createrule-ac-ctrl.spec.js deleted file mode 100644 index 4f99a71..0000000 --- a/ui/tests/ut/specs/controllers/createrule-ac-ctrl.spec.js +++ /dev/null @@ -1,134 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/controllers/createrule-ac-ctrl'], - function(angular, mocks, CreateRuleACCtrl) { - describe('Test /js/controllers/createrule-ac-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $scope, $rootScope, $controller, $httpBackend, $config, $location, toaster, $timeout, $route; - beforeEach(inject(function(_$rootScope_ , _$controller_, _$httpBackend_, _$config_, _$location_, _$timeout_){ - $rootScope = _$rootScope_; - $controller = _$controller_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $location = _$location_; - $timeout = _$timeout_; - $route = {}; - toaster = {}; - })); - - beforeEach(function(){ - $scope = $rootScope.$new(); - controller = $controller('CreateRuleACCtrl', {$scope: $scope, $route: $route, toaster: toaster }); - }); - - describe("if the controller of CreateRuleACCtrl exists",function(){ - it('controller exists', function(){ - expect(controller).toBeDefined(); - }); - }) - - describe("check if parameters are available",function(){ - - it('if the controller exists', function(){ - expect(controller).toBeDefined(); - }); - - it('$scope.value and $config.value should be right', function(){ - expect($scope.currentStep).toBe(1); - expect(typeof $scope.selection).toEqual("object"); - expect($config.uri.dbtree).toBeTruthy(); - expect($config.uri.schemadefinition).toBeTruthy(); - }); - - it('$scope.ruleTypes should be right', function(){ - expect($scope.ruleTypes).toEqual(['Accuracy', 'Validity', 'Anomaly Detection', 'Publish Metrics']); - }); - - }) - - describe("check if function are work",function(){ - - it('$scope.selectNodeLabelTarget works well', function(){ - expect($scope.selectNodeLabelTarget ).toBeDefined(); - }); - - it('$scope.toggleSelection works well', function(){ - expect($scope.toggleSelection).toBeDefined(); - }); - - it('$scope.toggleAll works well', function(){ - expect($scope.toggleAll).toBeDefined(); - }); - - it('$scope.form is a object', function(){ - expect(typeof $scope.form).toBe("object"); - }); - - }) - - describe("$scope.form test",function(){ - - it('the type of $scope.form', function(){ - expect(typeof $scope.form).toBe("object"); - }); - - it('the type of $scope.form.submit', function(){ - expect(typeof $scope.form.submit).toBe('function'); - }); - - it('the type of $scope.form.save', function(){ - expect(typeof $scope.form.save).toBe('function'); - }); - - }) - - describe("httpGet $config.uri.dbtree test",function(){ - beforeEach(function(){ - $httpBackend.when('GET', $config.uri.dbtree).respond({"age": 16,"name": "li"}); - $httpBackend.when('GET', $config.uri.schemadefinition).respond({"age": 16,"name": "li"}); - }); - - it('http response', function(){ - $httpBackend.flush(); - expect($scope.dbListTarget).toBeTruthy(); - }); - - it('test watch and http request', function(){ - $scope.currentNode = {"name":"ha"}; - $scope.$digest(); - - $httpBackend.flush(); - expect($scope.selection.length).toBe(0); - expect($scope.selectedAll).toBe(false); - - expect($scope.schemaCollection.age).toBe(16); - }); - - afterEach(function() { - $httpBackend.verifyNoOutstandingExpectation(); - $httpBackend.verifyNoOutstandingRequest(); - }); - }) - }); - } -) http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/createrule-pu-ctrl.spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/createrule-pu-ctrl.spec.js b/ui/tests/ut/specs/controllers/createrule-pu-ctrl.spec.js deleted file mode 100644 index 9933541..0000000 --- a/ui/tests/ut/specs/controllers/createrule-pu-ctrl.spec.js +++ /dev/null @@ -1,110 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/controllers/createrule-pu-ctrl'], - function(angular, mocks, CreateRulePUCtrl) { - describe('Test /js/controllers/createrule-pu-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $scope, $rootScope, $controller, $httpBackend, $config, $location, toaster, $timeout, $route; - beforeEach(inject(function(_$rootScope_ , _$controller_, _$httpBackend_, _$config_, _$location_, _$timeout_){ - $rootScope = _$rootScope_; - $controller = _$controller_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $location = _$location_; - $timeout = _$timeout_; - $route = {}; - toaster = ['error', 'Error', "hello", "lisan"];/*test data*/ - })); - - beforeEach(function(){ - $scope = $rootScope.$new(); - controller = $controller('CreateRulePUCtrl', {$scope: $scope, $route: $route, toaster: toaster }); - }); - - describe("if the controller of CreateRulePUCtrl exists",function(){ - it('controller exists', function(){ - expect(controller).toBeDefined(); - }); - }) - - describe("$scope.value",function(){ - - it('$scope.currentStep == 1', function(){ - expect($scope.currentStep).toBe(1); - }); - - it('$scope.scheduleTypes', function(){ - expect($scope.scheduleTypes).toEqual(['Daily', 'Weekly', 'Monthly', 'Hourly']); - }); - - }) - - describe("$scope.form test",function(){ - - it('the type of $scope.form', function(){ - expect(typeof $scope.form).toBe("object"); - }); - - it('the type of $scope.form.submit', function(){ - expect(typeof $scope.form.submit).toBe('function'); - }); - - it('the type of $scope.form.save', function(){ - expect(typeof $scope.form.save).toBe('function'); - }); - - }) - - /*describe("function errorMessage() test",function(){ - // test function - it('errorMessage', function(){ - var message = ["hello"]; - var i = 2; - var msg = true; - $scope.errorMessage(i,msg); - expect(toaster).toEqual(['error', 'Error',"hello"]); - }); - - })*/ - - describe('Testing $watch expressions', function() { - it('test using $digest', function() { - var form = {}; - form.basic = {"name": "li"}; - form.publishUrl = "publishUrl"; - $scope.form = form; - form.basic.name = "ha"; - $scope.$digest(); - form.basic.name = "la"; - $scope.$digest(); - - expect($scope.form.publishUrl).toEqual('http://dq.vip.ebay.com/api/v1/publishmetric/la'); - - }); - }); - - - - }); - } -) http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/createrule-va-ctrl.spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/createrule-va-ctrl.spec.js b/ui/tests/ut/specs/controllers/createrule-va-ctrl.spec.js deleted file mode 100644 index f0653b4..0000000 --- a/ui/tests/ut/specs/controllers/createrule-va-ctrl.spec.js +++ /dev/null @@ -1,115 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/controllers/createrule-va-ctrl'], - function(angular, mocks, CreateRuleVACtrl) { - describe('Test /js/controllers/createrule-va-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $scope, $rootScope, $controller, $httpBackend, $config, $location, toaster, $timeout, $route; - beforeEach(inject(function(_$rootScope_ , _$controller_, _$httpBackend_, _$config_, _$location_, _$timeout_){ - $rootScope = _$rootScope_; - $controller = _$controller_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $location = _$location_; - $timeout = _$timeout_; - $route = {}; - toaster = {}; - })); - - beforeEach(function(){ - $scope = $rootScope.$new(); - controller = $controller('CreateRuleVACtrl', {$scope: $scope, $route: $route, toaster: toaster }); - }); - - describe("if the controller of CreateRuleVACtrl exists",function(){ - it('controller exists', function(){ - expect(controller).toBeDefined(); - }); - }) - - describe("check if parameters are available",function(){ - - it('$scope.value and $config.value should be right', function(){ - expect($scope.currentStep).toBe(1); - expect($config.uri.dbtree).toBeTruthy(); - expect($config.uri.schemadefinition).toBeTruthy(); - }); - - it('$scope.ruleTypes should be right', function(){ - expect($scope.ruleTypes).toEqual(['Accuracy', 'Validity', 'Anomaly Detection', 'Publish Metrics']); - }); - - }) - - describe("check if form function are work",function(){ - - it('$scope.form is a object', function(){ - expect(typeof $scope.form).toBe("object"); - }); - - }) - - describe("$scope.form test",function(){ - - it('the type of $scope.form', function(){ - expect(typeof $scope.form).toBe("object"); - }); - - it('the type of $scope.form.submit', function(){ - expect(typeof $scope.form.submit).toBe('function'); - }); - - it('the type of $scope.form.save', function(){ - expect(typeof $scope.form.save).toBe('function'); - }); - - }) - - describe("httpGet $config.uri.dbtree test",function(){ - beforeEach(function(){ - $httpBackend.when('GET', $config.uri.dbtree).respond({"age": 16,"name": "li"}); - $httpBackend.when('GET', $config.uri.schemadefinition).respond({"age": 15,"name": "wei"}); - }); - - it('http response', function(){ - $httpBackend.flush(); - expect($scope.dbList).toBeTruthy(); - }); - - it('test watch and http request', function(){ - $scope.currentNode = {"name":"ha"}; - $scope.$digest(); - - $httpBackend.flush(); - expect($scope.schemaCollection.age).toBe(15); - }); - - afterEach(function() { - $httpBackend.verifyNoOutstandingExpectation(); - $httpBackend.verifyNoOutstandingRequest(); - }); - }) - - }); - } -) http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/createrule0-ctrl.spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/createrule0-ctrl.spec.js b/ui/tests/ut/specs/controllers/createrule0-ctrl.spec.js deleted file mode 100644 index aefe247..0000000 --- a/ui/tests/ut/specs/controllers/createrule0-ctrl.spec.js +++ /dev/null @@ -1,67 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/controllers/createrule0-ctrl'], - function(angular, mocks, CreateRule0Ctrl) { - describe('Test /js/controllers/createrule0-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $scope, $rootScope, $controller, $httpBackend, $config, $location, toaster, $timeout; - - beforeEach(inject(function(_$rootScope_ , _$controller_, _$httpBackend_, _$config_, _$location_, _$timeout_){ - $rootScope = _$rootScope_; - $controller = _$controller_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $location = _$location_; - $timeout = _$timeout_; - toaster = {}; - })); - - beforeEach(function(){ - $scope = $rootScope.$new(); - controller = $controller('CreateRule0Ctrl', {$scope: $scope, toaster: toaster }); - }); - - describe("if the controller of CreateRule0Ctrl exists",function(){ - it('controller exists', function(){ - expect(controller).toBeDefined(); - }); - }) - - describe("if the $scope.click exists",function(){ - - it('$scope.click', function(){ - expect($scope.click).toBeDefined(); - }); - - it('should change location when setting it via click function', inject(function() { - var url = '/index'; - $scope.click(url); - spyOn($location, 'path').and.returnValue(url); - })); - - }) - - - }); - } -) http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/health-ctrl.spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/health-ctrl.spec.js b/ui/tests/ut/specs/controllers/health-ctrl.spec.js deleted file mode 100644 index 053ff4b..0000000 --- a/ui/tests/ut/specs/controllers/health-ctrl.spec.js +++ /dev/null @@ -1,78 +0,0 @@ -/*- -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. - -*/ -define(['require', 'angular', 'angularMocks', 'js/controllers/health-ctrl', 'echarts'], - function(require, angular, mocks, HealthCtrl) { - describe('Test /js/controllers/health-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $scope, $rootScope, $controller, $httpBackend, $config, $location, toaster, $timeout, $route; - - beforeEach(inject(function(_$rootScope_ , _$controller_, _$httpBackend_, _$config_, _$location_, _$timeout_){ - $rootScope = _$rootScope_; - $controller = _$controller_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $location = _$location_; - $timeout = _$timeout_; - toaster = {}; - $route = {}; - })); - - beforeEach(function(){ - $scope = $rootScope.$new(); - controller = $controller('HealthCtrl', {$scope: $scope, $route: $route, toaster: toaster }); - }); - - describe("if the controller of HealthCtrl exists",function(){ - it('controller exists', function(){ - expect(controller).toBeDefined(); - }); - }) - - describe("check if parameters are available",function(){ - - it('$scope.value and $config.value should be right', function(){ - expect($config.uri.heatmap).toBeTruthy(); - }); - - }) - - describe("httpGet $config.uri.dbtree test",function(){ - beforeEach(function(){ - $httpBackend.when('GET', $config.uri.heatmap).respond([{"name":"unknown","dq":0.0,"metrics":[{"name":"mean","dq":4835.3,"dqfail":0,"timestamp":1470387389994,"metricType":"","assetName":null,"details":[]},{"name":"test1001","dq":1638.6,"dqfail":0,"timestamp":1470387312289,"metricType":"","assetName":null,"details":[]},{"name":"test_publish","dq":99.8,"dqfail":0,"timestamp":1463994766925,"metricType":"","assetName":null,"details":[]},{"name":"v","dq":99.8,"dqfail":0,"timestamp":1463994766925,"metricType":"","assetName":null,"details":[]}]},{"name":"Hadoop","dq":0.0,"metrics":[{"name":"movie_acc","dq":97.0,"dqfail":0,"timestamp":1470009600000,"metricType":"","assetName":null,"details":[]},{"name":"movie_acc_test2","dq":97.0,"dqfail":0,"timestamp":1470009600000,"metricType":"","assetName":null,"details":[]},{"name":"hadoop_accuracy_1","dq":99.053,"dqfail":0,"timestamp":1467356400000,"metricType":"","assetName":null,"details":[]}]},{"name":"Bullseye","dq":0.0,"metrics":[{"na me":"test_accuracy_1","dq":98.952,"dqfail":1,"timestamp":1467439200000,"metricType":"","assetName":null,"details":[]},{"name":"test_accuracy_2","dq":99.103,"dqfail":0,"timestamp":1467439200000,"metricType":"","assetName":null,"details":[]},{"name":"TotalCount_asset1","dq":5056215.0,"dqfail":0,"timestamp":1467439200000,"metricType":"","assetName":null,"details":[]},{"name":"TotalCount_asset2","dq":1.229703E7,"dqfail":0,"timestamp":1467356400000,"metricType":"","assetName":null,"details":[]},{"name":"aw","dq":5056215.0,"dqfail":0,"timestamp":1467439200000,"metricType":"Bollinger","assetName":null,"details":[]}]}]); - $httpBackend.flush(); - }); - - it('http response', function(){ - // expect($scope.dbList).toBeTruthy(); - }); - - afterEach(function() { - $httpBackend.verifyNoOutstandingExpectation(); - $httpBackend.verifyNoOutstandingRequest(); - }); - }) - - - }); - } -) http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/job-ctrl.spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/job-ctrl.spec.js b/ui/tests/ut/specs/controllers/job-ctrl.spec.js deleted file mode 100644 index 2d7bc4b..0000000 --- a/ui/tests/ut/specs/controllers/job-ctrl.spec.js +++ /dev/null @@ -1,62 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/controllers/job-ctrl'], - function(angular, mocks, JobCtrl) { - describe('Test /js/controllers/job-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $scope, $rootScope, $controller, $httpBackend, $config, $location, toaster, $timeout, $route; - - beforeEach(inject(function(_$rootScope_ , _$controller_, _$httpBackend_, _$config_, _$location_, _$timeout_){ - $rootScope = _$rootScope_; - $controller = _$controller_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $location = _$location_; - $timeout = _$timeout_; - toaster = {}; - $route = {}; - })); - - beforeEach(function(){ - $scope = $rootScope.$new(); - controller = $controller('JobCtrl', {$scope: $scope, $route: $route, toaster: toaster }); - }); - - describe("if the controller of JobCtrl exists",function(){ - it('controller exists', function(){ - expect(controller).toBeDefined(); - }); - }) - - describe("check if createRowCollection",function(){ - - it('createRowCollection', function(){ - expect($scope.rowCollection).not.toEqual([]); - }); - - }) - - - }); - } -) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/metrics-ctrl.spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/metrics-ctrl.spec.js b/ui/tests/ut/specs/controllers/metrics-ctrl.spec.js deleted file mode 100644 index ec89983..0000000 --- a/ui/tests/ut/specs/controllers/metrics-ctrl.spec.js +++ /dev/null @@ -1,81 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/controllers/metrics-ctrl'], - function(angular, mocks, MetricsCtrl) { - describe('Test /js/controllers/metrics-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $rootScope, $controller, $httpBackend, $config, $filter, $routeParams, $timeout, $compile, $route; - beforeEach(inject(function(_$rootScope_, _$controller_, _$httpBackend_, _$config_, _$filter_, _$timeout_, _$compile_){ - $rootScope = _$rootScope_; - $controller = _$controller_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $filter = _$filter_; - $routeParams = {}; - // $routeParams.siteId = 'abc'; - $timeout = _$timeout_; - $compile = _$compile_; - $route = {}; - })); - - describe("function test",function(){ - var $scope; - - beforeEach(function(){ - $scope = $rootScope.$new(); - controller = $controller('MetricsCtrl', {$scope: $scope, $route: $route, $routeParams: $routeParams}); - }); - - it('controller exists', function(){ - // var controller = $controller('MetricsCtrl', {$scope: $scope, $routeParams: $routeParams}); - expect(controller).toBeDefined(); - }); - - it('$config.uri.dashboard', function(){ - expect($config.uri.dashboard).toBeTruthy(); - }); - - it('$scope.showBig works well', function(){ - expect($scope.showBig).toBeDefined(); - }); - - describe("http test",function(){ - beforeEach(function(){ - $httpBackend.when('GET', $config.uri.dashboard).respond({"age": 16,"name": "li"}); - $httpBackend.flush(); - }); - - it('http response', function(){ - expect($scope.dashboard.age).toBe(16); - }); - - afterEach(function() { - $httpBackend.verifyNoOutstandingExpectation(); - $httpBackend.verifyNoOutstandingRequest(); - }); - }) - - }) - }); - } -) http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/nav-ctrl_spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/nav-ctrl_spec.js b/ui/tests/ut/specs/controllers/nav-ctrl_spec.js deleted file mode 100644 index 4b616ef..0000000 --- a/ui/tests/ut/specs/controllers/nav-ctrl_spec.js +++ /dev/null @@ -1,52 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/controllers/nav-ctrl'], - function(angular, mocks, navCtrl) { - describe('Test /js/controllers/nav-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $controller, $config, $httpBackend, $location; - - beforeEach(inject(function(_$controller_, _$config_, _$httpBackend_, _$location_){ - $controller = _$controller_; - $config = _$config_; - $httpBackend = _$httpBackend_; - $location = _$location_; - })); - - describe('$scope functions are set properly', function(){ - var $scope; - - beforeEach(function(){ - $scope = {}; - $controller('NavCtrl', {$scope:$scope}); - }) - - it('$scope.isActive is defined correctly', function(){ - $location.path('/home'); - expect($scope.isActive('/home')).toBeTruthy(); - }); - - }); - }); - } -); http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/rule-ctrl.spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/rule-ctrl.spec.js b/ui/tests/ut/specs/controllers/rule-ctrl.spec.js deleted file mode 100644 index b6c205e..0000000 --- a/ui/tests/ut/specs/controllers/rule-ctrl.spec.js +++ /dev/null @@ -1,62 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/controllers/rule-ctrl'], - function(angular, mocks, RuleCtrl) { - describe('Test /js/controllers/rule-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $scope, $rootScope, $controller, $httpBackend, $config, $location, toaster, $timeout, $route; - - beforeEach(inject(function(_$rootScope_ , _$controller_, _$httpBackend_, _$config_, _$location_, _$timeout_){ - $rootScope = _$rootScope_; - $controller = _$controller_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $location = _$location_; - $timeout = _$timeout_; - toaster = {}; - $route = {}; - })); - - beforeEach(function(){ - $scope = $rootScope.$new(); - controller = $controller('RuleCtrl', {$scope: $scope, $route: $route, toaster: toaster }); - }); - - describe("if the controller of RuleCtrl exists",function(){ - it('controller exists', function(){ - expect(controller).toBeDefined(); - }); - }) - - describe("check if createRowCollection",function(){ - - it('createRowCollection', function(){ - expect($scope.rowCollection).not.toEqual([]); - }); - - }) - - - }); - } -) http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/sidebar-ctrl_spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/sidebar-ctrl_spec.js b/ui/tests/ut/specs/controllers/sidebar-ctrl_spec.js deleted file mode 100644 index aeadfca..0000000 --- a/ui/tests/ut/specs/controllers/sidebar-ctrl_spec.js +++ /dev/null @@ -1,94 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/controllers/sidebar-ctrl'], - function(angular, mocks, sidebarCtrl) { - describe('Test /js/controllers/sidebar-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $controller, $httpBackend, $config, $filter, $timeout, $compile; - beforeEach(inject(function(_$controller_, _$httpBackend_, _$config_, _$filter_, _$timeout_, _$compile_){ - $controller = _$controller_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $filter = _$filter_; - $timeout = _$timeout_; - $compile = _$compile_; - })); - - describe("http unit test",function(){ - var $scope; - beforeEach(function(){ - $scope = {}; - $controller('SideBarCtrl', {$scope:$scope}); - }) - it('$scope.str works well', function(){ - // expect($scope.str).toEqual("hello"); - }); - it('url works well', function(){ - expect($config.uri.statistics).toBeTruthy(); - }); - it('function resizeSidebar() works well', function(){ - // expect($scope.resizeSidebar).toBeDefined(); - }); - describe("http get test",function(){ - beforeEach(function(){ - $httpBackend.when('GET', $config.uri.statistics).respond( - { - "assets": 16, - "metrics": 20, - "status":{ - "health": 16, - "warn": 3, - "invalid": 1 - } - } - ); - - $httpBackend.when('GET', $config.uri.briefmetrics).respond( - { - "assets": 16, - "metrics": 20, - "status":{ - "health": 16, - "warn": 3, - "invalid": 1 - } - } - ); - $httpBackend.flush(); - }); - - it("$scope.chartConfig is defined", function(){ - expect($scope.chartConfig).toBeDefined(); - }); - - afterEach(function() { - $httpBackend.verifyNoOutstandingExpectation(); - $httpBackend.verifyNoOutstandingRequest(); - }); - }) - - - }) - }); - } -) http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/controllers/viewrule-ctrl.spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/controllers/viewrule-ctrl.spec.js b/ui/tests/ut/specs/controllers/viewrule-ctrl.spec.js deleted file mode 100644 index 1de441b..0000000 --- a/ui/tests/ut/specs/controllers/viewrule-ctrl.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/controllers/viewrule-ctrl'], - function(angular, mocks, ViewRuleCtrl) { - describe('Test /js/controllers/viewrule-ctrl.js', function(){ - beforeEach(function(){ - module('app.controllers'); - module('app.services'); - }); - var $scope, $rootScope, $controller, $filter, $httpBackend, $config, $location, toaster, $timeout, $compile; - - beforeEach(inject(function(_$rootScope_ , _$controller_, _$filter_, _$httpBackend_, _$config_, _$location_, _$timeout_, _$compile_){ - $rootScope = _$rootScope_; - $controller = _$controller_; - $filter = _$filter_; - $httpBackend = _$httpBackend_; - $config = _$config_; - $location = _$location_; - $timeout = _$timeout_; - toaster = {}; - $compile = _$compile_; - })); - - beforeEach(function(){ - $scope = $rootScope.$new(); - controller = $controller('ViewRuleCtrl', {$scope: $scope, toaster: toaster}); - }); - - describe("if the controller of ViewRuleCtrl exists",function(){ - it('controller exists', function(){ - expect(controller).toBeDefined(); - }); - }) - - describe("check if parameters are available",function(){ - it('$scope.value and $config.value should be right', function(){ - expect($config.uri.rulemetric).toBeTruthy(); - }); - }) - - describe("httpGet $config.uri.rulemetric test",function(){ - beforeEach(function(){ - $httpBackend.when('GET', $config.uri.rulemetric).respond({"age": 16,"name": "li"}); - $httpBackend.flush(); - }); - - it('http response', function(){ - // expect($scope.dbList).toBeTruthy(); - }); - - afterEach(function() { - $httpBackend.verifyNoOutstandingExpectation(); - $httpBackend.verifyNoOutstandingRequest(); - }); - }) - - - }); - } -) http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/42ee8863/ui/tests/ut/specs/filters/strmap_spec.js ---------------------------------------------------------------------- diff --git a/ui/tests/ut/specs/filters/strmap_spec.js b/ui/tests/ut/specs/filters/strmap_spec.js deleted file mode 100644 index a63d74b..0000000 --- a/ui/tests/ut/specs/filters/strmap_spec.js +++ /dev/null @@ -1,38 +0,0 @@ -/*- -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. - -*/ -define(['angular', 'angularMocks', 'js/filters/strmap'], - function(angular, mocks, filter) { - - describe('Test /js/filters/strmap.js', function() { - beforeEach(module('app.filters')); - - // Our first test!!!! - it('map correctly for index', mocks.inject(function($filter) { - // console.log($filter('strShorten')('1234567890123444444')); - var arr = ['Apple', 'Orange', 'Pale']; - expect($filter('strmap')(0, arr)).toEqual(arr[0]); - expect($filter('strmap')(3, arr)).toEqual(3); - - })); - - - }); - } -);
