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

Commit

Permalink
Introducing raw edit mode, json validation, improved credential edit …
Browse files Browse the repository at this point in the history
…panel and many bug fixes

Co-authored-by: Antigoni Karavasili <[email protected]>
Co-authored-by: Christian Schmid <[email protected]>"
  • Loading branch information
2 people authored and Tim Weise committed Jan 17, 2019
1 parent 4343068 commit 54ad9d6
Show file tree
Hide file tree
Showing 90 changed files with 3,720 additions and 2,236 deletions.
14 changes: 0 additions & 14 deletions .gitignore

This file was deleted.

3 changes: 3 additions & 0 deletions Acknowledgments.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A full list of all contained components and licenses you can find in the disclos
## Assets overview
The following table gives an overview about the in this project used design assets:

=======
| Resource | Description |License |Origin |
| --------------- |-------------|----------|----------|
| /developer-ui-frontend/src/images/addIcon.svg | Add Icon | [Apache License 2.0][1] | [Material.io][2]|
Expand Down Expand Up @@ -72,6 +73,8 @@ The following table gives an overview about the in this project used design asse
| /developer-ui-frontend/src/images/gatewayIcon.svg | Router | [Apache License 2.0][1] | [Material.io][2]|
| /developer-ui-frontend/src/images/codeIcon.svg | Code | [Apache License 2.0][1] | [Material.io][2]|
| /developer-ui-frontend/src/images/arrow-dropdown.svg | Code | [Apache License 2.0][1] | [Material.io][2]|
| /developer-ui-frontend/src/images/addBox.svg | Add Box| [Apache License 2.0][1] | [Material.io][2]|
| /developer-ui-frontend/src/images/removeBox.svg | Add Box| [Apache License 2.0][1] | [Material.io][2]|
| /devui.png | Key Visual | [Bosch SI Example Code License][5]| Own Creation
| /developer-ui-frontend/src/images/jsoneditor-icons.svg | jsoneditor-icons | [Apache License 2.0][8] | [JSON Editor][8]|
| /developer-ui-frontend/src/images/fixBugIcon.svg | _edited from bug\_report and build_ | [Apache License 2.0][1] | [Material.io][2]|
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ The following features are available:
* Register new devices and credentials
* View devices and their credentials

## System Requirements
The Hub Developer UI works best using the following system environment:
* Java 8
* Google Chrome

## Usage
* Download the current release from our github release page: [Releases](https://github.com/bsinno/iot-hub-devui/releases).
Alternatively you can clone the repo and build the source code on your own.
Expand Down
2 changes: 1 addition & 1 deletion developer-ui-backend/assembly/assemblyConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<outputDirectory>.</outputDirectory>
</file>
<file>
<source>${project.build.directory}/frontend/webroot/LICENSE.TXT</source>
<source>${project.build.directory}/frontend/webroot/LICENSE</source>
<outputDirectory>.</outputDirectory>
</file>
<file>
Expand Down
9 changes: 1 addition & 8 deletions developer-ui-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
<revision>0-SNAPSHOT</revision>
<vertx.version>3.5.4</vertx.version>
<jackson.version>2.9.5</jackson.version>
<proton.version>0.22.0</proton.version>
<logback.version>1.2.3</logback.version>
<hono.version>0.8-M2</hono.version>
<qpid-jms.version>0.21.0</qpid-jms.version>
<hono.version>0.8</hono.version>
<vertx.health.port>8088</vertx.health.port>
<vertx.health.path>/liveness</vertx.health.path>
<vertx.health.readiness.path>/readiness</vertx.health.readiness.path>
Expand Down Expand Up @@ -245,11 +243,6 @@
<artifactId>hono-client</artifactId>
<version>${hono.version}</version>
</dependency>
<dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>proton-j</artifactId>
<version>${proton.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-web</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion developer-ui-backend/src/main/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ services:
- HUB_CLIENT_TLS_ENABLED=true
- HUB.CLIENT.USERNAME=____________TODO_ENTER_USER_NAME____________
- HUB_CLIENT_PASSWORD=____________TODO_ENTER_PASSWORD____________
- HUB_DEVICEREGISTRY_DEVICEREGISTRY_URL=https://device-registry.bosch-iot-hub.com
- HUB_DEVICEREGISTRY_DEVICEREGISTRY_URL=https://manage.bosch-iot-hub.com
- HUB_DEVICEREGISTRY_USERNAME=____________TODO_ENTER_USER_NAME____________
- HUB_DEVICEREGISTRY_PASSWORD=____________TODO_ENTER_PASSWORD____________
4 changes: 2 additions & 2 deletions developer-ui-backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ hub:
password: ____________TODO_ENTER_PASSWORD____________

deviceregistry:
url: https://device-registry.bosch-iot-hub.com
url: https://manage.bosch-iot-hub.com
username: ____________TODO_ENTER_PASSWORD____________
password: ____________TODO_ENTER_PASSWORD____________
password: ____________TODO_ENTER_PASSWORD____________
File renamed without changes.
2 changes: 1 addition & 1 deletion developer-ui-frontend/assembly/assemblyConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</fileSets>
<files>
<file>
<source>${project.basedir}/LICENSE.TXT</source>
<source>${project.basedir}/LICENSE</source>
<outputDirectory>.</outputDirectory>
</file>
<file>
Expand Down
12 changes: 7 additions & 5 deletions developer-ui-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
]
},
"author": "Tim Weise",
"license": "SEE LICENSE IN LICENSE.TXT",
"license": "SEE LICENSE IN LICENSE",
"devDependencies": {
"@storybook/addon-info": "^3.2.18",
"@storybook/addon-options": "^3.2.18",
Expand Down Expand Up @@ -57,9 +57,9 @@
"eslint-plugin-react": "^5.0.1",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "1.1.6",
"html-webpack-plugin": "^2.28.0",
"html-webpack-plugin": "^3.2.0",
"image-webpack-loader": "^3.4.2",
"jest": "^22.0.3",
"jest": "^23.6.0",
"node-sass": "^4.5.2",
"postcss-flexbugs-fixes": "^3.3.0",
"postcss-loader": "^2.0.10",
Expand All @@ -79,16 +79,18 @@
},
"dependencies": {
"@material/typography": "^0.35.0",
"ajv": "6.5.4",
"async": "^2.6.1",
"axios": "^0.16.2",
"brace": "^0.11.1",
"crypto-js": "^3.1.9-1",
"html-react-parser": "^0.4.0",
"immutable": "^3.8.1",
"jsoneditor-react": "^0.1.9",
"jssha": "^2.3.1",
"lodash": "^4.17.5",
"lodash.range": "^3.2.0",
"lodash.throttle": "^4.1.1",
"moment": "^2.22.2",
"normalizr": "^3.2.4",
"polished": "^1.9.3",
"pretty-checkbox": "^3.0.3",
"prismjs": "^1.8.1",
Expand Down
60 changes: 35 additions & 25 deletions developer-ui-frontend/src/__mocks__/actionMocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ import {
import { exampleEventBus } from "__mocks__/storeMocks/stateMocks";
import { exampleGetAuthIds } from "__mocks__/apiResponses";
import { fromJS } from "immutable";
import {
formatDateString,
randomDate,
calculateLogId,
calculateFilterId,
mapCredentialParams
} from "utils";
import { calculateLogId, calculateFilterId } from "utils";
import { normalize } from "normalizr";
import { Credential } from "api/schemas";

export const exampleNewLogAction = {
type: actionTypes.NEW_LOG,
Expand Down Expand Up @@ -116,36 +112,50 @@ export const exampleCalculateLogMemoryAction = {
// Initial fetch
export const exampleCredentialsFetchedAction = {
type: actionTypes.CREDENTIALS_FETCHED,
data: exampleGetAuthIds,
prevAuthIds: fromJS([])
data: normalize(exampleGetAuthIds, {
credentials: [Credential]
}),
deviceId: exampleGetAuthIds.credentials[0]["device-id"]
};

// After fetches were made
export const exampleCredentialsFetchedAction2 = {
type: actionTypes.CREDENTIALS_FETCHED,
data: exampleGetAuthIds,
prevAuthIds: fromJS([
"newDevice-97fff113f84b4d91a208889d13236fa8",
"newDevice-f6ca6710e78043568ddf86b70bb4f010"
])
data: normalize(exampleGetAuthIds, {
credentials: [Credential]
}),
deviceId: exampleGetAuthIds.credentials[0]["device-id"]
};
// First credential got deleted in the meantime
export const exampleCredentialsFetchedAction3 = {
type: actionTypes.CREDENTIALS_FETCHED,
data: { total: 1, credentials: [exampleGetAuthIds.credentials[1]] },
prevAuthIds: fromJS([
"newDevice-97fff113f84b4d91a208889d13236fa8",
"newDevice-f6ca6710e78043568ddf86b70bb4f010"
])
data: normalize(
{ total: 1, credentials: [exampleGetAuthIds.credentials[1]] },
{
credentials: [Credential]
}
),
deviceId: exampleGetAuthIds.credentials[0]["device-id"]
};

export const exampleNewCredentialAction = {
type: actionTypes.NEW_CREDENTIAL,
authId: "newDevice-f6ca6710e78043568ddf86b70bb4f010",
deviceId: "newDevice",
newCredential: mapCredentialParams(
"newDevice-f6ca6710e78043568ddf86b70bb4f010",
"hashed-password",
null
)
deviceId: "newDevice-f6ca6710e78043568ddf86b70bb4f010",
credential: {
"auth-id": "newDevice-f6ca6710e78043568ddf86b70bb4f010",
type: "hashed-password",
secrets: [
"newDevice-f6ca6710e78043568ddf86b70bb4f010-owispKt9ltqmX3LG83FxrIrdy/0="
]
},
secrets: {
"newDevice-f6ca6710e78043568ddf86b70bb4f010-owispKt9ltqmX3LG83FxrIrdy/0=": {
"hash-function": "sha-512",
"pwd-hash":
"tzmMe0PvXf4mFeY5NTR6g+ICy3beuof/h8TV9Wws3dNRPEt+bWmf2T1pdYIFK+xHB2vBnJ0qoawxREzFwdzMmA==",
secretId:
"newDevice-f6ca6710e78043568ddf86b70bb4f010-owispKt9ltqmX3LG83FxrIrdy/0="
}
}
};
Loading

0 comments on commit 54ad9d6

Please sign in to comment.