Skip to content

Commit

Permalink
Merge pull request #75 from sdtabilit/feature/SLTS-59-new-watch-list
Browse files Browse the repository at this point in the history
Feature/slts 59 new watch list
  • Loading branch information
grzesiekb authored Nov 25, 2016
2 parents d563644 + feead5c commit 7f07b00
Show file tree
Hide file tree
Showing 19 changed files with 223 additions and 26 deletions.
6 changes: 5 additions & 1 deletion ScadaLTS-UI/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ import { routing } from './app.routing';
import { AppBodyComponent } from './appBody/index';
import { LoginComponent } from './login/index';
import { RegistrationComponent } from './registration/index';
import { WatchlistComponent } from './appBody/watchlist/index';
import { DashboardComponent } from './appBody/dashboard/index';

@NgModule({
declarations: [
AppComponent,
AppBodyComponent,
LoginComponent,
RegistrationComponent
RegistrationComponent,
WatchlistComponent,
DashboardComponent
],
imports: [
BrowserModule,
Expand Down
9 changes: 8 additions & 1 deletion ScadaLTS-UI/src/app/app.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ import { Routes, RouterModule } from '@angular/router';
import { AppBodyComponent } from './appBody/index';
import { LoginComponent } from './login/index';
import { RegistrationComponent } from './registration/index';
import { WatchlistComponent } from './appBody/watchlist/index';
import { DashboardComponent } from './appBody/dashboard/index';

const appRoutes: Routes = [
{ path: '', component: LoginComponent },
{ path: 'appBody', component: AppBodyComponent },
{ path: 'registration', component: RegistrationComponent },
{ path: 'appBody', component: AppBodyComponent,
children: [
{ path: 'watchlist', component: WatchlistComponent },
{ path: 'dashboard', component: DashboardComponent },
{ path: '', component: DashboardComponent }
]},

// otherwise redirect to home
{ path: '**', redirectTo: '' }
Expand Down
21 changes: 16 additions & 5 deletions ScadaLTS-UI/src/app/appBody/appBody.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@
transition: all 0.5s ease;
}

.bordersOfMenuSide {
/*border-top: solid 1px #404a4e;*/
}

.menuItemText {
margin: 0px 0px 0px 30px;
display: block;
Expand Down Expand Up @@ -140,7 +136,7 @@ a {

.mainContentInside {
width: 100%;
height: auto;
height: 100%;
}

.header {
Expand Down Expand Up @@ -179,3 +175,18 @@ a {
.activeMenuItem {
background-color: #e6e6e6;
}

/*.background {*/
/*background-color: #0d3349;*/
/*height: 100%;*/
/*width: 100%;*/
/*left: 0;*/
/*top: 0;*/
/*overflow: hidden;*/
/*position: fixed;*/
/*z-index: -1;*/
/*}*/

.content {
padding: 40px;
}
31 changes: 24 additions & 7 deletions ScadaLTS-UI/src/app/appBody/appBody.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@
<img class="logo" src="../app/media/ScadaLogo.png">
</span>

<span class="menuItem bordersOfMenuSide" (click)="hideElements();isHiddenSubMenu[0] = !isHiddenSubMenu[0]" [ngClass]="{ 'activeMenuItem':isHiddenSubMenu[0] }">
<span class="menuItem" (click)="hideElements();isHiddenSubMenu[0] = !isHiddenSubMenu[0]"
[ngClass]="{ 'activeMenuItem':isHiddenSubMenu[0] }">
<md-icon class="icon">visibility</md-icon>
<span class="menuItemText">Dashboard</span>
</span>
<div class="subMenuItemContainer subMenuHide" [ngClass]="{ 'subMenuShow':isHiddenSubMenu[0] }">
<a class="subMenuLink" href="#">Main dashboard</a>
<a class="subMenuLink" href="#">Watch list</a>
<a class="subMenuLink" [routerLink]="['./']">Main dashboard</a>
<a class="subMenuLink" [routerLink]="['./watchlist']">Watch list</a>
<a class="subMenuLink" href="#">Views</a>
<a class="subMenuLink" href="#">Alarms</a>
<a class="subMenuLink" href="#">Raports</a>
</div>

<span class="menuItem bordersOfMenuSide" (click)="hideElements();isHiddenSubMenu[1] = !isHiddenSubMenu[1]" [ngClass]="{ 'activeMenuItem':isHiddenSubMenu[1] }">
<span class="menuItem" (click)="hideElements();isHiddenSubMenu[1] = !isHiddenSubMenu[1]"
[ngClass]="{ 'activeMenuItem':isHiddenSubMenu[1] }">
<md-icon class="icon">subject</md-icon>
<span class="menuItemText">Project</span>
</span>
Expand All @@ -30,7 +32,8 @@
<a class="subMenuLink" href="#">Point links</a>
</div>

<span class="menuItem bordersOfMenuSide" (click)="hideElements();isHiddenSubMenu[2] = !isHiddenSubMenu[2]" [ngClass]="{ 'activeMenuItem':isHiddenSubMenu[2] }">
<span class="menuItem" (click)="hideElements();isHiddenSubMenu[2] = !isHiddenSubMenu[2]"
[ngClass]="{ 'activeMenuItem':isHiddenSubMenu[2] }">
<md-icon class="icon">settings</md-icon>
<span class="menuItemText">Settings</span>
</span>
Expand All @@ -44,7 +47,8 @@
<a class="subMenuLink" href="#">Log</a>
</div>

<span class="menuItem bordersOfMenuSide" (click)="hideElements();isHiddenSubMenu[3] = !isHiddenSubMenu[3]" [ngClass]="{ 'activeMenuItem':isHiddenSubMenu[3] }">
<span class="menuItem" (click)="hideElements();isHiddenSubMenu[3] = !isHiddenSubMenu[3]"
[ngClass]="{ 'activeMenuItem':isHiddenSubMenu[3] }">
<md-icon class="icon">trending_up</md-icon>
<span class="menuItemText">Trends</span>
</span>
Expand All @@ -58,7 +62,8 @@
<a class="subMenuLink" href="#">Lorem ipsum</a>
</div>

<span class="menuItem bordersOfMenuSide" (click)="hideElements();isHiddenSubMenu[4] = !isHiddenSubMenu[4]" [ngClass]="{ 'activeMenuItem':isHiddenSubMenu[4] }">
<span class="menuItem" (click)="hideElements();isHiddenSubMenu[4] = !isHiddenSubMenu[4]"
[ngClass]="{ 'activeMenuItem':isHiddenSubMenu[4] }">
<md-icon class="icon">search</md-icon>
<span class="menuItemText">Search</span>
</span>
Expand All @@ -67,6 +72,11 @@
<a class="subMenuLink" href="#">Edit something</a>
</div>

<span class="menuItem">
<md-icon class="icon">info_outline</md-icon>
<span class="menuItemText">About us</span>
</span>

</div>
</div>

Expand All @@ -79,7 +89,14 @@
<md-icon class="icon-message">mail_outline</md-icon>
</div>

<div class="content">
<div class="contentInside">
<router-outlet></router-outlet>
</div>
</div>

</div>

</div>


Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DASHBOARD

33 changes: 33 additions & 0 deletions ScadaLTS-UI/src/app/appBody/dashboard/dashboard.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// /* tslint:disable:no-unused-variable */
//
// import { TestBed, async } from '@angular/core/testing';
// import { AppComponent } from './app.component';
//
// describe('AppComponent', () => {
// beforeEach(() => {
// TestBed.configureTestingModule({
// declarations: [
// AppComponent
// ],
// });
// });
//
// it('should create the app', async(() => {
// let fixture = TestBed.createComponent(AppComponent);
// let app = fixture.debugElement.componentInstance;
// expect(app).toBeTruthy();
// }));
//
// it(`should have as title 'app works!'`, async(() => {
// let fixture = TestBed.createComponent(AppComponent);
// let app = fixture.debugElement.componentInstance;
// expect(app.title).toEqual('app works!');
// }));
//
// it('should render title in a h1 tag', async(() => {
// let fixture = TestBed.createComponent(AppComponent);
// fixture.detectChanges();
// let compiled = fixture.debugElement.nativeElement;
// expect(compiled.querySelector('h1').textContent).toContain('app works!');
// }));
// });
10 changes: 10 additions & 0 deletions ScadaLTS-UI/src/app/appBody/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent {

}
22 changes: 22 additions & 0 deletions ScadaLTS-UI/src/app/appBody/dashboard/dashboard.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { MaterialModule } from '@angular/material';
import { DashboardComponent } from './dashboard.component';

@NgModule({
declarations: [
DashboardComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
MaterialModule.forRoot()
],
providers: [],
bootstrap: [DashboardComponent]
})
export class AppModule { }

2 changes: 2 additions & 0 deletions ScadaLTS-UI/src/app/appBody/dashboard/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './dashboard.component';
export * from './dashboard.module';
2 changes: 2 additions & 0 deletions ScadaLTS-UI/src/app/appBody/watchlist/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './watchlist.component';
export * from './watchlist.module';
5 changes: 5 additions & 0 deletions ScadaLTS-UI/src/app/appBody/watchlist/watchlist.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
input {
border: 1px solid #333;
width: 98%;
height: 50px;
}
15 changes: 15 additions & 0 deletions ScadaLTS-UI/src/app/appBody/watchlist/watchlist.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="search">

<div class="searchInput">
<input type="text" placeholder="search"/>
</div>

<div class="listItem">
<ul class="listGroup" *ngIf="items.length">
<li class="listGroupItem" *ngFor="let item of items"></li>
</ul>
</div>

</div>


33 changes: 33 additions & 0 deletions ScadaLTS-UI/src/app/appBody/watchlist/watchlist.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// /* tslint:disable:no-unused-variable */
//
// import { TestBed, async } from '@angular/core/testing';
// import { AppComponent } from './app.component';
//
// describe('AppComponent', () => {
// beforeEach(() => {
// TestBed.configureTestingModule({
// declarations: [
// AppComponent
// ],
// });
// });
//
// it('should create the app', async(() => {
// let fixture = TestBed.createComponent(AppComponent);
// let app = fixture.debugElement.componentInstance;
// expect(app).toBeTruthy();
// }));
//
// it(`should have as title 'app works!'`, async(() => {
// let fixture = TestBed.createComponent(AppComponent);
// let app = fixture.debugElement.componentInstance;
// expect(app.title).toEqual('app works!');
// }));
//
// it('should render title in a h1 tag', async(() => {
// let fixture = TestBed.createComponent(AppComponent);
// fixture.detectChanges();
// let compiled = fixture.debugElement.nativeElement;
// expect(compiled.querySelector('h1').textContent).toContain('app works!');
// }));
// });
10 changes: 10 additions & 0 deletions ScadaLTS-UI/src/app/appBody/watchlist/watchlist.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'watchlist',
templateUrl: './watchlist.component.html',
styleUrls: ['./watchlist.component.css']
})
export class WatchlistComponent {

}
22 changes: 22 additions & 0 deletions ScadaLTS-UI/src/app/appBody/watchlist/watchlist.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { MaterialModule } from '@angular/material';
import { WatchlistComponent } from './watchlist.component';

@NgModule({
declarations: [
WatchlistComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
MaterialModule.forRoot()
],
providers: [],
bootstrap: [WatchlistComponent]
})
export class AppModule { }

12 changes: 7 additions & 5 deletions ScadaLTS-UI/src/app/login/login.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@

.container {
height: 500px;
width: 500px;
width: 450px;
border-radius: 5px;
-webkit-transition: background .5s ease;
-moz-transition: background .5s ease;
-o-transition: background .5s ease;
transition: background .5s ease;
background-color: #fafafa;
border: 1px solid #ebebeb;
box-shadow: rgba(0, 0, 0, 0.14902) 0 1px 1px 0, rgba(0, 0, 0, 0.09804) 0 1px 2px 0;
box-shadow: rgba(0, 0, 0, 0.24902) 16px 16px 32px 0, rgba(0, 0, 0, 0.19804) 16px 16px 32px 0;
position: relative;
}

.content {

}

.scadaLogo {
Expand All @@ -35,6 +36,7 @@
box-sizing: border-box;
position: relative;
padding-left: 32px;
border-radius: 3px;
}

.scadaLogo img {
Expand Down Expand Up @@ -88,17 +90,17 @@ input:focus {
}

button {
padding: 12px 24px;
/*padding: 12px 24px;*/
margin: .3em 0 1em 0;
height: 45px;
width: 100%;
vertical-align: middle;
color: #fff;
font-size: 16px;
line-height: 20px;
/*line-height: 20px;*/
-webkit-font-smoothing: antialiased;
text-align: center;
letter-spacing: 1px;
/*letter-spacing: 1px;*/
background-color: #666;
cursor: pointer;
transition: all 0.15s ease;
Expand Down
Loading

0 comments on commit 7f07b00

Please sign in to comment.