diff --git a/bundles/org.openhab.ui/web/build/webpack.config.js b/bundles/org.openhab.ui/web/build/webpack.config.js index 6f79f71d96..04b11ea3d5 100644 --- a/bundles/org.openhab.ui/web/build/webpack.config.js +++ b/bundles/org.openhab.ui/web/build/webpack.config.js @@ -58,7 +58,9 @@ module.exports = { errors: true, runtimeErrors: false, warnings: false - } + }, + webSocketTransport: 'ws', + webSocketURL: apiBaseUrl + '/ws' }, static: [ path.resolve(__dirname, 'www'), @@ -68,6 +70,11 @@ module.exports = { proxy: [{ context: ['/auth', '/rest', '/chart', '/proxy', '/icon', '/static', '/changePassword', '/createApiToken', '/audio'], target: apiBaseUrl + }, + { + context: "/ws", + target: apiBaseUrl, + ws: true }] }, performance: { diff --git a/bundles/org.openhab.ui/web/src/components/app.vue b/bundles/org.openhab.ui/web/src/components/app.vue index 3bc5fb4ae0..86e85be1f4 100644 --- a/bundles/org.openhab.ui/web/src/components/app.vue +++ b/bundles/org.openhab.ui/web/src/components/app.vue @@ -92,7 +92,7 @@ + currentUrl.indexOf('/developer/blocks') < 0 && currentUrl.indexOf('/developer/api-explorer') < 0 && currentUrl.indexOf('/developer/log-viewer') < 0 }">
  • @@ -109,6 +109,10 @@ :class="{ currentsection: currentUrl.indexOf('/developer/api-explorer') === 0 }"> + + + diff --git a/bundles/org.openhab.ui/web/src/js/routes.js b/bundles/org.openhab.ui/web/src/js/routes.js index 128b0b9e18..bcc9e1c940 100644 --- a/bundles/org.openhab.ui/web/src/js/routes.js +++ b/bundles/org.openhab.ui/web/src/js/routes.js @@ -62,6 +62,7 @@ const WidgetEditPage = () => import(/* webpackChunkName: "admin-devtools" */ '.. const BlocksListPage = () => import(/* webpackChunkName: "admin-devtools" */ '../pages/developer/blocks/blocks-list.vue') const BlocksEditPage = () => import(/* webpackChunkName: "blockly-editor" */ '../pages/developer/blocks/blocks-edit.vue') const ApiExplorerPage = () => import(/* webpackChunkName: "admin-devtools" */ '../pages/developer/api-explorer.vue') +const LogViewerPage = () => import(/* webpackChunkName: "admin-devtools" */ '../pages/developer/log-viewer.vue') const SetupWizardPage = () => import(/* webpackChunkName: "setup-wizard" */ '../pages/wizards/setup-wizard.vue') @@ -501,6 +502,11 @@ export default [ path: 'api-explorer', beforeEnter: [enforceAdminForRoute], async: loadAsync(ApiExplorerPage) + }, + { + path: 'log-viewer', + beforeEnter: [enforceAdminForRoute], + async: loadAsync(LogViewerPage) } ] }, diff --git a/bundles/org.openhab.ui/web/src/pages/developer/developer-tools.vue b/bundles/org.openhab.ui/web/src/pages/developer/developer-tools.vue index d7196e68a6..bc4eecb861 100644 --- a/bundles/org.openhab.ui/web/src/pages/developer/developer-tools.vue +++ b/bundles/org.openhab.ui/web/src/pages/developer/developer-tools.vue @@ -44,6 +44,9 @@ + + + diff --git a/bundles/org.openhab.ui/web/src/pages/developer/log-viewer.vue b/bundles/org.openhab.ui/web/src/pages/developer/log-viewer.vue new file mode 100644 index 0000000000..fa2cce607f --- /dev/null +++ b/bundles/org.openhab.ui/web/src/pages/developer/log-viewer.vue @@ -0,0 +1,738 @@ + + + + +