Commit 2746bdba authored by François Agneray's avatar François Agneray
Browse files

Initial commit for the version 3.1

parent a30818eb
# 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
# 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
#--- OS ---#
.DS_Store
._*
# dependencies
/node_modules
#--- IDE ---#
.vscode/
.idea/
nbproject/
# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
#--- COMPOSER ---#
vendor/
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
#--- NODE ---#
npm-debug.log*
yarn-debug.log*
yarn-error.log*
node_modules/
public/bower_components/
bower_components/
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
#--- LOGS ---#
logs/
*.log
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
#--- ANGULAR ---#
.editorconfig
dist
out-tsc
/e2e/*.js
/e2e/*.map
/typings
/var
# System Files
.DS_Store
Thumbs.db
#--- OTHER ---#
tmp
npm-debug.log
yarn-error.log
\ No newline at end of file
......@@ -5,7 +5,7 @@ stages:
- deploy
variables:
VERSION: "3.0"
VERSION: "3.1"
SONARQUBE_URL: https://sonarqube.lam.fr
CONTAINER_IMAGE: portus.lam.fr/anis/anis-admin
......@@ -43,9 +43,9 @@ build:
stage: build
script:
- docker login -u fagneray -p $PORTUS_TOKEN portus.lam.fr
- docker pull $CONTAINER_IMAGE:latest-dev || true
- docker build --cache-from $CONTAINER_IMAGE:latest-dev -t $CONTAINER_IMAGE:latest-dev .
- docker push $CONTAINER_IMAGE:latest-dev
- docker pull $CONTAINER_IMAGE:latest || true
- docker build --cache-from $CONTAINER_IMAGE:latest -t $CONTAINER_IMAGE:latest .
- docker push $CONTAINER_IMAGE:latest
cache:
paths:
- dist
......
......@@ -4,21 +4,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [3.0.0] - yyyy-mm-dd
## [0.0.0] - yyyy-mm-dd
### Added
- Pour les nouvelles fonctionnalités.
- For new features.
### Changed
- Pour les changements au sein des fonctionnalités déjà existantes.
- For changes in existing functionality.
### Deprecated
- Pour les fonctionnalités qui seront supprimées dans la prochaine publication.
- For soon-to-be removed features.
### Removed
- Pour les anciennes fonctionnalités Deprecated qui viennent d’être supprimées.
- For now removed features.
### Fixed
- Pour les corrections de bugs.
- For any bug fixes.
### Security
- Pour encourager les utilisateurs à mettre à niveau afin d’éviter des failles de sécurité.
\ No newline at end of file
- In case of vulnerabilities.
FROM nginx
COPY dist/anis-admin /usr/share/nginx/html
COPY conf-dev/nginx.conf /etc/nginx/conf.d/default.conf
\ No newline at end of file
COPY dist/new-admin-anis /usr/share/nginx/html
COPY conf-dev/nginx.conf /etc/nginx/conf.d/default.conf
AstroNomical Information System - Admin Client
AstroNomical Information System - Admin Dashboard
Copyright @ François Agneray & Chrystel Moreau
Copyright @ Laboratoire d'Astrophysique de Marseille
ANIS Server Admin Client is governed by the CeCILL license under French law and
ANIS Admin Dashboard is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
......
# UID := $(id -u)
# GID := $(id -g)
UID := 1000
GID := 1000
......@@ -9,12 +6,14 @@ list:
@echo "Useful targets:"
@echo ""
@echo " install > install node modules dependancies (node_modules)"
@echo " start > run a dev server for anis admin application (in memory)"
@echo " stop > stop the dev server for anis admin application"
@echo " restart > restart the dev server for anis admin (container)"
@echo " ng-build > generate the angular dist application (html, css, js)"
@echo " log > display anis admin container logs"
@echo " debug > shell into anis admin container"
@echo " start > run a dev server for anis client application (in memory)"
@echo " stop > stop the dev server for anis client application"
@echo " restart > restart the dev server for anis client (container)"
@echo " status > display anis-admin container status"
@echo " test > run anis client tests"
@echo " dist > generate the angular dist application (html, css, js)"
@echo " logs > display anis client container logs"
@echo " shell > shell into anis client container"
@echo ""
install:
......@@ -26,6 +25,7 @@ start:
@docker build -t anis-node conf-dev && docker run --init -it --rm --user $(UID):$(GID) \
--name anis-admin \
-p 4201:4201 \
-p 9876:9876 \
-v $(CURDIR):/project -d \
-w /project anis-node ng serve --host=0.0.0.0 --disable-host-check --port 4201
......@@ -34,13 +34,19 @@ stop:
restart: stop start
ng-build:
status:
@docker ps -f name=anis-admin
test:
@docker exec -ti anis-admin ng test --no-watch
dist:
@docker build -t anis-node conf-dev && docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR):/project \
-w /project anis-node ng build --prod
-w /project anis-node ng build --prod --base-href /admin/
log:
logs:
@docker logs -f -t anis-admin
debug:
@docker exec -ti anis-admin bash
\ No newline at end of file
shell:
@docker exec -ti anis-admin bash
# ANIS ADMIN
# NewAdminAnis
## Introduction
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.18.
AstroNomical Information System est un outil web générique qui vise à faciliter
la mise à disposition de données (Astrophysiques), accessible depuis
une base de données, à une communauté de scientifiques.
## Development server
ANIS-ADMIN est un composant de ANIS qui permet d'alimiter la base de données metamodel.
ANIS est capable de générer des formulaires et d'interroger une ou plusieurs bases de données
à partir des informations contenues dans la base de metamodel.
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Auteurs
## Code scaffolding
* `François Agneray` : Laboratoire d'Astrophysique de Marseille (CNRS)
* `Chrystel Moreau` : Laboratoire d'Astrophysique de Marseille (CNRS)
* `Tifenn Guillas` : Laboratoire d'Astrophysique de Marseille (CNRS)
\ No newline at end of file
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
3.0.3
\ No newline at end of file
3.1
\ No newline at end of file
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"anis-admin": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/anis-admin",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/ngx-toastr/toastr.css",
"node_modules/@fortawesome/fontawesome-free/css/all.css",
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"anis-admin": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/anis-admin",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/ngx-toastr/toastr.css",
"node_modules/@fortawesome/fontawesome-free/css/all.css",
"src/styles.css"
],
"scripts": [
"node_modules/@fortawesome/fontawesome-free/js/all.js"
]
},
"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"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "anis-admin:build"
},
"configurations": {
"production": {
"browserTarget": "anis-admin:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "anis-admin:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "anis-admin:serve"
},
"configurations": {
"production": {
"devServerTarget": "anis-admin:serve:production"
}
}
}
],
"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": "anis-admin:build"
},
"configurations": {
"production": {
"browserTarget": "anis-admin:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "anis-admin:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "anis-admin:serve"
},
"configurations": {
"production": {
"devServerTarget": "anis-admin:serve:production"
}
}
}
}
}},
"defaultProject": "anis-admin"
},
"defaultProject": "anis-admin"
}
\ No newline at end of file
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
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.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
\ No newline at end of file
......@@ -10,7 +10,7 @@ describe('workspace-project App', () => {
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome to anis-admin!');
expect(page.getTitleText()).toEqual('new-admin-anis app is running!');
});
afterEach(async () => {
......
......@@ -6,6 +6,6 @@ export class AppPage {
}
getTitleText() {
return element(by.css('app-root h1')).getText() as Promise<string>;
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}
......@@ -11,31 +11,32 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~8.0.1",
"@angular/common": "~8.0.1",
"@angular/compiler": "~8.0.1",
"@angular/core": "~8.0.1",
"@angular/forms": "~8.0.1",
"@angular/platform-browser": "~8.0.1",
"@angular/platform-browser-dynamic": "~8.0.1",
"@angular/router": "~8.0.1",
"@fortawesome/fontawesome-free": "^5.9.0",
"@ngrx/effects": "^8.0.1",
"@ngrx/router-store": "^8.0.1",
"@ngrx/store": "^8.0.1",
"@ngrx/store-devtools": "^8.0.1",
"bootstrap": "3.3.7",
"ngx-bootstrap": "^4.3.0",
"ngx-toastr": "^10.0.4",
"@angular/animations": "~8.2.13",
"@angular/common": "~8.2.13",
"@angular/compiler": "~8.2.13",
"@angular/core": "~8.2.13",
"@angular/forms": "~8.2.13",
"@angular/platform-browser": "~8.2.13",
"@angular/platform-browser-dynamic": "~8.2.13",
"@angular/router": "~8.2.13",
"@fortawesome/fontawesome-free": "^5.11.2",
"@ngrx/effects": "^8.5.2",
"@ngrx/router-store": "^8.5.2",
"@ngrx/store": "^8.5.2",
"@ngrx/store-devtools": "^8.5.2",
"bootstrap": "^4.4.1",
"jwt-decode": "^2.2.0",
"ngx-bootstrap": "^5.2.0",
"ngx-toastr": "^11.2.1",
"rxjs": "~6.4.0",
"tslib": "^1.9.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.800.0",
"@angular/cli": "~8.0.3",
"@angular/compiler-cli": "~8.0.1",
"@angular/language-service": "~8.0.1",
"@angular-devkit/build-angular": "~0.803.18",
"@angular/cli": "~8.3.18",
"@angular/compiler-cli": "~8.2.13",
"@angular/language-service": "~8.2.13",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",