Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Add version to appearance page, make provisioning JSON input resizable (#1715)

DonWillemsb1a077bd56bd
diff --git a/ui/app/manager/src/pages/page-configuration.ts b/ui/app/manager/src/pages/page-configuration.ts
index 33454fe17..df60fc12d 100644
--- a/ui/app/manager/src/pages/page-configuration.ts
+++ b/ui/app/manager/src/pages/page-configuration.ts
@@ -39,6 +39,7 @@ import {DefaultHeaderMainMenu, DefaultHeaderSecondaryMenu, DefaultRealmConfig} f
declare const CONFIG_URL_PREFIX: string;
declare const MANAGER_URL: string | undefined;
+declare const APP_VERSION: string;
export function pageConfigurationProvider(store: Store<AppStateKeyed>): PageProvider<AppStateKeyed> {
return {
@@ -287,6 +288,9 @@ export class PageConfiguration extends Page<AppStateKeyed> {
</div>
`)}
</or-panel>
+ <div style="margin: 0px auto; font-size: smaller;">
+ OpenRemote Manager v${APP_VERSION}
+ </div>
</div>
`
})}
diff --git a/ui/app/manager/src/pages/page-provisioning.ts b/ui/app/manager/src/pages/page-provisioning.ts
index e3485d805..3f72dcee8 100644
--- a/ui/app/manager/src/pages/page-provisioning.ts
+++ b/ui/app/manager/src/pages/page-provisioning.ts
@@ -371,6 +371,7 @@ export class PageProvisioning extends Page<AppStateKeyed> {
<or-mwc-input .label="${i18next.t("CACertPem")}" required
.type="${InputType.TEXTAREA}"
.value="${data.CACertPEM}"
+ resizeVertical
@or-mwc-input-changed="${(e: OrInputChangedEvent) => data.CACertPEM = e.detail.value}"></or-mwc-input>
<or-mwc-input .label="${i18next.t("ignoreExpiryDate")}"
.type="${InputType.CHECKBOX}"
@@ -430,6 +431,7 @@ export class PageProvisioning extends Page<AppStateKeyed> {
<or-mwc-input .label="${i18next.t("assetTemplate")}"
.type="${InputType.JSON}"
.value="${config.assetTemplate ? JSON.stringify(JSON.parse(config.assetTemplate), null, 2) : undefined}"
+ resizeVertical
@or-mwc-input-changed="${(e: OrInputChangedEvent) => config.assetTemplate = e.detail.value ? JSON.stringify(e.detail.value) : undefined}"></or-mwc-input>
<or-mwc-input .label="${i18next.t("createAsRestrictedUser")}"
.type="${InputType.CHECKBOX}"
diff --git a/ui/app/manager/webpack.config.js b/ui/app/manager/webpack.config.js
index 9acfd3ad8..78b88eb27 100644
--- a/ui/app/manager/webpack.config.js
+++ b/ui/app/manager/webpack.config.js
@@ -1,6 +1,7 @@
const util = require("@openremote/util");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const webpack = require("webpack");
+const packageJson = require('./package.json');
module.exports = (env, argv) => {
@@ -46,7 +47,8 @@ module.exports = (env, argv) => {
// Add a custom base URL to resolve the config dir to the path of the dev server not root
config.plugins.push(
new webpack.DefinePlugin({
- CONFIG_URL_PREFIX: JSON.stringify(IS_DEV_SERVER && customConfigDir ? "/manager" : "")
+ CONFIG_URL_PREFIX: JSON.stringify(IS_DEV_SERVER && customConfigDir ? "/manager" : ""),
+ APP_VERSION: JSON.stringify(packageJson.version)
})
);