You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@griffin.apache.org by gu...@apache.org on 2018/08/20 14:34:42 UTC
[5/5] incubator-griffin git commit: make ui style consistent
make ui style consistent
make ui module code style consistent
Author: William Guo <gu...@apache.org>
Closes #398 from guoyuepeng/2018_08_20_make_ui_style_consistent.
Project: http://git-wip-us.apache.org/repos/asf/incubator-griffin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-griffin/commit/b306d872
Tree: http://git-wip-us.apache.org/repos/asf/incubator-griffin/tree/b306d872
Diff: http://git-wip-us.apache.org/repos/asf/incubator-griffin/diff/b306d872
Branch: refs/heads/master
Commit: b306d872c97dd37ab0be06c908b9f17e084a6a26
Parents: e51245b
Author: William Guo <gu...@apache.org>
Authored: Mon Aug 20 22:34:30 2018 +0800
Committer: Lionel Liu <bh...@163.com>
Committed: Mon Aug 20 22:34:30 2018 +0800
----------------------------------------------------------------------
ui/angular/.angular-cli.json | 6 +-
ui/angular/karma.conf.js | 4 +-
ui/angular/protractor.conf.js | 7 +-
ui/angular/src/app/app.component.css | 17 +-
ui/angular/src/app/app.component.html | 36 +-
ui/angular/src/app/app.component.js | 34 +-
ui/angular/src/app/app.component.spec.ts | 4 +-
ui/angular/src/app/app.component.ts | 30 +-
ui/angular/src/app/app.module.js | 71 +-
ui/angular/src/app/app.module.ts | 119 +-
.../src/app/dataasset/dataasset.component.css | 6 +-
.../src/app/dataasset/dataasset.component.html | 120 +-
.../app/dataasset/dataasset.component.spec.ts | 8 +-
.../src/app/dataasset/dataasset.component.ts | 26 +-
ui/angular/src/app/health/health.component.html | 3 +-
.../src/app/health/health.component.spec.ts | 8 +-
ui/angular/src/app/health/health.component.ts | 42 +-
.../job/create-job/batch/batch.component.css | 82 +-
.../job/create-job/batch/batch.component.html | 31 +-
.../create-job/batch/batch.component.spec.ts | 8 +-
.../app/job/create-job/batch/batch.component.ts | 52 +-
.../streaming/streaming.component.css | 82 +-
.../streaming/streaming.component.html | 16 +-
.../streaming/streaming.component.spec.ts | 8 +-
.../create-job/streaming/streaming.component.ts | 48 +-
.../job/job-detail/job-detail.component.html | 2 +-
.../job/job-detail/job-detail.component.spec.ts | 8 +-
.../app/job/job-detail/job-detail.component.ts | 26 +-
ui/angular/src/app/job/job.component.css | 8 +-
ui/angular/src/app/job/job.component.html | 183 +--
ui/angular/src/app/job/job.component.spec.ts | 8 +-
ui/angular/src/app/job/job.component.ts | 82 +-
ui/angular/src/app/loader/loader.component.css | 10 +-
.../src/app/loader/loader.component.spec.ts | 8 +-
ui/angular/src/app/loader/loader.component.ts | 46 +-
.../src/app/loader/loader.service.spec.ts | 8 +-
ui/angular/src/app/loader/loader.service.ts | 27 +-
ui/angular/src/app/loader/loader.state.ts | 4 +-
ui/angular/src/app/login/login.component.css | 4 +-
ui/angular/src/app/login/login.component.html | 10 +-
.../src/app/login/login.component.spec.ts | 8 +-
ui/angular/src/app/login/login.component.ts | 22 +-
.../measure/create-measure/ac/ac.component.css | 23 +-
.../measure/create-measure/ac/ac.component.html | 179 +--
.../create-measure/ac/ac.component.spec.ts | 8 +-
.../measure/create-measure/ac/ac.component.ts | 43 +-
.../configuration/configuration.component.html | 6 +-
.../configuration.component.spec.ts | 8 +-
.../configuration/configuration.component.ts | 8 +-
.../create-measure/create-measure.component.css | 23 +-
.../create-measure.component.html | 298 ++---
.../create-measure.component.spec.ts | 8 +-
.../create-measure/create-measure.component.ts | 34 +-
.../confirmModal/confirmModal.component.spec.ts | 6 +-
.../pr/confirmModal/confirmModal.component.ts | 3 +-
.../measure/create-measure/pr/pr.component.css | 1 -
.../measure/create-measure/pr/pr.component.html | 16 +-
.../create-measure/pr/pr.component.spec.ts | 8 +-
.../measure/create-measure/pr/pr.component.ts | 31 +-
.../create-measure/pr/rule/rule.component.css | 2 +-
.../create-measure/pr/rule/rule.component.html | 1046 +++++++++---------
.../pr/rule/rule.component.spec.ts | 8 +-
.../create-measure/pr/rule/rule.component.ts | 12 +-
.../create-measure/pr/step1/step1.component.css | 23 +-
.../pr/step1/step1.component.html | 98 +-
.../pr/step1/step1.component.spec.ts | 6 +-
.../create-measure/pr/step1/step1.component.ts | 45 +-
.../create-measure/pr/step2/step2.component.css | 1 -
.../pr/step2/step2.component.html | 9 +-
.../pr/step2/step2.component.spec.ts | 6 +-
.../create-measure/pr/step2/step2.component.ts | 14 +-
.../create-measure/pr/step3/step3.component.css | 1 -
.../pr/step3/step3.component.html | 9 +-
.../pr/step3/step3.component.spec.ts | 6 +-
.../create-measure/pr/step3/step3.component.ts | 16 +-
.../create-measure/pr/step4/step4.component.css | 1 -
.../pr/step4/step4.component.html | 10 +-
.../pr/step4/step4.component.spec.ts | 6 +-
.../create-measure/pr/step4/step4.component.ts | 15 +-
.../create-measure/pub/pub.component.css | 85 +-
.../create-measure/pub/pub.component.html | 56 +-
.../create-measure/pub/pub.component.spec.ts | 8 +-
.../measure/create-measure/pub/pub.component.ts | 80 +-
.../measure-detail.component.html | 6 +-
.../measure-detail.component.spec.ts | 8 +-
.../measure-detail/measure-detail.component.ts | 19 +-
.../src/app/measure/measure.component.css | 82 +-
.../src/app/measure/measure.component.html | 73 +-
.../src/app/measure/measure.component.spec.ts | 8 +-
ui/angular/src/app/measure/measure.component.ts | 26 +-
.../detail-metric/detail-metric.component.css | 4 +-
.../detail-metric/detail-metric.component.html | 63 +-
.../detail-metric.component.spec.ts | 8 +-
.../detail-metric/detail-metric.component.ts | 70 +-
ui/angular/src/app/metric/metric.component.html | 17 +-
.../src/app/metric/metric.component.spec.ts | 8 +-
ui/angular/src/app/metric/metric.component.ts | 26 +-
.../mydashboard/mydashboard.component.spec.ts | 8 +-
.../app/mydashboard/mydashboard.component.ts | 7 +-
.../src/app/service/chart.service.spec.ts | 4 +-
ui/angular/src/app/service/chart.service.ts | 15 +-
ui/angular/src/app/service/http.service.spec.ts | 4 +-
ui/angular/src/app/service/http.service.ts | 54 +-
.../src/app/service/service.service.spec.ts | 4 +-
ui/angular/src/app/service/service.service.ts | 28 +-
ui/angular/src/app/service/user.service.spec.ts | 4 +-
ui/angular/src/app/service/user.service.ts | 5 +-
.../src/app/sidebar/sidebar.component.css | 9 +-
.../src/app/sidebar/sidebar.component.html | 13 +-
.../src/app/sidebar/sidebar.component.spec.ts | 8 +-
ui/angular/src/app/sidebar/sidebar.component.ts | 34 +-
ui/angular/src/app/sidebar/truncate.pipe.ts | 4 +-
ui/angular/src/environments/environment.js | 2 +-
ui/angular/src/index.html | 4 +-
ui/angular/src/main.js | 2 +-
ui/angular/src/main.ts | 10 +-
ui/angular/src/polyfills.ts | 2 -
ui/angular/src/styles.css | 862 ++++++++-------
ui/angular/src/test.ts | 5 +-
ui/angular/src/typings.d.ts | 1 +
ui/angular/src/vendor.ts | 3 +-
ui/angular/webpack.config.js | 114 +-
ui/pom.xml | 229 ++--
123 files changed, 2859 insertions(+), 2592 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/.angular-cli.json
----------------------------------------------------------------------
diff --git a/ui/angular/.angular-cli.json b/ui/angular/.angular-cli.json
index 810347e..2044168 100644
--- a/ui/angular/.angular-cli.json
+++ b/ui/angular/.angular-cli.json
@@ -22,7 +22,11 @@
"../node_modules/bootstrap/dist/css/bootstrap.css",
"styles.css"
],
- "scripts": [ "../node_modules/echarts/dist/echarts.min.js", "../node_modules/jquery/dist/jquery.min.js", "../node_modules/bootstrap/dist/js/bootstrap.min.js" ],
+ "scripts": [
+ "../node_modules/echarts/dist/echarts.min.js",
+ "../node_modules/jquery/dist/jquery.min.js",
+ "../node_modules/bootstrap/dist/js/bootstrap.min.js"
+ ],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/karma.conf.js
----------------------------------------------------------------------
diff --git a/ui/angular/karma.conf.js b/ui/angular/karma.conf.js
index 25b36fb..c092cab 100644
--- a/ui/angular/karma.conf.js
+++ b/ui/angular/karma.conf.js
@@ -31,11 +31,11 @@ module.exports = function (config) {
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
- client:{
+ client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
- reports: [ 'html', 'lcovonly' ],
+ reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
angularCli: {
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/protractor.conf.js
----------------------------------------------------------------------
diff --git a/ui/angular/protractor.conf.js b/ui/angular/protractor.conf.js
index bf3c9a3..98f2981 100644
--- a/ui/angular/protractor.conf.js
+++ b/ui/angular/protractor.conf.js
@@ -19,7 +19,7 @@ under the License.
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
-const { SpecReporter } = require('jasmine-spec-reporter');
+const {SpecReporter} = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
@@ -35,12 +35,13 @@ exports.config = {
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
- print: function() {}
+ print: function () {
+ }
},
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
- jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
+ jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
}
};
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/app.component.css
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/app.component.css b/ui/angular/src/app/app.component.css
index 15f712d..e793939 100644
--- a/ui/angular/src/app/app.component.css
+++ b/ui/angular/src/app/app.component.css
@@ -16,14 +16,14 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-
@import url('../../node_modules/bootstrap/dist/css/bootstrap.css');
+
* {
color: white;
}
-.navbar-default .navbar-nav>li>a:hover,
-.navbar-default .navbar-nav>li>a:focus {
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
color: #ffffff;
background-color: transparent;
}
@@ -47,7 +47,6 @@ under the License.
cursor: pointer;
}
-
h3 {
font-size: 34px;
}
@@ -56,23 +55,21 @@ input {
margin: 12px;
}
-
-
.dropdown-menu {
background-color: #222222;
}
-.dropdown-menu>li>a {
+.dropdown-menu > li > a {
color: #ffffff;
}
-.dropdown-menu>li>a:hover {
+.dropdown-menu > li > a:hover {
text-decoration: none;
color: #ffffff;
background-color: #2a9fd6;
}
-.navbar-default .navbar-nav>.open>a {
+.navbar-default .navbar-nav > .open > a {
background-color: #333;
}
@@ -114,7 +111,7 @@ hr {
}
}
-@media (max-width:991px) {
+@media (max-width: 991px) {
#content-row {
margin-top: 0em;
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/app.component.html
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/app.component.html b/ui/angular/src/app/app.component.html
index 84b6413..b0c7f39 100644
--- a/ui/angular/src/app/app.component.html
+++ b/ui/angular/src/app/app.component.html
@@ -21,13 +21,16 @@ under the License.
<nav class="navbar navbar-default navbar-fixed-top" ng-controller="NavCtrl">
<div class="container-fluid">
<div class="navbar-header">
- <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse"
+ aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a routerLink="/" class="navbar-brand" style="padding-top:5px;padding-bottom:0;"><img src="/assets/img/logo.png" title="Data Quality Service" style="max-height:40px;"/></a>
+ <a routerLink="/" class="navbar-brand" style="padding-top:5px;padding-bottom:0;"><img src="/assets/img/logo.png"
+ title="Data Quality Service"
+ style="max-height:40px;"/></a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav">
@@ -38,15 +41,20 @@ under the License.
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
- <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" id="toggle">{{fullName}} <i class="fa fa-user fa-fw"></i><span class="caret"></span></a>
+ <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"
+ id="toggle">{{fullName}} <i class="fa fa-user fa-fw"></i><span class="caret"></span></a>
<ul class="dropdown-menu dropdown-user">
<li><a href="#!/undercons"><i class="fa fa-user fa-fw"></i> User Profile</a></li>
<li><a href="#!/undercons"><i class="fa fa-gear fa-fw"></i> Settings</a></li>
<li class="divider"></li>
- <li><a href="https://griffin.incubator.apache.org/" target="_blank"><i class="fa fa-home fa-fw"></i> Home Page</a></li>
- <li><a href="https://github.com/apache/incubator-griffin/blob/master/griffin-doc/service/api-guide.md" target="_blank"><i class="fa fa-book fa-fw"></i> API DOCs</a></li>
- <li><a href="https://github.com/apache/incubator-griffin/blob/master/griffin-doc/ui/user-guide.md" target="_blank"><i class="fa fa-question-circle fa-fw"></i> User Guide</a></li>
- <li><a href="mailto:dev@griffin.incubator.apache.org"><i class="fa fa-envelope fa-fw"></i> Contact us</a></li>
+ <li><a href="https://griffin.incubator.apache.org/" target="_blank"><i class="fa fa-home fa-fw"></i> Home
+ Page</a></li>
+ <li><a href="https://github.com/apache/incubator-griffin/blob/master/griffin-doc/service/api-guide.md"
+ target="_blank"><i class="fa fa-book fa-fw"></i> API DOCs</a></li>
+ <li><a href="https://github.com/apache/incubator-griffin/blob/master/griffin-doc/ui/user-guide.md"
+ target="_blank"><i class="fa fa-question-circle fa-fw"></i> User Guide</a></li>
+ <li><a href="mailto:dev@griffin.incubator.apache.org"><i class="fa fa-envelope fa-fw"></i> Contact us</a>
+ </li>
<li class="divider"></li>
<li><a (click)="logout()" class="re"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
</li>
@@ -54,16 +62,22 @@ under the License.
</li>
</ul>
<form class="navbar-search navbar-right nav navbar-nav">
- <input id="searchBox" type="text" class="search-query" placeholder="Search..." ng-disabled="!isActive('/measures')&&!isActive('/dataassets')">
+ <input id="searchBox" type="text" class="search-query" placeholder="Search..."
+ ng-disabled="!isActive('/measures')&&!isActive('/dataassets')">
</form>
</div>
</div>
</nav>
- <div class="container-fluid" us-spinner="{color:'#ffffff', lines:13, width:14, length:28, radius:42, shadow:true, hwaccel:true, speed:0.8}" spinner-on="false" style="padding-top:56px;padding-bottom:90px;height:100%;padding-right:0;" id="mainContent">
+ <div class="container-fluid"
+ us-spinner="{color:'#ffffff', lines:13, width:14, length:28, radius:42, shadow:true, hwaccel:true, speed:0.8}"
+ spinner-on="false" style="padding-top:56px;padding-bottom:90px;height:100%;padding-right:0;" id="mainContent">
<div class="col-md-9 col-xs-12">
- <button type="button" class="btn btn-primary btn-circle" style="position: absolute; top: 0px; right: 30px; z-index:99" (click)="goback();"><span style="margin-bottom:20px;">Back</span></button>
+ <button type="button" class="btn btn-primary btn-circle"
+ style="position: absolute; top: 0px; right: 30px; z-index:99" (click)="goback();"><span
+ style="margin-bottom:20px;">Back</span></button>
<!-- main content goes here-->
- <div id="mainWindow" (window:resize)="onResize($event)" class="row y-scrollable" ng-view style="padding-right: 10px;">
+ <div id="mainWindow" (window:resize)="onResize($event)" class="row y-scrollable" ng-view
+ style="padding-right: 10px;">
<app-loader></app-loader>
<router-outlet></router-outlet>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/app.component.js
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/app.component.js b/ui/angular/src/app/app.component.js
index a7fbf35..9d15b51 100644
--- a/ui/angular/src/app/app.component.js
+++ b/ui/angular/src/app/app.component.js
@@ -18,26 +18,28 @@ under the License.
*/
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
+ var c = arguments.length,
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
};
exports.__esModule = true;
var core_1 = require("@angular/core");
// import 'bootstrap/dist/css/bootstrap.css';
var AppComponent = (function () {
- function AppComponent() {
- this.title = 'app';
- }
- AppComponent = __decorate([
- core_1.Component({
- selector: 'app-root',
- template: "\n <h1>Angular Router</h1>\n <nav>\n <a routerLink=\"/measures\" routerLinkActive=\"active\"> Measures</a>\n <a routerLink=\"/jobs\">jobs</a>\n </nav>\n <router-outlet></router-outlet>\n ",
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.css']
- })
- ], AppComponent);
- return AppComponent;
+ function AppComponent() {
+ this.title = 'app';
+ }
+
+ AppComponent = __decorate([
+ core_1.Component({
+ selector: 'app-root',
+ template: "\n <h1>Angular Router</h1>\n <nav>\n <a routerLink=\"/measures\" routerLinkActive=\"active\"> Measures</a>\n <a routerLink=\"/jobs\">jobs</a>\n </nav>\n <router-outlet></router-outlet>\n ",
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.css']
+ })
+ ], AppComponent);
+ return AppComponent;
}());
exports.AppComponent = AppComponent;
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/app.component.spec.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/app.component.spec.ts b/ui/angular/src/app/app.component.spec.ts
index 7e62354..6b8dc79 100644
--- a/ui/angular/src/app/app.component.spec.ts
+++ b/ui/angular/src/app/app.component.spec.ts
@@ -16,9 +16,9 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { TestBed, async } from '@angular/core/testing';
+import {TestBed, async} from '@angular/core/testing';
-import { AppComponent } from './app.component';
+import {AppComponent} from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/app.component.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/app.component.ts b/ui/angular/src/app/app.component.ts
index f80a3be..21061d7 100644
--- a/ui/angular/src/app/app.component.ts
+++ b/ui/angular/src/app/app.component.ts
@@ -14,14 +14,14 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { Component, Directive, ViewContainerRef, OnInit, AfterViewChecked } from "@angular/core";
-import { Router } from "@angular/router";
-import { XHRBackend } from '@angular/http';
+import {Component, Directive, ViewContainerRef, OnInit, AfterViewChecked} from "@angular/core";
+import {Router} from "@angular/router";
+import {XHRBackend} from '@angular/http';
import * as $ from "jquery";
-import { ServiceService } from "./service/service.service";
-import { UserService } from "./service/user.service";
-import { Location, LocationStrategy, HashLocationStrategy } from "@angular/common";
-import { HttpClient } from "@angular/common/http";
+import {ServiceService} from "./service/service.service";
+import {UserService} from "./service/user.service";
+import {Location, LocationStrategy, HashLocationStrategy} from "@angular/common";
+import {HttpClient} from "@angular/common/http";
@Component({
selector: "app-root",
@@ -34,26 +34,33 @@ export class AppComponent implements AfterViewChecked, OnInit {
ntAccount: string;
timestamp: Date;
fullName: string;
+
onResize(event) {
this.resizeMainWindow();
}
+
goback() {
this.location.back();
}
+
ngOnInit() {
this.ntAccount = this.userService.getCookie("ntAccount");
this.fullName = this.userService.getCookie("fullName");
}
+
constructor(
private router: Router,
- private http:HttpClient,
+ private http: HttpClient,
private location: Location,
public serviceService: ServiceService,
public userService: UserService
- ) {}
+ ) {
+ }
+
resizeMainWindow() {
$("#mainWindow").height(window.innerHeight - 56 - 20);
}
+
logout() {
this.ntAccount = undefined;
this.userService.setCookie("ntAccount", undefined, -1);
@@ -62,6 +69,7 @@ export class AppComponent implements AfterViewChecked, OnInit {
window.location.reload();
// window.location.replace ('login');
}
+
ngAfterViewChecked() {
this.resizeMainWindow();
$("#rightbar").css({
@@ -69,7 +77,7 @@ export class AppComponent implements AfterViewChecked, OnInit {
});
$("#side-bar-metrics").css({
height:
- $("#mainContent").height() - $("#side-bar-stats").outerHeight()
+ $("#mainContent").height() - $("#side-bar-stats").outerHeight()
});
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/app.module.js
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/app.module.js b/ui/angular/src/app/app.module.js
index 1ce697c..5cbb62f 100644
--- a/ui/angular/src/app/app.module.js
+++ b/ui/angular/src/app/app.module.js
@@ -18,10 +18,11 @@ under the License.
*/
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
+ var c = arguments.length,
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
};
exports.__esModule = true;
var platform_browser_1 = require("@angular/platform-browser");
@@ -29,37 +30,39 @@ var core_1 = require("@angular/core");
var router_1 = require("@angular/router");
var app_component_1 = require("./app.component");
var appRoutes = [
- { path: 'health', component: app_component_1.AppComponent },
- { path: 'measures', component: app_component_1.AppComponent },
- { path: 'hero/:id', component: app_component_1.AppComponent },
- { path: 'mydashboard', component: app_component_1.AppComponent },
- {
- path: 'jobs', component: app_component_1.AppComponent,
- data: { title: 'Heroes List' }
- },
- { path: '',
- redirectTo: 'health',
- pathMatch: 'full'
- },
- { path: '**', component: app_component_1.AppComponent }
+ {path: 'health', component: app_component_1.AppComponent},
+ {path: 'measures', component: app_component_1.AppComponent},
+ {path: 'hero/:id', component: app_component_1.AppComponent},
+ {path: 'mydashboard', component: app_component_1.AppComponent},
+ {
+ path: 'jobs', component: app_component_1.AppComponent,
+ data: {title: 'Heroes List'}
+ },
+ {
+ path: '',
+ redirectTo: 'health',
+ pathMatch: 'full'
+ },
+ {path: '**', component: app_component_1.AppComponent}
];
var AppModule = (function () {
- function AppModule() {
- }
- AppModule = __decorate([
- core_1.NgModule({
- declarations: [
- app_component_1.AppComponent
- ],
- imports: [
- platform_browser_1.BrowserModule,
- router_1.RouterModule.forRoot(appRoutes, { enableTracing: true } // <-- debugging purposes only
- )
- ],
- providers: [],
- bootstrap: [app_component_1.AppComponent]
- })
- ], AppModule);
- return AppModule;
+ function AppModule() {
+ }
+
+ AppModule = __decorate([
+ core_1.NgModule({
+ declarations: [
+ app_component_1.AppComponent
+ ],
+ imports: [
+ platform_browser_1.BrowserModule,
+ router_1.RouterModule.forRoot(appRoutes, {enableTracing: true} // <-- debugging purposes only
+ )
+ ],
+ providers: [],
+ bootstrap: [app_component_1.AppComponent]
+ })
+ ], AppModule);
+ return AppModule;
}());
exports.AppModule = AppModule;
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/app.module.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/app.module.ts b/ui/angular/src/app/app.module.ts
index 2c769f3..196fdbc 100644
--- a/ui/angular/src/app/app.module.ts
+++ b/ui/angular/src/app/app.module.ts
@@ -16,49 +16,49 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { BrowserModule } from '@angular/platform-browser';
-import { NgModule} from '@angular/core';
-import { RouterModule, Routes } from '@angular/router';
-import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
-import { DataTableModule} from "angular2-datatable";
-import { TreeModule } from 'angular-tree-component';
-import { BrowserAnimationsModule} from '@angular/platform-browser/animations';
-import { NgxEchartsModule } from 'ngx-echarts';
-import { MatDatepickerModule, MatNativeDateModule} from '@angular/material';
-import { Location, LocationStrategy, HashLocationStrategy} from '@angular/common';
-import { ToasterModule, ToasterService} from 'angular2-toaster';
-import { FormsModule } from '@angular/forms';
-import { AppComponent } from './app.component';
-import { MeasureComponent } from './measure/measure.component';
-import { JobComponent } from './job/job.component';
-import { SidebarComponent } from './sidebar/sidebar.component';
-import { HealthComponent } from './health/health.component';
-import { MydashboardComponent } from './mydashboard/mydashboard.component';
-import { CreateMeasureComponent } from './measure/create-measure/create-measure.component';
-import { MeasureDetailComponent } from './measure/measure-detail/measure-detail.component';
-import { MetricComponent } from './metric/metric.component';
-import { DetailMetricComponent } from './metric/detail-metric/detail-metric.component';
-import { DataassetComponent } from './dataasset/dataasset.component';
-import { BatchComponent } from './job/create-job/batch/batch.component';
-import { AcComponent} from './measure/create-measure/ac/ac.component';
-import { PrComponent } from './measure/create-measure/pr/pr.component';
-import { PrStep1Component } from './measure/create-measure/pr/step1/step1.component';
-import { PrStep2Component } from './measure/create-measure/pr/step2/step2.component';
-import { PrStep3Component } from './measure/create-measure/pr/step3/step3.component';
-import { PrStep4Component } from './measure/create-measure/pr/step4/step4.component';
-import { PrConfirmModal } from './measure/create-measure/pr/confirmModal/confirmModal.component';
-import { PubComponent } from './measure/create-measure/pub/pub.component';
-import { LoginComponent } from './login/login.component';
-import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown/angular2-multiselect-dropdown';
-import { RuleComponent } from './measure/create-measure/pr/rule/rule.component';
-import { TruncatePipe} from './sidebar/truncate.pipe';
-import { ConfigurationComponent } from './measure/create-measure/configuration/configuration.component';
-import { NouisliderModule } from 'ng2-nouislider';
-import { HttpService } from './service/http.service';
-import { LoaderService } from './loader/loader.service';
-import { LoaderComponent } from './loader/loader.component';
-import { JobDetailComponent } from './job/job-detail/job-detail.component';
-import { StreamingComponent } from './job/create-job/streaming/streaming.component';
+import {BrowserModule} from '@angular/platform-browser';
+import {NgModule} from '@angular/core';
+import {RouterModule, Routes} from '@angular/router';
+import {HttpClientModule, HTTP_INTERCEPTORS} from '@angular/common/http';
+import {DataTableModule} from "angular2-datatable";
+import {TreeModule} from 'angular-tree-component';
+import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
+import {NgxEchartsModule} from 'ngx-echarts';
+import {MatDatepickerModule, MatNativeDateModule} from '@angular/material';
+import {Location, LocationStrategy, HashLocationStrategy} from '@angular/common';
+import {ToasterModule, ToasterService} from 'angular2-toaster';
+import {FormsModule} from '@angular/forms';
+import {AppComponent} from './app.component';
+import {MeasureComponent} from './measure/measure.component';
+import {JobComponent} from './job/job.component';
+import {SidebarComponent} from './sidebar/sidebar.component';
+import {HealthComponent} from './health/health.component';
+import {MydashboardComponent} from './mydashboard/mydashboard.component';
+import {CreateMeasureComponent} from './measure/create-measure/create-measure.component';
+import {MeasureDetailComponent} from './measure/measure-detail/measure-detail.component';
+import {MetricComponent} from './metric/metric.component';
+import {DetailMetricComponent} from './metric/detail-metric/detail-metric.component';
+import {DataassetComponent} from './dataasset/dataasset.component';
+import {BatchComponent} from './job/create-job/batch/batch.component';
+import {AcComponent} from './measure/create-measure/ac/ac.component';
+import {PrComponent} from './measure/create-measure/pr/pr.component';
+import {PrStep1Component} from './measure/create-measure/pr/step1/step1.component';
+import {PrStep2Component} from './measure/create-measure/pr/step2/step2.component';
+import {PrStep3Component} from './measure/create-measure/pr/step3/step3.component';
+import {PrStep4Component} from './measure/create-measure/pr/step4/step4.component';
+import {PrConfirmModal} from './measure/create-measure/pr/confirmModal/confirmModal.component';
+import {PubComponent} from './measure/create-measure/pub/pub.component';
+import {LoginComponent} from './login/login.component';
+import {AngularMultiSelectModule} from 'angular2-multiselect-dropdown/angular2-multiselect-dropdown';
+import {RuleComponent} from './measure/create-measure/pr/rule/rule.component';
+import {TruncatePipe} from './sidebar/truncate.pipe';
+import {ConfigurationComponent} from './measure/create-measure/configuration/configuration.component';
+import {NouisliderModule} from 'ng2-nouislider';
+import {HttpService} from './service/http.service';
+import {LoaderService} from './loader/loader.service';
+import {LoaderComponent} from './loader/loader.component';
+import {JobDetailComponent} from './job/job-detail/job-detail.component';
+import {StreamingComponent} from './job/create-job/streaming/streaming.component';
const appRoutes: Routes = [
@@ -98,31 +98,31 @@ const appRoutes: Routes = [
},
{
path: 'createmeasure',
- component:CreateMeasureComponent
+ component: CreateMeasureComponent
},
{
path: 'createmeasureac',
- component:AcComponent
+ component: AcComponent
},
- {
+ {
path: 'createmeasurepr',
- component:PrComponent
+ component: PrComponent
},
{
path: 'createmeasurepub',
- component:PubComponent
+ component: PubComponent
},
{
path: 'detailed/:name',
- component:DetailMetricComponent
+ component: DetailMetricComponent
},
{
path: 'dataassets',
- component:DataassetComponent
+ component: DataassetComponent
},
{
path: 'metrics',
- component:MetricComponent
+ component: MetricComponent
},
{
path: '',
@@ -131,7 +131,7 @@ const appRoutes: Routes = [
},
{
path: 'login',
- component:LoginComponent
+ component: LoginComponent
},
// {
// path: '**',
@@ -190,13 +190,14 @@ const appRoutes: Routes = [
],
exports: [
LoaderComponent
-],
- providers: [ LoaderService,
+ ],
+ providers: [LoaderService,
{
- provide: HTTP_INTERCEPTORS,
- useClass: HttpService,
- multi: true,
- }],
+ provide: HTTP_INTERCEPTORS,
+ useClass: HttpService,
+ multi: true,
+ }],
bootstrap: [AppComponent]
})
-export class AppModule { }
+export class AppModule {
+}
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/dataasset/dataasset.component.css
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/dataasset/dataasset.component.css b/ui/angular/src/app/dataasset/dataasset.component.css
index 694641e..765f436 100644
--- a/ui/angular/src/app/dataasset/dataasset.component.css
+++ b/ui/angular/src/app/dataasset/dataasset.component.css
@@ -22,15 +22,19 @@ under the License.
left: 50%;
top: 20%;
}
+
.co {
border-collapse: separate;
}
+
.co > tbody > tr:nth-of-type(even) {
background-color: #1f1f1f;
}
+
.co > tbody > tr:nth-of-type(odd) {
background-color: #080808;
}
+
.table-striped > tbody > tr {
background-color: #1f1f1f;
border: 1px solid transparent;
@@ -42,4 +46,4 @@ under the License.
.reco > tbody:nth-of-type(even) > tr {
background-color: #080808;
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/dataasset/dataasset.component.html
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/dataasset/dataasset.component.html b/ui/angular/src/app/dataasset/dataasset.component.html
index c209537..aeae55e 100644
--- a/ui/angular/src/app/dataasset/dataasset.component.html
+++ b/ui/angular/src/app/dataasset/dataasset.component.html
@@ -30,72 +30,72 @@ under the License.
</table>
<table class="table table-striped reco" [mfData]="results" #mf="mfDataTable" [mfRowsOnPage]="5">
<thead>
- <tr style="background-color:#7D95CC">
- <th st-ratio="10">Table Name</th>
- <th st-ratio="10">DB Name</th>
- <th st-ratio="20">Owner</th>
- <th st-ratio="10">Creation Time</th>
- <th st-ratio="20">Location</th>
- </tr>
+ <tr style="background-color:#7D95CC">
+ <th st-ratio="10">Table Name</th>
+ <th st-ratio="10">DB Name</th>
+ <th st-ratio="20">Owner</th>
+ <th st-ratio="10">Creation Time</th>
+ <th st-ratio="20">Location</th>
+ </tr>
</thead>
<tbody>
- <tr *ngIf="!results">
- <td *ngIf="!results" colspan="7" style="text-align:center">
- No content.
- </td>
- <!-- <td class="icon">
- <span class="fa fa-spinner fa-spin fa-3x fa-fw"></span>
- </td> -->
- </tr>
+ <tr *ngIf="!results">
+ <td *ngIf="!results" colspan="7" style="text-align:center">
+ No content.
+ </td>
+ <!-- <td class="icon">
+ <span class="fa fa-spinner fa-spin fa-3x fa-fw"></span>
+ </td> -->
+ </tr>
</tbody>
<tbody *ngFor="let row of mf.data" style="word-break:break-all;">
- <tr>
- <td [ngClass]="{accordion:true}" (click)="row.showDetail=!(row.showDetail)" style="cursor: pointer;">
- <i *ngIf="!row.showDetail" class="fa fa-chevron-circle-right blue"></i>
- <i *ngIf="row.showDetail" class="fa fa-chevron-circle-down blue"></i> {{row.tableName}}
- </td>
- <td>{{row.dbName || 'N/A'}}</td>
- <td>{{row.owner || 'N/A'}}</td>
- <td>{{(row.createTime * 1000 | date: 'short') || 'N/A'}}</td>
- <td>{{row.sd.location || 'N/A'}}</td>
- </tr>
- <tr *ngIf="row.showDetail">
- <td colspan="7" style="padding:20px 30px 10px 30px;">
- <table class="table table-striped co" [mfData]="row.sd.cols" #mf2="mfDataTable">
- <thead>
- <tr style="background-color:#7D95CC">
- <th st-ratio="15">Name</th>
- <th st-ratio="15">Type</th>
- <th st-ratio="15">Comment</th>
- </tr>
- </thead>
- <tbody>
- <tr *ngIf="!row.sd.cols">
- <td colspan="7" style="text-align:center">No content.</td>
- </tr>
- <tr *ngFor="let item of mf2.data">
- <td>{{item.name}}</td>
- <td>{{item.type}}</td>
- <td>{{item.comment || 'N/A'}}</td>
- </tr>
- </tbody>
- <!-- <tfoot>
- <tr>
- <td colspan="8" class="text-right">
- <mfBootstrapPaginator></mfBootstrapPaginator>
- </td>
- </tr>
- </tfoot> -->
- </table>
- </td>
- </tr>
+ <tr>
+ <td [ngClass]="{accordion:true}" (click)="row.showDetail=!(row.showDetail)" style="cursor: pointer;">
+ <i *ngIf="!row.showDetail" class="fa fa-chevron-circle-right blue"></i>
+ <i *ngIf="row.showDetail" class="fa fa-chevron-circle-down blue"></i> {{row.tableName}}
+ </td>
+ <td>{{row.dbName || 'N/A'}}</td>
+ <td>{{row.owner || 'N/A'}}</td>
+ <td>{{(row.createTime * 1000 | date: 'short') || 'N/A'}}</td>
+ <td>{{row.sd.location || 'N/A'}}</td>
+ </tr>
+ <tr *ngIf="row.showDetail">
+ <td colspan="7" style="padding:20px 30px 10px 30px;">
+ <table class="table table-striped co" [mfData]="row.sd.cols" #mf2="mfDataTable">
+ <thead>
+ <tr style="background-color:#7D95CC">
+ <th st-ratio="15">Name</th>
+ <th st-ratio="15">Type</th>
+ <th st-ratio="15">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr *ngIf="!row.sd.cols">
+ <td colspan="7" style="text-align:center">No content.</td>
+ </tr>
+ <tr *ngFor="let item of mf2.data">
+ <td>{{item.name}}</td>
+ <td>{{item.type}}</td>
+ <td>{{item.comment || 'N/A'}}</td>
+ </tr>
+ </tbody>
+ <!-- <tfoot>
+ <tr>
+ <td colspan="8" class="text-right">
+ <mfBootstrapPaginator></mfBootstrapPaginator>
+ </td>
+ </tr>
+ </tfoot> -->
+ </table>
+ </td>
+ </tr>
</tbody>
<tfoot>
- <tr>
- <td colspan="8" class="text-right">
- <mfBootstrapPaginator></mfBootstrapPaginator>
- </td>
- </tr>
+ <tr>
+ <td colspan="8" class="text-right">
+ <mfBootstrapPaginator></mfBootstrapPaginator>
+ </td>
+ </tr>
</tfoot>
</table>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/dataasset/dataasset.component.spec.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/dataasset/dataasset.component.spec.ts b/ui/angular/src/app/dataasset/dataasset.component.spec.ts
index 65c9b57..b8d24fa 100644
--- a/ui/angular/src/app/dataasset/dataasset.component.spec.ts
+++ b/ui/angular/src/app/dataasset/dataasset.component.spec.ts
@@ -16,9 +16,9 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import {async, ComponentFixture, TestBed} from '@angular/core/testing';
-import { DataassetComponent } from './dataasset.component';
+import {DataassetComponent} from './dataasset.component';
describe('DataassetComponent', () => {
let component: DataassetComponent;
@@ -26,9 +26,9 @@ describe('DataassetComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ DataassetComponent ]
+ declarations: [DataassetComponent]
})
- .compileComponents();
+ .compileComponents();
}));
beforeEach(() => {
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/dataasset/dataasset.component.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/dataasset/dataasset.component.ts b/ui/angular/src/app/dataasset/dataasset.component.ts
index ee3384a..c477fe6 100644
--- a/ui/angular/src/app/dataasset/dataasset.component.ts
+++ b/ui/angular/src/app/dataasset/dataasset.component.ts
@@ -16,24 +16,24 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { Component, OnInit } from '@angular/core';
-import { HttpClient } from "@angular/common/http";
+import {Component, OnInit} from '@angular/core';
+import {HttpClient} from "@angular/common/http";
import * as $ from 'jquery';
import {ServiceService} from '../service/service.service';
@Component({
selector: 'app-dataasset',
templateUrl: './dataasset.component.html',
- providers:[ServiceService],
+ providers: [ServiceService],
styleUrls: ['./dataasset.component.css']
})
export class DataassetComponent implements OnInit {
public results = [];
public visible = false;
public visibleAnimate = false;
- sourceTable :string;
- targetTable :string;
- data:object;
+ sourceTable: string;
+ targetTable: string;
+ data: object;
public hide(): void {
this.visibleAnimate = false;
@@ -45,20 +45,22 @@ export class DataassetComponent implements OnInit {
this.hide();
}
}
- constructor(private http:HttpClient,public serviceService:ServiceService) { }
+
+ constructor(private http: HttpClient, public serviceService: ServiceService) {
+ }
ngOnInit() {
var allDataassets = this.serviceService.config.uri.dataassetlist;
- this.http.get(allDataassets).subscribe(data =>{
+ this.http.get(allDataassets).subscribe(data => {
for (let db in data) {
- for(let table of data[db]){
+ for (let table of data[db]) {
table.location = table.sd.location;
this.results.push(table);
- }
+ }
}
$('.icon').hide();
- },err =>{
-
+ }, err => {
+
});
};
}
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/health/health.component.html
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/health/health.component.html b/ui/angular/src/app/health/health.component.html
index d512b40..4ed47c9 100644
--- a/ui/angular/src/app/health/health.component.html
+++ b/ui/angular/src/app/health/health.component.html
@@ -18,6 +18,7 @@ under the License.
-->
<div class="tab-content" style='margin-top: '>
<div class="tab-pane fade active in" id="heatmap">
- <div echarts [options]="chartOption" class="demo-chart" id="chart1" (chartClick)="onChartClick($event)" style="margin-top: 50px;"></div>
+ <div echarts [options]="chartOption" class="demo-chart" id="chart1" (chartClick)="onChartClick($event)"
+ style="margin-top: 50px;"></div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/health/health.component.spec.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/health/health.component.spec.ts b/ui/angular/src/app/health/health.component.spec.ts
index d50be5a..40c5198 100644
--- a/ui/angular/src/app/health/health.component.spec.ts
+++ b/ui/angular/src/app/health/health.component.spec.ts
@@ -16,9 +16,9 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import {async, ComponentFixture, TestBed} from '@angular/core/testing';
-import { HealthComponent } from './health.component';
+import {HealthComponent} from './health.component';
describe('HealthComponent', () => {
let component: HealthComponent;
@@ -26,9 +26,9 @@ describe('HealthComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ HealthComponent ]
+ declarations: [HealthComponent]
})
- .compileComponents();
+ .compileComponents();
}));
beforeEach(() => {
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/health/health.component.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/health/health.component.ts b/ui/angular/src/app/health/health.component.ts
index ead969c..1b7f2f2 100644
--- a/ui/angular/src/app/health/health.component.ts
+++ b/ui/angular/src/app/health/health.component.ts
@@ -16,10 +16,10 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { Component, OnInit } from "@angular/core";
-import { HttpClient } from "@angular/common/http";
-import { Router } from "@angular/router";
-import { ServiceService } from "../service/service.service";
+import {Component, OnInit} from "@angular/core";
+import {HttpClient} from "@angular/common/http";
+import {Router} from "@angular/router";
+import {ServiceService} from "../service/service.service";
import * as $ from "jquery";
@Component({
@@ -29,10 +29,12 @@ import * as $ from "jquery";
})
export class HealthComponent implements OnInit {
constructor(
- private http:HttpClient,
+ private http: HttpClient,
private router: Router,
public serviceService: ServiceService
- ) {}
+ ) {
+ }
+
chartOption: object;
finalData = [];
mesWithJob: any;
@@ -86,7 +88,9 @@ export class HealthComponent implements OnInit {
metricId++;
}
}
- item.children = item.children.sort(function(a,b) {return (a.name > b.name) ? 1 : ((b.name > a.name) ? -1 : 0);} );
+ item.children = item.children.sort(function (a, b) {
+ return (a.name > b.name) ? 1 : ((b.name > a.name) ? -1 : 0);
+ });
result.push(item);
sysId++;
}
@@ -127,20 +131,20 @@ export class HealthComponent implements OnInit {
},
backgroundColor: "transparent",
tooltip: {
- formatter: function(info) {
+ formatter: function (info) {
var dqFormat = info.data.dq > 100 ? "" : "%";
if (info.data.dq)
return [
'<span style="font-size:1.8em;">' +
- info.data.sysName +
- " > </span>",
+ info.data.sysName +
+ " > </span>",
'<span style="font-size:1.5em;">' +
- info.data.name +
- "</span><br>",
+ info.data.name +
+ "</span><br>",
'<span style="font-size:1.5em;">dq : ' +
- info.data.dq.toFixed(2) +
- dqFormat +
- "</span>"
+ info.data.dq.toFixed(2) +
+ dqFormat +
+ "</span>"
].join("");
}
},
@@ -169,7 +173,7 @@ export class HealthComponent implements OnInit {
this.chartOption = option;
}
- checkvalue(job){
+ checkvalue(job) {
return job.metricValues.length === 0;
}
@@ -177,9 +181,9 @@ export class HealthComponent implements OnInit {
let url_dashboard = this.serviceService.config.uri.dashboard;
this.http.get(url_dashboard).subscribe(data => {
this.mesWithJob = JSON.parse(JSON.stringify(data));
- for(let i=0;i<this.mesWithJob.length;i++) {
- if(this.mesWithJob[i].some(this.checkvalue)){
- this.mesWithJob[i].splice(i,1);
+ for (let i = 0; i < this.mesWithJob.length; i++) {
+ if (this.mesWithJob[i].some(this.checkvalue)) {
+ this.mesWithJob[i].splice(i, 1);
}
}
for (let mesName in this.mesWithJob) {
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/create-job/batch/batch.component.css
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/create-job/batch/batch.component.css b/ui/angular/src/app/job/create-job/batch/batch.component.css
index 6288f12..e8e4108 100644
--- a/ui/angular/src/app/job/create-job/batch/batch.component.css
+++ b/ui/angular/src/app/job/create-job/batch/batch.component.css
@@ -17,74 +17,80 @@ specific language governing permissions and limitations
under the License.
*/
.job {
- font-size: 20px;
+ font-size: 20px;
}
.info {
- color: #b2c831;
+ color: #b2c831;
}
.btn-o {
- background: 0 0 !important;
+ background: 0 0 !important;
}
legend {
- background-color: #000;
- color: #007aff;
- left: 10px;
- padding: 0 10px;
- position: absolute;
- top: -12px;
- font-weight: 400;
- color: #fff;
- margin-bottom: 20px;
- font-size: 21px;
- width: auto !important;
- border: none !important;
+ background-color: #000;
+ color: #007aff;
+ left: 10px;
+ padding: 0 10px;
+ position: absolute;
+ top: -12px;
+ font-weight: 400;
+ color: #fff;
+ margin-bottom: 20px;
+ font-size: 21px;
+ width: auto !important;
+ border: none !important;
}
+
fieldset {
- border: 1px solid #e6e8e8;
- border-radius: 5px;
- margin: 20px 0;
- padding: 25px;
- position: relative;
- min-width: 0;
- display: block;
- height: 320px;
+ border: 1px solid #e6e8e8;
+ border-radius: 5px;
+ margin: 20px 0;
+ padding: 25px;
+ position: relative;
+ min-width: 0;
+ display: block;
+ height: 320px;
}
.formStep {
- background-color: #000;
+ background-color: #000;
}
+
.setcolor {
- color: #b2c831;
+ color: #b2c831;
}
+
.setgrey {
- color: #888888;
+ color: #888888;
}
+
.mat-calendar-table {
- height: 400px;
+ height: 400px;
}
+
.mat-datepicker-content {
- overflow-y: auto;
+ overflow-y: auto;
}
#md-datepicker-0 {
- height: 250px;
+ height: 250px;
}
.center {
- margin-left: 5%;
+ margin-left: 5%;
}
.range {
- display: block;
- width: 20%;
- height: 10%;
- margin-bottom: 5px;
+ display: block;
+ width: 20%;
+ height: 10%;
+ margin-bottom: 5px;
}
+
.setborder {
- border: 2px solid;
- border-radius: 5px;
- width: 8%;
-}
\ No newline at end of file
+ border: 2px solid;
+ border-radius: 5px;
+ width: 8%;
+}
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/create-job/batch/batch.component.html
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/create-job/batch/batch.component.html b/ui/angular/src/app/job/create-job/batch/batch.component.html
index 86b82e3..0922eff 100644
--- a/ui/angular/src/app/job/create-job/batch/batch.component.html
+++ b/ui/angular/src/app/job/create-job/batch/batch.component.html
@@ -36,12 +36,14 @@ under the License.
</legend>
<div class="y-scrollable">
<div class="col-md-12 col-lg-12 col-sm-12">
- <div class="form-group" [ngClass]="{'has-error':jobName.dirty&&jobName.invalid, 'has-success':jobName.valid}">
+ <div class="form-group"
+ [ngClass]="{'has-error':jobName.dirty&&jobName.invalid, 'has-success':jobName.valid}">
<label class="col-md-2 col-lg-2 col-sm-2 control-label">
Job Name<span class="symbol required"></span>:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
- <input type="text" class="form-control" [(ngModel)]="jobname" name="jobName" #jobName="ngModel" placeholder="Please input the job name" required pattern="^[a-zA-Z0-9_-]*$" id="jobName">
+ <input type="text" class="form-control" [(ngModel)]="jobname" name="jobName" #jobName="ngModel"
+ placeholder="Please input the job name" required pattern="^[a-zA-Z0-9_-]*$" id="jobName">
<span class="error text-small block " *ngIf="jobName.dirty && (jobName.errors?.required)">
Job Name is required</span>
<span class="error text-small block " *ngIf="jobName.dirty && (jobName.errors?.pattern)">Only letter, number, "-" and "_" are allowed</span>
@@ -54,7 +56,8 @@ under the License.
Measure Name<span class="symbol required"></span>:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
- <select id="measureSelector" class="form-control" ngControl="name" required name="measure.name" [(ngModel)]="measure" (ngModelChange)="onChange($event)">
+ <select id="measureSelector" class="form-control" ngControl="name" required name="measure.name"
+ [(ngModel)]="measure" (ngModelChange)="onChange($event)">
<option *ngFor="let row of Measures" value="{{row.name}}">{{row.name}}</option>
</select>
</div>
@@ -77,14 +80,21 @@ under the License.
</label>
</div>
<p style="margin-left:60px" class="setcolor">
- <i class="fa fa-info-circle"></i> One step means a partition size,and {{connector.name}} partition size = {{connector.size}}
+ <i class="fa fa-info-circle"></i> One step means a partition size,and {{connector.name}} partition
+ size = {{connector.size}}
</p>
<div class="col-md-11 col-lg-11 col-sm-11 center">
begin :
- <input type="number" class="setborder" value="{{ someKeyboard[i][0] }}" [(ngModel)]="someKeyboard[i][0]" max="0" name="begin{{i}}" (ngModelChange)="changeRange(index,someKeyboard[i][0],i)"> end :
- <input type="number" class="setborder" max="0" value="{{ someKeyboard[i][1] }}" [(ngModel)]="someKeyboard[i][1]" name="end{{i}}" (ngModelChange)="changeRange(1,$event,i)">
+ <input type="number" class="setborder" value="{{ someKeyboard[i][0] }}"
+ [(ngModel)]="someKeyboard[i][0]" max="0" name="begin{{i}}"
+ (ngModelChange)="changeRange(index,someKeyboard[i][0],i)"> end :
+ <input type="number" class="setborder" max="0" value="{{ someKeyboard[i][1] }}"
+ [(ngModel)]="someKeyboard[i][1]" name="end{{i}}" (ngModelChange)="changeRange(1,$event,i)">
</div>
- <nouislider class="col-md-11 col-lg-11 col-sm-11 center" id="slider{{i}}" #sliderRef name="slider{{i}}" [config]="someKeyboardConfig[i]" [(ngModel)]="someKeyboard[i]" (ngModelChange)="rangeChange($event,i)" (keyup)="blinkKeyupLabel()" (keydown)="blinkKeydownLabel()" style="margin-bottom: 5rem"></nouislider>
+ <nouislider class="col-md-11 col-lg-11 col-sm-11 center" id="slider{{i}}" #sliderRef
+ name="slider{{i}}" [config]="someKeyboardConfig[i]" [(ngModel)]="someKeyboard[i]"
+ (ngModelChange)="rangeChange($event,i)" (keyup)="blinkKeyupLabel()"
+ (keydown)="blinkKeydownLabel()" style="margin-bottom: 5rem"></nouislider>
</div>
</div>
<div class="setcolor">
@@ -106,11 +116,14 @@ under the License.
</div>
</div>
</div>
- <div class="modal fade" id="confirm-job" role="dialog" [ngClass]="{'in': visibleAnimate}" [ngStyle]="{'display': visible ? 'block' : 'none', 'opacity': visibleAnimate ? 1 : 0}" (click)="onContainerClicked($event)">
+ <div class="modal fade" id="confirm-job" role="dialog" [ngClass]="{'in': visibleAnimate}"
+ [ngStyle]="{'display': visible ? 'block' : 'none', 'opacity': visibleAnimate ? 1 : 0}"
+ (click)="onContainerClicked($event)">
<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" (click)="hide()">×</button>
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true" (click)="hide()">×
+ </button>
<h4 class="modal-title">Save the job with the below information?</h4>
</div>
<div class="modal-body">
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/create-job/batch/batch.component.spec.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/create-job/batch/batch.component.spec.ts b/ui/angular/src/app/job/create-job/batch/batch.component.spec.ts
index 25b1479..e166b78 100644
--- a/ui/angular/src/app/job/create-job/batch/batch.component.spec.ts
+++ b/ui/angular/src/app/job/create-job/batch/batch.component.spec.ts
@@ -16,9 +16,9 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import {async, ComponentFixture, TestBed} from '@angular/core/testing';
-import { BatchComponent } from './batch.component';
+import {BatchComponent} from './batch.component';
describe('BatchComponent', () => {
let component: BatchComponent;
@@ -26,9 +26,9 @@ describe('BatchComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ BatchComponent ]
+ declarations: [BatchComponent]
})
- .compileComponents();
+ .compileComponents();
}));
beforeEach(() => {
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/create-job/batch/batch.component.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/create-job/batch/batch.component.ts b/ui/angular/src/app/job/create-job/batch/batch.component.ts
index 7c2d9f6..1e2a4b2 100644
--- a/ui/angular/src/app/job/create-job/batch/batch.component.ts
+++ b/ui/angular/src/app/job/create-job/batch/batch.component.ts
@@ -16,22 +16,22 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { Component, OnInit, AfterViewChecked, ViewChildren } from "@angular/core";
-import { FormControl } from "@angular/forms";
-import { FormsModule } from "@angular/forms";
-import { MaxLengthValidator } from "@angular/forms";
-import { NgControlStatus, Validators } from "@angular/forms";
-import { PatternValidator } from "@angular/forms";
-import { MatDatepickerModule } from "@angular/material";
-import { ServiceService } from "../../../service/service.service";
-import { AngularMultiSelectModule } from "angular2-multiselect-dropdown/angular2-multiselect-dropdown";
-import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
-import { ToasterModule, ToasterService, ToasterConfig } from "angular2-toaster";
+import {Component, OnInit, AfterViewChecked, ViewChildren} from "@angular/core";
+import {FormControl} from "@angular/forms";
+import {FormsModule} from "@angular/forms";
+import {MaxLengthValidator} from "@angular/forms";
+import {NgControlStatus, Validators} from "@angular/forms";
+import {PatternValidator} from "@angular/forms";
+import {MatDatepickerModule} from "@angular/material";
+import {ServiceService} from "../../../service/service.service";
+import {AngularMultiSelectModule} from "angular2-multiselect-dropdown/angular2-multiselect-dropdown";
+import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
+import {ToasterModule, ToasterService, ToasterConfig} from "angular2-toaster";
import * as $ from "jquery";
-import { HttpParams } from "@angular/common/http";
-import { Router } from "@angular/router";
-import { NouisliderModule } from "ng2-nouislider";
-import { HttpClient } from "@angular/common/http";
+import {HttpParams} from "@angular/common/http";
+import {Router} from "@angular/router";
+import {NouisliderModule} from "ng2-nouislider";
+import {HttpClient} from "@angular/common/http";
@Component({
selector: "app-batch",
@@ -71,7 +71,7 @@ export class BatchComponent implements OnInit, AfterViewChecked {
"cron.expression": "",
"measure.id": "",
"job.name": "",
- "job.type":"batch",
+ "job.type": "batch",
"cron.time.zone": "",
// "cron.time.zone": "GMT+8:00",
// "predicate.config": {
@@ -138,7 +138,7 @@ export class BatchComponent implements OnInit, AfterViewChecked {
let timezone = "GMT" + time + ":00";
this.newJob = {
"job.name": this.jobname,
- "job.type":"batch",
+ "job.type": "batch",
"measure.id": this.measureid,
"cron.expression": this.cronExp,
"cron.time.zone": timezone,
@@ -199,7 +199,7 @@ export class BatchComponent implements OnInit, AfterViewChecked {
},
err => {
let response = JSON.parse(err.error);
- if(response.code === '40004'){
+ if (response.code === '40004') {
this.toasterService.pop("error", "Error!", "Job name already exists!");
} else {
this.toasterService.pop("error", "Error!", "Error when creating job");
@@ -217,15 +217,15 @@ export class BatchComponent implements OnInit, AfterViewChecked {
var stepSelection = ".formStep";
$(stepSelection).css({
height:
- window.innerHeight -
- $(stepSelection).offset().top -
- $("#footerwrap").outerHeight()
+ window.innerHeight -
+ $(stepSelection).offset().top -
+ $("#footerwrap").outerHeight()
});
$("fieldset").height(
$(stepSelection).height() -
- $(stepSelection + ">.stepDesc").height() -
- $(".btn-container").height() -
- 200
+ $(stepSelection + ">.stepDesc").height() -
+ $(".btn-container").height() -
+ 200
);
$(".y-scrollable").css({
height: $("fieldset").height()
@@ -365,8 +365,8 @@ export class BatchComponent implements OnInit, AfterViewChecked {
var allModels = this.serviceService.config.uri.allModels + '?type=griffin';
this.http.get(allModels).subscribe(data => {
let originData = data;
- for(let i in originData){
- if(originData[i]["process.type"] === "BATCH"){
+ for (let i in originData) {
+ if (originData[i]["process.type"] === "BATCH") {
this.Measures.push(originData[i]);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/create-job/streaming/streaming.component.css
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/create-job/streaming/streaming.component.css b/ui/angular/src/app/job/create-job/streaming/streaming.component.css
index 6288f12..e8e4108 100644
--- a/ui/angular/src/app/job/create-job/streaming/streaming.component.css
+++ b/ui/angular/src/app/job/create-job/streaming/streaming.component.css
@@ -17,74 +17,80 @@ specific language governing permissions and limitations
under the License.
*/
.job {
- font-size: 20px;
+ font-size: 20px;
}
.info {
- color: #b2c831;
+ color: #b2c831;
}
.btn-o {
- background: 0 0 !important;
+ background: 0 0 !important;
}
legend {
- background-color: #000;
- color: #007aff;
- left: 10px;
- padding: 0 10px;
- position: absolute;
- top: -12px;
- font-weight: 400;
- color: #fff;
- margin-bottom: 20px;
- font-size: 21px;
- width: auto !important;
- border: none !important;
+ background-color: #000;
+ color: #007aff;
+ left: 10px;
+ padding: 0 10px;
+ position: absolute;
+ top: -12px;
+ font-weight: 400;
+ color: #fff;
+ margin-bottom: 20px;
+ font-size: 21px;
+ width: auto !important;
+ border: none !important;
}
+
fieldset {
- border: 1px solid #e6e8e8;
- border-radius: 5px;
- margin: 20px 0;
- padding: 25px;
- position: relative;
- min-width: 0;
- display: block;
- height: 320px;
+ border: 1px solid #e6e8e8;
+ border-radius: 5px;
+ margin: 20px 0;
+ padding: 25px;
+ position: relative;
+ min-width: 0;
+ display: block;
+ height: 320px;
}
.formStep {
- background-color: #000;
+ background-color: #000;
}
+
.setcolor {
- color: #b2c831;
+ color: #b2c831;
}
+
.setgrey {
- color: #888888;
+ color: #888888;
}
+
.mat-calendar-table {
- height: 400px;
+ height: 400px;
}
+
.mat-datepicker-content {
- overflow-y: auto;
+ overflow-y: auto;
}
#md-datepicker-0 {
- height: 250px;
+ height: 250px;
}
.center {
- margin-left: 5%;
+ margin-left: 5%;
}
.range {
- display: block;
- width: 20%;
- height: 10%;
- margin-bottom: 5px;
+ display: block;
+ width: 20%;
+ height: 10%;
+ margin-bottom: 5px;
}
+
.setborder {
- border: 2px solid;
- border-radius: 5px;
- width: 8%;
-}
\ No newline at end of file
+ border: 2px solid;
+ border-radius: 5px;
+ width: 8%;
+}
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/create-job/streaming/streaming.component.html
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/create-job/streaming/streaming.component.html b/ui/angular/src/app/job/create-job/streaming/streaming.component.html
index db85aa5..784b415 100644
--- a/ui/angular/src/app/job/create-job/streaming/streaming.component.html
+++ b/ui/angular/src/app/job/create-job/streaming/streaming.component.html
@@ -36,12 +36,14 @@ under the License.
</legend>
<div class="y-scrollable">
<div class="col-md-12 col-lg-12 col-sm-12">
- <div class="form-group" [ngClass]="{'has-error':jobName.dirty&&jobName.invalid, 'has-success':jobName.valid}">
+ <div class="form-group"
+ [ngClass]="{'has-error':jobName.dirty&&jobName.invalid, 'has-success':jobName.valid}">
<label class="col-md-2 col-lg-2 col-sm-2 control-label">
Job Name<span class="symbol required"></span>:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
- <input type="text" class="form-control" [(ngModel)]="jobname" name="jobName" #jobName="ngModel" placeholder="Please input the job name" required pattern="^[a-zA-Z0-9_-]*$" id="jobName">
+ <input type="text" class="form-control" [(ngModel)]="jobname" name="jobName" #jobName="ngModel"
+ placeholder="Please input the job name" required pattern="^[a-zA-Z0-9_-]*$" id="jobName">
<span class="error text-small block " *ngIf="jobName.dirty && (jobName.errors?.required)">
Job Name is required</span>
<span class="error text-small block " *ngIf="jobName.dirty && (jobName.errors?.pattern)">Only letter, number, "-" and "_" are allowed</span>
@@ -54,7 +56,8 @@ under the License.
Measure Name<span class="symbol required"></span>:
</label>
<div class="col-md-10 col-lg-10 col-sm-10 ">
- <select id="measureSelector" class="form-control" ngControl="name" required name="measure.name" [(ngModel)]="measure" (ngModelChange)="onChange($event)">
+ <select id="measureSelector" class="form-control" ngControl="name" required name="measure.name"
+ [(ngModel)]="measure" (ngModelChange)="onChange($event)">
<option *ngFor="let row of Measures" value="{{row.name}}">{{row.name}}</option>
</select>
</div>
@@ -80,11 +83,14 @@ under the License.
</div>
</div>
</div>
- <div class="modal fade" id="confirm-job" role="dialog" [ngClass]="{'in': visibleAnimate}" [ngStyle]="{'display': visible ? 'block' : 'none', 'opacity': visibleAnimate ? 1 : 0}" (click)="onContainerClicked($event)">
+ <div class="modal fade" id="confirm-job" role="dialog" [ngClass]="{'in': visibleAnimate}"
+ [ngStyle]="{'display': visible ? 'block' : 'none', 'opacity': visibleAnimate ? 1 : 0}"
+ (click)="onContainerClicked($event)">
<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" (click)="hide()">×</button>
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true" (click)="hide()">×
+ </button>
<h4 class="modal-title">Save the job with the below information?</h4>
</div>
<div class="modal-body">
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/create-job/streaming/streaming.component.spec.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/create-job/streaming/streaming.component.spec.ts b/ui/angular/src/app/job/create-job/streaming/streaming.component.spec.ts
index 58bc51f..69b3cf0 100644
--- a/ui/angular/src/app/job/create-job/streaming/streaming.component.spec.ts
+++ b/ui/angular/src/app/job/create-job/streaming/streaming.component.spec.ts
@@ -16,9 +16,9 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import {async, ComponentFixture, TestBed} from '@angular/core/testing';
-import { StreamingComponent } from './streaming.component';
+import {StreamingComponent} from './streaming.component';
describe('StreamingComponent', () => {
let component: StreamingComponent;
@@ -26,9 +26,9 @@ describe('StreamingComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ StreamingComponent ]
+ declarations: [StreamingComponent]
})
- .compileComponents();
+ .compileComponents();
}));
beforeEach(() => {
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/create-job/streaming/streaming.component.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/create-job/streaming/streaming.component.ts b/ui/angular/src/app/job/create-job/streaming/streaming.component.ts
index fa6c531..94a400e 100644
--- a/ui/angular/src/app/job/create-job/streaming/streaming.component.ts
+++ b/ui/angular/src/app/job/create-job/streaming/streaming.component.ts
@@ -16,20 +16,20 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { Component, OnInit, AfterViewChecked, ViewChildren } from "@angular/core";
-import { FormControl } from "@angular/forms";
-import { FormsModule } from "@angular/forms";
-import { MaxLengthValidator } from "@angular/forms";
-import { NgControlStatus, Validators } from "@angular/forms";
-import { PatternValidator } from "@angular/forms";
-import { MatDatepickerModule } from "@angular/material";
-import { ServiceService } from "../../../service/service.service";
-import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
-import { ToasterModule, ToasterService, ToasterConfig } from "angular2-toaster";
+import {Component, OnInit, AfterViewChecked, ViewChildren} from "@angular/core";
+import {FormControl} from "@angular/forms";
+import {FormsModule} from "@angular/forms";
+import {MaxLengthValidator} from "@angular/forms";
+import {NgControlStatus, Validators} from "@angular/forms";
+import {PatternValidator} from "@angular/forms";
+import {MatDatepickerModule} from "@angular/material";
+import {ServiceService} from "../../../service/service.service";
+import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
+import {ToasterModule, ToasterService, ToasterConfig} from "angular2-toaster";
import * as $ from "jquery";
-import { HttpParams } from "@angular/common/http";
-import { Router } from "@angular/router";
-import { HttpClient } from "@angular/common/http";
+import {HttpParams} from "@angular/common/http";
+import {Router} from "@angular/router";
+import {HttpClient} from "@angular/common/http";
@Component({
selector: 'app-streaming',
@@ -67,7 +67,7 @@ export class StreamingComponent implements OnInit {
newJob = {
"cron.expression": "",
- "job.type":"streaming",
+ "job.type": "streaming",
"measure.id": "",
"job.name": "",
"cron.time.zone": "",
@@ -135,7 +135,7 @@ export class StreamingComponent implements OnInit {
let time = new Date().getTimezoneOffset() / 60;
let timezone = "GMT" + time + ":00";
this.newJob = {
- "job.type":"streaming",
+ "job.type": "streaming",
"job.name": this.jobname,
"measure.id": this.measureid,
"cron.expression": this.cronExp,
@@ -177,7 +177,7 @@ export class StreamingComponent implements OnInit {
},
err => {
let response = JSON.parse(err.error);
- if(response.code === '40004'){
+ if (response.code === '40004') {
this.toasterService.pop("error", "Error!", "Job name already exists!");
} else {
this.toasterService.pop("error", "Error!", "Error when creating job");
@@ -195,15 +195,15 @@ export class StreamingComponent implements OnInit {
var stepSelection = ".formStep";
$(stepSelection).css({
height:
- window.innerHeight -
- $(stepSelection).offset().top -
- $("#footerwrap").outerHeight()
+ window.innerHeight -
+ $(stepSelection).offset().top -
+ $("#footerwrap").outerHeight()
});
$("fieldset").height(
$(stepSelection).height() -
- $(stepSelection + ">.stepDesc").height() -
- $(".btn-container").height() -
- 200
+ $(stepSelection + ">.stepDesc").height() -
+ $(".btn-container").height() -
+ 200
);
$(".y-scrollable").css({
height: $("fieldset").height()
@@ -260,8 +260,8 @@ export class StreamingComponent implements OnInit {
var allModels = this.serviceService.config.uri.allModels + '?type=griffin';
this.http.get(allModels).subscribe(data => {
let originData = data;
- for(let i in originData){
- if(originData[i]["process.type"] === "STREAING"){
+ for (let i in originData) {
+ if (originData[i]["process.type"] === "STREAING") {
this.Measures.push(originData[i]);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/job-detail/job-detail.component.html
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/job-detail/job-detail.component.html b/ui/angular/src/app/job/job-detail/job-detail.component.html
index befa9ff..dfe1060 100644
--- a/ui/angular/src/app/job/job-detail/job-detail.component.html
+++ b/ui/angular/src/app/job/job-detail/job-detail.component.html
@@ -71,7 +71,7 @@ under the License.
{{cronTimeZone}}
</div>
</div>
- <div *ngIf="this.rangeConfig.length != 0">
+ <div *ngIf="this.rangeConfig.length != 0">
<div class="row" style="margin-left: 0px" *ngFor="let item of this.tableInfo;let i = index">
<div class="row">
<label class="col-xs-12">
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/job-detail/job-detail.component.spec.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/job-detail/job-detail.component.spec.ts b/ui/angular/src/app/job/job-detail/job-detail.component.spec.ts
index 5f2e168..f998979 100644
--- a/ui/angular/src/app/job/job-detail/job-detail.component.spec.ts
+++ b/ui/angular/src/app/job/job-detail/job-detail.component.spec.ts
@@ -1,6 +1,6 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import {async, ComponentFixture, TestBed} from '@angular/core/testing';
-import { JobDetailComponent } from './job-detail.component';
+import {JobDetailComponent} from './job-detail.component';
describe('JobDetailComponent', () => {
let component: JobDetailComponent;
@@ -8,9 +8,9 @@ describe('JobDetailComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ JobDetailComponent ]
+ declarations: [JobDetailComponent]
})
- .compileComponents();
+ .compileComponents();
}));
beforeEach(() => {
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/job-detail/job-detail.component.ts
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/job-detail/job-detail.component.ts b/ui/angular/src/app/job/job-detail/job-detail.component.ts
index e5c8a8d..7c4a10b 100644
--- a/ui/angular/src/app/job/job-detail/job-detail.component.ts
+++ b/ui/angular/src/app/job/job-detail/job-detail.component.ts
@@ -16,10 +16,10 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
*/
-import { Component, OnInit } from '@angular/core';
-import { ServiceService } from "../../service/service.service";
-import { HttpClient } from "@angular/common/http";
-import { Router, ActivatedRoute, ParamMap } from "@angular/router";
+import {Component, OnInit} from '@angular/core';
+import {ServiceService} from "../../service/service.service";
+import {HttpClient} from "@angular/common/http";
+import {Router, ActivatedRoute, ParamMap} from "@angular/router";
@Component({
selector: 'app-job-detail',
@@ -28,7 +28,7 @@ import { Router, ActivatedRoute, ParamMap } from "@angular/router";
styleUrls: ['./job-detail.component.css']
})
export class JobDetailComponent implements OnInit {
-
+
currentId: string;
jobData: any;
measureData: any;
@@ -40,11 +40,13 @@ export class JobDetailComponent implements OnInit {
processType: string;
rangeConfig = [];
tableInfo = [];
+
constructor(
- private route: ActivatedRoute,
- private router: Router,
- private http: HttpClient,
- public serviceService: ServiceService) { }
+ private route: ActivatedRoute,
+ private router: Router,
+ private http: HttpClient,
+ public serviceService: ServiceService) {
+ }
getMeasureById(measureId) {
let url = this.serviceService.config.uri.getModel + "/" + measureId;
@@ -54,7 +56,7 @@ export class JobDetailComponent implements OnInit {
this.measureName = this.measureData.name;
this.measureType = this.measureData["dq.type"].toLowerCase();
this.processType = this.measureData["process.type"].toLowerCase();
- for(let item of this.measureData["data.sources"]){
+ for (let item of this.measureData["data.sources"]) {
let config = item.connectors[0].config;
let tableName = config.database + "." + config["table.name"];
this.tableInfo.push(tableName);
@@ -67,7 +69,7 @@ export class JobDetailComponent implements OnInit {
}
ngOnInit() {
- this.currentId = this.route.snapshot.paramMap.get("id");
+ this.currentId = this.route.snapshot.paramMap.get("id");
var getJobById = this.serviceService.config.uri.getJobById + "?jobId=" + this.currentId;
this.http.get(getJobById).subscribe(
data => {
@@ -77,7 +79,7 @@ export class JobDetailComponent implements OnInit {
this.cronTimeZone = this.jobData["cron.time.zone"];
let mesureId = this.jobData["measure.id"];
this.getMeasureById(mesureId);
- for(let item of this.jobData["data.segments"]){
+ for (let item of this.jobData["data.segments"]) {
this.rangeConfig.push(item["segment.range"]);
}
},
http://git-wip-us.apache.org/repos/asf/incubator-griffin/blob/b306d872/ui/angular/src/app/job/job.component.css
----------------------------------------------------------------------
diff --git a/ui/angular/src/app/job/job.component.css b/ui/angular/src/app/job/job.component.css
index 03977d3..2d68922 100644
--- a/ui/angular/src/app/job/job.component.css
+++ b/ui/angular/src/app/job/job.component.css
@@ -17,15 +17,15 @@ specific language governing permissions and limitations
under the License.
*/
-.table-striped>tbody>tr:nth-of-type(even) {
+.table-striped > tbody > tr:nth-of-type(even) {
background-color: #1f1f1f;
}
-.table-striped>tbody>tr:nth-of-type(odd) {
+.table-striped > tbody > tr:nth-of-type(odd) {
background-color: #080808;
}
-.reco>tbody:nth-of-type(odd)>tr {
+.reco > tbody:nth-of-type(odd) > tr {
background-color: #1f1f1f;
}
@@ -33,7 +33,7 @@ under the License.
border-collapse: separate;
}
-.table>tbody+tbody {
+.table > tbody + tbody {
border-top: 1px solid transparent;
}