The Management Web App for Blended
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
common/src/main/scala/blended/ui/common
components/src/main/scala/blended/ui/components/reacttable
i18n
material-gen
material/src/main/scala/blended/material/ui
mgmt-app-test/src/test/scala/blended/mgmt/app/test
mgmt-app
project
router/src
sampleApp
server/src/main/scala/blended/mgmt/ui/server/internal
.gitignore
.travis.yml
LICENSE
Makefile
README.adoc
TODO.adoc
build.sbt
scalastyle-config.xml

README.adoc

Build Status Codacy code quality

Blended Management UI

This project contains the Scala.js project implementing a management console that can be used as a client to a blended container hosting the blended management REST Api.

The management console is a React application implemented in Scala.js using react4s and the Material UI react components.

Subprojects

The overall project contains several subprojects:

  • common contains reusable objects which may be of use in any Scala.js/react4s application such as a simple logger and internationalization support.

  • components contains reusable higher level React components, such as a ReactTable.

  • material-gen contains a simple generator which reads the index.js files of Material-UI React and generates simple Scala.js wrappers to use those components in Scala.js / react4s.

  • material uses the generated components and is the place to enrich the Material-API manually to make it more Scala-ish. For now the manual code is around customizing the styles used in Material-Ui-React-Components.

  • router is essentially taken from https://github.com/werk/router4s with some more options for variable paths and some test cases. Once the management console reaches it’s final stages the changes will be contributed back to the original project.

  • mgmt-app contains the actual management console.

  • sampleApp contains a sample application that can be used as a playground to test out React Components without breaking the management console. Over time this subproject will become obsolete.

  • mgmt-app-test contains the setup for testing the management console with Selenium. For now it just has a very simple test and the setup. The test performs tests on the management console built wih app/fastOptJS/webpack and requires the SeleniumDriver for Chrome to be set up correctly. Test can be executed with uitest/test

  • server contains a simple server based on Akka-HTTP which will serve the management console resources via Akka-HTTP. The resulting jar can be deployed into a container which is hosting the blended Akka-HTTP-Server bundle.

Building

Management console

The fastest way to build the management console ist to start sbt and run app/fastOptJS/webpack. This will build everything into the directory ./sampleApp/target/scala-2.12/scalajs-bundler/main.

The build process will copy the file index-dev.html into that directory as well, so the management console can be started by loading the index-dev.html file in a browser.

Note

In IntelliJ, simply navigate to the index-dev.html in the directory above and select any of the browser buttons in the top right corner of the editor.

The management console requires a running managemen container hosting the REST- and WebSocket API to connect to.

During development you can use sbt in file watching mode with ~app/fastOptJS/webpack, so that the management console is rebuilt and repackaged whenever code changes are saved to disk. After the rebuild ,simply refresh the browser page to load the new version.

Server bundle

The server bundle can be built simply with server/packageBin to produce the OSGi deployable bundle.

Tests

Run test to execute all Unit- and Selenium-Tests.

Publishing locally

Run publishM2 to publish all relevant artifacts in the local maven repository. This is required to use the server bundle in a management container packaging.