Skip to content

armgit / core

Public Imported from GitHub
0

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

UI update: Remove obsolete console_loader app (#2031)

Wouter Born916fecb61013
diff --git a/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java b/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java
index ae217c85a..cba6d22ff 100644
--- a/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java
+++ b/manager/src/main/java/org/openremote/manager/web/ManagerWebService.java
@@ -95,10 +95,9 @@ public class ManagerWebService extends WebService {
public static final String MANAGER_APP_PATH = "/manager";
public static final String INSIGHTS_APP_PATH = "/insights";
public static final String SWAGGER_APP_PATH = "/swagger";
- public static final String CONSOLE_LOADER_APP_PATH = "/console_loader";
public static final String SHARED_PATH = "/shared";
- public static final List<String> APP_PATHS = List.of(MANAGER_APP_PATH, INSIGHTS_APP_PATH, SWAGGER_APP_PATH, CONSOLE_LOADER_APP_PATH, SHARED_PATH);
+ public static final List<String> APP_PATHS = List.of(MANAGER_APP_PATH, INSIGHTS_APP_PATH, SWAGGER_APP_PATH, SHARED_PATH);
public static final String UI_CLASSPATH_PREFIX = "org/openremote/web";
diff --git a/ui/app/console_loader/.appignore b/ui/app/console_loader/.appignore
deleted file mode 100644
index e69de29bb..000000000
diff --git a/ui/app/console_loader/.gitignore b/ui/app/console_loader/.gitignore
deleted file mode 100644
index 632fd9253..000000000
--- a/ui/app/console_loader/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-build/
-node_modules/
-test/integration/screenshots-current/
-_site/
-.DS_Store
-src/**/*.d.ts
-src/**/*.js
-src/**/*.js.map
-openremote/**/*.d.ts
-openremote/**/*.js
-openremote/**/*.js.map
\ No newline at end of file
diff --git a/ui/app/console_loader/build.gradle b/ui/app/console_loader/build.gradle
deleted file mode 100644
index 7364d902b..000000000
--- a/ui/app/console_loader/build.gradle
+++ /dev/null
@@ -1,100 +0,0 @@
-apply plugin: 'java'
-apply plugin: "maven-publish"
-apply plugin: "signing"
-
-sourceSets.main.resources.srcDirs += layout.buildDirectory.dir("classes/main")
-
-base {
- archivesName = "openremote-${project.name}"
-}
-
-java {
- withJavadocJar()
- withSourcesJar()
-}
-
-publishing {
- publications {
- maven(MavenPublication) {
- group = "io.openremote.ui"
- artifactId = "openremote-${project.name}"
- from components.java
- pom {
- name = 'OpenRemote Console Loader'
- description = 'Provides the loader for OpenRemote Consoles'
- url = 'https://github.com/openremote/openremote'
- licenses {
- license {
- name = 'GNU Affero General Public License v3.0'
- url = 'https://www.gnu.org/licenses/agpl-3.0.en.html'
- }
- }
- developers {
- developer {
- id = 'developers'
- name = 'Developers'
- email = '[email protected]'
- organization = 'OpenRemote'
- organizationUrl = 'https://openremote.io'
- }
- }
- scm {
- connection = 'scm:git:git://github.com/openremote/openremote.git'
- developerConnection = 'scm:git:ssh://github.com:openremote/openremote.git'
- url = 'https://github.com/openremote/openremote/tree/master'
- }
- }
- }
- }
-
- repositories {
- maven {
- if (!version.endsWith('-LOCAL')) {
- credentials {
- username = findProperty("publishUsername")
- password = findProperty("publishPassword")
- }
- }
- url = version.endsWith('-LOCAL') ? layout.buildDirectory.dir('repo') : version.endsWith('-SNAPSHOT') ? findProperty("snapshotsRepoUrl") : findProperty("releasesRepoUrl")
- }
- }
-}
-
-signing {
- def signingKey = findProperty("signingKey")
- def signingPassword = findProperty("signingPassword")
- if (signingKey && signingPassword) {
- useInMemoryPgpKeys(signingKey, signingPassword)
- sign publishing.publications.maven
- }
-}
-
-tasks.register('cleanDist') {
- dependsOn npmClean
-}
-
-tasks.register('generateSources', Copy) {
- dependsOn npmBuild
- from layout.projectDirectory.dir("dist")
- into layout.buildDirectory.dir("classes/main/org/openremote/web/${project.name}")
-}
-
-tasks.register('prepareUi') {
- dependsOn clean, npmPrepare
-}
-
-tasks.register('publishUi') {
- dependsOn clean, npmPublish
-}
-
-tasks.register('installDist', Copy) {
- dependsOn npmBuild
- mustRunAfter resolveTask(":manager:installDist")
- from layout.projectDirectory.dir("dist")
- into project(':manager').layout.buildDirectory.dir("install/manager/web/${project.name}")
-}
-
-clean.dependsOn(cleanDist)
-jar.dependsOn(generateSources)
-processResources.dependsOn(generateSources)
-sourcesJar.dependsOn(generateSources)
diff --git a/ui/app/console_loader/images/Icon-128.png b/ui/app/console_loader/images/Icon-128.png
deleted file mode 100644
index ff533dc13..000000000
Binary files a/ui/app/console_loader/images/Icon-128.png and /dev/null differ
diff --git a/ui/app/console_loader/images/Icon-144.png b/ui/app/console_loader/images/Icon-144.png
deleted file mode 100644
index 268fcb42f..000000000
Binary files a/ui/app/console_loader/images/Icon-144.png and /dev/null differ
diff --git a/ui/app/console_loader/images/Icon-196.png b/ui/app/console_loader/images/Icon-196.png
deleted file mode 100644
index 97a0a93c0..000000000
Binary files a/ui/app/console_loader/images/Icon-196.png and /dev/null differ
diff --git a/ui/app/console_loader/images/Icon-256.png b/ui/app/console_loader/images/Icon-256.png
deleted file mode 100644
index 869c157e2..000000000
Binary files a/ui/app/console_loader/images/Icon-256.png and /dev/null differ
diff --git a/ui/app/console_loader/images/Icon-48.png b/ui/app/console_loader/images/Icon-48.png
deleted file mode 100644
index f73176b9b..000000000
Binary files a/ui/app/console_loader/images/Icon-48.png and /dev/null differ
diff --git a/ui/app/console_loader/images/Icon-512.png b/ui/app/console_loader/images/Icon-512.png
deleted file mode 100644
index a64a845a6..000000000
Binary files a/ui/app/console_loader/images/Icon-512.png and /dev/null differ
diff --git a/ui/app/console_loader/images/Icon-72.png b/ui/app/console_loader/images/Icon-72.png
deleted file mode 100644
index f30af07e2..000000000
Binary files a/ui/app/console_loader/images/Icon-72.png and /dev/null differ
diff --git a/ui/app/console_loader/images/favicon.ico b/ui/app/console_loader/images/favicon.ico
deleted file mode 100644
index 041659d88..000000000
Binary files a/ui/app/console_loader/images/favicon.ico and /dev/null differ
diff --git a/ui/app/console_loader/images/logo-mobile.png b/ui/app/console_loader/images/logo-mobile.png
deleted file mode 100644
index 15ace0048..000000000
Binary files a/ui/app/console_loader/images/logo-mobile.png and /dev/null differ
diff --git a/ui/app/console_loader/images/logo-mobile.svg b/ui/app/console_loader/images/logo-mobile.svg
deleted file mode 100644
index 93bab486c..000000000
--- a/ui/app/console_loader/images/logo-mobile.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256"><path d="M128,251.42A123.56,123.56,0,0,1,4.58,128H30.42A97.58,97.58,0,1,0,128,30.42V4.58a123.42,123.42,0,0,1,0,246.84Z" fill="#c2d500"/><path d="M109.31,217.54a91.47,91.47,0,1,1,108.23-70.87l-25.29-5.26a65.63,65.63,0,1,0-77.65,50.83l-5.29,25.3Z" fill="#4c9c2e"/><path d="M128.08,187.3c-1,0-2,0-3-.06a59.33,59.33,0,0,1-56.29-62.18l25.81,1.28a33.46,33.46,0,1,0,35.07-31.76l1.29-25.81a59.3,59.3,0,0,1-2.86,118.53Z" fill="#1a5632"/></svg>
\ No newline at end of file
diff --git a/ui/app/console_loader/images/logo.png b/ui/app/console_loader/images/logo.png
deleted file mode 100644
index 2179b259d..000000000
Binary files a/ui/app/console_loader/images/logo.png and /dev/null differ
diff --git a/ui/app/console_loader/images/onboarding-assets.svg b/ui/app/console_loader/images/onboarding-assets.svg
deleted file mode 100644
index b4dbd8e2d..000000000
--- a/ui/app/console_loader/images/onboarding-assets.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256"><path d="M171.69,123.29v48.46H84.31v-68h29.13V94.16L128,79.6l14.56,14.56v29.13Zm-68-9.79H94.1v9.79h9.55Zm0,19.34H94.1v9.79h9.55Zm0,19.57H94.1V162h9.55Zm29.13-58.25h-9.56v9.56h9.56Zm0,19.34h-9.56v9.79h9.56Zm0,19.34h-9.56v9.79h9.56Zm0,19.57h-9.56V162h9.56Zm29.12-19.57h-9.55v9.79h9.55Zm0,19.57h-9.55V162h9.55Z" fill="#27844f"/><path d="M241.87,120.43a3.26,3.26,0,0,1,1.07,2.33V132L237,137.9v5h-8.36v-5L222.74,132v-9.23a3.26,3.26,0,0,1,1.07-2.33,3.22,3.22,0,0,1,2.32-1.06v-6.71h3.32v6.71h6.78v-6.71h3.31v6.71A3.24,3.24,0,0,1,241.87,120.43Z" fill="#66af50"/><path d="M84.35,227.2a11.67,11.67,0,0,1-1.3,5.44,11.31,11.31,0,0,1-3.63,4.14,12.44,12.44,0,0,1-5.16,2.09V244H70.94v-5.13a12.44,12.44,0,0,1-5.16-2.09,11.13,11.13,0,0,1-3.63-4.14,11.67,11.67,0,0,1-1.3-5.44h3.31a7.84,7.84,0,0,0,.67,3.19,8.63,8.63,0,0,0,1.85,2.72,8.28,8.28,0,0,0,2.72,1.82,8.41,8.41,0,0,0,10.49-3.51A8.09,8.09,0,0,0,81,227.2ZM72.6,212.05a5,5,0,0,1,5.05,5v10.1a4.93,4.93,0,0,1-1.46,3.55,5,5,0,0,1-7.18,0,4.93,4.93,0,0,1-1.46-3.55V217.1a5,5,0,0,1,5-5Z" fill="#66af50"/><path d="M82,20a2.21,2.21,0,0,1,.68,1.62V47.4A2.08,2.08,0,0,1,82,49a2.25,2.25,0,0,1-1.61.63H64.71A2.19,2.19,0,0,1,63.17,49a2.11,2.11,0,0,1-.67-1.58V21.61A2.24,2.24,0,0,1,63.17,20a2.11,2.11,0,0,1,1.54-.67h2.84V16h10.1v3.31h2.84A2.09,2.09,0,0,1,82,20ZM77.65,33.67H74.26v-9.3L67.55,37h3.39V46.3Z" fill="#66af50"/><path d="M190.46,17a11.91,11.91,0,0,1,4.26,4.26,11.39,11.39,0,0,1,1.58,5.92A11.68,11.68,0,0,1,195,32.65a11,11,0,0,1-3.71,4.14v3.87a1.57,1.57,0,0,1-.47,1.18,1.6,1.6,0,0,1-1.18.48H179.5a1.64,1.64,0,0,1-1.66-1.66V36.79a11,11,0,0,1-3.7-4.14,11.91,11.91,0,0,1,.23-11.4A11.91,11.91,0,0,1,178.63,17a11.93,11.93,0,0,1,11.83,0Zm-11,28.72h10.1v1.65A1.62,1.62,0,0,1,187.94,49h-6.78a1.61,1.61,0,0,1-1.66-1.66Z" fill="#66af50"/><path d="M30.83,111.27a9.8,9.8,0,0,1,3.67,3.67,10.08,10.08,0,0,1-8.76,15.18h-5v10.1H14V109.93H25.74A10,10,0,0,1,30.83,111.27Zm-2.37,11.16a3.42,3.42,0,0,0,0-4.81,3.18,3.18,0,0,0-2.33-1H20.69v6.78h5.44A3.17,3.17,0,0,0,28.46,122.43Z" fill="#66af50"/><path d="M174.06,226.09H169V222.7h5.05Zm2.28-10.49-3-3.08,2.36-2.36,3,3Zm0,17.59,2.37,2.36-3,3.08-2.36-2.37Zm16.29-17.55a10.17,10.17,0,0,1,3.67,3.7,10.19,10.19,0,0,1,0,10.1,9.87,9.87,0,0,1-3.67,3.67,10.32,10.32,0,0,1-10.17,0,9.72,9.72,0,0,1-3.67-3.67,10.19,10.19,0,0,1,0-10.1,10,10,0,0,1,3.67-3.7,10.06,10.06,0,0,1,10.17,0Zm-3.43-4.7h-3.31v-5h3.31Zm-3.31,26.9h3.31v5h-3.31Zm12.85-22.24-2.36-2.45,3-3,2.36,2.36Zm0,17.59,3,3.07-2.36,2.37-3-3.08ZM201,222.7h5.05v3.39H201Z" fill="#66af50"/><path d="M76,130.5H74a2.5,2.5,0,0,1,0-5h2a2.5,2.5,0,0,1,0,5Z" fill="#c2d500"/><path d="M61.57,130.5H57.43a2.5,2.5,0,0,1,0-5h4.14a2.5,2.5,0,0,1,0,5Z" fill="#c2d500"/><path d="M45,130.5H43a2.5,2.5,0,0,1,0-5h2a2.5,2.5,0,0,1,0,5Z" fill="#c2d500"/><path d="M104.74,89.72a2.49,2.49,0,0,1-2.17-1.26l-1-1.74a2.5,2.5,0,1,1,4.34-2.47l1,1.73a2.5,2.5,0,0,1-.93,3.41A2.43,2.43,0,0,1,104.74,89.72Z" fill="#c2d500"/><path d="M96.91,76a2.51,2.51,0,0,1-2.18-1.26l-2.28-4a2.5,2.5,0,1,1,4.35-2.47l2.28,4a2.5,2.5,0,0,1-.94,3.41A2.39,2.39,0,0,1,96.91,76Z" fill="#c2d500"/><path d="M87.79,60a2.51,2.51,0,0,1-2.18-1.27l-1-1.73A2.5,2.5,0,0,1,89,54.53l1,1.74A2.51,2.51,0,0,1,87.79,60Z" fill="#c2d500"/><path d="M151.41,91.55a2.51,2.51,0,0,1-2.14-3.79l1-1.71a2.5,2.5,0,0,1,4.29,2.57l-1,1.72A2.5,2.5,0,0,1,151.41,91.55Z" fill="#c2d500"/><path d="M160.14,77a2.42,2.42,0,0,1-1.29-.36,2.5,2.5,0,0,1-.86-3.43L160.56,69a2.5,2.5,0,1,1,4.28,2.57l-2.56,4.27A2.5,2.5,0,0,1,160.14,77Z" fill="#c2d500"/><path d="M170.39,60a2.45,2.45,0,0,1-1.29-.36,2.5,2.5,0,0,1-.85-3.43l1-1.71a2.5,2.5,0,1,1,4.29,2.57l-1,1.72A2.48,2.48,0,0,1,170.39,60Z" fill="#c2d500"/><path d="M180,130.5h-2a2.5,2.5,0,0,1,0-5h2a2.5,2.5,0,0,1,0,5Z" fill="#c2d500"/><path d="M197,130.5h-4.25a2.5,2.5,0,0,1,0-5H197a2.5,2.5,0,0,1,0,5Z" fill="#c2d500"/><path d="M211.73,130.5h-2a2.5,2.5,0,0,1,0-5h2a2.5,2.5,0,1,1,0,5Z" fill="#c2d500"/><path d="M157.41,181.72a2.5,2.5,0,0,1-2.17-1.26l-1-1.73a2.5,2.5,0,1,1,4.34-2.49l1,1.73a2.5,2.5,0,0,1-.93,3.41A2.44,2.44,0,0,1,157.41,181.72Z" fill="#c2d500"/><path d="M164.55,194.15a2.51,2.51,0,0,1-2.17-1.25l-1.78-3.11a2.5,2.5,0,0,1,4.33-2.49l1.79,3.11a2.49,2.49,0,0,1-.93,3.41A2.43,2.43,0,0,1,164.55,194.15Z" fill="#c2d500"/><path d="M170.9,205.22a2.51,2.51,0,0,1-2.17-1.26l-1-1.73a2.5,2.5,0,1,1,4.33-2.49l1,1.73a2.51,2.51,0,0,1-2.17,3.75Z" fill="#c2d500"/><path d="M98.21,181.71A2.5,2.5,0,0,1,96.05,178l1-1.72a2.5,2.5,0,1,1,4.32,2.51l-1,1.73A2.48,2.48,0,0,1,98.21,181.71Z" fill="#c2d500"/><path d="M89.86,196.06a2.45,2.45,0,0,1-1.25-.34,2.49,2.49,0,0,1-.91-3.41l2.09-3.59a2.5,2.5,0,1,1,4.32,2.51L92,194.82A2.48,2.48,0,0,1,89.86,196.06Z" fill="#c2d500"/><path d="M82.59,208.56a2.48,2.48,0,0,1-1.25-.34,2.5,2.5,0,0,1-.91-3.42l1-1.73a2.5,2.5,0,0,1,4.32,2.51l-1,1.73A2.52,2.52,0,0,1,82.59,208.56Z" fill="#c2d500"/></svg>
\ No newline at end of file
diff --git a/ui/app/console_loader/images/onboarding-geofence.svg b/ui/app/console_loader/images/onboarding-geofence.svg
deleted file mode 100644
index 76f7396a0..000000000
--- a/ui/app/console_loader/images/onboarding-geofence.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256"><circle cx="128" cy="128" r="122.01" fill="#27844f"/><path d="M172.23,79.19h26.09a7.92,7.92,0,0,1,7.8,7.8v15.6a7.92,7.92,0,0,1-7.8,7.81H180L164.43,126V87a7.91,7.91,0,0,1,7.8-7.8Z" fill="#66af50"/><path d="M80.91,152.72a16,16,0,0,1,5.8,5.8,15.35,15.35,0,0,1,2.14,7.93,25,25,0,0,1-2.46,9.87A77.7,77.7,0,0,1,80.91,186q-2.56,3.65-5.57,7.4l-2.47,2.9-2.47-2.9q-3-3.75-5.58-7.4a77.52,77.52,0,0,1-5.47-9.66,25,25,0,0,1-2.46-9.87A15.35,15.35,0,0,1,59,158.52a16.1,16.1,0,0,1,5.79-5.8,16.19,16.19,0,0,1,16.09,0Zm-4,17.86a5.67,5.67,0,1,0-4,1.67A5.47,5.47,0,0,0,76.89,170.58Z" fill="#66af50"/><path d="M150.9,82.24a9.86,9.86,0,0,0-7.2-3H107.13a9.84,9.84,0,0,0-7.19,3,10.12,10.12,0,0,0-3,7.43v72.66a10.12,10.12,0,0,0,3,7.43,9.8,9.8,0,0,0,7.19,3.05H143.7a9.83,9.83,0,0,0,7.2-3.05,10.11,10.11,0,0,0,3-7.43V89.67A10.11,10.11,0,0,0,150.9,82.24Zm-7.2,69.85H107.13V99.91H143.7Z" fill="#fff"/></svg>
\ No newline at end of file
diff --git a/ui/app/console_loader/index.html b/ui/app/console_loader/index.html
deleted file mode 100644
index 37aa0875c..000000000
--- a/ui/app/console_loader/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes, viewport-fit=cover">
-
- <title>OpenRemote</title>
- <meta name="application-name" content="OpenRemote">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="apple-mobile-web-app-title" content="OpenRemote">
-
- <meta name="msapplication-TileImage" content="images/Icon-144.png">
- <meta name="msapplication-TileColor" content="#ffffff">
- <meta name="msapplication-tap-highlight" content="no">
-
- <link rel="icon" href="images/favicon.ico">
- <meta name="theme-color" content="#ffffff">
-
- <!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
- <meta name="mobile-web-app-capable" content="yes">
-
- <!-- Add to homescreen for Safari on iOS -->
- <meta name="apple-mobile-web-app-capable" content="yes">
-
- <!-- Homescreen icons -->
- <link rel="apple-touch-icon" href="images/Icon-48.png">
- <link rel="apple-touch-icon" sizes="72x72" href="images/Icon-72.png">
- <link rel="apple-touch-icon" sizes="144x144" href="images/Icon-144.png">
- <link rel="apple-touch-icon" sizes="192x192" href="images/Icon-196.png">
-
- <!-- Tile icon for Windows 8 (144x144 + tile color) -->
- <meta name="msapplication-TileImage" content="images/Icon-144.png">
- <meta name="msapplication-TileColor" content="#ffffff">
- <meta name="msapplication-tap-highlight" content="no">
-
- <!-- Default twitter cards -->
- <meta name="twitter:card" content="summary">
- <meta name="twitter:site" content="@username">
- <meta property="og:type" content="website">
- <meta property="og:site_name" content="my-app">
- <meta property="og:image" content="images/Icon-144.png" />
-
- <!--
- Feature detect Custom Elements support. If the browser DOES support Custom
- Elements then we need to load the custom-elements-es5-adapter because
- our project code has been transpiled from ES2015 to ES5 and native Custom
- Elements expect elements will be registered as classes.
- -->
- <script>if (!window.customElements) { document.write('<!--'); }</script>
- <script src="./modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
- <!--! DO NOT REMOVE THIS COMMENT, WE NEED ITS CLOSING MARKER -->
-
- <style>
- html {
- height: 100%;
- }
- body {
- margin: 0;
- font-family: "Segoe UI", Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
- line-height: 1.5;
- height: 100%;
- -webkit-font-smoothing: antialiased;
- overflow: hidden;
- }
- </style>
-
-
-</head>
-<body>
-<!--
-Use the webcomponents-loader script which will feature detect which Web
-Components features are missing and lazy load the appropriate polyfills.
-When we hear the 'WebComponentsReady' event from the polyfill bundle we can
-insert our 'bundle.js'.
--->
-<script>
- (function () {
- document.addEventListener('WebComponentsReady', function componentsReady() {
- document.removeEventListener('WebComponentsReady', componentsReady, false);
- var script = document.createElement('script');
- script.src = '<%= htmlWebpackPlugin.files.js[0] %>';
- var refScript = document.getElementsByTagName('script')[0];
- refScript.parentNode.insertBefore(script, refScript);
- }, false);
- })();
-</script>
-<script src="modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
-</body>
-</html>
diff --git a/ui/app/console_loader/package.json b/ui/app/console_loader/package.json
deleted file mode 100644
index 5006d6fb0..000000000
--- a/ui/app/console_loader/package.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "console_loader",
- "version": "1.8.0-snapshot",
- "description": "Console App Loader",
- "author": "OpenRemote",
- "license": "AGPL-3.0-or-later",
- "private": true,
- "exports": {
- "./*": "./lib/*.js"
- },
- "scripts": {
- "clean": "npx tsc -b --clean && npx shx rm -rf dist lib",
- "modelBuild": "npx orutil build",
- "modelWatch": "npx orutil watch",
- "build": "npx cross-env NODE_OPTIONS=--max_old_space_size=4096 rspack --mode production",
- "serve": "npx orutil build && npx cross-env NODE_OPTIONS=--max_old_space_size=4096 rspack serve --host 0.0.0.0 --mode development",
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "dependencies": {
- "@openremote/or-app": "workspace:*"
- },
- "devDependencies": {
- "@openremote/util": "workspace:*"
- }
-}
diff --git a/ui/app/console_loader/rspack.config.js b/ui/app/console_loader/rspack.config.js
deleted file mode 100644
index c6e35ae07..000000000
--- a/ui/app/console_loader/rspack.config.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const util = require("@openremote/util");
-
-module.exports = (env, argv) => {
- const IS_DEV_SERVER = process.argv.find(arg => arg.includes('rspack serve'));
- return util.getAppConfig(argv.mode, IS_DEV_SERVER, __dirname);
-};
diff --git a/ui/app/console_loader/src/index.ts b/ui/app/console_loader/src/index.ts
deleted file mode 100644
index 311c9c123..000000000
--- a/ui/app/console_loader/src/index.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-// Declare require method which we'll use for importing webpack resources (using ES6 imports will confuse typescript parser)
-import { Auth, ManagerConfig } from "@openremote/model";
-
-declare function require(name: string): any;
-
-import {combineReducers, configureStore} from "@reduxjs/toolkit";
-import "@openremote/or-app";
-import {
- OrApp,
- AppConfig,
- appReducer} from "@openremote/or-app";
-
-import "./pages/page-mobile-onboarding";
-import {pageMobileOnboardingProvider, OnboardingConfig} from "./pages/page-mobile-onboarding";
-import "./pages/page-mobile-splash";
-import {pageMobileSplashProvider, SplashConfig} from "./pages/page-mobile-splash";
-import "./pages/page-mobile-geofences";
-import {pageMobileGeofencesProvider} from "./pages/page-mobile-geofences";
-import { Util } from "@openremote/core";
-
-const onboardingConfig:OnboardingConfig = {
- pages: [
- {
- title: "The city assets in your pocket",
- type: "default",
- description: "With this app you have all live asset data conveniently available. Handy when doing maintenance or installing new devices.",
- image: require("../images/onboarding-assets.svg"),
- enableProviders: [
- {
- name:"push",
- action:"PROVIDER_ENABLE"
- }
- ],
- },
- {
- title: "At the right time and the right place",
- type: "bottom-image",
- description: "You can receive notifications that are created by workflow rules. Based on your location relevant messages can be sent to you.",
- enableProviders: [
- {
- name:"geofence",
- action:"PROVIDER_ENABLE"
- }
- ],
- image: require("../images/onboarding-geofence.svg")
- }
- ],
- redirect: "/manager/?realm=smartcity&consoleProviders=geofence push storage"
-}
-
-const splashConfig:SplashConfig = {
- redirect: "#onboarding/",
- interval: 3000,
- logoMobile: require("../images/logo-mobile.svg")
-}
-
-declare var MANAGER_URL: string;
-
-const rootReducer = combineReducers({
- app: appReducer
-});
-
-type RootState = ReturnType<typeof rootReducer>;
-
-export const store = configureStore({
- reducer: rootReducer
-});
-
-const orApp = new OrApp(store);
-const managerConfig: ManagerConfig = {
- managerUrl: MANAGER_URL,
- auth: Auth.NONE,
- autoLogin: false,
- realm: Util.getQueryParameter("realm"),
- consoleAutoEnable: false,
- loadTranslations: ["app", "or"],
- defaultLanguage: Util.getBrowserLanguage(),
-};
-
-const appConfig: AppConfig<RootState> = {
- pages: [
- pageMobileSplashProvider(store, splashConfig),
- pageMobileGeofencesProvider(store),
- pageMobileOnboardingProvider(store, onboardingConfig)
- ],
- realms: {
- default: {
- appTitle: "OpenRemote",
- logo: require("../images/logo.png"),
- logoMobile: require("../images/logo-mobile.png")
- }
- }
-};
-orApp.managerConfig = managerConfig;
-orApp.appConfig = appConfig;
-document.body.appendChild(orApp);
diff --git a/ui/app/console_loader/src/pages/page-mobile-geofences.ts b/ui/app/console_loader/src/pages/page-mobile-geofences.ts
deleted file mode 100644
index a56d7addf..000000000
--- a/ui/app/console_loader/src/pages/page-mobile-geofences.ts
+++ /dev/null
@@ -1,370 +0,0 @@
-import {css, html, PropertyValues} from "lit";
-import {customElement, property} from "lit/decorators.js";
-import {Page, PageProvider, AppStateKeyed} from "@openremote/or-app";
-import {NavigationControl} from "maplibre-gl";
-import {Store} from "@reduxjs/toolkit";
-import manager, {Util} from "@openremote/core";
-import {JsonRulesetDefinition} from "@openremote/model";
-import {OrMap, OrMapClickedEvent, OrMapMarker, OrMapMarkerClickedEvent} from "@openremote/or-map";
-
-export interface GeofencesConfig {
-}
-
-export function pageMobileGeofencesProvider(store: Store<AppStateKeyed>, config?: GeofencesConfig): PageProvider<AppStateKeyed> {
- return {
- name: "geofences",
- routes: [
- "geofences"
- ],
- pageCreator: () => {
- const page = new PageMobileGeofences(store);
- if(config) page.config = config;
- return page;
- }
- };
-}
-const QUERY_VIEW = new URLSearchParams(window.location.search).get("view");
-const APP_ICON_POSITION = new URLSearchParams(window.location.search).get("appIconPosition");
-@customElement("page-mobile-geofences")
-export class PageMobileGeofences extends Page<AppStateKeyed> {
-
-
- static get styles() {
- // language=CSS
- return css`
- :host,
- :host > .inner {
- flex: 1;
- width: 100%;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- --internal-or-map-marker-color: var(--or-console-primary-color, --or-app-color4);
- }
- .inner {
- display: none;
- }
- .inner[active] {
- display: block;
- }
- .header {
- position: fixed;
- z-index: 99999;
- width: auto;
- top: 0;
- right: 0;
- }
-
- .d-flex {
- display: flex;
- flex-direction: column;
- }
-
- .right {
- align-items: flex-end;
- }
-
- .flex {
- flex: 1;
- }
-
- .list-container {
- width: 100%;
- height: 100vh;
- }
-
- .list-item {
- display: flex;
- min-height: 45px;
- flex-direction: row;
- text-decoration: none;
- padding: 20px;
- color: var(--or-app-color3);
- border-bottom: 1px solid #22211f47;
- }
-
- h3, p {
- margin: 0;
- }
-
- h3 {
- color: var(--or-console-primary-color, --or-app-color4);
- }
-
- .button {
- cursor: pointer;
- background-color: var(--or-app-color2);
- color: var(--or-console-primary-color, --or-app-color4);
- --or-icon-fill: var(--or-app-color3);
- width: 42px;
- height: 42px;
- align-items: center;
- justify-content: center;
- text-align: center;
- border-radius: 30px;
- margin: 10px;
- -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.16), 0 2px 4px rgba(0,0,0,0.19);
- -moz-box-shadow: 0 2px 4px rgba(0,0,0,0.16), 0 2px 4px rgba(0,0,0,0.19);
- box-shadow: 0 2px 4px rgba(0,0,0,0.16), 0 2px 4px rgba(0,0,0,0.19);
- }
-
- .marker-tooltip {
- position: absolute;
- bottom: 0;
- right: 0;
- margin: 15px;
- padding: 20px;
- background-color: var(--or-app-color2);
- color: var(--or-app-color3);
- text-decoration: none;
- max-width: 230px;
-
- -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.16), 0 2px 4px rgba(0,0,0,0.19);
- -moz-box-shadow: 0 2px 4px rgba(0,0,0,0.16), 0 2px 4px rgba(0,0,0,0.19);
- box-shadow: 0 2px 4px rgba(0,0,0,0.16), 0 2px 4px rgba(0,0,0,0.19);
-
- z-index: 99999;
-
- }
-
- .marker-tooltip.full-width {
- width: 100%;
- max-width: none
- }
-
- .marker-tooltip.bottom_left {
-
- top: auto;
- bottom: 0;
- right: 0;
- left: auto;
- }
-
- .marker-tooltip.bottom_right {
- top: auto;
- bottom: 0;
- right: auto;
- left: 0;
- }
-
- .marker-tooltip.top_left {
- top: 0;
- bottom: auto;
- right: 0;
- left: auto;
- }
-
- .marker-tooltip.top_right {
-
- top: 0;
- bottom: auto;
- right: auto;
- left: 0;
- }
-
- or-map-marker[active] {
- --or-map-marker-width: 60px;
- --or-map-marker-height: 60px;
- }
-
-
-
-
- @supports(padding:max(0px)) {
- .header {
- padding-top: min(0vmin, env(safe-area-inset-top));
- padding-bottom: min(0vmin, env(safe-area-inset-bottom));
- }
- }
-
- .list-container,
- .header {
- padding-top: env(safe-area-inset-top); /* Apply safe area */
- padding-bottom: env(safe-area-inset-bottom);
- }
-
- `;
- }
-
- @property({type: String})
- view = QUERY_VIEW ? QUERY_VIEW : "map";
-
- @property({type: Array})
- mapItems = [];
-
- @property({type: Array})
- listItems = [];
-
- @property({type: Object})
- activeItem?: any;
-
- get name(): string {
- return "mobile-geofences";
- }
-
- constructor(store: Store<AppStateKeyed>) {
- super(store);
- this.getGeoNotifications();
- this.addEventListener(OrMapMarkerClickedEvent.NAME, this.onMapMarkerClick);
- this.addEventListener(OrMapClickedEvent.NAME, this.onMapClick);
- }
-
- protected onMapMarkerClick(evt: OrMapMarkerClickedEvent) {
- const marker = evt.detail.marker as any;
- this.activeItem = marker.marker;
- }
-
- protected onMapClick(e: OrMapClickedEvent) {
- this.activeItem = undefined;
- }
-
- public stateChanged(state: AppStateKeyed) {
- }
-
- @property()
- public config?: GeofencesConfig;
-
- protected updated(changedProperties: PropertyValues) {
- if(changedProperties.has('view') && this.view === "map"){
- const map = this.shadowRoot!.querySelector('.or-map');
- const vectorMap = map as OrMap;
- vectorMap.resize()
- }
- }
-
- protected render() {
- const controls = [new NavigationControl({showCompass: false, showZoom: false})];
- return html`
- <div ?active="${this.view === 'map'}" class="inner">
- <div class="header">
- <div class="d-flex right">
- <a class="d-flex button" @click="${() => history.back()}"><or-icon icon="close"></or-icon></a>
- <a class="d-flex button" @click="${() => this.view = "list"}"><or-icon icon="view-list"></or-icon></a>
- <a class="d-flex location-button button" @click="${this.getLocation}"><or-icon icon="crosshairs-gps"></or-icon></a>
- </div>
- </div>
- <or-map id="vector" class="or-map" .controls="${controls}" type="VECTOR" style="height: 100vh; width: 100vw">
- ${this.mapItems.map((marker: any) => {
- return html`
- <or-map-marker ?active="${JSON.stringify(this.activeItem) === JSON.stringify(marker) }" icon="information" .marker="${marker}" lat="${marker.predicate.lat}" lng="${marker.predicate.lng}"></or-map-marker>
- `})}
- </or-map>
- ${this.activeItem ? html`
- <a class="marker-tooltip ${manager.consoleAppConfig!.menuPosition ? manager.consoleAppConfig!.menuPosition.toLowerCase() : ""} ${manager.consoleAppConfig!.menuEnabled ? "" : "full-width"}" href="${this.createUrl(this.activeItem.notification.action)}">
- <div class="flex marker-tooltip-inner" >
- <div style="flex-direction:row;" class="d-flex">
- <div class="flex">
- <h3>${this.activeItem.notification.title}</h3>
- <p>${this.activeItem.notification.body}</p>
- </div>
- <div style="align-items: center; justify-content: center; display: flex;">
- <or-icon style="margin-left: 20px;" icon="chevron-right"></or-icon>
- </div>
- </div>
- </div>
- </a>
- ` : ``}
- </div>
- <div ?active="${this.view === 'list'}" class="inner">
- <div class="header">
- <div class="d-flex right">
- <a class="d-flex button" @click="${() => history.back()}"><or-icon icon="close"></or-icon></a>
- <a class="d-flex button" @click="${() => this.view = "map"}"><or-icon icon="map"></or-icon></a>
- </div>
- </div>
- <div class="list-container">
- ${this.listItems.map((item: any) => {
- return html`
- <a class="list-item" href="${this.createUrl(item.notification.action)}">
- <div class="flex">
- <h3>${item.notification.title}</h3>
- <p>${item.notification.body}</p>
- </div>
- <div style="align-items: center; justify-content: center; display: flex;">
- <or-icon style="margin-left: 20px;" icon="chevron-right"></or-icon>
- </div>
- </a>
- `})}
- </div>
- </div>
- `;
- }
-
-
- protected checkPeriod(datetime) {
- const today = new Date().getTime();
- const startDate = new Date(datetime.start).getTime();
- const endDate = new Date(datetime.end).getTime();
-
- if((today - startDate) > 0 && (today - endDate) < 0) {
- return true;
- } else {
- return false;
- }
- }
-
- protected getGeoNotifications() {
- manager.rest.api.RulesResource.getRealmRulesets(manager.config.realm, {fullyPopulate: true}).then((response: any) => {
- const mapItemDefinition: JsonRulesetDefinition = {
- rules: []
- };
-
- const listItemtDefinition: JsonRulesetDefinition = {
- rules: []
- };
- if (response && response.data) {
- response.data.forEach((rulesSet) => {
- let parsedRules = JSON.parse(rulesSet.rules);
- // TODO enable this when custom validity en meta items are availible
- // const datetime = rulesSet.meta.validity;
- // if(this.checkPeriode(datetime) === false || rulesSet.enabled === false) {
- // return;
- // }
- // if(rulesSet.meta && rulesSet.meta.showOnMap) {
- // mapItemDefinition.rules.push(...parsedRules.rules);
- // }
- // if(rulesSet.meta && rulesSet.meta.showOnList) {
- // listItemtDefinition.rules.push(...parsedRules.rules);
- // }
- mapItemDefinition.rules.push(...parsedRules.rules);
- listItemtDefinition.rules.push(...parsedRules.rules);
-
- });
- }
- this.mapItems = Util.getGeoNotificationsFromRulesSet(mapItemDefinition);
- this.listItems = Util.getGeoNotificationsFromRulesSet(listItemtDefinition);
- }).catch((reason) => {
- console.log("Error:" + reason);
- const rulesetDefinition: JsonRulesetDefinition = {
- rules: []
- };
- this.mapItems = Util.getGeoNotificationsFromRulesSet(rulesetDefinition);
- this.listItems = Util.getGeoNotificationsFromRulesSet(rulesetDefinition);
- });
- }
-
- protected createUrl(action) {
- if(action){
- let url = action.url;
-
- if(action.openInBrowser) {
- url = url.replace("https", "webbrowser");
- }
-
- return url;
- }
- }
-
- protected getLocation() {
- console.info("getLocation pressed");
- const map = this.shadowRoot!.querySelector('.or-map');
- const vectorMap = map as OrMap;
-
- manager.console.sendProviderMessage({provider: 'geofence', action: "GET_LOCATION"}, true).then(response => {
- console.info(JSON.stringify(response));
- if (response.data) {
- vectorMap.flyTo({lng: response.data.longitude, lat: response.data.latitude});
- }
- });
- }
-}
diff --git a/ui/app/console_loader/src/pages/page-mobile-onboarding.ts b/ui/app/console_loader/src/pages/page-mobile-onboarding.ts
deleted file mode 100644
index 211ee346e..000000000
--- a/ui/app/console_loader/src/pages/page-mobile-onboarding.ts
+++ /dev/null
@@ -1,166 +0,0 @@
-import {css, html} from "lit";
-import {customElement, property} from "lit/decorators.js";
-import {Page, PageProvider, AppStateKeyed} from "@openremote/or-app";
-import {Store} from "@reduxjs/toolkit";
-import manager from "@openremote/core";
-
-export interface ConsoleProvider {
- name: string;
- action: string;
-}
-export interface OnboardingPage {
- title: string;
- description?: string;
- enableProviders?: ConsoleProvider[];
- image?: HTMLTemplateElement | string;
- type: "default" | "bottom-image";
- next?: string;
-}
-
-export interface OnboardingConfig {
- pages: OnboardingPage[],
- redirect: string;
-}
-
-export function pageMobileOnboardingProvider(store: Store<AppStateKeyed>, config?: OnboardingConfig): PageProvider<AppStateKeyed> {
- return {
- name: "onboarding",
- routes: [
- "onboarding"
- ],
- pageCreator: () => {
- const page = new PageMobileOnboarding(store);
- if(config) page.config = config;
- return page;
- }
- };
-}
-
-@customElement("page-mobile-onboarding")
-export class PageMobileOnboarding extends Page<AppStateKeyed> {
-
- static get styles() {
- // language=CSS
- return css`
- :host {
- flex: 1;
- width: 100%;
- flex-direction: column;
- }
-
- .page-container {
- width: 100vw;
- height: 100vh;
- flex-direction: column;
- display: none;
-
- }
-
- .page-container.active {
- display: flex;
- }
-
- .page-content {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- text-align: center;
- padding: 20px;
- }
-
- .next-button {
- cursor: pointer;
- margin: 0 20px 20px auto;
- width: 42px;
- height: 42px;
- border-radius: 50%;
- background-color: var(--or-console-primary-color, --or-app-color4);
- justify-content: center;
- align-items: center;
- display: flex;
- --or-icon-fill: var(--or-app-color2, #F9F9F9);
- }
- `;
- }
-
- @property()
- protected active: boolean = false;
-
- get name(): string {
- return "mobile-onboarding";
- }
-
- constructor(store: Store<AppStateKeyed>) {
- super(store);
- }
-
- public connectedCallback() {
- super.connectedCallback();
- if (localStorage.getItem("completedOnboarding") !== null) {
- window.location.href = manager.consoleAppConfig ? manager.consoleAppConfig.url : this.config.redirect;
- } else {
- this.active = true;
- }
- }
-
- public stateChanged(state: AppStateKeyed) {
- }
-
- @property()
- public pageIndex: number = 0;
-
- @property()
- public config?: OnboardingConfig;
-
- protected render() {
- if(this.active) {
- return html`
- ${this.config.pages.map((page, index) => {
- return html`
- <div class="page-container ${this.pageIndex === index ? "active" :""}">
- <div class="page-content">
- ${page.type === "default" ? html`
- <div><img src="${page.image}" /></div>
- <h1>${page.title}</h1>
- <p>${page.description}</p>
- ` : ``}
-
- ${page.type === "bottom-image" ? html`
- <h1>${page.title}</h1>
- <p>${page.description}</p>
- <div><img src="${page.image}" /></div>
- ` : ``}
- </div>
-
- <div class="next-button" @click="${() => this.nextPage(index)}">
- <or-icon icon="chevron-right"></or-icon>
- </div>
- </div>
- `
- })}
- `;
- }
- }
-
- private enableProviders(): Promise<any> {
- if(this.config.pages[this.pageIndex].enableProviders) {
- return Promise.all(this.config.pages[this.pageIndex].enableProviders.map(provider => {
- return manager.console.sendProviderMessage({provider: provider.name, action: provider.action, consoleId: manager.console.registration.id}, true);
- }));
- }
- return Promise.resolve();
- }
-
- private nextPage(index) {
- this.enableProviders().then(() => {
- if (this.config.pages.length - 1 === index) {
- window.location.href = manager.consoleAppConfig ? manager.consoleAppConfig.url : this.config.redirect;
- window.localStorage.setItem("completedOnboarding", "1");
- } else {
- this.pageIndex = this.pageIndex + 1
- }
- });
- }
-}
diff --git a/ui/app/console_loader/src/pages/page-mobile-splash.ts b/ui/app/console_loader/src/pages/page-mobile-splash.ts
deleted file mode 100644
index 54dba06eb..000000000
--- a/ui/app/console_loader/src/pages/page-mobile-splash.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import {css, html} from "lit";
-import {customElement, property} from "lit/decorators.js";
-import {Page, PageProvider, AppStateKeyed} from "@openremote/or-app";
-import {Store} from "@reduxjs/toolkit";
-
-export interface SplashConfig {
- redirect: string;
- interval?: number;
- logoMobile?: HTMLTemplateElement | string;
-}
-
-export function pageMobileSplashProvider(store: Store<AppStateKeyed>, config?: SplashConfig): PageProvider<AppStateKeyed> {
- return {
- name: "splash",
- routes: [
- "splash"
- ],
- pageCreator: () => {
- const page = new PageMobileSplash(store);
- if(config) page.config = config;
- return page;
- }
- };
-}
-
-@customElement("page-mobile-splash")
-export class PageMobileSplash extends Page<AppStateKeyed> {
-
- static get styles() {
- // language=CSS
- return css`
- :host {
- flex: 1;
- width: 100%;
- align-items: center;
- justify-content: center;
- }
- `;
- }
-
- get name(): string {
- return "mobile-splash";
- }
-
- constructor(store: Store<AppStateKeyed>) {
- super(store);
- }
-
- public connectedCallback() {
- super.connectedCallback();
- if (this.config) {
- setTimeout(() => {
- window.location.href = this.config!.redirect;
- }, this.config.interval ? this.config.interval : 3000);
- }
- }
-
-
- public stateChanged(state: AppStateKeyed) {
- }
-
-
- @property()
- public config?: SplashConfig;
-
- protected render() {
- return html`
- <div><img id="logo-mobile" src="${this.config?.logoMobile}" /></div>
- `;
- }
-}
diff --git a/ui/app/console_loader/tsconfig.json b/ui/app/console_loader/tsconfig.json
deleted file mode 100644
index 9b93fee4c..000000000
--- a/ui/app/console_loader/tsconfig.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "./lib",
- "strict": false
- },
- "include": [
- "./src"
- ],
- "references": [
- { "path": "../../component/or-app" }
- ]
-}
diff --git a/yarn.lock b/yarn.lock
index a526e9a0d..407a7e7fb 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3723,15 +3723,6 @@ __metadata:
languageName: node
linkType: hard
-"console_loader@workspace:ui/app/console_loader":
- version: 0.0.0-use.local
- resolution: "console_loader@workspace:ui/app/console_loader"
- dependencies:
- "@openremote/or-app": "workspace:*"
- "@openremote/util": "workspace:*"
- languageName: unknown
- linkType: soft
-
"content-disposition@npm:0.5.4":
version: 0.5.4
resolution: "content-disposition@npm:0.5.4"