remote-access/vnc/vnc-viewer/vnc-viewer.component.ts
AfterViewInit
OnDestroy
| selector | c8y-vnc-viewer |
| standalone | true |
| imports |
C8yTranslatePipe
TitleComponent
ActionBarItemComponent
C8yTranslateDirective
IconDirective
NgIf
NgClass
LoadingComponent
|
| templateUrl | ./vnc-viewer.component.html |
Properties |
Methods |
constructor(remoteAccess: RemoteAccessService, activatedRoute: ActivatedRoute, modalService: BsModalService)
|
||||||||||||
|
Parameters :
|
| changeStatus | ||||||
changeStatus(status: "connecting" | "connected" | "disconnected")
|
||||||
|
Parameters :
Returns :
void
|
| connect | |||||||||||||||
connect(container: HTMLElement, deviceId: string, configId: string, noVNC)
|
|||||||||||||||
|
Parameters :
Returns :
void
|
| disconnectFromOldSession |
disconnectFromOldSession()
|
|
Returns :
void
|
| downloadScreenshot |
downloadScreenshot()
|
|
Returns :
void
|
| Async getNoVNCClient |
getNoVNCClient()
|
|
Returns :
Promise<>
|
| ngAfterViewInit |
ngAfterViewInit()
|
|
Returns :
void
|
| ngOnDestroy |
ngOnDestroy()
|
|
Returns :
void
|
| Protected Async requestCredentials | ||||||
requestCredentials(types: Array
|
||||||
|
Parameters :
Returns :
any
|
| sendCtrlAltDel |
sendCtrlAltDel()
|
|
Returns :
void
|
| sendReboot |
sendReboot()
|
|
Returns :
void
|
| sendReset |
sendReset()
|
|
Returns :
void
|
| sendShutDown |
sendShutDown()
|
|
Returns :
void
|
| toggleFullscreen |
toggleFullscreen()
|
|
Returns :
void
|
| connectionSubscription |
Type : Subscription
|
| container |
Type : HTMLElement | null
|
Default value : null
|
| container$ |
Default value : new BehaviorSubject<HTMLElement | null>(null)
|
| noVNCClient |
Type : NoVncClient
|
| powerCapability |
Default value : false
|
| status |
Type : "connecting" | "connected" | "disconnected"
|
Default value : 'connecting'
|
| title |
Type : string
|
Default value : ''
|
| titlePrefix |
Default value : gettext('VNC viewer')
|
<c8y-title>{{ titlePrefix | translate }}: {{ title | translate }}</c8y-title>
<ng-container *ngIf="status === 'connected'">
<c8y-action-bar-item [placement]="'right'">
<button
class="btn btn-link"
(click)="toggleFullscreen()"
>
<i [c8yIcon]="'expand'"></i>
<span translate>Fullscreen</span>
</button>
</c8y-action-bar-item>
<c8y-action-bar-item [placement]="'right'">
<button
class="btn btn-link"
(click)="downloadScreenshot()"
>
<i [c8yIcon]="'download'"></i>
<span translate>Screenshot</span>
</button>
</c8y-action-bar-item>
<c8y-action-bar-item [placement]="'more'">
<button
class="btn btn-link"
(click)="sendCtrlAltDel()"
>
<i [c8yIcon]="'keyboard'"></i>
<span translate>Send Ctrl+Alt+Del</span>
</button>
</c8y-action-bar-item>
</ng-container>
<ng-container *ngIf="powerCapability && status === 'connected'">
<c8y-action-bar-item [placement]="'more'">
<button
class="btn btn-link"
(click)="sendShutDown()"
>
<i [c8yIcon]="'shutdown'"></i>
<span translate>Shutdown</span>
</button>
</c8y-action-bar-item>
<c8y-action-bar-item [placement]="'more'">
<button
class="btn btn-link"
(click)="sendReboot()"
>
<i [c8yIcon]="'reset'"></i>
<span translate>Reboot</span>
</button>
</c8y-action-bar-item>
<c8y-action-bar-item [placement]="'more'">
<button
class="btn btn-link"
(click)="sendReset()"
>
<i [c8yIcon]="'reset'"></i>
<span translate>Reset</span>
</button>
</c8y-action-bar-item>
</ng-container>
<c8y-loading *ngIf="status === 'connecting'"></c8y-loading>
<div
class="content-fullpage"
[ngClass]="{ hidden: status !== 'connected' }"
>
<div
class="inner-scroll"
id="vnc-screen"
></div>
</div>