Skip to content

Commit

Permalink
Merge pull request #37 from cloudiator/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Florian Lappe authored Nov 13, 2019
2 parents da49d8e + 439c3ae commit a1219b1
Show file tree
Hide file tree
Showing 94 changed files with 15,228 additions and 409 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# IDE - VSCode
.vscode/*
!.vscode/settings.json
.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
Expand All @@ -43,4 +43,3 @@ Thumbs.db
# documentation
/documentation

package-lock.json
13,222 changes: 13,222 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"start": "ng serve",
"build": "ng build",
"test": "ng test --browsers=Chrome --source-map=false",
"travis-test": "ng test --watch=false --environment=prod --browsers=ChromeHeadlessNoSandbox --reporters=progress,kjhtml",
"travis-test": "ng test --watch=false --environment=prod --browsers=ChromeHeadlessNoSandbox --reporters=progress,kjhtml --source-map=false",
"lint": "ng lint",
"e2e": "ng e2e",
"compodoc": "npx compodoc",
Expand All @@ -22,7 +22,7 @@
"@angular/core": "^8.1.1",
"@angular/flex-layout": "^8.0.0-beta.26",
"@angular/forms": "^8.1.1",
"@angular/http": "*",
"@angular/http": "7.2.15",
"@angular/platform-browser": "^8.1.1",
"@angular/platform-browser-dynamic": "^8.1.1",
"@angular/pwa": "^0.801.1",
Expand All @@ -33,15 +33,19 @@
"bulma-badge": "^2.0.0",
"bulma-checkradio": "^2.1.1",
"bulma-divider": "^2.0.1",
"cloudiator-rest-api": "1.4.0",
"cloudiator-rest-api": "1.5.0",
"core-js": "^2.6.5",
"cytoscape": "^3.8.1",
"file-saver": "^2.0.1",
"hammerjs": "^2.0.8",
"lodash": "^4.17.15",
"node-sass": "^4.12.0",
"rxjs": "^6.4.0",
"sass-loader": "^7.1.0",
"webpack": "^4.35.3",
"xterm": "^4.1.0",
"xterm-addon-attach": "^0.3.0",
"xterm-addon-fit": "^0.2.1",
"zone.js": "^0.8.29"
},
"devDependencies": {
Expand All @@ -50,8 +54,10 @@
"@angular/compiler-cli": "^8.1.1",
"@angular/language-service": "^8.1.1",
"@compodoc/compodoc": "^1.1.10",
"@types/cytoscape": "^3.8.1",
"@types/jasmine": "^2.8.16",
"@types/jasminewd2": "^2.0.6",
"@types/lodash": "^4.14.138",
"@types/node": "^10.14.12",
"bulma": "^0.7.4",
"codelyzer": "^4.5.0",
Expand All @@ -68,6 +74,6 @@
"protractor": "^5.4.2",
"ts-node": "^7.0.1",
"tslint": "^5.18.0",
"typescript": "<3.5.0"
"typescript": " >=3.4.0 <3.6.0"
}
}
21 changes: 16 additions & 5 deletions src/app/app-dialog/app-dialog.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import {NgModule} from '@angular/core';
import {OverlayModule} from '@angular/cdk/overlay';
import {ToastComponent} from './dialogs/toast/toast.component';
import {
ToastComponent,
ConfirmNewCloudDialogComponent,
DeleteCloudDialogComponent,
DeleteScheduleDialogComponent,
ScheduleDiagnosticDialogComponent
} from './dialogs';
import {DialogService} from './services/dialog.service';
import {ToastService} from './services/toast.service';
import {ConfirmNewCloudDialogComponent} from './dialogs/confirm-new-cloud-dialog/confirm-new-cloud-dialog.component';
import {DeleteCloudDialogComponent} from './dialogs/delete-cloud-dialog/delete-cloud-dialog.component';
import { SshConsoleDialogComponent } from './dialogs/ssh-console-dialog/ssh-console-dialog.component';

/**
* Main Module handling App DIalogs and Toasts.
Expand All @@ -13,7 +18,10 @@ import {DeleteCloudDialogComponent} from './dialogs/delete-cloud-dialog/delete-c
declarations: [
ToastComponent,
ConfirmNewCloudDialogComponent,
DeleteCloudDialogComponent
DeleteCloudDialogComponent,
DeleteScheduleDialogComponent,
ScheduleDiagnosticDialogComponent,
SshConsoleDialogComponent
],
imports: [
OverlayModule
Expand All @@ -25,7 +33,10 @@ import {DeleteCloudDialogComponent} from './dialogs/delete-cloud-dialog/delete-c
entryComponents: [
ToastComponent,
ConfirmNewCloudDialogComponent,
DeleteCloudDialogComponent
DeleteCloudDialogComponent,
DeleteScheduleDialogComponent,
ScheduleDiagnosticDialogComponent,
SshConsoleDialogComponent
]
})
export class AppDialogModule {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div class="modal is-active">
<div class="modal-background" (click)="onClose()"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">Delete {{scheduleName}}</p>
<button class="delete" aria-label="close" (click)="onClose()"></button>
</header>
<section class="modal-card-body">
<div>Do you really want to delete this Schedule?</div>
</section>
<footer class="modal-card-foot">
<button class="button is-danger" (click)="onClose(true)">Delete</button>
<button class="button" (click)="onClose()">Cancel</button>
</footer>
</div>
</div>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { DeleteScheduleDialogComponent } from './delete-schedule-dialog.component';
import {DialogRef} from '../../model/dialogRef';
import {DIALOG_DATA} from '../../services/dialog.service';

describe('DeleteScheduleDialogComponent', () => {
let component: DeleteScheduleDialogComponent;
let fixture: ComponentFixture<DeleteScheduleDialogComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DeleteScheduleDialogComponent ],
providers: [
{provide: DialogRef, useVale: {}},
{ provide: DIALOG_DATA, useValue: {}}
]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(DeleteScheduleDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import {Component, Inject, OnInit} from '@angular/core';
import {DialogRef} from '../../model/dialogRef';
import {DIALOG_DATA} from '../../services/dialog.service';

@Component({
selector: 'app-delete-schedule-dialog',
templateUrl: './delete-schedule-dialog.component.html',
styleUrls: ['./delete-schedule-dialog.component.scss']
})
export class DeleteScheduleDialogComponent implements OnInit {

public scheduleName: string;

constructor(public dialogRef: DialogRef,
@Inject(DIALOG_DATA) public data: any) { }

ngOnInit() {
this.scheduleName = this.data.scheduleName;
}

public onClose(result = false) {
this.dialogRef.close(result);
}
}
15 changes: 15 additions & 0 deletions src/app/app-dialog/dialogs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {ConfirmNewCloudDialogComponent} from './confirm-new-cloud-dialog/confirm-new-cloud-dialog.component';
import {DeleteCloudDialogComponent} from './delete-cloud-dialog/delete-cloud-dialog.component';
import {DeleteScheduleDialogComponent} from './delete-schedule-dialog/delete-schedule-dialog.component';
import {ScheduleDiagnosticDialogComponent} from './schedule-diagnostic-dialog/schedule-diagnostic-dialog.component';
import {ToastComponent} from './toast/toast.component';
import {SshConsoleDialogComponent} from './ssh-console-dialog/ssh-console-dialog.component';

export {
ConfirmNewCloudDialogComponent,
DeleteScheduleDialogComponent,
DeleteCloudDialogComponent,
ScheduleDiagnosticDialogComponent,
ToastComponent,
SshConsoleDialogComponent
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="modal is-active">
<div class="modal-background" (click)="onClose()"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">Diagnostic {{data.task}}</p>
<button class="delete" aria-label="close" (click)="onClose()"></button>
</header>
<section class="modal-card-body">
<div>{{data.diagnostic}}</div>
</section>
<footer class="modal-card-foot">
</footer>
</div>
</div>

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';

import {ScheduleDiagnosticDialogComponent} from './schedule-diagnostic-dialog.component';
import {AppDialogModule} from '../../app-dialog.module';
import {DialogRef} from '../../model/dialogRef';
import {DIALOG_DATA} from '../../services/dialog.service';

describe('ScheduleDiagnosticDialogComponent', () => {
let component: ScheduleDiagnosticDialogComponent;
let fixture: ComponentFixture<ScheduleDiagnosticDialogComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
ScheduleDiagnosticDialogComponent
],
imports: [],
providers: [
{provide: DialogRef, useVale: {}},
{ provide: DIALOG_DATA, useValue: {}}
]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(ScheduleDiagnosticDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import {Component, Inject, OnInit} from '@angular/core';
import {DialogRef} from '../../model/dialogRef';
import {DIALOG_DATA} from '../../services/dialog.service';
import {CloudiatorProcess} from 'cloudiator-rest-api';

@Component({
selector: 'app-schedule-diagnostic-dialog',
templateUrl: './schedule-diagnostic-dialog.component.html',
styleUrls: ['./schedule-diagnostic-dialog.component.scss']
})
export class ScheduleDiagnosticDialogComponent implements OnInit {

constructor(public dialogRef: DialogRef,
@Inject(DIALOG_DATA) public data: CloudiatorProcess) { }

ngOnInit() {
}

onClose() {
this.dialogRef.close();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="modal is-active" (window:resize)="onResize()">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">{{data.name}} SSH Terminal</p>
<button class="delete" aria-label="close" (click)="onClose()"></button>
</header>
<section class="modal-card-body">
<div #terminal class="terminal-container"></div>
</section>
<footer class="modal-card-foot">
</footer>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@import "~bulma/sass/utilities/mixins";

.modal-card {
width: 90%;
height: 90%;
}

.modal-card-body {
padding: 0;
}

.terminal-container {
width: 100%;
height: 100%;
background-color: black;
}

.mobile-view {
display: none;
}

@include mobile {
.modal {
padding: 0;
align-items: stretch;
}

.modal-card {
width: 100%;
height: 100%;
max-height: 100vh;
margin: 0;
}

.modal-card-head {
border-radius: 0;
}

.modal-card-foot {
border-radius: 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';

import {SshConsoleDialogComponent} from './ssh-console-dialog.component';
import {AppDialogModule} from '../../app-dialog.module';
import {DialogRef} from '../../model/dialogRef';
import {DIALOG_DATA, DialogService} from '../../services/dialog.service';
import {HttpClientTestingModule} from '@angular/common/http/testing';
import {ApiModule} from 'cloudiator-rest-api';
import {apiConfigFactory} from '../../../app.module';
import {RootStoreModule} from '../../../root-store';
import {ToastService} from '../../services/toast.service';

describe('SshConsoleDialogComponent', () => {
let component: SshConsoleDialogComponent;
let fixture: ComponentFixture<SshConsoleDialogComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [],
imports: [
RootStoreModule,
HttpClientTestingModule,
ApiModule.forRoot(apiConfigFactory),
AppDialogModule
],
providers: [
{provide: DialogRef, useVale: {}},
{provide: DIALOG_DATA, useValue: {}}
]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(SshConsoleDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Loading

0 comments on commit a1219b1

Please sign in to comment.