Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Feb 15, 2023
2 parents 5759000 + c15d1f6 commit 684f1e9
Show file tree
Hide file tree
Showing 18 changed files with 14,266 additions and 14,344 deletions.
28,067 changes: 14,048 additions & 14,019 deletions package-lock.json

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@denbi/cloud-portal-webapp",
"version": "4.597.0",
"version": "4.608.0",
"description": "de.NBI Cloud Portal",
"scripts": {
"ng": "ng serve",
Expand All @@ -20,18 +20,18 @@
"private": true,
"dependencies": {
"@angular-eslint/eslint-plugin": "^15.2.0",
"@angular/animations": "15.1.3",
"@angular/cdk": "15.1.3",
"@angular/common": "15.1.3",
"@angular/compiler": "15.1.3",
"@angular/core": "15.1.3",
"@angular/forms": "15.1.3",
"@angular/localize": "15.1.3",
"@angular/platform-browser": "15.1.3",
"@angular/platform-browser-dynamic": "15.1.3",
"@angular/router": "15.1.3",
"@angular/service-worker": "15.1.3",
"@angular/upgrade": "15.1.3",
"@angular/animations": "15.1.4",
"@angular/cdk": "15.1.4",
"@angular/common": "15.1.4",
"@angular/compiler": "15.1.4",
"@angular/core": "15.1.4",
"@angular/forms": "15.1.4",
"@angular/localize": "15.1.4",
"@angular/platform-browser": "15.1.4",
"@angular/platform-browser-dynamic": "15.1.4",
"@angular/router": "15.1.4",
"@angular/service-worker": "15.1.4",
"@angular/upgrade": "15.1.4",
"@coreui/angular": "^4.3.4",
"@coreui/coreui": "4.2.6",
"@coreui/icons-angular": "^4.3.0",
Expand All @@ -45,9 +45,9 @@
"angulartics2": "12.2.0",
"billboard.js": "3.7.4",
"bootstrap": "4.6.2",
"chart.js": "4.2.0",
"chart.js": "4.2.1",
"cli-color": "2.0.3",
"core-js": "3.27.2",
"core-js": "3.28.0",
"css-loader": "6.7.3",
"cssnano": "5.1.14",
"d3": "7.8.2",
Expand Down Expand Up @@ -87,17 +87,17 @@
"zone.js": "0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "15.1.4",
"@angular-eslint/builder": "15.2.0",
"@angular-eslint/eslint-plugin-template": "15.2.0",
"@angular-eslint/schematics": "15.2.0",
"@angular-eslint/template-parser": "15.2.0",
"@angular/cli": "15.1.4",
"@angular/compiler-cli": "15.1.3",
"@angular-devkit/build-angular": "15.1.5",
"@angular-eslint/builder": "15.2.1",
"@angular-eslint/eslint-plugin-template": "15.2.1",
"@angular-eslint/schematics": "15.2.1",
"@angular-eslint/template-parser": "15.2.1",
"@angular/cli": "15.1.5",
"@angular/compiler-cli": "15.1.4",
"@compodoc/compodoc": "1.1.19",
"@playwright/test": "1.30.0",
"@types/jasmine": "4.3.1",
"@types/node": "18.11.19",
"@types/node": "18.13.0",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"async": "3.2.4",
Expand All @@ -106,7 +106,7 @@
"eslint": "^8.28.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsdoc": "39.8.0",
"eslint-plugin-jsdoc": "40.0.0",
"eslint-plugin-no-null": "latest",
"eslint-plugin-prefer-arrow": "1.2.3",
"exports-loader": "4.0.0",
Expand All @@ -117,10 +117,10 @@
"karma": "6.4.1",
"karma-chrome-launcher": "3.1.1",
"less-loader": "11.1.0",
"lint-staged": "13.1.0",
"lint-staged": "13.1.2",
"ngx-spec": "2.1.5",
"npm-run-all": "4.1.5",
"prettier": "2.8.3",
"prettier": "2.8.4",
"raw-loader": "4.0.2",
"sass-loader": "13.2.0",
"script-loader": "0.7.2",
Expand Down
24 changes: 18 additions & 6 deletions src/app/applications/applications.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
<span class="path4"></span>
<span class="path5"></span>
</span>

<span
*ngIf="application?.project_application_pi_approved"
style="margin: 2px"
Expand All @@ -139,10 +140,21 @@
title="This application is yet not approved by a PI"
>
<span class="icon icon-no_pi" style="font-size: 2em">
<span class="path1"></span><span class="path2"></span><span class="path3"></span
><span class="path4"></span>
<span class="path1"></span>
<span class="path2"></span>
<span class="path3"></span>
<span class="path4"></span>
</span>
</span>
<span
style="margin-left: 12px"
class="badge badge-warning"
data-toggle="tooltip"
data-placement="auto"
title="This application uses sensitive data"
*ngIf="application?.project_application_sensitive_data"
><span style="font-size: 17px"> <i class="fas fa-fingerprint"></i></span>
</span>
</td>
<td>{{ application?.project_application_name }}</td>
<td>{{ application?.project_application_shortname }}</td>
Expand Down Expand Up @@ -962,10 +974,10 @@
Information
</button>
<!--button (click)="deleteModal.show();setDeleteId(application?.application_status_id)"
type="button"
class="btn btn-secondary">
Remove Application
</button-->
type="button"
class="btn btn-secondary">
Remove Application
</button-->
</td>
</tr>
<td colspan="12">
Expand Down
5 changes: 3 additions & 2 deletions src/app/applications/applications.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { FormsModule } from '@angular/forms';
import { ModalModule } from 'ngx-bootstrap/modal';
import { ClickOutsideModule } from 'ng4-click-outside';
import { NgSelectModule } from '@ng-select/ng-select';
import { BadgeModule } from '@coreui/angular';
import { ApplicationsComponent } from './applications.component';
import { ApplicationsRoutingModule } from './applications-routing.module';
import { AddsimplevmComponent } from './addsimplevm.component';
Expand Down Expand Up @@ -42,6 +43,7 @@ import { NewsModule } from '../news/news.module';
PipeModuleModule,
NewsModule,
NgSelectModule,
BadgeModule,
],
declarations: [
ApplicationsComponent,
Expand All @@ -61,5 +63,4 @@ import { NewsModule } from '../news/news.module';
],
exports: [ApplicationDetailComponent],
})
export class ApplicationsModule {
}
export class ApplicationsModule {}
13 changes: 11 additions & 2 deletions src/app/facility_manager/facility.application.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
<button
id="approval_{{ application?.project_application_shortname }}"
[attr.data-test-id]="'approval_' + application?.project_application_shortname"
*ngIf="application | hasstatusinlist: Application_States.WAIT_FOR_CONFIRMATION"
*ngIf="application | hasstatusinlist : Application_States.WAIT_FOR_CONFIRMATION"
style="margin: 2px"
(click)="
resetNotificationModal(); approveApplication(application); notificationModal.show()
Expand All @@ -190,7 +190,7 @@
</button>

<button
*ngIf="application | hasstatusinlist: Application_States.WAIT_FOR_CONFIRMATION"
*ngIf="application | hasstatusinlist : Application_States.WAIT_FOR_CONFIRMATION"
style="margin: 2px"
[id]="'decline_' + application?.project_application_shortname"
(click)="
Expand Down Expand Up @@ -947,6 +947,15 @@
<span class="path4"></span>
<span class="path5"></span>
</span>
<span
style="margin-left: 12px"
class="badge badge-warning"
data-toggle="tooltip"
data-placement="auto"
title="This application uses sensitive data"
*ngIf="application?.project_application_sensitive_data"
><span style="font-size: 15px"> <i class="fas fa-fingerprint"></i></span>
</span>
</td>
<td>{{ application?.project_application_name }}</td>
<td>{{ application?.project_application_shortname }}</td>
Expand Down
2 changes: 1 addition & 1 deletion src/app/facility_manager/imageTag.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
<td>
<a href="{{ logo?.url }}">{{ logo?.url }}</a>
</td>
<td><img alt="Not found" src="{{ logo?.url }}" style="width: 200px; height: 100px" /></td>
<td><img alt="Not found" [src]="logo?.url" style="width: 200px; height: 100px" /></td>
<td>
<button (click)="removeLogoTag(logo)" type="button" class="btn btn-secondary">Remove</button>
</td>
Expand Down
5 changes: 3 additions & 2 deletions src/app/maintenance/maintenance-alert.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</div>
<div
class="callout"
*ngIf="frames_loaded"
*ngIf="frames_loaded && (maintenanceTimeFrames.length > 0 || error_on_loading)"
[ngClass]="{
'callout-warning': error_on_loading,
'callout-info': maintenanceTimeFrames.length === 0,
Expand All @@ -22,7 +22,8 @@
>
<div class="ms-2 me-auto">
<div class="fw-bold">{{ tf.name }}</div>
{{ tf.start_time | date : 'dd/MM/yy HH:mm' : 'de' }} - {{ tf.end_time | date : 'dd/MM/yy HH:mm' : 'de' }}
{{ tf.start_time | date : 'dd/MM/yy HH:mm' : 'de' }}
- {{ tf.end_time | date : 'dd/MM/yy HH:mm' : 'de' }}
<br />
{{ tf.message.length > 0 ? tf.message : '' }}
</div>
Expand Down
9 changes: 9 additions & 0 deletions src/app/projectmanagement/overview.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ <h3>
<span class="path4"></span>
<span class="path5"></span>
</span>
<span
style="margin-left: 12px"
class="badge badge-warning"
data-toggle="tooltip"
data-placement="auto"
title="This application uses sensitive data"
*ngIf="project_application?.project_application_sensitive_data"
><span style="font-size: 15px"> <i class="fas fa-fingerprint"></i></span>
</span>
</td>
<td>{{ project_application?.project_application_name }}</td>
<td>{{ project_application?.project_application_shortname }}</td>
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/modal/confirmation-modal.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ <h4 class="modal-title" data-test-id="confirmation_modal_title">{{ modalTitle }}
data-test-id="confirm_confirmation_model_btn"
(click)="confirmAction(); bsModalRef.hide()"
>
Confirm {{ type }}
Confirm {{ buttonText() }}
</button>
</div>
13 changes: 13 additions & 0 deletions src/app/shared/modal/confirmation-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@ export class ConfirmationModalComponent implements OnDestroy, OnInit {
});
}

buttonText(): string {
switch (this.type) {
case 'Approve':
return 'Approval';
case 'Decline':
return 'Declination';
default:
break;
}

return '';
}

ngOnInit() {
this.request_failed = false;
switch (this.action) {
Expand Down
37 changes: 33 additions & 4 deletions src/app/virtualmachines/modals/reboot-vm/reboot-vm.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h4 class="modal-title">Choose Reboot Type for: {{ virtualMachine?.name }}</h4>
type="button"
class="btn btn-primary"
*ngIf="
!(virtualMachine?.status | hasStatus: VirtualMachineStates.staticDELETED) &&
!(virtualMachine?.status | hasStatus : VirtualMachineStates.staticDELETED) &&
virtualMachine?.client.features['VM_REBOOT']
"
[attr.data-test-id]="'soft_reboot_vm_' + virtualMachine?.name"
Expand All @@ -32,7 +32,7 @@ <h4 class="modal-title">Choose Reboot Type for: {{ virtualMachine?.name }}</h4>
class="btn btn-primary"
[id]="'hardRebootVM_' + virtualMachine?.name"
*ngIf="
!(virtualMachine?.status | hasStatus: VirtualMachineStates.staticDELETED) &&
!(virtualMachine?.status | hasStatus : VirtualMachineStates.staticDELETED) &&
virtualMachine?.client.features['VM_REBOOT']
"
(click)="hardRebootShow()"
Expand Down Expand Up @@ -62,11 +62,40 @@ <h4 class="modal-title">
</div>
<div class="modal-body">
<div class="alert alert-warning" role="alert">
Restarted instances will lose any data not saved in persistent storage.<br>
Any mounted volumes will need to be remounted after the reboot.<br>
Restarted instances will lose any data not saved in persistent storage.<br />
Any mounted volumes will need to be remounted after the reboot.<br />
Are you sure to
<strong>{{ reboot_type }}</strong> reboot {{ virtualMachine?.name }}?
</div>
<div *ngIf="virtualMachine.volumes?.length > 0">
<h6>List of volumes</h6>
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Volume Name</th>
<th scope="col">Storage Size</th>
<th scope="col">Physical device</th>
<th scope="col">Mountpath</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let volume of virtualMachine.volumes">
<th scope="row">{{ volume.volume_name }}</th>
<td>{{ volume.volume_storage }} GB(s)</td>
<td>{{ volume.volume_device }}</td>
<td>/vol/{{ volume.volume_path }}</td>
</tr>
</tbody>
</table>
</div>

<div class="alert alert-warning">
<strong>Please consider: </strong>The volume's mount path may have already changed, for example, if you manually
mounted or unmounted the volume. Read more on mounting of volumes
<a class="alert-link" [href]="WIKI_MOUNT_VOLUME" rel="noopener noreferrer" target="_blank">here</a>.
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success col-md-4" (click)="rebootVm()" data-test-id="verifyRebootButton">Yes</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { Component, EventEmitter, OnDestroy } from '@angular/core';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { VirtualMachine } from '../../virtualmachinemodels/virtualmachine';
import { VirtualMachineStates } from '../../virtualmachinemodels/virtualmachinestates';
import { WIKI_MOUNT_VOLUME } from '../../../../links/links';

@Component({
selector: 'app-reboot-vm',
templateUrl: './reboot-vm.component.html',
})
export class RebootVmComponent implements OnDestroy {

virtualMachine: VirtualMachine;
VirtualMachineStates: VirtualMachineStates = new VirtualMachineStates();
public event: EventEmitter<any> = new EventEmitter();
Expand All @@ -17,6 +17,8 @@ export class RebootVmComponent implements OnDestroy {
confirm: boolean = false;
reboot_type: string = '';

WIKI_MOUNT_VOLUME: string = WIKI_MOUNT_VOLUME;

constructor(public bsModalRef: BsModalRef) {
// eslint-disable-next-line no-empty-function
}
Expand Down Expand Up @@ -44,5 +46,4 @@ export class RebootVmComponent implements OnDestroy {
this.event.emit({ resume: true });
}
}

}
9 changes: 7 additions & 2 deletions src/app/virtualmachines/vmcard/vmcard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@
<div
*ngIf="
(vm?.res_env_url &&
(vm?.backend?.playbook_successful || vm?.conda_packages.length > 0) && vm?.backend?.playbook_done) ||
(vm?.backend?.playbook_successful || vm?.conda_packages.length > 0) &&
vm?.backend?.playbook_done) ||
vm?.backend?.no_playbook
"
class="col-md-1"
Expand Down Expand Up @@ -340,6 +341,7 @@
(vm?.status | hasStatus : VirtualMachineStates.staticCHECKING_CONNECTION) ||
(vm?.status | hasStatus : VirtualMachineStates.staticPORT_CLOSED) ||
(vm?.status | hasStatus : VirtualMachineStates.staticERROR) ||
(vm?.status | hasStatus : VirtualMachineStates.staticCREATION_FAILED) ||
(vm?.status | hasStatus : VirtualMachineStates.staticSHUTOFF)) &&
vm?.cardState !== 0
"
Expand Down Expand Up @@ -490,7 +492,10 @@
</div>
<div
class="col-md-auto"
*ngIf="vm.client.features['VM_REBOOT'] && !(vm?.status | hasStatus : VirtualMachineStates.staticDELETED)"
*ngIf="
vm.client.features['VM_REBOOT'] &&
!(vm?.status | statusInList : [VirtualMachineStates.staticDELETED, VirtualMachineStates.staticERROR])
"
>
<div
class="font-weight-bold font-xs btn-block text-muted btn btn-outline-secondary"
Expand Down
Loading

0 comments on commit 684f1e9

Please sign in to comment.