Skip to content

Commit da49d8e

Browse files
author
Florian Lappe
authored
Merge pull request #25 from cloudiator/development
Development
2 parents 22dc171 + ac525a7 commit da49d8e

41 files changed

Lines changed: 686 additions & 536 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,44 @@
1515
},
1616
"private": true,
1717
"dependencies": {
18-
"@angular/animations": "^7.2.12",
19-
"@angular/cdk": "^7.3.6",
20-
"@angular/common": "^7.2.12",
21-
"@angular/compiler": "^7.2.12",
22-
"@angular/core": "^7.2.12",
23-
"@angular/flex-layout": "^7.0.0-beta.24",
24-
"@angular/forms": "^7.2.12",
25-
"@angular/http": "^7.2.12",
26-
"@angular/platform-browser": "^7.2.12",
27-
"@angular/platform-browser-dynamic": "^7.2.12",
28-
"@angular/pwa": "^0.12.4",
29-
"@angular/router": "^7.2.12",
30-
"@angular/service-worker": "^7.2.6",
31-
"@ngrx/store": "^7.2.0",
18+
"@angular/animations": "^8.1.1",
19+
"@angular/cdk": "^8.0.2",
20+
"@angular/common": "^8.1.1",
21+
"@angular/compiler": "^8.1.1",
22+
"@angular/core": "^8.1.1",
23+
"@angular/flex-layout": "^8.0.0-beta.26",
24+
"@angular/forms": "^8.1.1",
25+
"@angular/http": "*",
26+
"@angular/platform-browser": "^8.1.1",
27+
"@angular/platform-browser-dynamic": "^8.1.1",
28+
"@angular/pwa": "^0.801.1",
29+
"@angular/router": "^8.1.1",
30+
"@angular/service-worker": "^8.1.1",
31+
"@ngrx/store": "^8.1.0",
3232
"brace": "^0.11.1",
3333
"bulma-badge": "^2.0.0",
34-
"bulma-checkradio": "^2.1.0",
34+
"bulma-checkradio": "^2.1.1",
3535
"bulma-divider": "^2.0.1",
3636
"cloudiator-rest-api": "1.4.0",
3737
"core-js": "^2.6.5",
38-
"cytoscape": "^3.5.2",
38+
"cytoscape": "^3.8.1",
3939
"file-saver": "^2.0.1",
4040
"hammerjs": "^2.0.8",
41-
"lodash": "^4.17.11",
4241
"node-sass": "^4.12.0",
4342
"rxjs": "^6.4.0",
4443
"sass-loader": "^7.1.0",
45-
"webpack": "^4.29.6",
44+
"webpack": "^4.35.3",
4645
"zone.js": "^0.8.29"
4746
},
4847
"devDependencies": {
49-
"@angular-devkit/build-angular": "^0.13.3",
50-
"@angular/cli": "^7.3.8",
51-
"@angular/compiler-cli": "^7.2.12",
52-
"@angular/language-service": "^7.2.12",
53-
"@compodoc/compodoc": "^1.1.8",
48+
"@angular-devkit/build-angular": "^0.801.1",
49+
"@angular/cli": "^8.1.1",
50+
"@angular/compiler-cli": "^8.1.1",
51+
"@angular/language-service": "^8.1.1",
52+
"@compodoc/compodoc": "^1.1.10",
5453
"@types/jasmine": "^2.8.16",
5554
"@types/jasminewd2": "^2.0.6",
56-
"@types/lodash": "^4.14.121",
57-
"@types/node": "^10.14.4",
55+
"@types/node": "^10.14.12",
5856
"bulma": "^0.7.4",
5957
"codelyzer": "^4.5.0",
6058
"hoek": "^6.1.2",
@@ -69,7 +67,7 @@
6967
"karma-teamcity-reporter": "^1.1.0",
7068
"protractor": "^5.4.2",
7169
"ts-node": "^7.0.1",
72-
"tslint": "^5.15.0",
73-
"typescript": "^3.1.6"
70+
"tslint": "^5.18.0",
71+
"typescript": "<3.5.0"
7472
}
7573
}

src/app/app-routing.module.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import {NgModule} from '@angular/core';
33
import {CloudOverviewComponent} from './components/clouds/cloud-overview/cloud-overview.component';
44
import {NewCloudComponent} from './components/clouds/new-cloud/new-cloud.component';
55
import {CloudViewComponent} from './components/clouds/cloud-view/cloud-view.component';
6-
import {HardwareOverviewComponent} from './components/hardware/hardware-overview/hardware-overview.component';
7-
import {ImagesOverviewComponent} from './components/images/images-overview/images-overview.component';
8-
import {LocationsOverviewComponent} from './components/locations/locations-overview/locations-overview.component';
6+
import {HardwareOverviewComponent} from './components/overview-tables/hardware-overview/hardware-overview.component';
7+
import {ImagesOverviewComponent} from './components/overview-tables/images-overview/images-overview.component';
8+
import {LocationsOverviewComponent} from './components/overview-tables/locations-overview/locations-overview.component';
99
import {YamlEditorComponent} from './components/editor/yaml-editor/yaml-editor.component';
1010
import {LoginComponent} from './components/login/login.component';
1111
import {AuthGuard} from './guards/auth.guard';
@@ -29,7 +29,6 @@ const routes: Routes = [
2929
{path: 'editor', component: YamlEditorComponent, canActivate: [AuthGuard]},
3030

3131
{path: 'schedules', component: SchedulesOverviewComponent},
32-
{path: 'schedules/:id', component: SchedulesOverviewComponent},
3332

3433
{path: 'clouds', component: CloudOverviewComponent, canActivate: [AuthGuard]},
3534
{path: '', component: CloudOverviewComponent, canActivate: [AuthGuard]},

src/app/app.module.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import {NewCloudComponent} from './components/clouds/new-cloud/new-cloud.compone
1111
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
1212
import {CloudViewComponent} from './components/clouds/cloud-view/cloud-view.component';
1313
import {CloudCardComponent} from './components/clouds/cloud-card/cloud-card.component';
14-
import {HardwareOverviewComponent} from './components/hardware/hardware-overview/hardware-overview.component';
14+
import {HardwareOverviewComponent} from './components/overview-tables/hardware-overview/hardware-overview.component';
1515
import {CdkTableModule} from '@angular/cdk/table';
16-
import {ImagesOverviewComponent} from './components/images/images-overview/images-overview.component';
17-
import {LocationsOverviewComponent} from './components/locations/locations-overview/locations-overview.component';
16+
import {ImagesOverviewComponent} from './components/overview-tables/images-overview/images-overview.component';
17+
import {LocationsOverviewComponent} from './components/overview-tables/locations-overview/locations-overview.component';
1818
import {YamlEditorComponent} from './components/editor/yaml-editor/yaml-editor.component';
1919
import {YamlGraphComponent} from './components/editor/yaml-graph/yaml-graph.component';
2020
import {AppDialogModule} from './app-dialog/app-dialog.module';
@@ -31,6 +31,8 @@ import { ServiceWorkerModule } from '@angular/service-worker';
3131
import { SchedulesBottomSheetComponent } from './components/schedules/schedules-bottom-sheet/schedules-bottom-sheet.component';
3232
import {environment} from '../environments/environment';
3333
import {FlexLayoutModule} from '@angular/flex-layout';
34+
import {ScrollingModule} from '@angular/cdk/scrolling';
35+
import { OverviewTableComponent } from './components/overview-tables/overview-table.component';
3436

3537
/**
3638
* Default configuration required by the swagger API Module.
@@ -77,6 +79,7 @@ export class BottomSheetHammerConfig extends HammerGestureConfig {
7779
SchedulesOverviewComponent,
7880
SchedulesViewComponent,
7981
SchedulesBottomSheetComponent,
82+
OverviewTableComponent,
8083
],
8184
imports: [
8285
BrowserModule,
@@ -90,7 +93,8 @@ export class BottomSheetHammerConfig extends HammerGestureConfig {
9093
CdkTableModule,
9194
AppDialogModule,
9295
FlexLayoutModule,
93-
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })
96+
ServiceWorkerModule.register('ngsw-worker.js', {enabled: environment.production}),
97+
ScrollingModule
9498
],
9599
providers: [
96100
{

src/app/components/app/app.component.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import {NewCloudComponent} from '../clouds/new-cloud/new-cloud.component';
66
import {CloudOverviewComponent} from '../clouds/cloud-overview/cloud-overview.component';
77
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
88
import {CloudCardComponent} from '../clouds/cloud-card/cloud-card.component';
9-
import {HardwareOverviewComponent} from '../hardware/hardware-overview/hardware-overview.component';
9+
import {HardwareOverviewComponent} from '../overview-tables/hardware-overview/hardware-overview.component';
1010
import {CdkTableModule} from '@angular/cdk/table';
11-
import {ImagesOverviewComponent} from '../images/images-overview/images-overview.component';
12-
import {LocationsOverviewComponent} from '../locations/locations-overview/locations-overview.component';
11+
import {ImagesOverviewComponent} from '../overview-tables/images-overview/images-overview.component';
12+
import {LocationsOverviewComponent} from '../overview-tables/locations-overview/locations-overview.component';
1313
import {YamlEditorComponent} from '../editor/yaml-editor/yaml-editor.component';
1414
import {YamlGraphComponent} from '../editor/yaml-graph/yaml-graph.component';
1515
import {RootStoreModule} from '../../root-store';
@@ -25,6 +25,7 @@ import {HttpClientTestingModule} from '@angular/common/http/testing';
2525
import {AuthService} from '../../services/auth.service';
2626
import {of} from 'rxjs';
2727
import * as testData from 'testing/test-data';
28+
import {ScrollingModule} from '@angular/cdk/scrolling';
2829

2930
describe('AppComponent', () => {
3031
beforeEach(async(() => {
@@ -55,7 +56,8 @@ describe('AppComponent', () => {
5556
CdkTableModule,
5657
ApiModule.forRoot(testData.testApiFactory),
5758
HttpClientTestingModule,
58-
AppDialogModule
59+
AppDialogModule,
60+
ScrollingModule
5961
],
6062
providers: []
6163
}).compileComponents();
Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
11
<div style="height: 100%;">
2-
<div class="hero">
3-
<div class="hero-body">
4-
<div class="container">
5-
<h1 class="title">Clouds</h1>
2+
<div class="hero">
3+
<div class="hero-body">
4+
<div class="container">
5+
<h1 class="title">Clouds</h1>
6+
</div>
67
</div>
78
</div>
8-
</div>
99

10-
<section class="section">
11-
<div class="is-flowing is-gaping">
10+
<section class="section">
11+
<div class="is-flowing is-gaping">
1212

13-
<app-cloud-card *ngFor="let cloud of clouds" [cloud]="cloud"></app-cloud-card>
13+
<ng-container *ngIf="!(cloudIsLoading$ | async); else cloudLoader">
14+
<app-cloud-card *ngFor="let cloud of clouds" [cloud]="cloud"></app-cloud-card>
15+
</ng-container>
16+
<ng-template #cloudLoader>
17+
<div class="card button is-secondary is-hoverable"
18+
style="min-width: 15em; min-height: 5em; padding: 0 0; display: flex; flex-direction: column; ">
19+
<div class="text-loading-animation" style="border-radius: 3rem; width: 11em; margin-bottom: 0.5em">&#8205;</div>
20+
<div class="text-loading-animation" style="border-radius: 3rem; width: 10em; height: 1em">&#8205;</div>
21+
</div>
22+
</ng-template>
1423

15-
<!-- Add new cloud button -->
16-
<a class="card button has-background-grey-lighter is-hoverable" routerLink="/new-cloud" routerLinkActive="active"
17-
style="min-width: 15em; min-height: 5em">
24+
<!-- Add new cloud button -->
25+
<a class="card button has-background-grey-lighter is-hoverable" routerLink="/new-cloud" routerLinkActive="active"
26+
style="min-width: 15em; min-height: 5em">
1827
<span class="icon is-large" style="width: 100%; height: 100%;">
1928
<i class="fas fa-plus fa-3x"></i>
2029
</span>
21-
</a>
22-
</div>
23-
</section>
30+
</a>
31+
</div>
32+
</section>
2433
</div>

src/app/components/clouds/cloud-overview/cloud-overview.component.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ describe('CloudOverviewComponent', () => {
1212
let fixture: ComponentFixture<CloudOverviewComponent>;
1313

1414
const mockCloudDataService = jasmine.createSpyObj('CloudDataService', {
15-
'findClouds': of([])
15+
'findClouds': of([]),
16+
'cloudIsLoading': of(false)
1617
});
1718

1819
beforeEach(async(() => {

src/app/components/clouds/cloud-overview/cloud-overview.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import {Component, OnDestroy, OnInit} from '@angular/core';
22
import {CloudDataService} from '../../../services/cloud-data.service';
33
import {Cloud} from 'cloudiator-rest-api';
4-
import {Subscription} from 'rxjs';
4+
import {Observable, Subscription} from 'rxjs';
5+
import {map, tap} from 'rxjs/operators';
56

67
/**
78
* Overview of all clouds given as a set of horizontally flowing cards.
@@ -19,6 +20,8 @@ export class CloudOverviewComponent implements OnInit, OnDestroy {
1920
*/
2021
public clouds: Cloud[] = [];
2122

23+
public cloudIsLoading$: Observable<boolean> = this.cloudDataService.cloudIsLoading();
24+
2225
/**
2326
* All Subscriptions of this Component.
2427
* @type {any[]}

src/app/components/hardware/hardware-overview/hardware-overview.component.html

Lines changed: 0 additions & 73 deletions
This file was deleted.

src/app/components/hardware/hardware-overview/hardware-overview.component.scss

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/app/components/images/images-overview/images-overview.component.html

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)