Skip to content

Commit

Permalink
Feat/backup info (#5986)
Browse files Browse the repository at this point in the history
* fix(Lifetime): Adjusted text-templating and information

* feat(Application): Add acknowledgement for data backups

* added word

* missed pushing test file

---------

Co-authored-by: denbicloud <[email protected]>
  • Loading branch information
vktrrdk and denbicloud authored Dec 22, 2023
1 parent 6ce2a08 commit 04c6345
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,23 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
</div>
<span class="help-block">How long would you like to run this project?</span>
<div class="alert alert-primary">
The maximum possible initial lifetime to be requested is
<strong>{{ max_lifetime }} months.</strong> Under certain conditions, longer initial terms can also be
granted, for example in the case the project is an <strong>NFDI</strong> project. Please click the
corresponding options in the further course of the form and enter further information in the available
comment and description fields if necessary. Please consider: After initially approved, you are able
to extend your project lifetime by sending extension requests.
<p
*ngIf="
!(application?.project_application_nfdi?.length > 0) || !application?.project_application_nfdi
"
>
The maximum possible initial lifetime to be requested is
<strong>{{ max_lifetime }} months.</strong> Under certain conditions, longer initial terms can also
be granted, for example in the case the project is an <strong>NFDI</strong> project. Please click
the corresponding options in the further course of the form and enter further information in the
available comment and description fields if necessary.
</p>
<p *ngIf="application?.project_application_nfdi?.length > 0">
As your project is an <strong>NFDI</strong> project you are able to request an initial lifetime of
up to <strong>{{ max_lifetime }} months</strong>.
</p>
Please consider: After initially approved, you are able to extend your project lifetime by sending
extension requests.
</div>
</div>
</div>
Expand Down Expand Up @@ -1707,7 +1718,7 @@ <h6><strong>Platforms</strong></h6>

<label class="col-md-4 form-control-label">
<button
(click)="notificationModal.show(); approveApplication(form)"
(click)="dataBackupModal.show()"
[disabled]="
!pi_responsibility_checked ||
(!unknownPiAffiliationsConfirmation && !valid_pi_affiliations) ||
Expand Down Expand Up @@ -1882,6 +1893,73 @@ <h4 class="modal-title">{{ acknowledgeModalTitle }}</h4>
</div>
<!-- /.modal -->

<div
bsModal
#dataBackupModal="bs-modal"
class="modal fade"
tabindex="-1"
role="dialog"
aria-labelledby="Label"
aria-hidden="true"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Note on data backups</h4>
<button type="button" class="close" style="cursor: pointer" (click)="dataBackupModal.hide()" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="alert alert-info" role="alert">
<strong>Important note</strong>:
<p>
Computing in cloud environments involves the risk of data loss, for example due to software or hardware
errors that lead to the loss of virtual machines and the data they contain. Other possible sources of error
are the accidental deletion of virtual machines by authorised users.
</p>
<p>
We would therefore like to point out that the members of a project are solely responsible for carrying out
regular data backups. Information on how to save data and perform backups can be found in the following Wiki
article:
<a class="alert-link" href="{{ WIKI_BACKUP_LINK }}" target="_blank" rel="noopener noreferrer"
>Best practices for data backup</a
>
</p>
<p>Please sensitise the members of the project to this issue.</p>
</div>
</div>
<div class="modal-footer">
<button
*ngIf="!is_validation"
id="backup_approve_btn"
type="button"
data-test-id="backup_approve_btn"
(click)="dataBackupModal.hide(); acknowledgemodal.show()"
class="btn btn-success"
>
I acknowledge
</button>
<button
*ngIf="is_validation"
id="backup_approve_btn"
type="button"
data-test-id="backup_approve_btn"
(click)="dataBackupModal.hide(); notificationModal.show(); approveApplication(form)"
class="btn btn-success"
>
I acknowledge
</button>

<button type="button" (click)="dataBackupModal.hide()" class="btn btn-danger">Close</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->

<div
bsModal
#submitModal="bs-modal"
Expand Down Expand Up @@ -2125,7 +2203,7 @@ <h4 class="modal-title">{{ projectName }}</h4>
type="button"
id="verification_btn"
data-test-id="verification_application_btn"
(click)="acknowledgemodal.show(); submitModal.hide()"
(click)="dataBackupModal.show(); submitModal.hide()"
>
Confirm Application
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
WIKI_LINKING_ACCOUNTS,
WIKI_PRINCIPAL_INVESTIGATOR,
WIKI_CLOUD_TERMS_LINK,
WIKI_BACKUP_LINK,
} from '../../../links/links';
import { UserService } from '../../api-connector/user.service';
import { Userinfo } from '../../userinfo/userinfo.model';
Expand Down Expand Up @@ -81,6 +82,7 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent
SIMPLE_VM_LINK: string = SIMPLE_VM_LINK;
WIKI_CLOUD_TERMS_LINK: string = WIKI_CLOUD_TERMS_LINK;
WIKI_PERSONAL_DATA: string = WIKI_PERSONAL_DATA;
WIKI_BACKUP_LINK: string = WIKI_BACKUP_LINK;
GDPR_LINK: string = GDPR_LINK;
survey_link_visible: boolean = false;

Expand Down Expand Up @@ -420,6 +422,7 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent
case 'nfdi': {
if (!checked) {
this.application.project_application_nfdi = '';
this.max_lifetime = this.MAX_LIFETIME_DEFAULT;
} else {
this.max_lifetime = 12;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ <h4>Extension request for {{ project?.project_application_shortname }}</h4>
<div class="alert alert-info">
Please consider: in certain cases the possible amount of months to extend the project can be higher than the
given maximum. This applies e.g for <strong>NFDI-projects</strong>. Please use the comment function to justify
the need for an extension beyond the maximum possible number of months.
the need for an extension beyond the maximum possible number of months. In this case, the extension request
can be subsequently adjusted by the de.NBI Cloud Governance.
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/links/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const ZAMMAD_HELPDESK_LINK = 'https://helpdesk.cloud.denbi.de';
export const GDPR_LINK = 'https://gdpr.eu/article-9-processing-special-categories-of-personal-data-prohibited/';
export const LIFESCIENCE_HOSTEL_SIGNUP = 'https://signup.aai.lifescience-ri.eu/non/registrar/?vo=lifescience_hostel&targetnew=https%3A%2F%2Flifescience-ri.eu%2Faai%2Fhow-use&targetexisting=https%3A%2F%2Flifescience-ri.eu%2Faai%2Fhow-use&targetextended=https%3A%2F%2Flifescience-ri.eu%2Faai%2Fhow-use';
export const WIKI_PERSISTENT_TERMINAL_LINK = `${environment.WIKI_PRE}Tutorials/Persistent_SSH_Sessions/`;
export const WIKI_BACKUP_LINK = `${environment.SIMPLEVM_WIKI_PRE}simple_vm/backup`;

export const WIKI_SVM_MIGRATION_LINK = `${environment.WIKI_PRE}`;

Expand Down Expand Up @@ -82,6 +83,7 @@ export const WIKI_LINKS: string[] = [
WIKI_MOSH_LINK,
WIKI_PERSONAL_DATA,
WIKI_SVM_MIGRATION_LINK,
WIKI_BACKUP_LINK,
];

export const LANDING_PAGE_LINKS: string[] = [
Expand Down
2 changes: 2 additions & 0 deletions tests/page_objects/formular.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class FormularPage {
private NEW_OPENSTACK_BTN: string = 'newOpenstackBtn';
private SUBMIT_BTN: string = 'submit_application_btn';
private VERIFICATION_BTN: string = 'verification_application_btn';
private BACKUP_ACKNOWLEDGE_BTN: string = 'backup_approve_btn';
private ACKNOWLEDGE_BTN: string = 'acknowledge_approve_btn';
private APPLICATION_SUBMITTED: string = 'The application was submitted';
private NOTIFICATION_MESSAGE: string = 'notification_message';
Expand Down Expand Up @@ -55,6 +56,7 @@ export class FormularPage {

await this.page.locator(Util.by_data_test_id_str(this.SUBMIT_BTN)).click();
await this.page.locator(Util.by_data_test_id_str(this.VERIFICATION_BTN)).click();
await this.page.locator(Util.by_data_test_id_str(this.BACKUP_ACKNOWLEDGE_BTN)).click();
await this.page.locator(Util.by_data_test_id_str(this.ACKNOWLEDGE_BTN)).click();
await this.page.waitForSelector(`data-test-id=${this.NOTIFICATION_MESSAGE} >> text=${this.APPLICATION_SUBMITTED}`);
console.log('Submitted Application');
Expand Down

0 comments on commit 04c6345

Please sign in to comment.