Skip to content

Commit

Permalink
Merge pull request #5917 from deNBI/fix/svmlink
Browse files Browse the repository at this point in the history
fix(SimpleVM): Link to new platform
  • Loading branch information
dweinholz authored Oct 18, 2023
2 parents ca53e99 + e408460 commit b99e9de
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 47 deletions.
12 changes: 10 additions & 2 deletions src/app/projectmanagement/overview.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,16 @@ <h3>
"
class="card-body"
>
<div class="row">
<div class="btn-group col-12"></div>
<div
class="row"
*ngIf="project_application.migrate_to_simple_vm && project_application.migrated_simple_vm_resources"
>
<div class="alert alert-info col-8 mx-auto">
The project is migrated to the new SimpleVM platform. You can access the platform here:
<a class="alert-link" [href]="NEW_SVM_PORTAL_LINK" target="_blank" rel="noreferrer noopener">{{
NEW_SVM_PORTAL_LINK
}}</a>
</div>
</div>
<div class="row">
<div class="btn-group col-12">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ <h5 class="alert-heading">Project migrated to new SimpleVM platform</h5>
</div>
<p *ngIf="!isCreationPage && type === 'machine'">
This machine is part of a project migrated to the new SimpleVM platform. You are not able to control this
machine using the current platform.
machine using the current platform. You can access the new platform here:
<a class="alert-link" [href]="NEW_SVM_PORTAL_LINK" target="_blank" rel="noreferrer noopener">{{
NEW_SVM_PORTAL_LINK
}}</a>
</p>
<hr />
<div>
Expand All @@ -42,8 +45,11 @@ <h5 class="alert-heading">Project migrated to new SimpleVM platform</h5>
</div>
<hr />
<p class="mb-0">
You can get to the new platform
<a class="alert-link" href="{{ NEW_SVM_PORTAL_LINK }}" target="_blank" rel="noopener noreferrer">here</a>.
You can get to the new platform here:
<a class="alert-link" href="{{ NEW_SVM_PORTAL_LINK }}" target="_blank" rel="noopener noreferrer">{{
NEW_SVM_PORTAL_LINK
}}</a
>.
</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@
<div class="row" *ngIf="cluster.project_is_migrated_to_simple_vm || cluster.migrate_project_to_simple_vm">
<div class="col-md-auto">
<div class="alert alert-info">
You are not able to control this instance via this platform as it is part of a migrated project!
You are not able to control this instance via this platform as it is part of a migrated project! You can
access the new platform here:
<a class="alert-link" [href]="NEW_SVM_PORTAL_LINK" target="_blank" rel="noreferrer noopener">{{
NEW_SVM_PORTAL_LINK
}}</a>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
import { ClipboardService } from 'ngx-clipboard';
import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
import { Subscription } from 'rxjs';
import { CLOUD_PORTAL_SUPPORT_MAIL } from '../../../../links/links';
import { CLOUD_PORTAL_SUPPORT_MAIL, NEW_SVM_PORTAL_LINK } from '../../../../links/links';
import { Clusterinfo, WorkerBatch } from '../clusterinfo';
import { VirtualMachineStates } from '../../virtualmachinemodels/virtualmachinestates';
import { ResumeClusterComponent } from '../../modals/resume-cluster/resume-cluster.component';
Expand Down Expand Up @@ -260,4 +260,6 @@ export class ClusterActionsComponent implements OnDestroy {
}),
);
}

protected readonly NEW_SVM_PORTAL_LINK = NEW_SVM_PORTAL_LINK;
}
82 changes: 43 additions & 39 deletions src/app/virtualmachines/vmcard/vmcard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<div class="col-5" style="margin: auto">
<a
*ngIf="
(vm?.status | hasStatus : VirtualMachineStates.staticACTIVE) ||
(vm?.status | hasStatus : VirtualMachineStates.staticSHUTOFF);
(vm?.status | hasStatus: VirtualMachineStates.staticACTIVE) ||
(vm?.status | hasStatus: VirtualMachineStates.staticSHUTOFF);
else statusElseBlock
"
class="h5 text-primary"
Expand All @@ -14,8 +14,8 @@
[attr.data-test-id]="'detail' + vm.name"
[routerLink]="['/virtualmachines/detail/' + vm?.openstackid]"
[ngClass]="{
'active-machine': (vm?.status | hasStatus : VirtualMachineStates.staticACTIVE),
'shutoff-machine': (vm?.status | hasStatus : VirtualMachineStates.staticSHUTOFF)
'active-machine': (vm?.status | hasStatus: VirtualMachineStates.staticACTIVE),
'shutoff-machine': (vm?.status | hasStatus: VirtualMachineStates.staticSHUTOFF)
}"
>
<i *ngIf="vm?.still_used_confirmation_requested" class="fas fa-exclamation-triangle" style="color: red"> </i>
Expand Down Expand Up @@ -51,8 +51,8 @@
<input
type="checkbox"
*ngIf="
(vm?.status | hasStatus : VirtualMachineStates.staticACTIVE) ||
(vm?.status | hasStatus : VirtualMachineStates.staticSHUTOFF)
(vm?.status | hasStatus: VirtualMachineStates.staticACTIVE) ||
(vm?.status | hasStatus: VirtualMachineStates.staticSHUTOFF)
"
[checked]="
is_checked && !(this.vm.project_is_migrated_to_simple_vm || this.vm.migrate_project_to_simple_vm)
Expand Down Expand Up @@ -120,8 +120,8 @@
id="{{ vm.name + 'resenvSpan' }}"
style="font-size: 10px; position: relative; top: -12px; left: -10px"
>
<i class="fas fa-check" *ngIf="vm?.status | hasStatus : VirtualMachineStates.staticACTIVE"> </i>
<i class="fas fa-times" *ngIf="vm?.status | hasStatus : VirtualMachineStates.staticSHUTOFF"> </i>
<i class="fas fa-check" *ngIf="vm?.status | hasStatus: VirtualMachineStates.staticACTIVE"> </i>
<i class="fas fa-times" *ngIf="vm?.status | hasStatus: VirtualMachineStates.staticSHUTOFF"> </i>
</span>
</span>
</div>
Expand All @@ -131,7 +131,7 @@
vm?.backend?.playbook_done &&
!vm?.backend?.playbook_successful &&
vm?.conda_packages?.length === 0 &&
(vm?.status | hasStatus : VirtualMachineStates.staticACTIVE)
(vm?.status | hasStatus: VirtualMachineStates.staticACTIVE)
"
class="col-md-1"
>
Expand Down Expand Up @@ -222,7 +222,7 @@
*ngIf="
vm?.backend?.playbook_done &&
!vm?.backend?.playbook_successful &&
(vm?.status | hasStatus : VirtualMachineStates.staticACTIVE)
(vm?.status | hasStatus: VirtualMachineStates.staticACTIVE)
"
>
Some steps in your playbook have failed!<br />You can download the playbook logs on the detailed overview of the
Expand Down Expand Up @@ -280,9 +280,9 @@
[id]="'showDetailsButton_' + vm?.name"
*ngIf="vm.elixir_id === user_elixir_id || is_vo_admin || is_vm_admin"
[disabled]="
!(vm?.status | hasStatus : VirtualMachineStates.staticACTIVE) &&
!(vm?.status | hasStatus : VirtualMachineStates.staticSHUTOFF) &&
!(vm?.status | hasStatus : VirtualMachineStates.staticDELETED)
!(vm?.status | hasStatus: VirtualMachineStates.staticACTIVE) &&
!(vm?.status | hasStatus: VirtualMachineStates.staticSHUTOFF) &&
!(vm?.status | hasStatus: VirtualMachineStates.staticDELETED)
"
[routerLink]="['/virtualmachines/detail/' + vm?.openstackid]"
>
Expand All @@ -293,7 +293,7 @@
<button
class="font-weight-bold font-xs btn-block text-muted btn btn-outline-secondary"
*ngIf="vm.cardState !== 1"
[disabled]="!(vm?.status | hasStatus : VirtualMachineStates.staticACTIVE)"
[disabled]="!(vm?.status | hasStatus: VirtualMachineStates.staticACTIVE)"
[id]="'showHowToConnectButton_' + vm?.name"
(click)="vm.cardState = 1"
>
Expand All @@ -313,12 +313,12 @@
class="font-weight-bold font-xs btn-block text-muted btn btn-outline-secondary"
*ngIf="vm.cardState !== 2 && (vm.elixir_id === user_elixir_id || is_vo_admin || is_vm_admin)"
[disabled]="
((vm?.status | statusInList : VirtualMachineStates.staticIN_PROCESS_STATE) &&
!(vm?.status | hasStatus : VirtualMachineStates.staticCHECKING_CONNECTION) &&
!(vm?.status | hasStatus : VirtualMachineStates.staticPORT_CLOSED)) ||
(vm?.status | hasStatus : VirtualMachineStates.staticNOT_FOUND) ||
(vm?.status | hasStatus : VirtualMachineStates.staticDELETED) ||
(vm?.status | hasStatus : VirtualMachineStates.staticDISABLED) ||
((vm?.status | statusInList: VirtualMachineStates.staticIN_PROCESS_STATE) &&
!(vm?.status | hasStatus: VirtualMachineStates.staticCHECKING_CONNECTION) &&
!(vm?.status | hasStatus: VirtualMachineStates.staticPORT_CLOSED)) ||
(vm?.status | hasStatus: VirtualMachineStates.staticNOT_FOUND) ||
(vm?.status | hasStatus: VirtualMachineStates.staticDELETED) ||
(vm?.status | hasStatus: VirtualMachineStates.staticDISABLED) ||
this.vm.project_is_migrated_to_simple_vm ||
this.vm.migrate_project_to_simple_vm
"
Expand All @@ -335,7 +335,7 @@
[disabled]="
this.vm.project_is_migrated_to_simple_vm ||
this.vm.migrate_project_to_simple_vm ||
(vm?.status | hasStatus : VirtualMachineStates.staticDISABLED)
(vm?.status | hasStatus: VirtualMachineStates.staticDISABLED)
"
(click)="vm.cardState = 0"
>
Expand All @@ -346,7 +346,11 @@
<div class="row" *ngIf="this.vm.project_is_migrated_to_simple_vm || this.vm.migrate_project_to_simple_vm">
<div class="col-md-auto">
<div class="alert alert-info">
You are not able to control this instance via this platform as it is part of a migrated project!
You are not able to control this instance via this platform as it is part of a migrated project! You can
access the new platform here:
<a class="alert-link" [href]="NEW_SVM_PORTAL_LINK" target="_blank" rel="noreferrer noopener">{{
NEW_SVM_PORTAL_LINK
}}</a>
</div>
</div>
</div>
Expand All @@ -355,12 +359,12 @@
<div
class="card-footer p-x-1 py-h"
*ngIf="
((vm?.status | hasStatus : VirtualMachineStates.staticACTIVE) ||
(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?.status | hasStatus: VirtualMachineStates.staticACTIVE) ||
(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 @@ -421,7 +425,7 @@

<div *ngIf="vm?.cardState === 2">
<div class="row">
<div class="col-md-auto" *ngIf="vm?.status | hasStatus : VirtualMachineStates.staticACTIVE">
<div class="col-md-auto" *ngIf="vm?.status | hasStatus: VirtualMachineStates.staticACTIVE">
<div
class="font-weight-bold font-xs btn-block text-muted btn btn-outline-secondary"
[id]="'attachVolume' + vm?.name"
Expand All @@ -433,7 +437,7 @@
</div>
<div
class="col-md-auto"
*ngIf="(vm?.status | hasStatus : VirtualMachineStates.staticSHUTOFF) && vm?.volumes.length > 0"
*ngIf="(vm?.status | hasStatus: VirtualMachineStates.staticSHUTOFF) && vm?.volumes.length > 0"
>
<span
class="d-inline-block"
Expand All @@ -455,7 +459,7 @@
</div>
<div
class="col-md-auto"
*ngIf="(vm?.status | hasStatus : VirtualMachineStates.staticACTIVE) && vm?.volumes.length > 0"
*ngIf="(vm?.status | hasStatus: VirtualMachineStates.staticACTIVE) && vm?.volumes.length > 0"
>
<div
class="font-weight-bold font-xs btn-block text-muted btn btn-outline-secondary"
Expand All @@ -468,7 +472,7 @@
</div>
<div
class="col-md-auto"
*ngIf="(vm?.status | hasStatus : VirtualMachineStates.staticSHUTOFF) && vm?.volumes.length > 0"
*ngIf="(vm?.status | hasStatus: VirtualMachineStates.staticSHUTOFF) && vm?.volumes.length > 0"
>
<span
class="d-inline-block"
Expand All @@ -488,7 +492,7 @@
</button>
</span>
</div>
<div class="col-md-auto" *ngIf="vm?.status | hasStatus : VirtualMachineStates.staticACTIVE">
<div class="col-md-auto" *ngIf="vm?.status | hasStatus: VirtualMachineStates.staticACTIVE">
<div
class="font-weight-bold font-xs btn-block text-muted btn btn-outline-secondary"
[id]="'stopVMButton_' + vm?.name"
Expand All @@ -498,7 +502,7 @@
Stop VM
</div>
</div>
<div class="col-md-2" *ngIf="vm?.status | hasStatus : VirtualMachineStates.staticSHUTOFF">
<div class="col-md-2" *ngIf="vm?.status | hasStatus: VirtualMachineStates.staticSHUTOFF">
<div
class="font-weight-bold font-xs btn-block text-muted btn btn-outline-secondary"
[id]="'restartVMButton_' + vm?.name"
Expand All @@ -514,7 +518,7 @@
vm.client.features['VM_REBOOT'] &&
!(
vm?.status
| statusInList : [VirtualMachineStates.staticDELETED, VirtualMachineStates.staticCREATION_FAILED]
| statusInList: [VirtualMachineStates.staticDELETED, VirtualMachineStates.staticCREATION_FAILED]
)
"
>
Expand All @@ -527,7 +531,7 @@
Reboot VM
</div>
</div>
<div class="col-md-auto" *ngIf="(vm?.status | hasStatus : VirtualMachineStates.staticACTIVE) && vm?.backend">
<div class="col-md-auto" *ngIf="(vm?.status | hasStatus: VirtualMachineStates.staticACTIVE) && vm?.backend">
<div
class="font-weight-bold font-xs btn-block text-muted btn btn-outline-secondary"
[id]="'recreateBackend_' + vm?.name"
Expand All @@ -540,8 +544,8 @@
<div
class="col-md-auto"
*ngIf="
(vm?.status | hasStatus : VirtualMachineStates.staticACTIVE) ||
(vm?.status | hasStatus : VirtualMachineStates.staticSHUTOFF)
(vm?.status | hasStatus: VirtualMachineStates.staticACTIVE) ||
(vm?.status | hasStatus: VirtualMachineStates.staticSHUTOFF)
"
>
<div
Expand All @@ -553,7 +557,7 @@
Create Snapshot
</div>
</div>
<div class="col-md-auto" *ngIf="vm?.status | statusInList : VirtualMachineStates.staticDELETABLE_STATES">
<div class="col-md-auto" *ngIf="vm?.status | statusInList: VirtualMachineStates.staticDELETABLE_STATES">
<div
class="font-weight-bold font-xs btn-block text-muted btn btn-outline-secondary"
[id]="'deleteVMButton_' + vm?.name"
Expand Down
3 changes: 3 additions & 0 deletions src/app/virtualmachines/vmcard/vmcard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
WIKI_RSTUDIO_LINK,
WIKI_PERSISTENT_TERMINAL_LINK,
WIKI_JUPYTERLAB_LINK,
NEW_SVM_PORTAL_LINK,
} from '../../../links/links';
import { TemplateNames } from '../conda/template-names';
import { StopVmComponent } from '../modals/stop-vm/stop-vm.component';
Expand Down Expand Up @@ -650,4 +651,6 @@ export class VmCardComponent implements OnInit, OnDestroy {

return true;
}

protected readonly NEW_SVM_PORTAL_LINK = NEW_SVM_PORTAL_LINK;
}
8 changes: 7 additions & 1 deletion src/app/virtualmachines/vmdetail/vmdetail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,13 @@
</div>
</div>
<div class="row" *ngIf="isMigrated">
<div class="alert alert-info">You are not able to control this machine using the current platform.</div>
<div class="alert alert-info">
You are not able to control this machine using the current platform. You can access the new platform
here:
<a class="alert-link" [href]="NEW_SVM_PORTAL_LINK" target="_blank" rel="noreferrer noopener">{{
NEW_SVM_PORTAL_LINK
}}</a>
</div>
</div>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/app/virtualmachines/vmdetail/vmdetail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { BiocondaService } from '../../api-connector/bioconda.service';
import { ResenvTemplate } from '../conda/resenvTemplate.model';
import { elixir_id, is_vo } from '../../shared/globalvar';
import {
NEW_SVM_PORTAL_LINK,
WIKI_CREATE_SNAPSHOT_LINK,
WIKI_GUACAMOLE_LINK,
WIKI_PERSISTENT_TERMINAL_LINK,
Expand Down Expand Up @@ -807,4 +808,6 @@ export class VmDetailComponent extends AbstractBaseClass implements OnInit {

return true;
}

protected readonly NEW_SVM_PORTAL_LINK = NEW_SVM_PORTAL_LINK;
}

0 comments on commit b99e9de

Please sign in to comment.