diff --git a/charts/nynja-app-desktop/Chart.yaml b/charts/nynja-app-desktop/Chart.yaml index 35e08ae815053f6532bff3361aef436254738569..d89cbe5cfb4f3ba29bc877d561aca41e077646b1 100644 --- a/charts/nynja-app-desktop/Chart.yaml +++ b/charts/nynja-app-desktop/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "1.0" description: Deployment of the nynja desktop application name: nynja-app-desktop -version: 0.2.10 +version: 0.2.31 diff --git a/charts/nynja-app-desktop/templates/nginx-configmap.yaml b/charts/nynja-app-desktop/templates/nginx-configmap.yaml index 56fe24ade6e7c5c10513cdd5cb287e4f800fab1f..fa210ce8fd28af1575e358f87e4d808e779f0544 100644 --- a/charts/nynja-app-desktop/templates/nginx-configmap.yaml +++ b/charts/nynja-app-desktop/templates/nginx-configmap.yaml @@ -49,29 +49,24 @@ data: location / { root /usr/share/nginx/html; index index.html; - try_files $uri /index.html; + try_files $uri $uri/ /index.html; set $auth_type "Restricted"; # Handle join links (ex. join.nynja.net/123) set $join_link 0; - # Handle client type (web|desktop - default is web) - set $client_type "web"; if ( $host ~ ^join\.(?.+)$ ) { set $join_link 1; set $auth_type "off"; } + if ($request_uri ~ ^/.well-known/.*$ ) { set $join_link 0; set $auth_type "off"; } - if ( $http_referer ~* desktop\.(?.+)$ ) { - set $client_type "desktop"; - } + if ($join_link = 1) { - return 302 https://$client_type.$domain/join$request_uri; - #return 302 https://web.$domain/join$request_uri; - #return 302 https://desktop.$domain/join$request_uri; + return 302 https://desktop.$domain/join$request_uri; } # {{ if .Values.auth.basic.enabled }} @@ -88,7 +83,7 @@ data: location /appversion { auth_basic off; default_type application/json; - return 200 '{"status":"success","version":"0.4.0","build":"1589451878","notes":["Electron Framework updated to latest version 8.0.1","Fixed select all keyboard shortcut (command + A) issue in Mac OS","Handled mic and camera permission issue on Mac OS","Handled black thumbnails in screen share popup on Windows OS","Updated spellcheck feature with stable library","Fixed cancel button issue in Print dialog of Pdf Viewer","Fullscreen and close button issue fixed in Pdf viewer","Added single process for upgrading web and native app upgrade","Seperated Codebase for native application","Fixed screen share and invite link issue for full screenshare dialog"]}'; + return 200 '{"status":"success","version":"0.4.0","build":"0.34.0","notes":["Electron Framework updated to latest version 8.0.1","Fixed select all keyboard shortcut (command + A) issue in Mac OS","Handled mic and camera permission issue on Mac OS","Handled black thumbnails in screen share popup on Windows OS","Updated spellcheck feature with stable library","Fixed cancel button issue in Print dialog of Pdf Viewer","Fullscreen and close button issue fixed in Pdf viewer","Added single process for upgrading web and native app upgrade","Seperated Codebase for native application","Fixed screen share and invite link issue for full screenshare dialog"]}'; } # Webpack debug proxy (temporary) @@ -129,4 +124,4 @@ data: location ~ /\.ht { deny all; } - } + } \ No newline at end of file diff --git a/charts/nynja-app-web/Chart.yaml b/charts/nynja-app-web/Chart.yaml index a3de6ea60562c8067f53e1d437390aa8f0b14476..1f2870887258c11fcada0424202b9d5028f95574 100644 --- a/charts/nynja-app-web/Chart.yaml +++ b/charts/nynja-app-web/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "1.0" description: Deployment of the nynja web application name: nynja-app-web -version: 0.2.7 +version: 0.2.17 diff --git a/charts/nynja-app-web/templates/nginx-configmap.yaml b/charts/nynja-app-web/templates/nginx-configmap.yaml index ca5d14eea04d6299598c4204daa7920fc6333283..28239c62b483fe039e2569cf516e874c020ea633 100644 --- a/charts/nynja-app-web/templates/nginx-configmap.yaml +++ b/charts/nynja-app-web/templates/nginx-configmap.yaml @@ -49,7 +49,7 @@ data: location / { root /usr/share/nginx/html; index index.html; - try_files $uri /index.html; + try_files $uri $uri/ /index.html; set $auth_type "Restricted"; # Handle join links (ex. join.nynja.net/123) @@ -61,17 +61,17 @@ data: set $join_link 1; set $auth_type "off"; } + if ($request_uri ~ ^/.well-known/.*$ ) { set $join_link 0; set $auth_type "off"; } - if ( $http_referer ~* desktop\.(?.+)$ ) { + + if ( $http_referer ~ desktop\..+ ) { set $client_type "desktop"; } if ($join_link = 1) { return 302 https://$client_type.$domain/join$request_uri; - #return 302 https://web.$domain/join$request_uri; - #return 302 https://desktop.$domain/join$request_uri; } # {{ if .Values.auth.basic.enabled }} @@ -124,3 +124,4 @@ data: deny all; } } + diff --git a/lib/desktop_updater.js b/lib/desktop_updater.js index 31657976cc6b61d34acd1a64d64e089ea0573cc0..e753c7e8980414efb90e667b304d834c575c7f7e 100755 --- a/lib/desktop_updater.js +++ b/lib/desktop_updater.js @@ -90,6 +90,7 @@ function ipcRendererOnUpdateEvent(msgJSON) { document.getElementById('update_version_nodejs').innerHTML = (msgJSON.nodejs === undefined ? process.versions.node : msgJSON.chromium); document.getElementById('update-desc-box').style = 'display: none;'; + document.getElementById('update-desc-release-notes').style = 'display: none;'; // document.getElementById('update-info').style = 'display: none;'; document.getElementById('update-conf-box').style = 'display: none;'; document.getElementById('update-conf-yes').style = 'display: none;'; @@ -133,6 +134,7 @@ function ipcRendererOnUpdateEvent(msgJSON) { document.getElementById('update-desc-box').style = 'display: none;'; + document.getElementById('update-desc-release-notes').style = 'display: none;'; // document.getElementById('update-info').style = 'display: none;'; document.getElementById('update-conf-box').style = 'display: none;'; document.getElementById('update-conf-yes').style = 'display: none;'; @@ -191,7 +193,8 @@ function showReleaseNotes(type, msgJSON) { console.log('[DTU]', 'msgJSON.upgrade:',msgJSON.upgrade,releaseNotesVersions) console.log('[DTU]', 'msgJSON.upgrade:',releaseNotes[msgJSON.version],msgJSON.notes) releaseNotes[msgJSON.version] = {}; - releaseNotes[msgJSON.version]["content"] = msgJSON.notes; + releaseNotes[msgJSON.version][msgJSON.build] = msgJSON.notes; + // releaseNotes[msgJSON.version]["content"] = msgJSON.notes; }else{ releaseNotesVersions = [msgJSON.version]; @@ -265,6 +268,8 @@ function updateVersionNotesClick() { function updateInfoClick(msgJSON) { //show modal popup document.getElementById('update-desc-box').style = ''; + document.getElementById('update_download_install').style = 'display: none;'; + document.getElementById('update_refresh_only').style = 'display: none;'; console.log(msgJSON) if (msgJSON.upgrade) { // // // document.getElementById('update-install').removeEventListener('click'); @@ -282,14 +287,15 @@ function updateInfoClick(msgJSON) { }else{ // alert(2) - document.getElementById('update_download_install').innerHTML = 'Refresh Only'; + // document.getElementById('update_download_install').innerHTML = 'Refresh Only'; document.getElementById('update_refresh_only').style = ''; document.getElementById('update_refresh_only').addEventListener("click", startDownloading) - document.getElementById('releases_info_p').innerHTML = 'By clicking on Confirm button, Nynja application will refresh to apply new updates.'; + // document.getElementById('releases_info_p').innerHTML = 'By clicking on Confirm button, Nynja application will refresh to apply new updates.'; } }else{ - - document.getElementById('update_download_install').style = ''; + + document.getElementById('update_download_install').style = ''; + document.getElementById('releases_info_p').innerHTML = 'After finishing the download, NYNJA application will be restarted to apply new updates.'; document.getElementById('update_download_install').addEventListener("click", updateConfClick) } } @@ -562,7 +568,30 @@ if (process.env.currentVersion) { */ var app_ver_split = process.env.currentVersion.split('.'); if(app_ver_split[0]!=='0'|| parseInt(app_ver_split[1])>3){ - getAppVesrion(); + /* + * Listerner to receive latest version + * Send this information to native app to show + */ + document.addEventListener('electron-latest-version', function (e) { + try { + console.log('[DTU]', 'latest-version DATA', e.data); + var version_data = e.data; + if (version_data) { + console.log('[DTU]', 'latest-version', 'if condition', process.env.currentBuild); + // if(process.env.currentBuild==='0') { + process.env.currentBuild = version_data.version; + // process.env.currentBuild = version_data.buildNumber; + // } + getAppVesrion(); + } else { + console.log('[DTU]', 'latest-version', 'else condition'); + } + } catch (err) { + console.error('[DTU]', 'latest-version err', err); + + } + }); + setInterval(function(){ console.log('[DTU] CHECK APP VERSION AFTER 10 MINS') getAppVesrion(); @@ -606,11 +635,34 @@ if (process.env.currentVersion) { // }; console.log('[DTU] current build',process.env.currentBuild); - console.log('[DTU] appversionObj.currentBuild > process.env.currentBuild',(appversionObj.currentBuild > parseInt(process.env.currentBuild))); + // console.log('[DTU] appversionObj.currentBuild > process.env.currentBuild',(appversionObj.currentBuild > parseInt(process.env.currentBuild))); if(process.env.currentBuild){ - if(appversionObj.build > parseInt(process.env.currentBuild)) { + var api_build_split = appversionObj.build.split('.'); + var app_env_curr_build_split = process.env.currentBuild.split('.'); + // if(appversionObj.build > parseInt(process.env.currentBuild)) { + // isBuildUpdate = true; + // } + console.log('[DTU] check build major ',api_build_split[0],'>',app_env_curr_build_split[0]); + console.log('[DTU] check build minor ',api_build_split[1],'>',app_env_curr_build_split[1]); + console.log('[DTU] check build patch ',api_build_split[2],'>',app_env_curr_build_split[2]); + // check major + if(parseInt(api_build_split[0])>parseInt(app_env_curr_build_split[0])){ isBuildUpdate = true; + }else{ + // check minor + if(parseInt(api_build_split[1])>parseInt(app_env_curr_build_split[1])){ + isBuildUpdate = true; + }else{ + // check patch + if(parseInt(api_build_split[2])>parseInt(app_env_curr_build_split[2])){ + isBuildUpdate = true; + }else{ + + isBuildUpdate = false; + } + } } + } console.log('[DTU] current version',process.env.currentVersion); if(process.env.currentVersion){ @@ -647,7 +699,7 @@ if (process.env.currentVersion) { version: appversionObj.version, build: appversionObj.build, currentVersion: process.env.currentVersion, - currentBuild: parseInt(process.env.currentBuild), + currentBuild: process.env.currentBuild, notes: appversionObj.notes, status: 200 }) diff --git a/lib/releaseNotes/releaseNotesDesktop.json b/lib/releaseNotes/releaseNotesDesktop.json index f90059a8f4ea1907fd9add771462e4f5f9e61c23..5f5c74a9aacd9b400e9297b0a2ada33c9afd48b3 100644 --- a/lib/releaseNotes/releaseNotesDesktop.json +++ b/lib/releaseNotes/releaseNotesDesktop.json @@ -1,11 +1,11 @@ { "0.4.1": { - "1589451878": [ + "0.34.0": [ "Stability improvements" ] }, "0.4.0": { - "1589451878": [ + "0.34.0": [ "Electron Framework updated to latest version 8.0.1", "Fixed select all keyboard shortcut (command + A) issue in Mac OS", "Handled mic and camera permission issue on Mac OS", @@ -19,7 +19,7 @@ ] }, "0.3.8": { - "1589451878": [ + "content": [ "Updated login page design.", "Added download guideline in app update process.", "Added release notes in update popup.", diff --git a/releases/dev/nynja-app-web.yaml b/releases/dev/nynja-app-web.yaml index e41e04f5d7d2c077033cc041901759a5db14a6c2..8983a8bf356ed26ab39b90e98136540593877bdb 100644 --- a/releases/dev/nynja-app-web.yaml +++ b/releases/dev/nynja-app-web.yaml @@ -8,7 +8,7 @@ spec: chart: repository: https://nynjagroup.jfrog.io/nynjagroup/helm/ name: nynja-app-web - version: 0.2.7 + version: 0.2.17 values: replicaCount: 1 auth: @@ -31,4 +31,4 @@ spec: host: messaging-service.messaging.svc.cluster.local confcall: service: calling-service.callconf.svc.cluster.local - historyService: calling-service-history.callconf.svc.cluster.local + historyService: calling-service-history.callconf.svc.cluster.local \ No newline at end of file diff --git a/releases/prod/nynja-app-desktop.yaml b/releases/prod/nynja-app-desktop.yaml index f49f1d0d53e299cc237e0ffcf1ad0b48f5378ca1..86fd54606b281ea474599d77cde340e5dd65b5dc 100644 --- a/releases/prod/nynja-app-desktop.yaml +++ b/releases/prod/nynja-app-desktop.yaml @@ -8,7 +8,7 @@ spec: chart: repository: https://nynjagroup.jfrog.io/nynjagroup/helm/ name: nynja-app-desktop - version: 0.2.10 + version: 0.2.31 values: replicaCount: 3 auth: @@ -23,7 +23,6 @@ spec: - api-gateway.default.svc.cluster.local hosts: - desktop.nynja.net - - join.nynja.net wellKnown: appleAppSiteAssociation: appId: 9GKQ5AMF2B.com.nynja.mobile.communicator @@ -31,4 +30,4 @@ spec: host: messaging-service.messaging.svc.cluster.local confcall: service: calling-service.callconf.svc.cluster.local - historyService: calling-service-history.callconf.svc.cluster.local + historyService: calling-service-history.callconf.svc.cluster.local \ No newline at end of file diff --git a/releases/prod/nynja-app-web.yaml b/releases/prod/nynja-app-web.yaml index d3cae4da7d14b7540586983ccfce8478910dbbd0..ab7ab4c1cb365f237bb2d483e535502c61a3eb32 100644 --- a/releases/prod/nynja-app-web.yaml +++ b/releases/prod/nynja-app-web.yaml @@ -8,7 +8,7 @@ spec: chart: repository: https://nynjagroup.jfrog.io/nynjagroup/helm/ name: nynja-app-web - version: 0.2.7 + version: 0.2.17 values: replicaCount: 3 auth: @@ -31,4 +31,4 @@ spec: host: messaging-service.messaging.svc.cluster.local confcall: service: calling-service.callconf.svc.cluster.local - historyService: calling-service-history.callconf.svc.cluster.local + historyService: calling-service-history.callconf.svc.cluster.local \ No newline at end of file diff --git a/releases/staging/nynja-app-desktop.yaml b/releases/staging/nynja-app-desktop.yaml index 3086e4c3b2954b223143f44c2a51bec7c4cf7a64..fcae183ac111f687a75323827065f1b028bc4af2 100644 --- a/releases/staging/nynja-app-desktop.yaml +++ b/releases/staging/nynja-app-desktop.yaml @@ -8,7 +8,7 @@ spec: chart: repository: https://nynjagroup.jfrog.io/nynjagroup/helm/ name: nynja-app-desktop - version: 0.2.10 + version: 0.2.31 values: replicaCount: 3 auth: @@ -23,7 +23,6 @@ spec: - api-gateway.default.svc.cluster.local hosts: - desktop.staging.nynja.net - - join.staging.nynja.net wellKnown: appleAppSiteAssociation: appId: 9GKQ5AMF2B.com.nynja.rc.mobile.communicator @@ -31,4 +30,4 @@ spec: host: messaging-service.messaging.svc.cluster.local confcall: service: calling-service.callconf.svc.cluster.local - historyService: calling-service-history.callconf.svc.cluster.local + historyService: calling-service-history.callconf.svc.cluster.local \ No newline at end of file diff --git a/releases/staging/nynja-app-web.yaml b/releases/staging/nynja-app-web.yaml index b313316dd08523df755ad49dc8cf8b7ef5324c6e..bebc8a7aa61375f94f1d93debac5317097ed89c1 100644 --- a/releases/staging/nynja-app-web.yaml +++ b/releases/staging/nynja-app-web.yaml @@ -8,7 +8,7 @@ spec: chart: repository: https://nynjagroup.jfrog.io/nynjagroup/helm/ name: nynja-app-web - version: 0.2.7 + version: 0.2.17 values: replicaCount: 3 auth: @@ -31,4 +31,4 @@ spec: host: messaging-service.messaging.svc.cluster.local confcall: service: calling-service.callconf.svc.cluster.local - historyService: calling-service-history.callconf.svc.cluster.local + historyService: calling-service-history.callconf.svc.cluster.local \ No newline at end of file diff --git a/src/root.js b/src/root.js index 79e1f121cc00ccc33a995cf4c7eba3923867cdc5..01b785d31aa8041e60a811341c00032ddf0bbb08 100644 --- a/src/root.js +++ b/src/root.js @@ -5,9 +5,21 @@ import { syncHistoryWithStore } from 'react-router-redux' import routes from './routes'; import { appInitActions as actions } from './core/resource/app'; +import NynjaCommunicator from './core/SDK/nynjaCommunicator.sdk'; +import constants from './core/configs/Constants.config'; class Root extends Component { componentDidMount() { this.props.store.dispatch(actions.appInit()); + + /*@akash: start call NynjaCommunicator instance for notify trigger to desktop_update listner */ + const facade = NynjaCommunicator.getInstance(); + const data = { + version: constants.version, + buildNumber: constants.buildNumber, + } + facade.notify('electron-latest-version', data); + /*@akash: end call NynjaCommunicator instance for notify trigger desktop_update listner */ + } render() {