resmon-guiclient
Repository for a GUI client component, which is part of ResMon software. It is destinated to web browsers and need to be served by any valid web server such as webpack-dev-server, apache2, nginx and so on...
It is designed to work along monitors (at least one) with authorization server. All of mentioned addresses could be built into distribution package. Also these values could be changed by users in the client and stored in browser local storage.
Installation
You can download the latest version of guiclient (or previous if you want) as a release in github service.
The package contains 2 files:
index.html- main file with GUI application,.htaccess- configuration file for apache2 web server.
We assume Apache2 web server is already installed on the machine. You need to create new apache vhost with overriding access (for .htaccess file) to serve GUI in order to server GUI correctly. An example configuration is listed below:
<VirtualHost resmon.tbajorek.pl:80>
ServerAdmin [enter desired server admin email here]
ServerName [enter desired domain here]
ServerAlias www.[enter desired domain here]
DocumentRoot [enter folder path containing files from release]
<Directory "[enter folder path containing files from release]">
AllowOverride All
</Directory>
</VirtualHost>
Development
- install npm
- install yarn globally:
npm install --global yarn - run
yarnto install dependencies - run
yarn testto test (use--watchto run in watch) - run
yarn startto start dev server (with watch) - run
yarn lint-checkto start dev server (with watch) - you may want to install react and redux plugins for browsers
Structure overview
/src/componentscontains pure react components (without redux integration)/src/containerscontains react components which are connected to redux/src/pagescontains page-level react components/src/reducerscontains redux reducers - pure functions transforming store to another state/src/actionscontains action creators - functions returning actions that could be directly dispatched by redux/src/api.jsconstains functions making api calls and returning promise-like object/src/index.jsentry file
CI
- install npm
- install yarn globally:
npm install --global yarn - run
yarnto install dependencies - run
yarn testto test - run
yarn lint-checkto start dev server (with watch) - run
yarn buildto build GUI client to/distfolder - in result we'll have.htaccessconfig file fo apache2 andindex.htmlfor browsers - run
yarn build:separate-jsto build GUI client to/distfolder including javascript bundle as separate file - in result we'll have.htaccessconfig file for apache2,index.htmlfo browsers andmain.jsas javascript application script connected to html file - run
AUTH_SERVER=bleh1 MONITORS=[{\"address\":\"aaa\",\"description\":\"bbb\"}] yarn buildto build with different auth server or monitor list - run
yarn docto generate docs in/docs