Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
vm logs key mock
Browse files Browse the repository at this point in the history
  • Loading branch information
wowshakhov committed Nov 23, 2018
1 parent 3012a10 commit b5a757a
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/vm/container/vm-detail.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const vmDescriptionKey = 'csui.vm.description';
[vm]="vm$ | async"
(statsUpdated)="updateStats($event)"
></cs-statistics>
<cs-vm-logs-secret-key></cs-vm-logs-secret-key>
`,
})
export class VmDetailContainerComponent implements OnInit {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<mat-card>
<mat-card-header>
<mat-card-title>
<h2>VM logs key</h2>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<cs-input-group class="full-width-input">
<mat-form-field class="full-width-input" cs-input-group-textbox>
<input matInput [value]="'9378535y32hr9823h832f832fg23fg23'" readonly>
</mat-form-field>
<cs-clipboard-button
cs-input-group-button
[value]="'9378535y32hr9823h832f832fg23fg23'"
tooltipPosition="below"
></cs-clipboard-button>
<button
cs-input-group-button
mat-icon-button
class="mat-icon-button"
(click)="onRefresh()"
>
<mat-icon class="mdi-replay"></mat-icon>
</button>
</cs-input-group>

<a class="truncate" target="_blank" [href]="apiUrl">
http://link_to_docs
</a>
</mat-card-content>
</mat-card>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component } from '@angular/core';
import { filter, onErrorResumeNext } from 'rxjs/operators';

import { DialogService } from '../../../dialog/dialog-service/dialog.service';

@Component({
selector: 'cs-vm-logs-secret-key',
templateUrl: 'vm-logs-secret-key.component.html',
styleUrls: ['vm-logs-secret-key.component.scss'],
})
export class VmLogsSecretKeyComponent {
constructor(private dialogService: DialogService) {}

public onRefresh(): void {
this.dialogService.confirm({ message: 'Are you sure you want to regenerate this key?' }).pipe(
onErrorResumeNext(),
filter(Boolean),
);
}
}
2 changes: 2 additions & 0 deletions src/app/vm/vm.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ import { ServiceOfferingDetailsComponent } from './vm-sidebar/vm-detail/service-
import { SshKeypairComponent } from './vm-sidebar/vm-detail/ssh/ssh-keypair.component';
import { VmDetailTemplateComponent } from './vm-sidebar/vm-detail/template/vm-detail-template.component';
import { VmDetailComponent } from './vm-sidebar/vm-detail/detail/vm-detail.component';
import { VmLogsSecretKeyComponent } from './vm-sidebar/vm-logs-secret-key/vm-logs-secret-key.component';
import { VmSidebarComponent } from './vm-sidebar/vm-sidebar.component';
import { VmTagsComponent } from './vm-sidebar/vm-tags/vm-tags.component';
import { ServiceOfferingSelectorComponent } from './vm-creation/components/service-offering-selector/service-offering-selector.component';
Expand Down Expand Up @@ -207,6 +208,7 @@ import { VmCreationAffinityGroupManagerComponent } from './vm-creation/component
ServiceOfferingSelectorComponent,
InstallationSourceDialogComponent,
VmPasswordComponent,
VmLogsSecretKeyComponent,
],
providers: [VmActionsService, VmService, SshAccessService, HttpAccessService, VncAccessService],
entryComponents: [
Expand Down

0 comments on commit b5a757a

Please sign in to comment.