@cmusei/console-forge 0.20.3 → 0.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -755,6 +755,25 @@ var WmksPosition;
|
|
|
755
755
|
WmksPosition[WmksPosition["LEFT_TOP"] = 1] = "LEFT_TOP";
|
|
756
756
|
})(WmksPosition || (WmksPosition = {}));
|
|
757
757
|
|
|
758
|
+
// ===BEGIN LICENSE===
|
|
759
|
+
// Copyright 2025 Carnegie Mellon University. All rights reserved.
|
|
760
|
+
// Released under an MIT (SEI)-style license. See the LICENSE.md file for license information.
|
|
761
|
+
// ===END LICENSE===
|
|
762
|
+
class UuidService {
|
|
763
|
+
get() {
|
|
764
|
+
if (!crypto) {
|
|
765
|
+
throw new Error("Failed to generate UUID: Can't resolve the `crypto` dependency in this environment.");
|
|
766
|
+
}
|
|
767
|
+
return crypto.randomUUID();
|
|
768
|
+
}
|
|
769
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UuidService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
770
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UuidService, providedIn: 'root' });
|
|
771
|
+
}
|
|
772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UuidService, decorators: [{
|
|
773
|
+
type: Injectable,
|
|
774
|
+
args: [{ providedIn: 'root' }]
|
|
775
|
+
}] });
|
|
776
|
+
|
|
758
777
|
// ===BEGIN LICENSE===
|
|
759
778
|
// Copyright 2025 Carnegie Mellon University. All rights reserved.
|
|
760
779
|
// Released under an MIT (SEI)-style license. See the LICENSE.md file for license information.
|
|
@@ -765,6 +784,7 @@ class VmWareConsoleClientService {
|
|
|
765
784
|
logger = inject(LoggerService);
|
|
766
785
|
document = inject(DOCUMENT);
|
|
767
786
|
userSettings = inject(UserSettingsService);
|
|
787
|
+
uuids = inject(UuidService);
|
|
768
788
|
window = inject(WINDOW);
|
|
769
789
|
wmksClient;
|
|
770
790
|
clientType = "vmware";
|
|
@@ -803,6 +823,10 @@ class VmWareConsoleClientService {
|
|
|
803
823
|
if (!options.hostElement) {
|
|
804
824
|
throw new Error("A host element is required to connect to a VMWare WMKS console.");
|
|
805
825
|
}
|
|
826
|
+
if (!options.hostElement.id) {
|
|
827
|
+
this.logger.log(LogLevel.WARNING, "The host element is present but has no ID. VMWare's WMKS requires that it have one, so generating a dummy for now.");
|
|
828
|
+
options.hostElement.id = `cf-console-vmware-dummy-${this.uuids.get()}`;
|
|
829
|
+
}
|
|
806
830
|
this.logger.log(LogLevel.DEBUG, "Connecting to WMKS...", options);
|
|
807
831
|
return new Promise((resolve, reject) => {
|
|
808
832
|
const wmksOptions = {
|
|
@@ -812,7 +836,7 @@ class VmWareConsoleClientService {
|
|
|
812
836
|
useVNCHandshake: false,
|
|
813
837
|
position: WmksPosition.CENTER
|
|
814
838
|
};
|
|
815
|
-
this.logger.log(LogLevel.DEBUG, "Creating WMKS client...", wmksOptions);
|
|
839
|
+
this.logger.log(LogLevel.DEBUG, "Creating WMKS client...", options.hostElement.id, wmksOptions);
|
|
816
840
|
this.wmksClient = createWmksClient(options.hostElement.id, wmksOptions)
|
|
817
841
|
.register(WmksEvents.CONNECTION_STATE_CHANGE, (ev, data) => {
|
|
818
842
|
this.logger.log(LogLevel.DEBUG, "WMKS state change", ev, data);
|
|
@@ -999,25 +1023,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
999
1023
|
args: [{ providedIn: 'root' }]
|
|
1000
1024
|
}] });
|
|
1001
1025
|
|
|
1002
|
-
// ===BEGIN LICENSE===
|
|
1003
|
-
// Copyright 2025 Carnegie Mellon University. All rights reserved.
|
|
1004
|
-
// Released under an MIT (SEI)-style license. See the LICENSE.md file for license information.
|
|
1005
|
-
// ===END LICENSE===
|
|
1006
|
-
class UuidService {
|
|
1007
|
-
get() {
|
|
1008
|
-
if (!crypto) {
|
|
1009
|
-
throw new Error("Failed to generate UUID: Can't resolve the `crypto` dependency in this environment.");
|
|
1010
|
-
}
|
|
1011
|
-
return crypto.randomUUID();
|
|
1012
|
-
}
|
|
1013
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UuidService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1014
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UuidService, providedIn: 'root' });
|
|
1015
|
-
}
|
|
1016
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UuidService, decorators: [{
|
|
1017
|
-
type: Injectable,
|
|
1018
|
-
args: [{ providedIn: 'root' }]
|
|
1019
|
-
}] });
|
|
1020
|
-
|
|
1021
1026
|
// ===BEGIN LICENSE===
|
|
1022
1027
|
// Copyright 2025 Carnegie Mellon University. All rights reserved.
|
|
1023
1028
|
// Released under an MIT (SEI)-style license. See the LICENSE.md file for license information.
|
|
@@ -1624,7 +1629,7 @@ class ConsoleComponent {
|
|
|
1624
1629
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: ConsoleComponent, isStandalone: true, selector: "cf-console", inputs: { autoConnect: { classPropertyName: "autoConnect", publicName: "autoConnect", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isViewOnly: { classPropertyName: "isViewOnly", publicName: "isViewOnly", isSignal: true, isRequired: false, transformFunction: null }, networkConfig: { classPropertyName: "networkConfig", publicName: "networkConfig", isSignal: true, isRequired: false, transformFunction: null }, toolbarComponent: { classPropertyName: "toolbarComponent", publicName: "toolbarComponent", isSignal: true, isRequired: false, transformFunction: null }, toolbarDisabled: { classPropertyName: "toolbarDisabled", publicName: "toolbarDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { connectionStatusChanged: "connectionStatusChanged", consoleClipboardUpdated: "consoleClipboardUpdated", consoleRecorded: "consoleRecorded", ctrlAltDelSent: "ctrlAltDelSent", localClipboardUpdated: "localClipboardUpdated", networkConnectionRequested: "networkConnectionRequested", networkDisconnectRequested: "networkDisconnectRequested", powerRequestSent: "powerRequestSent", reconnectRequest: "reconnectRequest", screenshotCopied: "screenshotCopied" }, providers: [
|
|
1625
1630
|
// the console component has access to the canvas which is injected by
|
|
1626
1631
|
CanvasService
|
|
1627
|
-
], viewQueries: [{ propertyName: "componentContainer", first: true, predicate: ["componentContainer"], descendants: true, isSignal: true }, { propertyName: "consoleHostElement", first: true, predicate: ["consoleHost"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- ===BEGIN LICENSE=== -->\n<!-- Copyright 2025 Carnegie Mellon University. All rights reserved. -->\n<!-- Released under an MIT (SEI)-style license. See the LICENSE.md file for license information. -->\n<!-- ===END LICENSE=== -->\n\n<div #componentContainer class=\"console-component flex\"\n [class.console-client-type-vnc]=\"consoleClient()?.clientType == 'vnc'\"\n [class.console-client-type-vmware]=\"consoleClient()?.clientType == 'vmware'\"\n [class.flex-column]=\"userSettings().toolbar.dockTo === 'top' || userSettings().toolbar.dockTo === 'bottom'\">\n\n @if (toolbarEnabled()) {\n <cf-console-toolbar\n [class.flex-order-1]=\"userSettings().toolbar.dockTo === 'right' || userSettings().toolbar.dockTo === 'bottom'\"\n [consoleClient]=\"consoleClient()!\" [consoleNetworkConfig]=\"networkConfig()\" [isViewOnly]=\"isViewOnly()\"\n (canvasRecordingFinished)=\"consoleRecorded.emit($event)\"\n (canvasRecordingStarted)=\"handleConsoleRecordingStarted()\" [customToolbarComponent]=\"toolbarComponent()\"\n (ctrlAltDelSent)=\"handleCtrlAltDelSent()\" (networkConnectionRequested)=\"networkConnectionRequested.emit($event)\"\n (powerRequestSent)=\"powerRequestSent.emit($event)\"\n (networkDisconnectRequested)=\"networkDisconnectRequested.emit($event)\"\n (reconnectRequestSent)=\"handleReconnectRequest()\" (screenshotCopied)=\"handleScreenshotCopied($event)\"\n (toggleFullscreen)=\"handleFullscreen()\"></cf-console-toolbar>\n }\n\n <div class=\"console-host-container\" [style.background]=\"consoleHostBackgroundStyle\"\n [class.flex-order-0]=\"userSettings().toolbar.dockTo === 'right' || userSettings().toolbar.dockTo === 'bottom'\">\n <cf-console-status [status]=\"consoleClient()?.connectionStatus()\"\n (reconnectRequest)=\"reconnectRequest.emit(this.config())\"></cf-console-status>\n\n <div #consoleHost [id]=\"consoleHostElementId\" class=\"console-host\" [class.recording]=\"isRecording()\"\n [class.view-only]=\"isViewOnly()\">\n </div>\n </div>\n</div>\n", styles: [".console-component{max-width:100vw;max-height:100vh;width:100%;height:100%}cf-console-toolbar{display:block;flex:0 1 auto;max-height:100%;max-width:100%}cf-console-status{width:100%}:fullscreen{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important}:fullscreen cf-console-toolbar{z-index:5}.console-host-container{align-items:center;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;max-height:100%;max-width:100%;justify-content:center}.console-host{max-width:100%;max-height:100%;width:100%;aspect-ratio:16/9;margin:0 auto;overflow:hidden}.console-host.recording{outline:4px solid #ee402e}.flex{display:flex;flex-direction:row}.flex.flex-column{flex-direction:column}.flex-order-0{order:0}.flex-order-1{order:1}.console-component.console-client-type-vmware:not(:fullscreen) ::ng-deep canvas{aspect-ratio:16/9!important;max-height:100%!important;max-width:100%!important}.console-component.console-client-type-vmware .console-host{display:flex;justify-content:center;
|
|
1632
|
+
], viewQueries: [{ propertyName: "componentContainer", first: true, predicate: ["componentContainer"], descendants: true, isSignal: true }, { propertyName: "consoleHostElement", first: true, predicate: ["consoleHost"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- ===BEGIN LICENSE=== -->\n<!-- Copyright 2025 Carnegie Mellon University. All rights reserved. -->\n<!-- Released under an MIT (SEI)-style license. See the LICENSE.md file for license information. -->\n<!-- ===END LICENSE=== -->\n\n<div #componentContainer class=\"console-component flex\"\n [class.console-client-type-vnc]=\"consoleClient()?.clientType == 'vnc'\"\n [class.console-client-type-vmware]=\"consoleClient()?.clientType == 'vmware'\"\n [class.flex-column]=\"userSettings().toolbar.dockTo === 'top' || userSettings().toolbar.dockTo === 'bottom'\">\n\n @if (toolbarEnabled()) {\n <cf-console-toolbar\n [class.flex-order-1]=\"userSettings().toolbar.dockTo === 'right' || userSettings().toolbar.dockTo === 'bottom'\"\n [consoleClient]=\"consoleClient()!\" [consoleNetworkConfig]=\"networkConfig()\" [isViewOnly]=\"isViewOnly()\"\n (canvasRecordingFinished)=\"consoleRecorded.emit($event)\"\n (canvasRecordingStarted)=\"handleConsoleRecordingStarted()\" [customToolbarComponent]=\"toolbarComponent()\"\n (ctrlAltDelSent)=\"handleCtrlAltDelSent()\" (networkConnectionRequested)=\"networkConnectionRequested.emit($event)\"\n (powerRequestSent)=\"powerRequestSent.emit($event)\"\n (networkDisconnectRequested)=\"networkDisconnectRequested.emit($event)\"\n (reconnectRequestSent)=\"handleReconnectRequest()\" (screenshotCopied)=\"handleScreenshotCopied($event)\"\n (toggleFullscreen)=\"handleFullscreen()\"></cf-console-toolbar>\n }\n\n <div class=\"console-host-container\" [style.background]=\"consoleHostBackgroundStyle\"\n [class.flex-order-0]=\"userSettings().toolbar.dockTo === 'right' || userSettings().toolbar.dockTo === 'bottom'\">\n <cf-console-status [status]=\"consoleClient()?.connectionStatus()\"\n (reconnectRequest)=\"reconnectRequest.emit(this.config())\"></cf-console-status>\n\n <div #consoleHost [id]=\"consoleHostElementId\" class=\"console-host\" [class.recording]=\"isRecording()\"\n [class.view-only]=\"isViewOnly()\">\n </div>\n </div>\n</div>\n", styles: [".console-component{max-width:100vw;max-height:100vh;width:100%;height:100%}cf-console-toolbar{display:block;flex:0 1 auto;max-height:100%;max-width:100%}cf-console-status{width:100%}:fullscreen{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important}:fullscreen cf-console-toolbar{z-index:5}.console-host-container{align-items:center;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;max-height:100%;max-width:100%;justify-content:center}.console-host{max-width:100%;max-height:100%;width:100%;aspect-ratio:16/9;margin:0 auto;overflow:hidden}.console-host.recording{outline:4px solid #ee402e}.flex{display:flex;flex-direction:row}.flex.flex-column{flex-direction:column}.flex-order-0{order:0}.flex-order-1{order:1}.console-component.console-client-type-vmware:not(:fullscreen) ::ng-deep canvas{aspect-ratio:16/9!important;max-height:100%!important;max-width:100%!important}.console-component.console-client-type-vmware .console-host{display:flex;justify-content:center;aspect-ratio:16/9;position:relative}.console-component.console-client-type-vmware .console-host.view-only ::ng-deep canvas{cursor:not-allowed;pointer-events:none!important}\n"], dependencies: [{ kind: "component", type: ConsoleStatusComponent, selector: "cf-console-status", inputs: ["status"], outputs: ["reconnectRequest"] }, { kind: "component", type: ConsoleToolbarComponent, selector: "cf-console-toolbar", inputs: ["consoleClient", "consoleNetworkConfig", "customToolbarComponent", "isViewOnly"], outputs: ["canvasRecordingStarted", "canvasRecordingFinished", "ctrlAltDelSent", "keyboardInputSent", "networkConnectionRequested", "networkDisconnectRequested", "powerRequestSent", "reconnectRequestSent", "screenshotCopied", "toggleFullscreen"] }] });
|
|
1628
1633
|
}
|
|
1629
1634
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConsoleComponent, decorators: [{
|
|
1630
1635
|
type: Component,
|
|
@@ -1634,31 +1639,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1634
1639
|
], providers: [
|
|
1635
1640
|
// the console component has access to the canvas which is injected by
|
|
1636
1641
|
CanvasService
|
|
1637
|
-
], template: "<!-- ===BEGIN LICENSE=== -->\n<!-- Copyright 2025 Carnegie Mellon University. All rights reserved. -->\n<!-- Released under an MIT (SEI)-style license. See the LICENSE.md file for license information. -->\n<!-- ===END LICENSE=== -->\n\n<div #componentContainer class=\"console-component flex\"\n [class.console-client-type-vnc]=\"consoleClient()?.clientType == 'vnc'\"\n [class.console-client-type-vmware]=\"consoleClient()?.clientType == 'vmware'\"\n [class.flex-column]=\"userSettings().toolbar.dockTo === 'top' || userSettings().toolbar.dockTo === 'bottom'\">\n\n @if (toolbarEnabled()) {\n <cf-console-toolbar\n [class.flex-order-1]=\"userSettings().toolbar.dockTo === 'right' || userSettings().toolbar.dockTo === 'bottom'\"\n [consoleClient]=\"consoleClient()!\" [consoleNetworkConfig]=\"networkConfig()\" [isViewOnly]=\"isViewOnly()\"\n (canvasRecordingFinished)=\"consoleRecorded.emit($event)\"\n (canvasRecordingStarted)=\"handleConsoleRecordingStarted()\" [customToolbarComponent]=\"toolbarComponent()\"\n (ctrlAltDelSent)=\"handleCtrlAltDelSent()\" (networkConnectionRequested)=\"networkConnectionRequested.emit($event)\"\n (powerRequestSent)=\"powerRequestSent.emit($event)\"\n (networkDisconnectRequested)=\"networkDisconnectRequested.emit($event)\"\n (reconnectRequestSent)=\"handleReconnectRequest()\" (screenshotCopied)=\"handleScreenshotCopied($event)\"\n (toggleFullscreen)=\"handleFullscreen()\"></cf-console-toolbar>\n }\n\n <div class=\"console-host-container\" [style.background]=\"consoleHostBackgroundStyle\"\n [class.flex-order-0]=\"userSettings().toolbar.dockTo === 'right' || userSettings().toolbar.dockTo === 'bottom'\">\n <cf-console-status [status]=\"consoleClient()?.connectionStatus()\"\n (reconnectRequest)=\"reconnectRequest.emit(this.config())\"></cf-console-status>\n\n <div #consoleHost [id]=\"consoleHostElementId\" class=\"console-host\" [class.recording]=\"isRecording()\"\n [class.view-only]=\"isViewOnly()\">\n </div>\n </div>\n</div>\n", styles: [".console-component{max-width:100vw;max-height:100vh;width:100%;height:100%}cf-console-toolbar{display:block;flex:0 1 auto;max-height:100%;max-width:100%}cf-console-status{width:100%}:fullscreen{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important}:fullscreen cf-console-toolbar{z-index:5}.console-host-container{align-items:center;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;max-height:100%;max-width:100%;justify-content:center}.console-host{max-width:100%;max-height:100%;width:100%;aspect-ratio:16/9;margin:0 auto;overflow:hidden}.console-host.recording{outline:4px solid #ee402e}.flex{display:flex;flex-direction:row}.flex.flex-column{flex-direction:column}.flex-order-0{order:0}.flex-order-1{order:1}.console-component.console-client-type-vmware:not(:fullscreen) ::ng-deep canvas{aspect-ratio:16/9!important;max-height:100%!important;max-width:100%!important}.console-component.console-client-type-vmware .console-host{display:flex;justify-content:center;
|
|
1642
|
+
], template: "<!-- ===BEGIN LICENSE=== -->\n<!-- Copyright 2025 Carnegie Mellon University. All rights reserved. -->\n<!-- Released under an MIT (SEI)-style license. See the LICENSE.md file for license information. -->\n<!-- ===END LICENSE=== -->\n\n<div #componentContainer class=\"console-component flex\"\n [class.console-client-type-vnc]=\"consoleClient()?.clientType == 'vnc'\"\n [class.console-client-type-vmware]=\"consoleClient()?.clientType == 'vmware'\"\n [class.flex-column]=\"userSettings().toolbar.dockTo === 'top' || userSettings().toolbar.dockTo === 'bottom'\">\n\n @if (toolbarEnabled()) {\n <cf-console-toolbar\n [class.flex-order-1]=\"userSettings().toolbar.dockTo === 'right' || userSettings().toolbar.dockTo === 'bottom'\"\n [consoleClient]=\"consoleClient()!\" [consoleNetworkConfig]=\"networkConfig()\" [isViewOnly]=\"isViewOnly()\"\n (canvasRecordingFinished)=\"consoleRecorded.emit($event)\"\n (canvasRecordingStarted)=\"handleConsoleRecordingStarted()\" [customToolbarComponent]=\"toolbarComponent()\"\n (ctrlAltDelSent)=\"handleCtrlAltDelSent()\" (networkConnectionRequested)=\"networkConnectionRequested.emit($event)\"\n (powerRequestSent)=\"powerRequestSent.emit($event)\"\n (networkDisconnectRequested)=\"networkDisconnectRequested.emit($event)\"\n (reconnectRequestSent)=\"handleReconnectRequest()\" (screenshotCopied)=\"handleScreenshotCopied($event)\"\n (toggleFullscreen)=\"handleFullscreen()\"></cf-console-toolbar>\n }\n\n <div class=\"console-host-container\" [style.background]=\"consoleHostBackgroundStyle\"\n [class.flex-order-0]=\"userSettings().toolbar.dockTo === 'right' || userSettings().toolbar.dockTo === 'bottom'\">\n <cf-console-status [status]=\"consoleClient()?.connectionStatus()\"\n (reconnectRequest)=\"reconnectRequest.emit(this.config())\"></cf-console-status>\n\n <div #consoleHost [id]=\"consoleHostElementId\" class=\"console-host\" [class.recording]=\"isRecording()\"\n [class.view-only]=\"isViewOnly()\">\n </div>\n </div>\n</div>\n", styles: [".console-component{max-width:100vw;max-height:100vh;width:100%;height:100%}cf-console-toolbar{display:block;flex:0 1 auto;max-height:100%;max-width:100%}cf-console-status{width:100%}:fullscreen{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important}:fullscreen cf-console-toolbar{z-index:5}.console-host-container{align-items:center;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;max-height:100%;max-width:100%;justify-content:center}.console-host{max-width:100%;max-height:100%;width:100%;aspect-ratio:16/9;margin:0 auto;overflow:hidden}.console-host.recording{outline:4px solid #ee402e}.flex{display:flex;flex-direction:row}.flex.flex-column{flex-direction:column}.flex-order-0{order:0}.flex-order-1{order:1}.console-component.console-client-type-vmware:not(:fullscreen) ::ng-deep canvas{aspect-ratio:16/9!important;max-height:100%!important;max-width:100%!important}.console-component.console-client-type-vmware .console-host{display:flex;justify-content:center;aspect-ratio:16/9;position:relative}.console-component.console-client-type-vmware .console-host.view-only ::ng-deep canvas{cursor:not-allowed;pointer-events:none!important}\n"] }]
|
|
1638
1643
|
}], ctorParameters: () => [] });
|
|
1639
1644
|
|
|
1640
1645
|
class ConsoleTileComponent {
|
|
1641
1646
|
config = input();
|
|
1647
|
+
clicked = output();
|
|
1642
1648
|
reconnectRequest = output();
|
|
1643
1649
|
cfConfig = inject(ConsoleForgeConfig);
|
|
1644
1650
|
consoleClientFactory = inject(ConsoleClientFactoryService);
|
|
1645
|
-
consoleClientType = computed(() => this.config()?.consoleClientType || this.cfConfig.defaultConsoleClientType);
|
|
1646
1651
|
consoleHostElement = viewChild("consoleHost");
|
|
1647
1652
|
logger = inject(LoggerService);
|
|
1648
1653
|
uuids = inject(UuidService);
|
|
1649
1654
|
consoleClient;
|
|
1655
|
+
consoleClientType = computed(() => this.config()?.consoleClientType || this.cfConfig.defaultConsoleClientType);
|
|
1650
1656
|
// even though nothing here explicitly references this, every console host element needs an ID
|
|
1651
1657
|
// because the vmware client relies on the ID, not the element reference, to create its canvas
|
|
1652
1658
|
consoleHostElementId = "console-host-tile-" + this.uuids.get();
|
|
1653
1659
|
constructor() {
|
|
1660
|
+
// auto-connect on config
|
|
1654
1661
|
effect(() => {
|
|
1655
1662
|
const config = this.config();
|
|
1656
1663
|
const consoleHostElement = this.consoleHostElement();
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
this.connect(consoleHostElement.nativeElement);
|
|
1660
|
-
this.logger.log(LogLevel.DEBUG, "Reconnected console tile with config", config);
|
|
1664
|
+
if (!config || !consoleHostElement) {
|
|
1665
|
+
return;
|
|
1661
1666
|
}
|
|
1667
|
+
this.logger.log(LogLevel.DEBUG, "Reconnecting console tile with config", config);
|
|
1668
|
+
this.connect(consoleHostElement.nativeElement);
|
|
1669
|
+
this.logger.log(LogLevel.DEBUG, "Reconnected console tile with config", config);
|
|
1662
1670
|
});
|
|
1663
1671
|
}
|
|
1664
1672
|
async connect(hostElement) {
|
|
@@ -1678,13 +1686,13 @@ class ConsoleTileComponent {
|
|
|
1678
1686
|
this.consoleClient.setIsViewOnly(true);
|
|
1679
1687
|
}
|
|
1680
1688
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConsoleTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1681
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.14", type: ConsoleTileComponent, isStandalone: true, selector: "cf-console-tile", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { reconnectRequest: "reconnectRequest" }, viewQueries: [{ propertyName: "consoleHostElement", first: true, predicate: ["consoleHost"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"console-tile-component\">\n <cf-console-status [status]=\"consoleClient?.connectionStatus()\"\n (reconnectRequest)=\"reconnectRequest.emit(this.config())\"></cf-console-status>\n\n <div #consoleHost [id]=\"consoleHostElementId\" class=\"console-host\">\n </div>\n</div>\n", styles: ["::ng-deep canvas{cursor:not-allowed!important;pointer-events:none!important;width:100%!important;height:100%!important}.console-tile-component{height:100%;width:100%;max-height:100%;max-width:100%}.console-host{max-width:100%;max-height:100%;width:100%;aspect-ratio:16/9;margin:0 auto;overflow:hidden}\n"], dependencies: [{ kind: "component", type: ConsoleStatusComponent, selector: "cf-console-status", inputs: ["status"], outputs: ["reconnectRequest"] }] });
|
|
1689
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.14", type: ConsoleTileComponent, isStandalone: true, selector: "cf-console-tile", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked", reconnectRequest: "reconnectRequest" }, viewQueries: [{ propertyName: "consoleHostElement", first: true, predicate: ["consoleHost"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"console-tile-component\">\n <cf-console-status [status]=\"consoleClient?.connectionStatus()\"\n (reconnectRequest)=\"reconnectRequest.emit(this.config())\"></cf-console-status>\n\n <div #consoleHost [id]=\"consoleHostElementId\" class=\"console-host\"\n [class.clickable]=\"consoleClient?.connectionStatus() == 'connected'\"\n [class.console-client-type-vnc]=\"consoleClientType() == 'vnc'\"\n [class.console-client-type-vmware]=\"consoleClientType() == 'vmware'\" (click)=\"clicked.emit(config())\">\n </div>\n</div>\n", styles: ["::ng-deep canvas{cursor:not-allowed!important;pointer-events:none!important;width:100%!important;height:100%!important}.console-tile-component{height:100%;width:100%;max-height:100%;max-width:100%}.console-host{max-width:100%;max-height:100%;width:100%;aspect-ratio:16/9;margin:0 auto;overflow:hidden}.console-host.clickable{cursor:pointer}.console-host.console-client-type-vmware{position:relative}\n"], dependencies: [{ kind: "component", type: ConsoleStatusComponent, selector: "cf-console-status", inputs: ["status"], outputs: ["reconnectRequest"] }] });
|
|
1682
1690
|
}
|
|
1683
1691
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConsoleTileComponent, decorators: [{
|
|
1684
1692
|
type: Component,
|
|
1685
1693
|
args: [{ selector: 'cf-console-tile', imports: [
|
|
1686
1694
|
ConsoleStatusComponent
|
|
1687
|
-
], template: "<div class=\"console-tile-component\">\n <cf-console-status [status]=\"consoleClient?.connectionStatus()\"\n (reconnectRequest)=\"reconnectRequest.emit(this.config())\"></cf-console-status>\n\n <div #consoleHost [id]=\"consoleHostElementId\" class=\"console-host\">\n </div>\n</div>\n", styles: ["::ng-deep canvas{cursor:not-allowed!important;pointer-events:none!important;width:100%!important;height:100%!important}.console-tile-component{height:100%;width:100%;max-height:100%;max-width:100%}.console-host{max-width:100%;max-height:100%;width:100%;aspect-ratio:16/9;margin:0 auto;overflow:hidden}\n"] }]
|
|
1695
|
+
], template: "<div class=\"console-tile-component\">\n <cf-console-status [status]=\"consoleClient?.connectionStatus()\"\n (reconnectRequest)=\"reconnectRequest.emit(this.config())\"></cf-console-status>\n\n <div #consoleHost [id]=\"consoleHostElementId\" class=\"console-host\"\n [class.clickable]=\"consoleClient?.connectionStatus() == 'connected'\"\n [class.console-client-type-vnc]=\"consoleClientType() == 'vnc'\"\n [class.console-client-type-vmware]=\"consoleClientType() == 'vmware'\" (click)=\"clicked.emit(config())\">\n </div>\n</div>\n", styles: ["::ng-deep canvas{cursor:not-allowed!important;pointer-events:none!important;width:100%!important;height:100%!important}.console-tile-component{height:100%;width:100%;max-height:100%;max-width:100%}.console-host{max-width:100%;max-height:100%;width:100%;aspect-ratio:16/9;margin:0 auto;overflow:hidden}.console-host.clickable{cursor:pointer}.console-host.console-client-type-vmware{position:relative}\n"] }]
|
|
1688
1696
|
}], ctorParameters: () => [] });
|
|
1689
1697
|
|
|
1690
1698
|
// ===BEGIN LICENSE===
|