Skip to content

Commit

Permalink
Fixes mistakes from #11 Updated proper commits from develop brach
Browse files Browse the repository at this point in the history
* EDA React application starter pack

* Included Arduino Frontend

* Configured For github actions

* Optimize build caching , add mysql , celery deps

* Configure Containers

* Add dev environment documentation

* Added docker config for eda-frontend

* Docker config for angular-frontend

* Added Layout and Grid for simulator interface

* Revert "Added Layout and Grid for simulator interface"

* Added MongoDB Container , Minor Documentation fixes (#12)

* Documentation Fixes

* Add MongoDB Container
Merge Develop branch changes (#11)

* EDA React application starter pack

* Hotfix: Docker command

* Included Arduino Frontend

* Configured For github actions

* Optimize build caching , add mysql , celery deps

* Configure Containers

* Add dev environment documentation

* Added docker config for eda-frontend

* Added Layout and Grid for simulator interface

* Added docker config for eda-frontend

* Docker config for angular-frontend

Co-authored-by: dssudake <darshansudake555@gmail.com>
Co-authored-by: Navonil Das <navneeladas@gmail.com>
Co-authored-by: Meet10 <61341284+meet-10@users.noreply.github.com>
Co-authored-by: felixfaisal <faisalahmedfarooq46@gmail.com>
  • Loading branch information
5 people committed Apr 26, 2020
1 parent 509fc9a commit ff69c1d
Show file tree
Hide file tree
Showing 85 changed files with 61,099 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .env.public
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
PYTHONUNBUFFERED=true
SQL_ENGINE=django.db.backends.mysql
SQL_HOST=db
SQL_PORT=3306
DJANGO_DEBUG=True

MYSQL_ROOT_PASSWORD=password

MYSQL_DATABASE=esimcloud_db
MYSQL_USER=user
MYSQL_PASSWORD=password

SQL_DATABASE=esimcloud_db
SQL_USER=user
SQL_PASSWORD=password

MONGO_INITDB_ROOT_USERNAME=user
MONGO_INITDB_ROOT_PASSWORD=password
24 changes: 24 additions & 0 deletions .github/workflows/angularTestBuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Angular Build and Tests

on:
push:
branches: [ ArduinoFrontend ]
pull_request:
branches: [ ArduinoFrontend ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node js
uses: actions/setup-node@v1
with:
node-version: 10.5.0
- name: Install packages,lint,build and Unit testing
working-directory: ./ArduinoFrontend
run: |
npm install
npm run lint
npm run build -- --prod
npm test -- --configuration=ci
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
redis_data/
mysql_data/
.vscode
venv
*.sqlite3
.env.prod
mongo_data/
13 changes: 13 additions & 0 deletions ArduinoFrontend/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
46 changes: 46 additions & 0 deletions ArduinoFrontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events.json
speed-measure-plugin.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
10 changes: 10 additions & 0 deletions ArduinoFrontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:10-alpine3.11

RUN mkdir /code
WORKDIR /code

COPY package.json /code/package.json
COPY package-lock.json /code/package-lock.json

RUN npm install

27 changes: 27 additions & 0 deletions ArduinoFrontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ArduinoFrontend

## Instructions

* Install Packages

```bash
npm install
```

* Run Server

```bash
ng serve
```

* Angular Linting

```bash
ng lint
```

* Angular Unit testing

```bash
ng test
```
148 changes: 148 additions & 0 deletions ArduinoFrontend/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ArduinoFrontend": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/ArduinoFrontend",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": [],
"es5BrowserSupport": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ArduinoFrontend:build",
"host": "0.0.0.0"
},
"configurations": {
"production": {
"browserTarget": "ArduinoFrontend:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ArduinoFrontend:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
},
"configurations": {
"ci": {
"watch": false,
"progress": false,
"browsers": "CIChromeHeadless"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ArduinoFrontend-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ArduinoFrontend:serve"
},
"configurations": {
"production": {
"devServerTarget": "ArduinoFrontend:serve:production"
},
"ci": {
"devServerTarget": "ArduinoFrontend:serve:production",
"protractorConfig": "e2e/protractor-ci.conf.js"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "ArduinoFrontend"
}
12 changes: 12 additions & 0 deletions ArduinoFrontend/e2e/protractor-ci.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

const config = require('./protractor.conf').config;

config.capabilities = {
browserName: 'chrome',
chromeOptions: {
args: ['--headless', '--no-sandbox', '--disable-gpu'],
binary: require('puppeteer').executablePath(),
},
};

exports.config = config;
28 changes: 28 additions & 0 deletions ArduinoFrontend/e2e/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');

exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
19 changes: 19 additions & 0 deletions ArduinoFrontend/e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';

describe('workspace-project App', () => {
let page: AppPage;

beforeEach(() => {
page = new AppPage();
});


afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
7 changes: 7 additions & 0 deletions ArduinoFrontend/e2e/src/app.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { browser, by, element } from 'protractor';

export class AppPage {
navigateTo() {
return browser.get(browser.baseUrl) as Promise<any>;
}
}
13 changes: 13 additions & 0 deletions ArduinoFrontend/e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
Loading

0 comments on commit ff69c1d

Please sign in to comment.