Skip to content

Commit

Permalink
fix: endpoint for group operations
Browse files Browse the repository at this point in the history
  • Loading branch information
anywie authored and 1mrekq committed Dec 25, 2023
1 parent 877eec5 commit a36e99e
Showing 1 changed file with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,28 +156,20 @@ export class ModuleInteractivePartComponent implements OnInit, OnChanges, OnDest
);
const subview = modulesAPI.getView(this.module.info.name);
let protoAPI: VXAPI;
let vxHostPort: string;
if (window.location.protocol === 'https:') {
vxHostPort = `wss://${window.location.host}`;
} else {
vxHostPort = `ws://${window.location.host}`;
}

if (this.viewMode === ViewMode.Agents) {
protoAPI = new VXAPI({
hash: this.entity.hash,
type: "browser",
moduleName: this.module.info.name,
hostPort: vxHostPort,
agentProto,
protocolProto
});
} else if (this.viewMode === ViewMode.Groups) {
if (this.viewMode === ViewMode.Agents || this.viewMode === ViewMode.Groups) {
let vxHostPort: string;
if (window.location.protocol === 'https:') {
vxHostPort = `wss://${window.location.host}`;
} else {
vxHostPort = `ws://${window.location.host}`;
}
const type = this.viewMode === ViewMode.Agents ? 'browser' : 'aggregate';
protoAPI = new VXAPI({
hash: this.entity.hash,
type: "aggregate",
moduleName: this.module.info.name,
hostPort: vxHostPort,
type,
agentProto,
protocolProto
});
Expand Down

0 comments on commit a36e99e

Please sign in to comment.