You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/01/26 21:08:09 UTC

[incubator-streampipes] 02/06: [hotfix] Add theme to prebuild script

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch experimental-module-federation
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 75f5445ff48101bcd59e89fe305320c738d954fc
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Wed Jan 26 21:20:57 2022 +0100

    [hotfix] Add theme to prebuild script
---
 ui/deployment/dev/config.yml         |   1 +
 ui/deployment/dev/img/favicon.png    | Bin 0 -> 5353 bytes
 ui/deployment/prebuild.js            |   6 ++++
 ui/deployment/sp-theme.scss          |   7 ++++
 ui/deployment/webpack.partial.dev.js |  65 +++++++++++++++++++++++++++++++++++
 5 files changed, 79 insertions(+)

diff --git a/ui/deployment/dev/config.yml b/ui/deployment/dev/config.yml
index 492d5f6..d134f44 100644
--- a/ui/deployment/dev/config.yml
+++ b/ui/deployment/dev/config.yml
@@ -17,6 +17,7 @@ login:
   backgroundImage: 'deployment/dev/img/background.png'
   logo: 'deployment/dev/img/logo.png'
   logo-navigation: 'deployment/dev/img/logo-navigation.png'
+  favicon: 'deployment/dev/img/favicon.png'
 modules:
   - spEditor
   - spPipelines
diff --git a/ui/deployment/dev/img/favicon.png b/ui/deployment/dev/img/favicon.png
new file mode 100644
index 0000000..92f2f5a
Binary files /dev/null and b/ui/deployment/dev/img/favicon.png differ
diff --git a/ui/deployment/prebuild.js b/ui/deployment/prebuild.js
index 47914fb..3750cff 100644
--- a/ui/deployment/prebuild.js
+++ b/ui/deployment/prebuild.js
@@ -92,6 +92,12 @@ fs.writeFileSync('src/assets/img/login/logo.png', fs.readFileSync(config['login'
 console.log('Moved: logo.png');
 fs.writeFileSync('src/assets/img/sp/logo-navigation.png', fs.readFileSync(config['login']['logo-navigation']));
 console.log('Moved: sp-logo-navigation.png');
+fs.writeFileSync('src/assets/img/favicon/favicon-96x96.png', fs.readFileSync(config['login']['favicon']));
+console.log('Moved: favicon');
+fs.writeFileSync('src/scss/sp/sp-theme.scss', fs.readFileSync('deployment/sp-theme.scss', 'utf8'));
+console.log("Moved: theme file");
+fs.writeFileSync('webpack.partial.dev.js', fs.readFileSync('deployment/webpack.partial.dev.js', 'utf8'));
+console.log("Moved: webpack dev config");
 
 if (process.env.THEME_LOC !== undefined) {
     console.log('Using custom-provided theme ' + process.env.THEME_LOC);
diff --git a/ui/deployment/sp-theme.scss b/ui/deployment/sp-theme.scss
index 894fc16..5a23ac5 100644
--- a/ui/deployment/sp-theme.scss
+++ b/ui/deployment/sp-theme.scss
@@ -16,6 +16,13 @@
  *
  */
 
+/**
+ *
+ * Note: to change this file, change sp-theme.scss in deployment folder
+ * changes in the root folder will be overridden by prebuild script
+ *
+ */
+
 @import '~@angular/material/theming';
 @import '../variables';
 
diff --git a/ui/deployment/webpack.partial.dev.js b/ui/deployment/webpack.partial.dev.js
new file mode 100644
index 0000000..d26b0fe
--- /dev/null
+++ b/ui/deployment/webpack.partial.dev.js
@@ -0,0 +1,65 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements.  See the NOTICE file distributed with
+ *   this work for additional information regarding copyright ownership.
+ *   The ASF licenses this file to You under the Apache License, Version 2.0
+ *   (the "License"); you may not use this file except in compliance with
+ *   the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ */
+
+/**
+ *
+ * Note: to change this file, change webpack.partial.dev.js in deployment folder
+ * changes in the root folder will be overridden by prebuild script
+ *
+ */
+
+const { merge } = require('webpack-merge');
+const baseConfig = require('./webpack.partial.base.js');
+
+module.exports = merge(baseConfig, {
+    devServer: {
+        compress: true,
+        port: 8082,
+        proxy: {
+            '/streampipes-connect': {
+                target: 'http://localhost:8030',
+                // pathRewrite: { '^/streampipes-connect': '' },
+                secure: false,
+            },
+            '/streampipes-backend': {
+                target: 'http://localhost:8030',
+                secure: false,
+            },
+            '/visualizablepipeline': {
+                target: 'http://localhost:5984',
+                secure: false,
+            },
+            '/dashboard': {
+                target: 'http://localhost:5984',
+                secure: false,
+            },
+            '/widget': {
+                target: 'http://localhost:5984',
+                secure: false,
+            },
+            '/pipeline': {
+                target: 'http://localhost:5984',
+                secure: false,
+            },
+            '/streampipes/ws': {
+                target: 'ws://localhost:61614',
+                ws: true,
+                secure: false,
+            },
+        },
+    },
+});