Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
fufuu committed May 3, 2024
0 parents commit faca40a
Show file tree
Hide file tree
Showing 93 changed files with 7,068 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules
package-lock.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

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

# System Files
.DS_Store
Thumbs.db
138 changes: 138 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ng-admin-free": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/ng-admin-free",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets",
{
"glob": "**/*",
"input": "./node_modules/mxgraph/javascript/src",
"output": "./assets/mxgraph"
},
{
"glob": "**/*",
"input": "./node_modules/@oneteme/jquery-apexcharts/src/assets",
"output": "./assets/icons"
}
],
"styles": [
"node_modules/vis-timeline/styles/vis-timeline-graph2d.min.css",
"src/styles.scss",
"node_modules/@oneteme/jquery-apexcharts/src/assets/styles/styles.scss"
],
"scripts": [
"node_modules/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js"
],
"aot": false,
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],

"optimization": {
"scripts": true,
"styles": true,
"fonts": false
},
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ng-admin-free:build"
},
"configurations": {
"production": {
"browserTarget": "ng-admin-free:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ng-admin-free:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
},
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}
40 changes: 40 additions & 0 deletions environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

import { Application } from "src/app/shared/model/conf.model";

export const environment = {
production: false,
url: "http://localhost:9006"
};

export const application: Application = {
default_env: 'prd',
session: {
api: {
default_period: makePeriod(0)
},
main: {
default_period: makePeriod(0)
}
},
dashboard: {
default_period: makePeriod(6),
api : {
default_period: undefined
},
app: {
default_period: undefined
},
database: {
default_period: undefined
},
user: {
default_period: undefined
}
}
}

export function makePeriod(dayBetween: number, shiftEnd: number = 0): { start: Date, end: Date } {
var s = new Date();
return {start: new Date(s.getFullYear(), s.getMonth(), s.getDate() - dayBetween), end: new Date(s.getFullYear(), s.getMonth(), s.getDate() + shiftEnd)};
}

51 changes: 51 additions & 0 deletions environments/environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

import { Application } from "src/app/shared/model/conf.model";

export const environment = {
production: false,
url: "http://localhost:9006"
};

export const application: Application = {
default_env: 'prd',
session: {
api: {
default_period: makePeriod(0)
},
main: {
default_period: makePeriod(0)
}
},
dashboard: {
default_period: makePeriod(6),
api : {
default_period: undefined
},
app: {
default_period: undefined
},
database: {
default_period: undefined
},
user: {
default_period: undefined
}
}
}

export function makePeriod(dayBetween: number, shiftEnd: number = 0): { start: Date, end: Date } {
var s = new Date();
return {start: new Date(s.getFullYear(), s.getMonth(), s.getDate() - dayBetween), end: new Date(s.getFullYear(), s.getMonth(), s.getDate() + shiftEnd)};
}

/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
62 changes: 62 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "traceapi-server",
"version": "15.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^16.2.12",
"@angular/cdk": "^16.2.12",
"@angular/common": "^16.2.12",
"@angular/compiler": "^16.2.12",
"@angular/core": "^16.2.12",
"@angular/forms": "^16.2.12",
"@angular/material": "^16.2.12",
"@angular/platform-browser": "^16.2.12",
"@angular/platform-browser-dynamic": "^16.2.12",
"@angular/router": "^16.2.12",
"@fortawesome/fontawesome-free": "^6.0.0",
"@oneteme/jquery-apexcharts": "^0.0.6",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"mxgraph": "^4.2.2",
"rxjs": "~7.5.0",
"tslib": "^2.0.0",
"vis-data": "^7.1.9",
"vis-timeline": "^7.7.3",
"zone.js": "~0.13.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.2.12",
"@angular-eslint/builder": "^16.0.0",
"@angular-eslint/eslint-plugin": "^16.0.0",
"@angular-eslint/eslint-plugin-template": "^16.0.0",
"@angular-eslint/schematics": "^16.0.0",
"@angular-eslint/template-parser": "^16.0.0",
"@angular/cli": "^16.2.12",
"@angular/compiler-cli": "^16.2.12",
"@angular/language-service": "^16.2.12",
"@typed-mxgraph/typed-mxgraph": "^1.0.8",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^20.5.9",
"@typescript-eslint/eslint-plugin": "5.11.0",
"@typescript-eslint/parser": "5.11.0",
"eslint": "^8.2.0",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "^6.3.17",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.7.0",
"mxgraph-type-definitions": "^1.0.6",
"typescript": "~4.9.3"
}
}
11 changes: 11 additions & 0 deletions src/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
#
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11
27 changes: 27 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<nav>
<mat-toolbar color="primary" style="display: flex; align-items: center; height: 48px;">
<span style="margin-right: 1em;">Trace Api</span>

<a style="color: inherit" [routerLink]="['session/api']" routerLinkActive="item-selected"
[queryParams]="{env: env.value}">
<button mat-button>Liste des API</button>
</a>
<a style="color: inherit" [routerLink]="['session/main']" routerLinkActive="item-selected"
[queryParams]="{env: env.value}">
<button mat-button>Liste des Sessions</button>
</a>

<span style="flex-grow: 1;"></span>
<mat-form-field appearance="fill" class="md-2 no-subscript" [class.loading]="isLoadingEnv">
<mat-select [formControl]="env">
<mat-option *ngFor="let e of envs" [value]="e">{{e}}</mat-option>
</mat-select>
<mat-spinner *ngIf="isLoadingEnv" [diameter]="18"></mat-spinner>
</mat-form-field>
</mat-toolbar>
</nav>
<mat-drawer-container>
<mat-drawer-content style="overflow-x: hidden; padding: 0.5em">
<router-outlet></router-outlet>
</mat-drawer-content>
</mat-drawer-container>
9 changes: 9 additions & 0 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:host {
display: flex;
flex-direction: column;
height: 100vh;
}

.item-selected {
background: rgba(0,0,0,.2);
}
Loading

0 comments on commit faca40a

Please sign in to comment.