From e3050fa7498504a3da5b1e3775e9fbc1c2288453 Mon Sep 17 00:00:00 2001 From: JackLivio Date: Fri, 20 Nov 2020 10:36:47 -0500 Subject: [PATCH] Add ptu path flag --- src/js/Controllers/FileSystemController.js | 4 +++- src/js/Flags.js | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/js/Controllers/FileSystemController.js b/src/js/Controllers/FileSystemController.js index d723ebe70..ccd909c13 100644 --- a/src/js/Controllers/FileSystemController.js +++ b/src/js/Controllers/FileSystemController.js @@ -1,4 +1,5 @@ import SimpleRPCClient from '../SimpleRPCClient' +import { flags } from '../Flags' class FileSystemController extends SimpleRPCClient { connect(url) { @@ -99,7 +100,8 @@ class FileSystemController extends SimpleRPCClient { } generatePTUFilePath(){ - let path = document.location.pathname; + + let path = flags.PTUPath ? flags.PTUPath : document.location.pathname; let index = path.lastIndexOf('/'); if (index >= 0) { path = path.slice(0, index); diff --git a/src/js/Flags.js b/src/js/Flags.js index 9df1d4e66..c0166cad5 100644 --- a/src/js/Flags.js +++ b/src/js/Flags.js @@ -7,7 +7,8 @@ var flags = { CoreHost: '127.0.0.1', CorePort: 8087, CoreWebEngineAppPort: 2020, - AppStoreDirectoryUrl: 'https://sdl-webengine-app-store-example.s3.amazonaws.com/app-directory.json' + AppStoreDirectoryUrl: 'https://sdl-webengine-app-store-example.s3.amazonaws.com/app-directory.json', + PTUPath: null }; export {flags}; \ No newline at end of file