mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Remove Citrix code (#2220)
This commit is contained in:
parent
f9baa9d453
commit
5488ef8452
@ -1,165 +1,165 @@
|
|||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
- NodeJS version >= 18.16.0
|
- NodeJS version >= 18.16.0
|
||||||
- Microsoft Visual Studio 2017 Community or Paid (C++ and .NET/C# development tools)
|
- Microsoft Visual Studio 2017 Community or Paid (C++ and .NET/C# development tools)
|
||||||
- Python >= 2.7.1
|
- Python >= 2.7.1
|
||||||
- Dot Net 3.5 SP1 or later
|
- Dot Net 3.5 SP1 or later
|
||||||
|
|
||||||
#### Notes
|
#### Notes
|
||||||
- C++ tools are required to recompile node modules
|
- C++ tools are required to recompile node modules
|
||||||
- Dot NET/C# tools required to compile screen-snippet module
|
- Dot NET/C# tools required to compile screen-snippet module
|
||||||
- Open 'Developer Command Prompt for VS2017'. This sets paths to visual studio build tools.
|
- Open 'Developer Command Prompt for VS2017'. This sets paths to visual studio build tools.
|
||||||
|
|
||||||
### Mac
|
### Mac
|
||||||
- Xcode command line tools. Or better, Xcode latest version
|
- Xcode command line tools. Or better, Xcode latest version
|
||||||
- NodeJS version >= 18.16.0
|
- NodeJS version >= 18.16.0
|
||||||
- [Sudre Packages](http://s.sudre.free.fr/Software/Packages/about.html)
|
- [Sudre Packages](http://s.sudre.free.fr/Software/Packages/about.html)
|
||||||
|
|
||||||
#### Notes
|
#### Notes
|
||||||
- Ensure you have accepted the XCode license agreement
|
- Ensure you have accepted the XCode license agreement
|
||||||
- We use Sudre packages to create a .pkg installer file
|
- We use Sudre packages to create a .pkg installer file
|
||||||
|
|
||||||
## Running SDA
|
## Running SDA
|
||||||
|
|
||||||
- Set this.origin to '*' in `app-bridge.ts` when running the demo.
|
- Set this.origin to '*' in `app-bridge.ts` when running the demo.
|
||||||
- Search for `// DEMO-APP:` and comment that line back in.
|
- Search for `// DEMO-APP:` and comment that line back in.
|
||||||
- Make sure to comment it out again before you commit.
|
- Make sure to comment it out again before you commit.
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
# Build SDA
|
# Build SDA
|
||||||
npm run prebuild
|
npm run prebuild
|
||||||
|
|
||||||
# Run against a POD
|
# Run against a POD
|
||||||
npm run dev -- --url=https://corporate.symphony.com
|
npm run dev -- --url=https://corporate.symphony.com
|
||||||
|
|
||||||
# Run the demo app
|
# Run the demo app
|
||||||
npm run demo
|
npm run demo
|
||||||
```
|
```
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
```
|
```
|
||||||
# Run all the tests
|
# Run all the tests
|
||||||
npm run compile:spec
|
npm run compile:spec
|
||||||
npm run test
|
npm run test
|
||||||
|
|
||||||
# Specific Tests
|
# Specific Tests
|
||||||
npm run test -- --match=spell*
|
npm run test -- --match=spell*
|
||||||
|
|
||||||
# Run Unit tests only
|
# Run Unit tests only
|
||||||
npm run test:unit
|
npm run test:unit
|
||||||
|
|
||||||
# Specific Unit tests
|
# Specific Unit tests
|
||||||
npm run test:unit -- --match=spell*
|
npm run test:unit -- --match=spell*
|
||||||
```
|
```
|
||||||
|
|
||||||
### Code Coverage
|
### Code Coverage
|
||||||
- We capture the Code coverage reports under [coverage](out/coverage)
|
- We capture the Code coverage reports under [coverage](out/coverage)
|
||||||
- To check the test run report, see the [out](out/) directory
|
- To check the test run report, see the [out](out/) directory
|
||||||
- See the [tests](spec/) directory to find all the unit tests
|
- See the [tests](spec/) directory to find all the unit tests
|
||||||
|
|
||||||
## Packaging:
|
## Packaging:
|
||||||
|
|
||||||
- Add Artifactory credentials to your home directory `.npmrc` file
|
- Add Artifactory credentials to your home directory `.npmrc` file
|
||||||
|
|
||||||
1. Login to https://repo.symphony.com/ in your browser
|
1. Login to https://repo.symphony.com/ in your browser
|
||||||
2. Open https://repo.symphony.com/artifactory/webapp/#/profile
|
2. Open https://repo.symphony.com/artifactory/webapp/#/profile
|
||||||
3. Click generate token
|
3. Click generate token
|
||||||
4. Execute `curl --location --request GET 'https://repo.symphony.com/artifactory/api/npm/auth' --header 'X-JFrog-Art-Api: <token from #3>'`
|
4. Execute `curl --location --request GET 'https://repo.symphony.com/artifactory/api/npm/auth' --header 'X-JFrog-Art-Api: <token from #3>'`
|
||||||
5. Update ~/.npmrc with:
|
5. Update ~/.npmrc with:
|
||||||
|
|
||||||
```
|
```
|
||||||
registry = https://repo.symphony.com/artifactory/api/npm/npm-virtual-dev/
|
registry = https://repo.symphony.com/artifactory/api/npm/npm-virtual-dev/
|
||||||
//repo.symphony.com/artifactory/api/npm/npm-virtual-dev/:_auth = <auth value from #4>
|
//repo.symphony.com/artifactory/api/npm/npm-virtual-dev/:_auth = <auth value from #4>
|
||||||
always-auth = true
|
always-auth = true
|
||||||
```
|
```
|
||||||
|
|
||||||
### Mac 🖥
|
### Mac 🖥
|
||||||
- npm install
|
- npm install
|
||||||
- npm run dev (to run locally)
|
- npm run dev (to run locally)
|
||||||
- To build the macOS app:
|
- To build the macOS app:
|
||||||
* Run the command `npm run unpacked-mac`
|
* Run the command `npm run unpacked-mac`
|
||||||
* The distributable is created in the `dist/mac` directory
|
* The distributable is created in the `dist/mac` directory
|
||||||
- To build mac package (installer):
|
- To build mac package (installer):
|
||||||
* Run the command `npm run packed-mac`
|
* Run the command `npm run packed-mac`
|
||||||
* The .pkg file will be generated in the `installer/mac/build` directory
|
* The .pkg file will be generated in the `installer/mac/build` directory
|
||||||
|
|
||||||
### Windows 💻
|
### Windows 💻
|
||||||
- npm install
|
- npm install
|
||||||
- npm run dev (to run locally)
|
- npm run dev (to run locally)
|
||||||
- To build windows unpacked exe:
|
- To build windows unpacked exe:
|
||||||
* Run the command `npm run unpacked-win`
|
* Run the command `npm run unpacked-win`
|
||||||
* The distributable is created in the `dist/win-unpacked` directory
|
* The distributable is created in the `dist/win-unpacked` directory
|
||||||
- To build windows 64-bit unpacked exe:
|
- To build windows 64-bit unpacked exe:
|
||||||
* Run the command `npm run unpacked-win`
|
* Run the command `npm run unpacked-win`
|
||||||
* The distributable is created in the `dist/win-unpacked` directory
|
* The distributable is created in the `dist/win-unpacked` directory
|
||||||
- To create msi (installer):
|
- To create msi (installer):
|
||||||
* Run the advanced installer script located in `installer/win` directory
|
* Run the advanced installer script located in `installer/win` directory
|
||||||
|
|
||||||
#### MSI command line options:
|
#### MSI command line options:
|
||||||
- To install for all users (admin required): msiexec.exe /i Symphony-x64.msi ALLUSERS=1
|
- To install for all users (admin required): msiexec.exe /i Symphony-x64.msi ALLUSERS=1
|
||||||
- To install per user: msiexec.exe /i Symphony-x64.msi ALLUSERS=""
|
- To install per user: msiexec.exe /i Symphony-x64.msi ALLUSERS=""
|
||||||
- To change default pod url: msiexe.exe /i Symphony-x64.msi POD_URL=my.symphony.com
|
- To change default pod url: msiexe.exe /i Symphony-x64.msi POD_URL=my.symphony.com
|
||||||
- To change auto start: msiexe.exe /i Symphony-x64.msi AUTO_LAUNCH=true (or false) - if not specified default it true.
|
- To change auto start: msiexe.exe /i Symphony-x64.msi AUTO_LAUNCH=true (or false) - if not specified default it true.
|
||||||
- To change minimize on close: msiexe.exe /i Symphony-x64.msi MINIMIZE_ON_CLOSE=true (or false) - if not specified default is true.
|
- To change minimize on close: msiexe.exe /i Symphony-x64.msi MINIMIZE_ON_CLOSE=true (or false) - if not specified default is true.
|
||||||
- Any of the above options can be chained together, for example: msiexe.exe /i Symphony-x64.msi MINIMIZE_ON_CLOSE=true AUTO_START=false POD_URL=my.symphony.com
|
- Any of the above options can be chained together, for example: msiexe.exe /i Symphony-x64.msi MINIMIZE_ON_CLOSE=true AUTO_START=false POD_URL=my.symphony.com
|
||||||
- The available values for various settings in the installer is listed below
|
- The available values for various settings in the installer is listed below
|
||||||
* POD_URL (String)
|
* POD_URL (String)
|
||||||
* ALWAYS_ON_TOP (Boolean)
|
* ALWAYS_ON_TOP (Boolean)
|
||||||
* AUTO_LAUNCH (Boolean)
|
* AUTO_LAUNCH (Boolean)
|
||||||
* MINIMIZE_ON_CLOSE (Boolean)
|
* MINIMIZE_ON_CLOSE (Boolean)
|
||||||
* BRING_TO_FRONT (Boolean)
|
* BRING_TO_FRONT (Boolean)
|
||||||
* MEDIA (Boolean)
|
* MEDIA (Boolean)
|
||||||
* LOCATION (Boolean)
|
* LOCATION (Boolean)
|
||||||
* NOTIFICATIONS (Boolean)
|
* NOTIFICATIONS (Boolean)
|
||||||
* MIDI_SYSEX (Boolean)
|
* MIDI_SYSEX (Boolean)
|
||||||
* FULL_SCREEN (Boolean)
|
* FULL_SCREEN (Boolean)
|
||||||
* POINTER_LOCK (Boolean)
|
* POINTER_LOCK (Boolean)
|
||||||
* OPEN_EXTERNAL (Boolean)
|
* OPEN_EXTERNAL (Boolean)
|
||||||
|
|
||||||
### Linux 🐳
|
### Linux 🐳
|
||||||
- Download and install Docker daemon [here](https://www.docker.com/products/docker-desktop)
|
- Download and install Docker daemon [here](https://www.docker.com/products/docker-desktop)
|
||||||
- Run the below docker commands under the project directory
|
- Run the below docker commands under the project directory
|
||||||
- To generate and tag the container
|
- To generate and tag the container
|
||||||
`docker build -t linux:6.0.0 --build-arg REPO=https://github.com/symphonyoss/SymphonyElectron --build-arg BRANCH=linux .`
|
`docker build -t linux:6.0.0 --build-arg REPO=https://github.com/symphonyoss/SymphonyElectron --build-arg BRANCH=linux .`
|
||||||
- To make sure the image is created and tagged correctly
|
- To make sure the image is created and tagged correctly
|
||||||
`docker images`
|
`docker images`
|
||||||
- To run the docker image and generate the linux builds 🎉
|
- To run the docker image and generate the linux builds 🎉
|
||||||
`docker run --name linux linux:6.0.0`
|
`docker run --name linux linux:6.0.0`
|
||||||
- To copy the builds
|
- To copy the builds
|
||||||
`docker cp linux:/SymphonyElectron/dist/symphony-6.1.0.x86_64.rpm ~/Desktop`
|
`docker cp linux:/SymphonyElectron/dist/symphony-6.1.0.x86_64.rpm ~/Desktop`
|
||||||
`docker cp linux:/SymphonyElectron/dist/symphony_6.1.0_amd64.deb ~/Desktop`
|
`docker cp linux:/SymphonyElectron/dist/symphony_6.1.0_amd64.deb ~/Desktop`
|
||||||
|
|
||||||
##### Other useful docker commands
|
##### Other useful docker commands
|
||||||
- To connect to the interactive bash
|
- To connect to the interactive bash
|
||||||
`docker run -i -t linux:6.0.0 /bin/bash`
|
`docker run -i -t linux:6.0.0 /bin/bash`
|
||||||
- To delete all stopper containers
|
- To delete all stopper containers
|
||||||
`docker system prune -a`
|
`docker system prune -a`
|
||||||
- To delete the container/image
|
- To delete the container/image
|
||||||
`docker rmi -f linux:6.0.0`
|
`docker rmi -f linux:6.0.0`
|
||||||
|
|
||||||
### Change POD URL
|
### Change POD URL
|
||||||
- To change the start url (i.e., pod url), edit config/Symphony.config and change 'url' variable. if no protocol provided, then https will be added.
|
- To change the start url (i.e., pod url), edit config/Symphony.config and change 'url' variable. if no protocol provided, then https will be added.
|
||||||
- The installer will include file config/Symphony.config next to executable. Changes in this file will affect all
|
- The installer will include file config/Symphony.config next to executable. Changes in this file will affect all
|
||||||
users.
|
users.
|
||||||
- Alternatively, to run against a specific pod, launch Symphony (SDA) with the command line parameter `--url=pod_url
|
- Alternatively, to run against a specific pod, launch Symphony (SDA) with the command line parameter `--url=pod_url
|
||||||
`. With this, you don't have to change the config/Symphony.config file every time.
|
`. With this, you don't have to change the config/Symphony.config file every time.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
### Logging
|
### Logging
|
||||||
- We enable local logging for dev environments using the module [electron-log](https://www.npmjs.com/package
|
- We enable local logging for dev environments using the module [electron-log](https://www.npmjs.com/package
|
||||||
/electron-log)
|
/electron-log)
|
||||||
- On macOS, we store the logs under `~/Library/Logs/Electron/app_<timestamp>.log`
|
- On macOS, we store the logs under `~/Library/Logs/Electron/app_<timestamp>.log`
|
||||||
- On Windows, we store the logs under `%USERPROFILE%\AppData\Roaming\Electron\app_<timestamp>.log`
|
- On Windows, we store the logs under `%USERPROFILE%\AppData\Roaming\Electron\app_<timestamp>.log`
|
||||||
- On Linux, we store the logs under `~/.config/Electron/logs/app_<timestamp>.log`
|
- On Linux, we store the logs under `~/.config/Electron/logs/app_<timestamp>.log`
|
||||||
|
|
||||||
### Customisation
|
### Customisation
|
||||||
- If you need to run against a POD without proper cert use cmd line option: --ignore-certificate-errors
|
- If you need to run against a POD without proper cert use cmd line option: --ignore-certificate-errors
|
||||||
- To start an additional instance with custom data directory (if you want seperate user) use cmd line options
|
- To start an additional instance with custom data directory (if you want seperate user) use cmd line options
|
||||||
: --multiInstance --userDataPath=`<path to data dir>`
|
: --multiInstance --userDataPath=`<path to data dir>`
|
||||||
- If directory doesn't exist, it will be created
|
- If directory doesn't exist, it will be created
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
import {
|
|
||||||
getCitrixMediaRedirectionStatus,
|
|
||||||
RedirectionStatus,
|
|
||||||
} from '../src/app/citrix-handler';
|
|
||||||
|
|
||||||
let regKeyValue;
|
|
||||||
|
|
||||||
jest.mock('winreg', () => {
|
|
||||||
return jest.fn().mockImplementation(() => {
|
|
||||||
return {
|
|
||||||
get: (_file, callback) => callback(null, regKeyValue),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
jest.mock('../src/common/env', () => {
|
|
||||||
return {
|
|
||||||
isWindowsOS: true,
|
|
||||||
isLinux: false,
|
|
||||||
isMac: false,
|
|
||||||
isDevEnv: true,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('citrix handler', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks().resetModules();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('status inactive', async () => {
|
|
||||||
regKeyValue = null;
|
|
||||||
const status = await getCitrixMediaRedirectionStatus();
|
|
||||||
expect(status).toBe(RedirectionStatus.INACTIVE);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return supported when having the right registry with value 1', async () => {
|
|
||||||
regKeyValue = { value: '0x01', type: 'REG_DWORD' };
|
|
||||||
const status = await getCitrixMediaRedirectionStatus();
|
|
||||||
expect(status).toBe(RedirectionStatus.SUPPORTED);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return unsupported when having the right registry with the wrong registry type', async () => {
|
|
||||||
regKeyValue = { value: '0x01', type: 'REG_BINARY' };
|
|
||||||
const status = await getCitrixMediaRedirectionStatus();
|
|
||||||
expect(status).toBe(RedirectionStatus.UNSUPPORTED);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return unsupported when finding the right registry with value 0 ', async () => {
|
|
||||||
regKeyValue = { value: '0x00', type: 'REG_DWORD' };
|
|
||||||
const status = await getCitrixMediaRedirectionStatus();
|
|
||||||
expect(status).toBe(RedirectionStatus.UNSUPPORTED);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return inactive on non windows Oses', async () => {
|
|
||||||
jest.mock('../src/common/env', () => {
|
|
||||||
return {
|
|
||||||
isWindowsOS: false,
|
|
||||||
isLinux: true,
|
|
||||||
isMac: false,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
const {
|
|
||||||
getCitrixMediaRedirectionStatus,
|
|
||||||
RedirectionStatus,
|
|
||||||
} = require('../src/app/citrix-handler');
|
|
||||||
const status = await getCitrixMediaRedirectionStatus();
|
|
||||||
expect(status).toBe(RedirectionStatus.INACTIVE);
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,65 +0,0 @@
|
|||||||
import { isWindowsOS } from '../common/env';
|
|
||||||
import { logger } from '../common/logger';
|
|
||||||
|
|
||||||
export enum RedirectionStatus {
|
|
||||||
/**
|
|
||||||
* Citrix virtual environment is not active
|
|
||||||
*/
|
|
||||||
INACTIVE = 'inactive',
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Citrix virtual environment is active and media redirection is supported
|
|
||||||
*/
|
|
||||||
SUPPORTED = 'supported',
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Citrix virtual environment is active but media redirection is not supported
|
|
||||||
*/
|
|
||||||
UNSUPPORTED = 'unsupported',
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum RegistryValueType {
|
|
||||||
REG_DWORD = 'REG_DWORD',
|
|
||||||
}
|
|
||||||
|
|
||||||
const CITRIX_REGISTRY_KEY = '\\Software\\Citrix\\HDXMediaStream';
|
|
||||||
const CITRIX_REGISTRY_KEY_NAME = 'MSTeamsRedirSupport';
|
|
||||||
|
|
||||||
export const getCitrixMediaRedirectionStatus = async (): Promise<RedirectionStatus> => {
|
|
||||||
if (!isWindowsOS) {
|
|
||||||
// Citrix virtual environments are not supported on non-Windows OSes
|
|
||||||
return RedirectionStatus.INACTIVE;
|
|
||||||
}
|
|
||||||
const Registry = require('winreg');
|
|
||||||
|
|
||||||
const regKey = new Registry({
|
|
||||||
hive: Registry.HKCU,
|
|
||||||
key: CITRIX_REGISTRY_KEY,
|
|
||||||
});
|
|
||||||
|
|
||||||
return new Promise((resolve, _reject) => {
|
|
||||||
regKey.get(CITRIX_REGISTRY_KEY_NAME, (err, redirectionSupportItem) => {
|
|
||||||
if (err) {
|
|
||||||
logger.info('citrix-handler: error occurred. Details: ', err);
|
|
||||||
resolve(RedirectionStatus.INACTIVE);
|
|
||||||
} else {
|
|
||||||
if (!redirectionSupportItem) {
|
|
||||||
resolve(RedirectionStatus.INACTIVE);
|
|
||||||
}
|
|
||||||
if (redirectionSupportItem.type === 'REG_DWORD') {
|
|
||||||
const redirectionSupportValue = parseInt(
|
|
||||||
redirectionSupportItem.value,
|
|
||||||
16,
|
|
||||||
);
|
|
||||||
if (redirectionSupportValue === 1) {
|
|
||||||
resolve(RedirectionStatus.SUPPORTED);
|
|
||||||
} else {
|
|
||||||
resolve(RedirectionStatus.UNSUPPORTED);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
resolve(RedirectionStatus.UNSUPPORTED);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
@ -25,7 +25,6 @@ import appStateHandler from './app-state-handler';
|
|||||||
import { analytics } from './bi/analytics-handler';
|
import { analytics } from './bi/analytics-handler';
|
||||||
import { closeC9Pipe, connectC9Pipe, writeC9Pipe } from './c9-pipe-handler';
|
import { closeC9Pipe, connectC9Pipe, writeC9Pipe } from './c9-pipe-handler';
|
||||||
import { loadC9Shell, terminateC9Shell } from './c9-shell-handler';
|
import { loadC9Shell, terminateC9Shell } from './c9-shell-handler';
|
||||||
import { getCitrixMediaRedirectionStatus } from './citrix-handler';
|
|
||||||
import { CloudConfigDataTypes, config, ICloudConfig } from './config-handler';
|
import { CloudConfigDataTypes, config, ICloudConfig } from './config-handler';
|
||||||
import { downloadHandler } from './download-handler';
|
import { downloadHandler } from './download-handler';
|
||||||
import { getContentWindowHandle } from './hwnd-handler';
|
import { getContentWindowHandle } from './hwnd-handler';
|
||||||
@ -620,8 +619,6 @@ ipcMain.handle(
|
|||||||
return getContentWindowHandle(windowHandle);
|
return getContentWindowHandle(windowHandle);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case apiCmds.getCitrixMediaRedirectionStatus:
|
|
||||||
return getCitrixMediaRedirectionStatus();
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,6 @@ export enum apiCmds {
|
|||||||
handleSwiftSearchMessageEvents = 'handle-shift-search-message-events',
|
handleSwiftSearchMessageEvents = 'handle-shift-search-message-events',
|
||||||
onSwiftSearchMessage = 'on-shift-search-message',
|
onSwiftSearchMessage = 'on-shift-search-message',
|
||||||
getNativeWindowHandle = 'get-native-window-handle',
|
getNativeWindowHandle = 'get-native-window-handle',
|
||||||
getCitrixMediaRedirectionStatus = 'get-citrix-media-redirection-status',
|
|
||||||
getSources = 'getSources',
|
getSources = 'getSources',
|
||||||
launchCloud9 = 'launch-cloud9',
|
launchCloud9 = 'launch-cloud9',
|
||||||
terminateCloud9 = 'terminate-cloud9',
|
terminateCloud9 = 'terminate-cloud9',
|
||||||
|
@ -108,6 +108,7 @@
|
|||||||
</style>
|
</style>
|
||||||
<link rel="stylesheet" href="download-manager.css" />
|
<link rel="stylesheet" href="download-manager.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="background-color: white">
|
<body style="background-color: white">
|
||||||
<h1>Symphony Electron API Demo</h1>
|
<h1>Symphony Electron API Demo</h1>
|
||||||
<div class="origin-reminder">
|
<div class="origin-reminder">
|
||||||
@ -539,13 +540,6 @@ Writes some thing to the file</textarea
|
|||||||
<input type="text" id="text-window-handle" />
|
<input type="text" id="text-window-handle" />
|
||||||
<hr />
|
<hr />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<hr />
|
|
||||||
<p>Citrix Media Redirection Status:</p>
|
|
||||||
<button id="get-citrix-media-redir">Get status</button>
|
|
||||||
<input type="text" id="text-citrix-media-redir" />
|
|
||||||
<hr />
|
|
||||||
<br />
|
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
const inputs = document.querySelectorAll('input');
|
const inputs = document.querySelectorAll('input');
|
||||||
@ -599,7 +593,6 @@ Writes some thing to the file</textarea
|
|||||||
checkMediaPermission: 'check-media-permission',
|
checkMediaPermission: 'check-media-permission',
|
||||||
restartApp: 'restart-app',
|
restartApp: 'restart-app',
|
||||||
getNativeWindowHandle: 'get-native-window-handle',
|
getNativeWindowHandle: 'get-native-window-handle',
|
||||||
getCitrixMediaRedirectionStatus: 'get-citrix-media-redirection-status',
|
|
||||||
};
|
};
|
||||||
let requestId = 0;
|
let requestId = 0;
|
||||||
|
|
||||||
@ -1577,22 +1570,5 @@ Writes some thing to the file</textarea
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
document
|
|
||||||
.getElementById('get-citrix-media-redir')
|
|
||||||
.addEventListener('click', () => {
|
|
||||||
const resultCallback = (status) => {
|
|
||||||
document.getElementById('text-citrix-media-redir').value = status;
|
|
||||||
};
|
|
||||||
if (window.ssf) {
|
|
||||||
window.ssf.getCitrixMediaRedirectionStatus().then(resultCallback);
|
|
||||||
} else if (window.manaSSF) {
|
|
||||||
window.manaSSF.getCitrixMediaRedirectionStatus().then(resultCallback);
|
|
||||||
} else {
|
|
||||||
postRequest(apiCmds.getCitrixMediaRedirectionStatus, null, {
|
|
||||||
successCallback: resultCallback,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
@ -93,8 +93,6 @@ if (ssfWindow.ssf) {
|
|||||||
getZoomLevel: ssfWindow.ssf.getZoomLevel,
|
getZoomLevel: ssfWindow.ssf.getZoomLevel,
|
||||||
supportedSettings: ssfWindow.ssf.supportedSettings,
|
supportedSettings: ssfWindow.ssf.supportedSettings,
|
||||||
getNativeWindowHandle: ssfWindow.ssf.getNativeWindowHandle,
|
getNativeWindowHandle: ssfWindow.ssf.getNativeWindowHandle,
|
||||||
getCitrixMediaRedirectionStatus:
|
|
||||||
ssfWindow.ssf.getCitrixMediaRedirectionStatus,
|
|
||||||
registerClientBanner: ssfWindow.ssf.registerClientBanner,
|
registerClientBanner: ssfWindow.ssf.registerClientBanner,
|
||||||
launchCloud9: ssfWindow.ssf.launchCloud9,
|
launchCloud9: ssfWindow.ssf.launchCloud9,
|
||||||
terminateCloud9: ssfWindow.ssf.terminateCloud9,
|
terminateCloud9: ssfWindow.ssf.terminateCloud9,
|
||||||
|
@ -7,7 +7,6 @@ import {
|
|||||||
} from '../../package.json';
|
} from '../../package.json';
|
||||||
import { AutoUpdateTrigger } from '../app/auto-update-handler';
|
import { AutoUpdateTrigger } from '../app/auto-update-handler';
|
||||||
import { IShellStatus } from '../app/c9-shell-handler';
|
import { IShellStatus } from '../app/c9-shell-handler';
|
||||||
import { RedirectionStatus } from '../app/citrix-handler';
|
|
||||||
import { IDownloadItem } from '../app/download-handler';
|
import { IDownloadItem } from '../app/download-handler';
|
||||||
import {
|
import {
|
||||||
apiCmds,
|
apiCmds,
|
||||||
@ -827,16 +826,6 @@ export class SSFApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieves the current status of Citrix' media redirection feature
|
|
||||||
* @returns status
|
|
||||||
*/
|
|
||||||
public getCitrixMediaRedirectionStatus(): Promise<RedirectionStatus> {
|
|
||||||
return ipcRenderer.invoke(apiName.symphonyApi, {
|
|
||||||
cmd: apiCmds.getCitrixMediaRedirectionStatus,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows JS to register a function to display a client banner
|
* Allows JS to register a function to display a client banner
|
||||||
* @param callback
|
* @param callback
|
||||||
|
Loading…
Reference in New Issue
Block a user