From 14c34b43dbbf61c835e73e543dba786d0151947a Mon Sep 17 00:00:00 2001 From: Swagata Prateek Date: Fri, 24 Jun 2016 00:27:03 +0600 Subject: [PATCH] #77 Started adding a job-summary component, #82 Removed some unnecessary imports from app.component.ts --- app/app.component.ts | 7 +-- app/dashboard/dashboard.component.html | 10 ++-- app/dashboard/dashboard.component.ts | 3 +- app/job/job-history/job-history.component.ts | 6 +-- app/job/job-summary/job-summary.component.css | 3 ++ .../job-summary/job-summary.component.html | 47 +++++++++++++++++++ app/job/job-summary/job-summary.component.ts | 25 ++++++++++ 7 files changed, 87 insertions(+), 14 deletions(-) create mode 100644 app/job/job-summary/job-summary.component.css create mode 100644 app/job/job-summary/job-summary.component.html create mode 100644 app/job/job-summary/job-summary.component.ts diff --git a/app/app.component.ts b/app/app.component.ts index 1ba6d98..d666198 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -1,12 +1,9 @@ -import { Component, ViewChild } from '@angular/core'; +import { Component } from '@angular/core'; import { Title } from '@angular/platform-browser'; import { RouteConfig, ROUTER_DIRECTIVES } from '@angular/router-deprecated'; import { AppSettings } from './shared/app.settings'; -import { WrapHeaderComponent } from './wrapHeader/WrapHeader.component'; import { NavbarComponent } from './navbar/navbar.component'; -import { ConfirmEmailComponent } from './account/confirm-email/confirm-email.component'; -import { OrderComponent } from './order/order.component'; import { LoginService } from './account/login/login.service' import { Routes } from './shared/router.config'; import { SecureRouterOutlet } from './shared/secure-router-outlet.directive'; @@ -14,7 +11,7 @@ import { SecureRouterOutlet } from './shared/secure-router-outlet.directive'; @Component({ selector: 'webcat', templateUrl: 'app/app.component.html', - directives: [ROUTER_DIRECTIVES, NavbarComponent, WrapHeaderComponent, SecureRouterOutlet, OrderComponent], + directives: [ROUTER_DIRECTIVES, NavbarComponent, SecureRouterOutlet], providers: [Title, LoginService] }) diff --git a/app/dashboard/dashboard.component.html b/app/dashboard/dashboard.component.html index 8745ab7..13f8e9d 100644 --- a/app/dashboard/dashboard.component.html +++ b/app/dashboard/dashboard.component.html @@ -43,13 +43,15 @@
-
-
- +
+
+
+
+ +
-
diff --git a/app/dashboard/dashboard.component.ts b/app/dashboard/dashboard.component.ts index 5e275d7..f27d384 100644 --- a/app/dashboard/dashboard.component.ts +++ b/app/dashboard/dashboard.component.ts @@ -1,11 +1,12 @@ import { Component, OnInit } from '@angular/core'; import { Router, ROUTER_DIRECTIVES } from '@angular/router-deprecated'; import { JobHistoryComponent } from '../job/job-history/job-history.component'; +import { JobSummaryComponent } from '../job/job-summary/job-summary.component'; @Component({ selector: 'dashboard', templateUrl: 'app/dashboard/dashboard.component.html', - directives: [ROUTER_DIRECTIVES, JobHistoryComponent] + directives: [ROUTER_DIRECTIVES, JobHistoryComponent, JobSummaryComponent] }) export class DashboardComponent implements OnInit { isSideBarOpen: boolean = true; diff --git a/app/job/job-history/job-history.component.ts b/app/job/job-history/job-history.component.ts index 9bb2b7d..dd7e078 100644 --- a/app/job/job-history/job-history.component.ts +++ b/app/job/job-history/job-history.component.ts @@ -1,10 +1,8 @@ import {Component, OnInit, Input} from '@angular/core'; import {Observable} from 'rxjs/Observable'; -import {HTTP_PROVIDERS } from '@angular/http'; import {JobService} from '../shared/job.service'; -import {PageEnvelope, Pagination} from '../../shared/pagination'; -import {Job, JobState} from '../shared/job'; +import {Job} from '../shared/job'; import {ComponentServiceStatus} from '../../shared/component-service-status'; @@ -19,7 +17,7 @@ export type ComponentMode = "WIDGET" | "FULL"; selector: 'job-history', templateUrl: 'app/job/job-history/job-history.component.html', directives: [ProgressBubbleComponent, WidgetHeaderComponent, WidgetBodyComponent], - providers: [JobService, HTTP_PROVIDERS] + providers: [JobService] }) export class JobHistoryComponent implements OnInit { @Input() diff --git a/app/job/job-summary/job-summary.component.css b/app/job/job-summary/job-summary.component.css new file mode 100644 index 0000000..b10ba18 --- /dev/null +++ b/app/job/job-summary/job-summary.component.css @@ -0,0 +1,3 @@ +.widget-icon { + margin-bottom: 5px; +} \ No newline at end of file diff --git a/app/job/job-summary/job-summary.component.html b/app/job/job-summary/job-summary.component.html new file mode 100644 index 0000000..657fbd3 --- /dev/null +++ b/app/job/job-summary/job-summary.component.html @@ -0,0 +1,47 @@ +
+ + + +
+ +
+
+
+
+
+ +
+
16
+
Completed
+
+
+
+
+
+ +
+
16
+
In Progress
+
+
+
+
+
+ +
+
16
+
Pending
+
+
+
+
+
+ +
+
16
+
Cancelled
+
+
+
+
+
\ No newline at end of file diff --git a/app/job/job-summary/job-summary.component.ts b/app/job/job-summary/job-summary.component.ts new file mode 100644 index 0000000..5a00c5d --- /dev/null +++ b/app/job/job-summary/job-summary.component.ts @@ -0,0 +1,25 @@ +import { Component, OnInit } from '@angular/core'; + +import {ProgressBubbleComponent} from '../../common/progress-bubble/progress-bubble.component'; +import {WidgetHeaderComponent} from '../../common/widget-header/widget-header.component'; +import {WidgetBodyComponent} from '../../common/widget-body/widget-body.component'; + +import {JobService} from '../shared/job.service'; +import {Job} from '../shared/job'; + +@Component({ + selector: 'job-summary', + templateUrl: 'app/job/job-summary/job-summary.component.html', + directives: [ProgressBubbleComponent, WidgetBodyComponent, WidgetHeaderComponent], + styleUrls: ['app/job/job-summary/job-summary.component.css'] +}) +export class JobSummaryComponent implements OnInit { + completedJobCount: number; + inprogressJobCount: number; + pendingJobCount: number; + cancelledJobCount: number; + + constructor() { } + + ngOnInit() { } +} \ No newline at end of file