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

Merge branch 'develop' into 'master'

3.1

See merge request !16
parents 407d2d77 c2c7a3e6
# 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,17 +5,17 @@ stages:
- deploy
variables:
VERSION: "3.0"
VERSION: "3.1"
SONARQUBE_URL: https://sonarqube.lam.fr
CONTAINER_IMAGE: portus.lam.fr/anis/anis-admin
install:
image: node:11
image: node:13-slim
stage: install
script:
- yarn global add @angular/cli
- yarn install
- ng build --prod
- ng build --prod --base-href /admin/
cache:
paths:
- dist
......@@ -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
......@@ -53,13 +53,3 @@ build:
only:
refs:
- develop
deploy:
image: alpine
stage: deploy
script:
- apk add --update curl
- curl -XPOST $DEV_WEBHOOK
only:
refs:
- develop
......@@ -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 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
NAME_APP=anis-admin
list:
@echo ""
@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 $(NAME_APP) application (in memory)"
@echo " stop > stop the dev server for $(NAME_APP) application"
@echo " restart > restart the dev server for $(NAME_APP) (container)"
@echo " status > display $(NAME_APP) container status"
@echo " test > run $(NAME_APP) tests"
@echo " dist > generate the angular dist application (html, css, js)"
@echo " logs > display $(NAME_APP) container logs"
@echo " shell > shell into $(NAME_APP) container"
@echo ""
install:
......@@ -24,23 +24,29 @@ install:
start:
@docker build -t anis-node conf-dev && docker run --init -it --rm --user $(UID):$(GID) \
--name anis-admin \
--name $(NAME_APP) \
-p 4201:4201 \
-v $(CURDIR):/project -d \
-w /project anis-node ng serve --host=0.0.0.0 --disable-host-check --port 4201
stop:
@docker stop anis-admin
@docker stop $(NAME_APP)
restart: stop start
ng-build:
status:
@docker ps -f name=$(NAME_APP)
test:
@docker exec -ti $(NAME_APP) 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:
@docker logs -f -t anis-admin
logs:
@docker logs -f -t $(NAME_APP)
debug:
@docker exec -ti anis-admin bash
\ No newline at end of file
shell:
@docker exec -ti $(NAME_APP) 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": true,
"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,
"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
FROM node:11
FROM node:13-slim
RUN yarn global add @angular/cli
RUN ng config -g cli.packageManager yarn
......
// @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>;
}
}