# HG changeset patch # User Sebastien Jodogne # Date 1622056033 -7200 # Node ID a56bf4c534ef5dd8b22693f18a1f7aa03e4aba58 # Parent 781e9fc8925ea0f01c6927de44fd0b75ac0a9947 display stone web viewer version in info panel diff -r 781e9fc8925e -r a56bf4c534ef Applications/StoneWebViewer/WebApplication/app.js --- a/Applications/StoneWebViewer/WebApplication/app.js Wed May 26 20:52:13 2021 +0200 +++ b/Applications/StoneWebViewer/WebApplication/app.js Wed May 26 21:07:13 2021 +0200 @@ -401,6 +401,7 @@ creatingArchive: false, archiveJob: '', mouseTool: 0, + stoneWebViewerVersion: 'Unknown', modalWarning: false, modalNotDiagnostic: false, @@ -1087,6 +1088,9 @@ console.warn('Stone properly initialized'); + stone.LoadStoneWebViewerVersion(); + app.stoneWebViewerVersion = stone.GetStringBuffer(); + app.SetCombinedToolActions(); var selectedStudies = getParameterFromUrl('selectedStudies'); diff -r 781e9fc8925e -r a56bf4c534ef Applications/StoneWebViewer/WebApplication/index.html --- a/Applications/StoneWebViewer/WebApplication/index.html Wed May 26 20:52:13 2021 +0200 +++ b/Applications/StoneWebViewer/WebApplication/index.html Wed May 26 21:07:13 2021 +0200 @@ -33,6 +33,10 @@ reviewing their images,
for research and for quality assurance.

+

Versions

+

+ Stone Web viewer: {{ stoneWebViewerVersion }} +


diff -r 781e9fc8925e -r a56bf4c534ef Applications/StoneWebViewer/WebAssembly/CMakeLists.txt --- a/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt Wed May 26 20:52:13 2021 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt Wed May 26 21:07:13 2021 +0200 @@ -119,6 +119,10 @@ # Define the WASM module # --------------------------------------------------------------- +add_definitions( + -DSTONE_WEB_VIEWER_VERSION="${STONE_WEB_VIEWER_VERSION}" + ) + add_executable(StoneWebViewer ${ORTHANC_STONE_SOURCES} ${AUTOGENERATED_SOURCES} diff -r 781e9fc8925e -r a56bf4c534ef Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp --- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Wed May 26 20:52:13 2021 +0200 +++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Wed May 26 21:07:13 2021 +0200 @@ -3482,6 +3482,17 @@ EMSCRIPTEN_KEEPALIVE + void LoadStoneWebViewerVersion() + { + try + { + stringBuffer_.assign(STONE_WEB_VIEWER_VERSION); + } + EXTERN_CATCH_EXCEPTIONS; + } + + + EMSCRIPTEN_KEEPALIVE void LoadStudyTags(int i) { try