From c3bdf30768e74bfdf524cb0a4cef07e09e4a1032 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Wed, 23 Oct 2024 16:54:10 +0530 Subject: [PATCH 01/13] sat change --- src/App.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/App.js b/src/App.js index c0f5ba24..f0513ffb 100644 --- a/src/App.js +++ b/src/App.js @@ -391,6 +391,9 @@ export default class App extends Base { if (lifecycle_validationString == true) { process.env.LIFECYCLE_VALIDATION = 'true'; } + if (query.params.pubSubToken) { + process.env.PUBSUB_TOKEN = query.params.pubSubToken; + } process.env.APP_TYPE = query.params.appType ? query.params.appType.toLowerCase() : CONSTANTS.FIREBOLT_CONST; From a13eadd6d877ec6eca7dcc04f83186e2ee5acc14 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Thu, 24 Oct 2024 14:05:52 +0530 Subject: [PATCH 02/13] formatting change --- src/App.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App.js b/src/App.js index f0513ffb..ecea3732 100644 --- a/src/App.js +++ b/src/App.js @@ -391,10 +391,6 @@ export default class App extends Base { if (lifecycle_validationString == true) { process.env.LIFECYCLE_VALIDATION = 'true'; } - if (query.params.pubSubToken) { - process.env.PUBSUB_TOKEN = query.params.pubSubToken; - } - process.env.APP_TYPE = query.params.appType ? query.params.appType.toLowerCase() : CONSTANTS.FIREBOLT_CONST; try { @@ -430,6 +426,10 @@ export default class App extends Base { if (query.params.pubSubUrl) { process.env.PUB_SUB_URL = query.params.pubSubUrl; } + // Set the pubSub token if present + if (query.params.pubSubToken) { + process.env.PUB_SUB_TOKEN = query.params.pubSubToken; + } if (query.task) { setTimeout(() => { From d0c13961e6d04945ea172e1d79fe7643b9c7b278 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Fri, 25 Oct 2024 13:31:50 +0530 Subject: [PATCH 03/13] added debug logs --- src/App.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/App.js b/src/App.js index ecea3732..e6b144f6 100644 --- a/src/App.js +++ b/src/App.js @@ -423,12 +423,17 @@ export default class App extends Base { } // Set the pubSub URL if present + console.log('2507 test log - query param', query.params); + console.log('2507 test log - query param pubsuburl', query.params.pubSubUrl); if (query.params.pubSubUrl) { process.env.PUB_SUB_URL = query.params.pubSubUrl; + console.log('2507 test log - process env pubsuburl', process.env.PUB_SUB_URL); } // Set the pubSub token if present + console.log('2507 test log - query param pubsubtoken', query.params.pubSubToken); if (query.params.pubSubToken) { process.env.PUB_SUB_TOKEN = query.params.pubSubToken; + console.log('2507 test log - process env pubsubtoken', process.env.PUB_SUB_TOKEN); } if (query.task) { From 0d5b41f0bd4cb4906acc2ffdd8a010e50278f79c Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Mon, 28 Oct 2024 11:13:45 +0530 Subject: [PATCH 04/13] navigate to changes --- src/LifeCycleHistory.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/LifeCycleHistory.js b/src/LifeCycleHistory.js index c16d1dbd..2da8132d 100644 --- a/src/LifeCycleHistory.js +++ b/src/LifeCycleHistory.js @@ -115,6 +115,9 @@ export default class LifecycleHistory { process.env.CURRENT_APPID = query.params.appId; process.env.MACADDRESS = query.params.macaddress; process.env.TEST_TOKEN = query.params.testtoken; + console.log('2507 test log - query param pubsubtoken discovery navigate', query.params.pubSubToken); + process.env.PUB_SUB_TOKEN = query.params.pubSubToken; + console.log('2507 test log - process env pubsubtoken discovery navigate', process.env.PUB_SUB_TOKEN); const pubSubListenerCreation = new PubSubCommunication(); const webSocketConnection = await pubSubListenerCreation.startWebSocket(); } From 5f7d391095c06e92906ca5aab14fb0e39061a8e5 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Tue, 29 Oct 2024 16:26:40 +0530 Subject: [PATCH 05/13] comment out testtoken --- src/App.js | 14 +++++++------- src/LifeCycleHistory.js | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/App.js b/src/App.js index e50532a7..b63b6cfe 100644 --- a/src/App.js +++ b/src/App.js @@ -103,7 +103,7 @@ export default class App extends Base { const standalone = new URLSearchParams(appUrl.search).get('standalone'); const standalonePrefix = new URLSearchParams(appUrl.search).get('standalonePrefix'); this.systemui = new URLSearchParams(window.location.search).get('systemui'); - this.testToken = new URLSearchParams(window.location.search).get('testtoken'); + // this.testToken = new URLSearchParams(window.location.search).get('testtoken'); this.pubSubUuidPresent = false; this.appContinue = false; process.env.LIFECYCLE_VALIDATION = lifecycle; @@ -111,7 +111,7 @@ export default class App extends Base { process.env.MF_VALUE = false; testContext ? (process.env.TESTCONTEXT = JSON.parse(testContext)) : (process.env.TESTCONTEXT = false); process.env.TESTCONTEXT = true; // Making TESTCONTEXT = true by default. This line will be removed in later stages when required - process.env.TEST_TOKEN = this.testToken; + // process.env.TEST_TOKEN = this.testToken; process.env.REPORTINGID = reportingId; process.env.STANDALONE = standalone; process.env.STANDALONE_PREFIX = standalonePrefix; @@ -417,11 +417,11 @@ export default class App extends Base { console.log('Error getting App Id :: ', err); } - if (query.params.testtoken) { - process.env.TEST_TOKEN = query.params.testtoken; - } else { - logger.error('No Test Token Found in Parameter Initialization response...', 'getParameterInitializationValues'); - } + // if (query.params.testtoken) { + // process.env.TEST_TOKEN = query.params.testtoken; + // } else { + // logger.error('No Test Token Found in Parameter Initialization response...', 'getParameterInitializationValues'); + // } if (query.params.macaddress) { process.env.MACADDRESS = query.params.macaddress; diff --git a/src/LifeCycleHistory.js b/src/LifeCycleHistory.js index 2da8132d..4b1eb447 100644 --- a/src/LifeCycleHistory.js +++ b/src/LifeCycleHistory.js @@ -108,13 +108,13 @@ export default class LifecycleHistory { const query = JSON.parse(event.data.query); // Establishing a pubSub connection if FCA receives an intent in the navigateTo event with the following parameters. - if (query.params && query.params.appId && query.params.testtoken && query.params.macaddress) { + if (query.params && query.params.appId && query.params.macaddress) { // PUBSUB_CONNECTION environment variable has a pubsub client instance and calls the isConnected function to check the Websocket status. if (!process.env.PUBSUB_CONNECTION || (process.env.PUBSUB_CONNECTION && !process.env.PUBSUB_CONNECTION.isConnected())) { process.env.APP_TYPE = query.params.appType ? query.params.appType.toLowerCase() : CONSTANTS.FIREBOLT_CONST; process.env.CURRENT_APPID = query.params.appId; process.env.MACADDRESS = query.params.macaddress; - process.env.TEST_TOKEN = query.params.testtoken; + // process.env.TEST_TOKEN = query.params.testtoken; console.log('2507 test log - query param pubsubtoken discovery navigate', query.params.pubSubToken); process.env.PUB_SUB_TOKEN = query.params.pubSubToken; console.log('2507 test log - process env pubsubtoken discovery navigate', process.env.PUB_SUB_TOKEN); From ce5c2363243e3619a37a184a190bce9066319f45 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Tue, 29 Oct 2024 19:19:45 +0530 Subject: [PATCH 06/13] addressed comment --- src/App.js | 8 -------- src/LifeCycleHistory.js | 1 - 2 files changed, 9 deletions(-) diff --git a/src/App.js b/src/App.js index b63b6cfe..e45db91d 100644 --- a/src/App.js +++ b/src/App.js @@ -103,7 +103,6 @@ export default class App extends Base { const standalone = new URLSearchParams(appUrl.search).get('standalone'); const standalonePrefix = new URLSearchParams(appUrl.search).get('standalonePrefix'); this.systemui = new URLSearchParams(window.location.search).get('systemui'); - // this.testToken = new URLSearchParams(window.location.search).get('testtoken'); this.pubSubUuidPresent = false; this.appContinue = false; process.env.LIFECYCLE_VALIDATION = lifecycle; @@ -111,7 +110,6 @@ export default class App extends Base { process.env.MF_VALUE = false; testContext ? (process.env.TESTCONTEXT = JSON.parse(testContext)) : (process.env.TESTCONTEXT = false); process.env.TESTCONTEXT = true; // Making TESTCONTEXT = true by default. This line will be removed in later stages when required - // process.env.TEST_TOKEN = this.testToken; process.env.REPORTINGID = reportingId; process.env.STANDALONE = standalone; process.env.STANDALONE_PREFIX = standalonePrefix; @@ -417,12 +415,6 @@ export default class App extends Base { console.log('Error getting App Id :: ', err); } - // if (query.params.testtoken) { - // process.env.TEST_TOKEN = query.params.testtoken; - // } else { - // logger.error('No Test Token Found in Parameter Initialization response...', 'getParameterInitializationValues'); - // } - if (query.params.macaddress) { process.env.MACADDRESS = query.params.macaddress; } else { diff --git a/src/LifeCycleHistory.js b/src/LifeCycleHistory.js index 4b1eb447..13811947 100644 --- a/src/LifeCycleHistory.js +++ b/src/LifeCycleHistory.js @@ -114,7 +114,6 @@ export default class LifecycleHistory { process.env.APP_TYPE = query.params.appType ? query.params.appType.toLowerCase() : CONSTANTS.FIREBOLT_CONST; process.env.CURRENT_APPID = query.params.appId; process.env.MACADDRESS = query.params.macaddress; - // process.env.TEST_TOKEN = query.params.testtoken; console.log('2507 test log - query param pubsubtoken discovery navigate', query.params.pubSubToken); process.env.PUB_SUB_TOKEN = query.params.pubSubToken; console.log('2507 test log - process env pubsubtoken discovery navigate', process.env.PUB_SUB_TOKEN); From 9e0af70b2ccfd7bbcf1f7391794b987966e5b13c Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Tue, 29 Oct 2024 19:27:38 +0530 Subject: [PATCH 07/13] update logs --- src/App.js | 8 +++----- src/LifeCycleHistory.js | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/App.js b/src/App.js index e45db91d..6adfbafa 100644 --- a/src/App.js +++ b/src/App.js @@ -426,17 +426,15 @@ export default class App extends Base { } // Set the pubSub URL if present - console.log('2507 test log - query param', query.params); - console.log('2507 test log - query param pubsuburl', query.params.pubSubUrl); + console.log('2507 test log - query params', query.params); if (query.params.pubSubUrl) { process.env.PUB_SUB_URL = query.params.pubSubUrl; - console.log('2507 test log - process env pubsuburl', process.env.PUB_SUB_URL); + console.log('2507 test log - query params pubsuburl', process.env.PUB_SUB_URL); } // Set the pubSub token if present - console.log('2507 test log - query param pubsubtoken', query.params.pubSubToken); if (query.params.pubSubToken) { process.env.PUB_SUB_TOKEN = query.params.pubSubToken; - console.log('2507 test log - process env pubsubtoken', process.env.PUB_SUB_TOKEN); + console.log('2507 test log - query params pubsubtoken', process.env.PUB_SUB_TOKEN); } if (query.task) { setTimeout(() => { diff --git a/src/LifeCycleHistory.js b/src/LifeCycleHistory.js index 13811947..85701bf9 100644 --- a/src/LifeCycleHistory.js +++ b/src/LifeCycleHistory.js @@ -114,9 +114,8 @@ export default class LifecycleHistory { process.env.APP_TYPE = query.params.appType ? query.params.appType.toLowerCase() : CONSTANTS.FIREBOLT_CONST; process.env.CURRENT_APPID = query.params.appId; process.env.MACADDRESS = query.params.macaddress; - console.log('2507 test log - query param pubsubtoken discovery navigate', query.params.pubSubToken); process.env.PUB_SUB_TOKEN = query.params.pubSubToken; - console.log('2507 test log - process env pubsubtoken discovery navigate', process.env.PUB_SUB_TOKEN); + console.log('2507 test log - query params pubsubtoken discovery navigateTo', process.env.PUB_SUB_TOKEN); const pubSubListenerCreation = new PubSubCommunication(); const webSocketConnection = await pubSubListenerCreation.startWebSocket(); } From a9356803db6711c69697fbf1d78b0525b53a4edc Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Wed, 30 Oct 2024 12:05:09 +0530 Subject: [PATCH 08/13] addressed comment --- src/App.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 6adfbafa..b9c2937a 100644 --- a/src/App.js +++ b/src/App.js @@ -118,7 +118,8 @@ export default class App extends Base { process.env.SDKS_AVAILABLE = [...CONSTANTS.defaultSDKs, ...CONSTANTS.additionalSDKs]; // Set the pubSub URL if present - process.env.PUB_SUB_URL = new URLSearchParams(window.location.search).get('pubSubUrl'); + process.env.PUB_SUB_URL = new URLSearchParams(appUrl.search).get('pubSubUrl'); + process.env.PUB_SUB_TOKEN = new URLSearchParams(appUrl.search).get('pubSubToken'); process.env.MACADDRESS = new URLSearchParams(appUrl.search).get('macaddress'); process.env.CURRENT_APPID = new URLSearchParams(appUrl.search).get('appId'); process.env.APP_TYPE = new URLSearchParams(appUrl.search).get('appType'); From 30bc15e6383c601646eb24f709c2caa3ae3f48f3 Mon Sep 17 00:00:00 2001 From: Nandana-NNR Date: Wed, 30 Oct 2024 12:21:13 +0530 Subject: [PATCH 09/13] dummy commit --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index b9c2937a..73b3cd96 100644 --- a/src/App.js +++ b/src/App.js @@ -11,7 +11,7 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. + * limitations under the License * * SPDX-License-Identifier: Apache-2.0 */ From f0dc327ffb52d65f96b013a54687b7a7d6da1276 Mon Sep 17 00:00:00 2001 From: Kummithi Guru Eswar Sainath Reddy Date: Tue, 12 Nov 2024 12:54:25 +0530 Subject: [PATCH 10/13] Catch region from intent --- src/App.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/App.js b/src/App.js index 73b3cd96..9edea1bb 100644 --- a/src/App.js +++ b/src/App.js @@ -437,6 +437,11 @@ export default class App extends Base { process.env.PUB_SUB_TOKEN = query.params.pubSubToken; console.log('2507 test log - query params pubsubtoken', process.env.PUB_SUB_TOKEN); } + // Set the region if present + if (query.params.region) { + process.env.REGION = query.params.region; + console.log('2507 test log - query params region', process.env.REGION); + } if (query.task) { setTimeout(() => { const intentReader = new IntentReader(); From e6647551dfbb17c92ad86238c5647f5e915c79bc Mon Sep 17 00:00:00 2001 From: Kummithi Guru Eswar Sainath Reddy Date: Tue, 19 Nov 2024 21:45:07 +0530 Subject: [PATCH 11/13] Removed console logs --- src/App.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/App.js b/src/App.js index 9edea1bb..9f968e29 100644 --- a/src/App.js +++ b/src/App.js @@ -11,7 +11,7 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License + * limitations under the License. * * SPDX-License-Identifier: Apache-2.0 */ @@ -427,20 +427,16 @@ export default class App extends Base { } // Set the pubSub URL if present - console.log('2507 test log - query params', query.params); if (query.params.pubSubUrl) { process.env.PUB_SUB_URL = query.params.pubSubUrl; - console.log('2507 test log - query params pubsuburl', process.env.PUB_SUB_URL); } // Set the pubSub token if present if (query.params.pubSubToken) { process.env.PUB_SUB_TOKEN = query.params.pubSubToken; - console.log('2507 test log - query params pubsubtoken', process.env.PUB_SUB_TOKEN); } // Set the region if present if (query.params.region) { process.env.REGION = query.params.region; - console.log('2507 test log - query params region', process.env.REGION); } if (query.task) { setTimeout(() => { From 9f5339553337a5a379edb311ab2e42f76adb3dee Mon Sep 17 00:00:00 2001 From: Kummithi Guru Eswar Sainath Reddy Date: Wed, 20 Nov 2024 09:26:33 +0530 Subject: [PATCH 12/13] Removed console logs --- src/LifeCycleHistory.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/LifeCycleHistory.js b/src/LifeCycleHistory.js index 85701bf9..dfc4ae85 100644 --- a/src/LifeCycleHistory.js +++ b/src/LifeCycleHistory.js @@ -115,7 +115,6 @@ export default class LifecycleHistory { process.env.CURRENT_APPID = query.params.appId; process.env.MACADDRESS = query.params.macaddress; process.env.PUB_SUB_TOKEN = query.params.pubSubToken; - console.log('2507 test log - query params pubsubtoken discovery navigateTo', process.env.PUB_SUB_TOKEN); const pubSubListenerCreation = new PubSubCommunication(); const webSocketConnection = await pubSubListenerCreation.startWebSocket(); } From 5503ab6e8ab5174606b156612c6f3ddf1399bef9 Mon Sep 17 00:00:00 2001 From: Kummithi Guru Eswar Sainath Reddy Date: Mon, 25 Nov 2024 21:19:47 +0530 Subject: [PATCH 13/13] Catching region from url params --- src/App.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App.js b/src/App.js index 9f968e29..22b1ec38 100644 --- a/src/App.js +++ b/src/App.js @@ -125,6 +125,7 @@ export default class App extends Base { process.env.APP_TYPE = new URLSearchParams(appUrl.search).get('appType'); process.env.PUBSUB_SUBSCRIBE_TOPIC_SUFFIX = new URLSearchParams(appUrl.search).get('pubSubSubscribeSuffix'); process.env.PUBSUB_PUBLISH_TOPIC_SUFFIX = new URLSearchParams(appUrl.search).get('pubSubPublishSuffix'); + process.env.REGION = new URLSearchParams(appUrl.search).get('region'); if (platform) { process.env.PLATFORM = platform;