Skip to content
This repository was archived by the owner on Aug 14, 2020. It is now read-only.

Commit 6a30263

Browse files
Tim WeiseChristian-Schmid
authored andcommitted
Added confirmation dialog on device creation; Minor bug fixes; CSS Adaptions
Signed-off-by: Christian Schmid <Christian.Schmid3@bosch-si.com>
1 parent 1ba088d commit 6a30263

File tree

124 files changed

+4857
-2894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+4857
-2894
lines changed

Acknowledgments.md

Lines changed: 53 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,59 @@ The following table gives an overview about the in this project used design asse
1414

1515
| Resource | Description |License |Origin |
1616
| --------------- |-------------|----------|----------|
17-
| images/addIcon.svg | Add Icon | [Apache License 2.0][1] | [Material.io][2]|
18-
| images/arrow-right.svg | Arrow Forward | [Apache License 2.0][1] | [Material.io][2]|
19-
| images/cancelIcon.svg | Cancel Icon | [Apache License 2.0][1] | [Material.io][2]|
20-
| images/cancelIconLight.svg | Cancel Icon | [Apache License 2.0][1] | [Material.io][2]|
21-
| images/clearConsole.svg | Delete Sweep | [Apache License 2.0][1] | [Material.io][2]|
22-
| images/deleteIcon.svg | Delete Icon | [Apache License 2.0][1] | [Material.io][2]|
23-
| images/disconnectedIcon.svg | Signal WiFi off | [Apache License 2.0][1] | [Material.io][2]|
24-
| images/errorIndicator.svg | Error | [Apache License 2.0][1] | [Material.io][2]|
25-
| images/editIcon.svg | Edit Icon | [Apache License 2.0][1] | [Material.io][2]|
26-
| images/editIconLight.svg | Edit Icon | [Apache License 2.0][1] | [Material.io][2]|
27-
| images/errorIconOutline.svg | Error Outline | [Apache License 2.0][1] | [Material.io][2]|
28-
| images/eventIcon.svg | Error Outline | [Apache License 2.0][1] | [Material.io][2]|
29-
| images/settingsIcon.svg | Settings | [Apache License 2.0][1] | [Material.io][2]|
30-
| images/submitCaret.svg | Keyboard Arrow Right | [Apache License 2.0][1] | [Material.io][2]|
31-
| images/successIcon.svg | Check | [Apache License 2.0][1] | [Material.io][2]|
32-
| images/doneIcon.png | Check | [Apache License 2.0][1] | [Material.io][2]|
33-
| images/unknownCategory.svg | Help Outline | [Apache License 2.0][1] | [Material.io][2]|
34-
| images/warning.svg | Warning Icon | [Apache License 2.0][1] | [Material.io][2]|
35-
| images/hintIcon.svg | Help Icon | [Apache License 2.0][1] | [Material.io][2]|
36-
| images/filtericon.svg | Filter | [Creative Commons 4][3] | [Font Awesome][4]|
37-
| images/bufferSizeIcon.svg |Buffer Size Icon | [Creative Commons 4][3] | [Font Awesome][4]|
38-
| images/curlyBraceIcon.svg | Modified Icon | [Creative Commons 4][3] | [Font Awesome][4]|
39-
| images/defaultIcon.svg | File Icon | [Creative Commons 4][3] | [Font Awesome][4]|
40-
| images/xmlIcon.svg | Meta Icon | [Creative Commons 4][3] | [Font Awesome][4]|
41-
| images/searchIcon.svg | Search Icon | [Creative Commons 4][3] | [Font Awesome][4]|
42-
| images/listLengthIcon.svg | List Icon | [Creative Commons 4][3] | [Font Awesome][4]|
43-
| images/deviceIcon.svg | Device Icon |[Bosch SI Example Code License][5] | Own Creation
44-
| images/deviceIconLight.svg | Device Icon | [Bosch SI Example Code License][5]| Own Creation
45-
| images/telemetryIcon.svg | Telemetry Icon | [Bosch SI Example Code License][5]| Own Creation
46-
| images/documentation/* | User Documentation | [Bosch SI Example Code License][5]| Own Creation
47-
| images/backgrounds/backgroundHeader | Background Header | [Unsplash License][6] | [Robert Haverly][7]
17+
| /developer-ui-frontend/src/images/addIcon.svg | Add Icon | [Apache License 2.0][1] | [Material.io][2]|
18+
| /developer-ui-frontend/src/images/arrow-right.svg | Arrow Forward | [Apache License 2.0][1] | [Material.io][2]|
19+
| /developer-ui-frontend/src/images/cancelIcon.svg | Cancel Icon | [Apache License 2.0][1] | [Material.io][2]|
20+
| /developer-ui-frontend/src/images/cancelIconLight.svg | Cancel Icon | [Apache License 2.0][1] | [Material.io][2]|
21+
| /developer-ui-frontend/src/images/clearConsoleIcon.svg | Delete Sweep | [Apache License 2.0][1] | [Material.io][2]|
22+
| /developer-ui-frontend/src/images/deleteIcon.svg | Delete Icon | [Apache License 2.0][1] | [Material.io][2]|
23+
| /developer-ui-frontend/src/images/disconnectedIcon.svg | Signal WiFi off | [Apache License 2.0][1] | [Material.io][2]|
24+
| /developer-ui-frontend/src/images/errorIndicator.svg | Error | [Apache License 2.0][1] | [Material.io][2]|
25+
| /developer-ui-frontend/src/images/editIcon.svg | Edit Icon | [Apache License 2.0][1] | [Material.io][2]|
26+
| /developer-ui-frontend/src/images/editIconLight.svg | Edit Icon | [Apache License 2.0][1] | [Material.io][2]|
27+
| /developer-ui-frontend/src/images/errorIconOutline.svg | Error Outline | [Apache License 2.0][1] | [Material.io][2]|
28+
| /developer-ui-frontend/src/images/pngIcons/errorIconOutline.png | Error Outline | [Apache License 2.0][1] | [Material.io][2]|
29+
| /developer-ui-frontend/src/images/eventIcon.svg | Error Outline | [Apache License 2.0][1] | [Material.io][2]|
30+
| /developer-ui-frontend/src/images/settingsIcon.svg | Settings | [Apache License 2.0][1] | [Material.io][2]|
31+
| /developer-ui-frontend/src/images/submitCaret.svg | Keyboard Arrow Right | [Apache License 2.0][1] | [Material.io][2]|
32+
| /developer-ui-frontend/src/images/successIcon.svg | Check | [Apache License 2.0][1] | [Material.io][2]|
33+
| /developer-ui-frontend/src/images/pngIcons/doneIcon.png | Check | [Apache License 2.0][1] | [Material.io][2]|
34+
| /developer-ui-frontend/src/images/unknownCategoryIcon.svg | Help Outline | [Apache License 2.0][1] | [Material.io][2]|
35+
| /developer-ui-frontend/src/images/warning.svg | Warning Icon | [Apache License 2.0][1] | [Material.io][2]|
36+
| /developer-ui-frontend/src/images/hintIcon.svg | Help Icon | [Apache License 2.0][1] | [Material.io][2]|
37+
| /developer-ui-frontend/src/images/filtericon.svg | Filter | [Creative Commons 4][3] | [Font Awesome][4]|
38+
| /developer-ui-frontend/src/images/bufferSizeIcon.svg |Buffer Size Icon | [Creative Commons 4][3] | [Font Awesome][4]|
39+
| /developer-ui-frontend/src/images/curlyBraceIcon.svg | Modified Icon | [Creative Commons 4][3] | [Font Awesome][4]|
40+
| /developer-ui-frontend/src/images/defaultIcon.svg | File Icon | [Creative Commons 4][3] | [Font Awesome][4]|
41+
| /developer-ui-frontend/src/images/xmlIcon.svg | Meta Icon | [Creative Commons 4][3] | [Font Awesome][4]|
42+
| /developer-ui-frontend/src/images/searchIcon.svg | Search Icon | [Creative Commons 4][3] | [Font Awesome][4]|
43+
| /developer-ui-frontend/src/images/listLengthIcon.svg | List Icon | [Creative Commons 4][3] | [Font Awesome][4]|
44+
| /developer-ui-frontend/src/images/deviceIcon.svg | Device Icon |[Bosch SI Example Code License][5] | Own Creation
45+
| /developer-ui-frontend/src/images/deviceIconLight.svg | Device Icon | [Bosch SI Example Code License][5]| Own Creation
46+
| /developer-ui-frontend/src/images/telemetryIcon.svg | Telemetry Icon | [Bosch SI Example Code License][5]| Own Creation
47+
| /developer-ui-frontend/src/images/documentation/* | User Documentation | [Bosch SI Example Code License][5]| Own Creation
48+
| /developer-ui-frontend/src/images/backgrounds/backgroundHeader.jpg | Background Header | [Unsplash License][6] | [Robert Haverly][7]
49+
| /developer-ui-frontend/src/images/caretDownIcon.svg | Keyboard Arrow Down | [Apache License 2.0][1] | [Material.io][2]|
50+
| /developer-ui-frontend/src/images/copyClipboardIcon.svg | Assignment Return | [Apache License 2.0][1] | [Material.io][2]|
51+
| /developer-ui-frontend/src/images/unmaskPwIcon.svg | Remove Red Eye | [Apache License 2.0][1] | [Material.io][2]|
52+
| /developer-ui-frontend/src/images/moreIcon.svg | More Vert | [Apache License 2.0][1] | [Material.io][2]|
53+
| /developer-ui-frontend/src/images/saveIcon.svg | Save | [Apache License 2.0][1] | [Material.io][2]|
54+
| /developer-ui-frontend/src/images/searchicon.svg | Search | [Creative Commons 4][3] | [Font Awesome][4]|aa
55+
| /developer-ui-frontend/src/images/addPwCredentialIcon.svg | _edited from VPN Key and Folder_ | [Apache License 2.0][1] | [Material.io][2]|
56+
| /developer-ui-frontend/src/images/accountIcon.svg | Account Circle | [Apache License 2.0][1] | [Material.io][2]|
57+
| /developer-ui-frontend/src/images/deletePwCredentialIcon.svg | _edited from VPN Key and Folder_ | [Apache License 2.0][1] | [Material.io][2]|
58+
| /developer-ui-frontend/src/images/addPwSecretIcon.svg | _edited from VPN Key_ | [Apache License 2.0][1] | [Material.io][2]|
59+
| /developer-ui-frontend/src/images/deletePwSecretIcon.svg | _edited from VPN Key_ | [Apache License 2.0][1] | [Material.io][2]|
60+
| /developer-ui-frontend/src/images/successIconCircle.svg | _edited from Done_ | [Apache License 2.0][1] | [Material.io][2]|
61+
| /developer-ui-frontend/src/images/pwCredentialIcon.svg | _edited from VPN Key and Folder_ | [Apache License 2.0][1] | [Material.io][2]|
62+
| /developer-ui-frontend/src/images/certificateIcon.svg | Certificate | [Creative Commons 4][3] | [Font Awesome][4]|
63+
| /developer-ui-frontend/src/images/addPwDevice.svg | _edited from VPN Key_ | [Apache License 2.0][1] | [Material.io][2]|
64+
| /developer-ui-frontend/src/images/newDeviceWithWizardIcon.svg | Description | [Apache License 2.0][1] | [Material.io][2]|
65+
| /developer-ui-frontend/src/images/pwSecretIcon.svg | VPN Key | [Apache License 2.0][1] | [Material.io][2]|
66+
| /developer-ui-frontend/src/images/addDeviceIcon.svg | Device Icon | [Bosch SI Example Code License][5]| Own Creation
67+
| /developer-ui-frontend/src/images/favicon.ico | Favicon | [Bosch SI Example Code License][5]| Own Creation
68+
| /developer-ui-frontend/src/images/warningIcon.svg | Warning | [Apache License 2.0][1] | [Material.io][2]|
69+
| /devui.png | Key Visual | [Bosch SI Example Code License][5]| Own Creation
4870

4971
[1]: https://github.com/google/material-design-icons/blob/master/LICENSE
5072
[2]: https://material.io/icons/
File renamed without changes.
File renamed without changes.

developer-ui-backend/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
<properties>
1616
<revision>0-SNAPSHOT</revision>
17-
<vertx.version>3.5.1</vertx.version>
17+
<vertx.version>3.5.3</vertx.version>
18+
<jackson.version>2.9.5</jackson.version>
1819
<proton.version>0.22.0</proton.version>
1920
<logback.version>1.2.3</logback.version>
2021
<hono.version>0.6</hono.version>

developer-ui-backend/src/main/java/com/bosch/iothub/developerui/endpoints/StaticFilesHttpEndpoint.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
package com.bosch.iothub.developerui.endpoints;
55

66
import com.bosch.iothub.developerui.config.DevUiProperties;
7+
import io.netty.handler.codec.http.HttpResponseStatus;
78
import io.vertx.ext.web.Router;
9+
import io.vertx.ext.web.RoutingContext;
810
import io.vertx.ext.web.handler.StaticHandler;
911
import org.slf4j.Logger;
1012
import org.slf4j.LoggerFactory;
@@ -28,10 +30,19 @@ public final class StaticFilesHttpEndpoint implements HttpEndpoint {
2830
public void addRoutes(final Router router) {
2931
StaticHandler staticHandler = StaticHandler.create();
3032
staticHandler.setDefaultContentEncoding("UTF-8");
33+
3134
router.route(config.getHtmlRoot()).handler(staticHandler);
32-
router.route(config.getHtmlRoot() + "/*").handler(staticHandler)
33-
.failureHandler(event -> event.response().sendFile("webroot/index.html"));
35+
router.route(config.getHtmlRoot() + "/*").handler(staticHandler);
36+
37+
// Redirect push state urls (defined as containing not a dot as in /pic.jpg) to index page
38+
router.routeWithRegex(config.getHtmlRoot() + "/[^.]*").handler(this::fallbackServeIndexHtmlHandler);
3439

3540
LOG.info("Serving developer ui at http://localhost:{}{}",config.getPort(), config.getHtmlRoot());
3641
}
42+
43+
private void fallbackServeIndexHtmlHandler(RoutingContext event) {
44+
event.response().headers().add("Location", config.getHtmlRoot() + "/");
45+
event.response().setStatusCode(HttpResponseStatus.SEE_OTHER.code());
46+
event.response().end();
47+
}
3748
}

developer-ui-frontend/.storybook/config.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22
import { configure, addDecorator, setAddon } from "@storybook/react";
33
import { setOptions } from "@storybook/addon-options";
44
import infoAddon, { setDefaults } from "@storybook/addon-info";
5+
import { ThemeProvider } from "styled-components";
56

67
// Global decorator for styling and centering
78
const style = {
@@ -20,15 +21,25 @@ const innerStyle = {
2021
margin: "auto"
2122
};
2223
const StyledDecorator = storyFn => (
23-
<div style={style}>
24-
<div style={innerStyle}>{storyFn()}</div>
25-
</div>
24+
<ThemeProvider
25+
theme={require('sass-extract-loader?{"plugins": ["sass-extract-js"]}!../src/styles/_globalVars.scss')}>
26+
<div style={style}>
27+
<div style={innerStyle}>{storyFn()}</div>
28+
</div>
29+
</ThemeProvider>
2630
);
2731
addDecorator(StyledDecorator);
2832

2933
// addon-info
3034
setDefaults({
31-
header: true
35+
header: true,
36+
styles: stylesheet => ({
37+
...stylesheet,
38+
propTableHead: {
39+
...stylesheet.source,
40+
fontSize: "22.5px"
41+
}
42+
})
3243
});
3344
setAddon(infoAddon);
3445

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"psi-header.templates": [
3+
{
4+
"language": "*",
5+
"template": [
6+
"Copyright 2018 Bosch Software Innovations GmbH (\"Bosch SI\"). All rights reserved."
7+
]
8+
}
9+
]
10+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2017",
4+
"module": "commonjs",
5+
"baseUrl": ".",
6+
"paths": {
7+
"__mocks__/*": ["./src/__mocks__/*"],
8+
"actions/*": ["./src/actions/*"],
9+
"animations/*": ["./src/animations/*"],
10+
"components/*": ["./src/components/*"],
11+
"images/*": ["./src/images/*"],
12+
"reducers/*": ["./src/reducers/*"],
13+
"styles/*": ["./src/styles/*"],
14+
"utils/*": ["./src/utils/*"],
15+
"validation/*": ["./src/validation/*"]
16+
}
17+
},
18+
"exclude": ["node_modules", "target"]
19+
}

developer-ui-frontend/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,29 @@
6868
"react-test-renderer": "^16.2.0",
6969
"redux-mock-store": "^1.3.0",
7070
"redux-testkit": "^1.0.6",
71+
"sass-extract": "^2.1.0",
72+
"sass-extract-js": "^0.3.0",
73+
"sass-extract-loader": "^1.1.0",
7174
"sass-loader": "^6.0.5",
7275
"style-loader": "^0.17.0",
7376
"webpack": "^2.5.1",
74-
"webpack-dev-server": "^2.4.5"
77+
"webpack-dev-server": "2.4.5"
7578
},
7679
"dependencies": {
80+
"@material/typography": "^0.35.0",
7781
"axios": "^0.16.2",
7882
"html-react-parser": "^0.4.0",
7983
"immutable": "^3.8.1",
8084
"jssha": "^2.3.1",
8185
"lodash": "^4.17.5",
8286
"lodash.range": "^3.2.0",
8387
"lodash.throttle": "^4.1.1",
88+
"polished": "^1.9.3",
8489
"pretty-checkbox": "^3.0.3",
8590
"prismjs": "^1.8.1",
8691
"react": "^16.3.2",
8792
"react-click-outside": "^3.0.0",
93+
"react-copy-to-clipboard": "^5.0.1",
8894
"react-dom": "^16.3.2",
8995
"react-json-edit": "^0.3.1",
9096
"react-measure": "2.0.2",
@@ -102,6 +108,7 @@
102108
"redux-immutable": "^4.0.0",
103109
"redux-thunk": "^2.2.0",
104110
"reselect": "^3.0.1",
111+
"styled-components": "^3.3.3",
105112
"typed.js": "^2.0.7",
106113
"uuid": "^3.2.1",
107114
"velocity-react": "^1.3.3",

developer-ui-frontend/src/WebsocketConnection.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ export const registerNewStatusHandler = (eventBus, channel, dispatch) => {
6666
export const unregisterHandler = (eventBus, channel, dispatch) => {
6767
eventBus.unregisterHandler("device." + channel, incomingMessageHandler);
6868
dispatch(subDeleted(eventBus, channel));
69-
console.log("New eventBus: ", eventBus);
7069
console.log(`device.${channel} deregistered as handler"`);
7170
};
7271
// Create the Websocket connection (the eventBus object)

0 commit comments

Comments
 (0)