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

Commit

Permalink
Merge pull request #397 from foglamp/1.5.0RC
Browse files Browse the repository at this point in the history
1.5.0 release
  • Loading branch information
praveen-garg authored Feb 22, 2019
2 parents ee413ff + fd31958 commit 7c1856e
Show file tree
Hide file tree
Showing 144 changed files with 6,689 additions and 3,044 deletions.
13 changes: 13 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
["env", {
"useBuiltIns": true,
"targets": {
"browsers": ["last 2 versions", "safari > 10", "not ie < 11"]
}
}]
],
"plugins": [
"lodash"
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2018 Dianomic Systems

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ This is a GUI for FogLAMP

[Prerequisite Windows](prerequisite-windows.md)

To install dependencies run the following command inside the root directory:
To update yarn, Run `sudo npm i -g yarn`

`yarn install`
`git clone https://github.com/foglamp/foglamp-gui.git`

`cd foglamp-gui`

## Development Server

Run `yarn start` or `yarn start --host [ip_address of host machine]` (to allow access on same network but another machine) for a dev server. Navigate to `http://localhost:4200/` or `http://<ip_address>:4200/`.
Run `yarn install && yarn start` or `yarn install && yarn start --host [ip_address of host machine]` (to allow access on same network but another machine) for a dev server. Navigate to `http://localhost:4200/` or `http://<ip_address>:4200/`.

> The app will automatically reload if you change any of the source files.

## Production Build & Deployment
Run `./build` to build the project. The build artifacts will be stored in the `dist/` directory.

> It uses the `-prod` flag with `ng` for a production build.
Run `./build --clean-start` to build the project. The build artifacts will be stored in the `dist/` directory.

### Deploy with nginx

Expand All @@ -50,6 +50,8 @@ start: `nginx -c nginx.conf -p $(pwd)`
stop: `nginx -s stop`

> nginx `-s stop` terminates the nginx process immediately while `-s quit` does a graceful shutdown.
#### windows

See details [here](windows-nginx-deployment-guide.md)
Expand All @@ -65,9 +67,9 @@ See details [here](windows-nginx-deployment-guide.md)
## Supported/Tested Browser Version
Browser | Tested Version | Supported
--------|-------- |-------
Safari (mac) | 11.x | latest 1
Chrome |67.0.x (64-bit) | latest 2
Firefox |60.x (64-bit) | latest 2
Safari (mac) | 12.0.x | latest 1
Chrome | 72.0.x (64-bit) | latest 2
Firefox | 65.x (64-bit) | latest 2


## Other
Expand All @@ -76,4 +78,4 @@ Firefox |60.x (64-bit) | latest 2
[Developer's Guide](developers-guide.md)


> &copy; 2017-18 DIANOMIC SYSTEMS. All Rights Reserved.
> &copy; 2017-19 DIANOMIC SYSTEMS. All Rights Reserved.
6 changes: 5 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./extra-webpack.config.js"
},
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
Expand All @@ -21,6 +24,7 @@
],
"styles": [
"./node_modules/angular-tree-component/dist/angular-tree-component.css",
"./node_modules/animate.css/animate.css",
"src/assets/css/bulma.min.css",
"src/assets/css/font-awesome.min.css",
"src/assets/css/bulma-tooltip.min.css",
Expand Down
28 changes: 27 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
## v1.5.0 [2019-02-07]

#### Added

* Functionality to delete South service and North instance
* Functionality to export readings to csv file, for South service and Asset
* Service health status on mouse hover on the green/yellow/grey/red traffic light in the navbar
* Advanced Configuration in South service modal
* Support for `script` type configuration item
* Support for the usage of `displayName` for configuration categories and items
* Support to add Data Processing Applications (filter)
* Show `SAFE MODE` label in navbar if FogLAMP is running in safe mode

#### Changed

* Improved save functionality for configuration items to use category bulk update api
* Upgraded to Angular 7 (including compatible TypeScript / CLI versions)

#### Removed

* Empty validation check on save configuration items

#### Fixed

* Improved South service and North instance setup wizard

## v1.4.0 [2018-09-25]

#### Added
Expand Down Expand Up @@ -33,7 +59,7 @@

#### Changed

* Upgraded to Angular v6 (including compatible TypeScript / CLI versions)
* Upgraded to Angular 6 (including compatible TypeScript / CLI versions)
* No login window with skip option will appear, If authentication is not mandatory
* FogLAMP instance status label will show the lock icon, If authentication is mandatory and allowPing is false, until you are logged in
* Auto-configuration of IP / host address, so you should be able to have instant access of FogLAMP instance with https://rasperrypi.local (whatever the host address is) and you shall not need to go to settings and "Set the URL & Restart"
Expand Down
2 changes: 1 addition & 1 deletion deploy
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CWARN="${CPFX}0;33m"
echo -e "${CWARN}This script is partially done, please track https://github.com/foglamp/foglamp-gui/issues/73 ${CRESET}"

# Variables
__version__="1.4.0"
__version__="1.5.0"
if [ -f "package.json" ]
then
__version__=`cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[" ,]//g'`
Expand Down
29 changes: 14 additions & 15 deletions developers-guide.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.7
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.1.4

## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`.
Expand Down Expand Up @@ -32,29 +32,28 @@ Set API base URL in `environments/environment.prod.ts`, you can always change it
#### Core:
Library | Version | Latest Stable (? Y/n) | License
------------- | ------------- | -------------------- | ------------
Angular | 6.0.3 | 6.0.3 | MIT
Angular CLI | 6.0.7 | 6.0.7 | MIT
TypeScript | 2.7.2 | 2.9 | Apache 2.0
rxjs | 6.2.0 | 6.2.0 | Apache 2.0
Bulma css | 0.7.1 | 0.7.1 | MIT
Angular | 7.1.4 | 7.2.0 | MIT
Angular CLI | 7.1.4 | 7.2.1 | MIT
TypeScript | 3.1.6 | 3.2.2 | Apache 2.0
rxjs | 6.3.3 | 6.3.3 | Apache 2.0
Bulma css | 0.7.1 | 0.7.2 | MIT

#### Dev:
Library | Version | Latest Stable (? Y/n) | License
---------------- | ------------- | -------------------- | ------------
chart.js | 2.7.2 | 2.7.2 | MIT
core-js | 2.5.6 | 2.5.6 | MIT
lodash-es | 4.17.10 | 4.17.10 | MIT
ng-sidebar | 6.0.4 | 7.1.0 | MIT
moment | 2.22.1 | 2.22.1 | MIT
ngx-progressbar | 2.1.1 | 2.1.1 | MIT
protractor-beautiful-reporter | 1.2.1 | 1.2.1 | MIT
chart.js | 2.7.3 | 2.7.3 | MIT
core-js | 2.6.1 | 2.6.2 | MIT
ng-sidebar | 8.0.0 | 8.0.0 | MIT
moment | 2.23.0 | 2.23.0 | MIT
@ngx-progressbar/core | 5.3.1 | 5.3.1 | MIT
protractor-beautiful-reporter | 1.2.7 | 1.2.7 | MIT


#### Why Yarn?

* Yarn parallelizes operations to maximize resource utilization so install times are faster than ever.
* Yarn parallelize operations to maximize resource utilization so install times are faster than ever.
* Offline cache: package installation using Yarn, it places the package on your disk. During the next install, this package will be used instead of sending an HTTP request to get the tarball from the registry.
* Deterministic Installs: Yarn uses lockfiles (yarn.lock) and a deterministic install algorithm. We can say goodbye to the "but it works on my machine" bugs.
* Deterministic Installs: Yarn uses lock-files (yarn.lock) and a deterministic install algorithm. We can say goodbye to the "but it works on my machine" bugs.

#### Yarn commands
* `yarn` # Install all dependencies from package.json
Expand Down
2 changes: 1 addition & 1 deletion e2e/environment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const environment = {
HOST: '10.2.5.20',
HOST: 'localhost',
SERVICE_PORT: '8081',
AUTH_OPTIONAL: true
};
25 changes: 20 additions & 5 deletions e2e/po/app.skip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class SkipLogin {

getSchedulesRefreshButton() {
browser.ignoreSynchronization = true;
return element(by.css('app-scheduled-process > div:nth-child(2) .fa.fa-refresh')).isDisplayed();
return element(by.css('#scheduled-process .fa.fa-refresh')).isDisplayed();
}

getCreateScheduleButton() {
Expand Down Expand Up @@ -249,14 +249,16 @@ export class SkipLogin {
return browser.get('/#/backup-restore');
}

getBackupRestoreTitle() {
clickRequestBackup() {
browser.ignoreSynchronization = true;
return element(by.css('app-backup-restore header p')).getText();
element(by.css('app-backup-restore .fix-pad')).click();
// wait
browser.wait(this.EC.visibilityOf(element(by.css('app-backup-restore table thead tr'))), 6000);
}

getBackupRestoreRefreshButton() {
getBackupRestoreTitle() {
browser.ignoreSynchronization = true;
return element(by.css('app-backup-restore button i')).isDisplayed();
return element(by.css('app-backup-restore header p')).getText();
}

getBackupRestoreColNames() {
Expand All @@ -269,6 +271,19 @@ export class SkipLogin {
return element(by.css('app-backup-restore header a')).getText();
}

deleteBackup() {
browser.ignoreSynchronization = true;
element(by.css('app-backup-restore .button.is-text')).click();
browser.wait(this.EC.visibilityOf(element(by.css('.modal-card footer button.is-info'))), 2000);
element(by.css('.modal-card footer button.is-info')).click();
browser.wait(this.EC.visibilityOf(element(by.css('app-backup-restore .no-rec'))), 3000);
}

noBackupRecord() {
browser.ignoreSynchronization = true;
return element(by.css('app-backup-restore .no-rec')).getText();
}

navToSupportBundles() {
return browser.get('/#/support');
}
Expand Down
7 changes: 5 additions & 2 deletions e2e/specs/app.e2e-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('FogLAMP gui', () => {
adminLogin = new AdminLogin();
nonAdminLogin = new NonAdminLogin();

beforeEach(() => {
beforeAll(() => {
if (!isSetupInstance) {
skipLogin.navigateToHome();
skipLogin.setUpInstance();
Expand Down Expand Up @@ -94,12 +94,15 @@ describe('FogLAMP gui', () => {
'Status'
];
skipLogin.navToBackupRestore();
skipLogin.clickRequestBackup();
expect(skipLogin.getBackupRestoreTitle()).toContain('Backup');
expect(skipLogin.getBackupRestoreRefreshButton()).toEqual(true);
for (const ColumnName in ColumnsName) {
expect(skipLogin.getBackupRestoreColNames()).toContain(ColumnsName[ColumnName]);
}
expect(skipLogin.getRequestBackup()).toContain('Backup');
// Delete backup
skipLogin.deleteBackup();
expect(skipLogin.noBackupRecord()).toContain('No Record');
});

it('Should Display Support Bundles', () => {
Expand Down
17 changes: 17 additions & 0 deletions extra-webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const webpack = require("webpack");
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');

const webpackConfig = {
resolve: {
alias: {
// 'lodash-es': 'lodash'
}
},
plugins: [
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/),
// new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
new LodashModuleReplacementPlugin()
]
}

module.exports = webpackConfig
Loading

0 comments on commit 7c1856e

Please sign in to comment.