Commit 6bcd3006 authored by El Mghazli Yacine's avatar El Mghazli Yacine

ng build OK

parent 7acc5e96
......@@ -10,7 +10,7 @@
],
"parserOptions": {
"project": [
"ngx/tsconfig.json"
"openairinterface5g/common/utils/websrv/frontend/tsconfig.json"
],
"createDefaultProgram": true
},
......
......@@ -47,5 +47,3 @@ testem.log
.DS_Store
Thumbs.db
config.toml
/.angular
......@@ -2,6 +2,7 @@ stages:
- install
- build
- publish
- deploy
variables:
TRION_CLI_VERSION: 12.2.4
......@@ -62,3 +63,45 @@ on-gitlab:
only:
- dev
- master
on-heroku:
stage: publish
dependencies:
- build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"registry.heroku.com\":{\"username\":\"_\",\"password\":\"$HEROKU_API_KEY\"}}}" > /kaniko/.docker/config.json
script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile Dockerfile --destination registry.heroku.com/$HEROKU_APP_NAME/web
only:
- dev
herokuapp:
stage: deploy
image: node:lts-alpine
before_script:
- apk update && apk add curl bash
- rm -rf /var/cache/apk/*
- curl https://cli-assets.heroku.com/install.sh | sh
script:
- heroku container:release web --app $HEROKU_APP_NAME
environment:
name: heroku-dev
url: https://lsdngx.herokuapp.com
only:
- dev
on-gke:
stage: deploy
image: alpine/k8s:1.20.7
script:
- kubectl config use-context lsd5/k8s:gke-agent
- kubectl apply -f k8s/manifest.yaml --namespace=$NAMESPACE
environment:
name: gke-master
url: https://lsd.nutridata.io
only:
- master
FROM nginx:alpine
COPY dist/lsd-ngx /usr/share/nginx/html/
COPY dist/softmodem-ngx /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/conf.d/default.conf
......
......@@ -7,7 +7,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ngx": {
"softmodemngx": {
"projectType": "application",
"schematics": {
"@schematics/angular:application": {
......@@ -21,7 +21,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/lsd-ngx",
"outputPath": "dist/softmodem-ngx",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
......@@ -77,10 +77,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "ngx:build:production"
"browserTarget": "softmodemngx:build:production"
},
"development": {
"browserTarget": "ngx:build:development"
"browserTarget": "softmodemngx:build:development"
}
},
"defaultConfiguration": "development"
......@@ -88,7 +88,7 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ngx:build"
"browserTarget": "softmodemngx:build"
}
},
"lint": {
......@@ -103,5 +103,5 @@
}
}
},
"defaultProject": "ngx"
"defaultProject": "softmodemngx"
}
\ No newline at end of file
{
"name": "ngx",
"name": "softmodemngx",
"version": "2.0.0",
"scripts": {
"lint": "ng lint",
......@@ -9,38 +9,37 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~13.2.6",
"@angular/cdk": "~13.2.6",
"@angular/common": "~13.2.6",
"@angular/compiler": "~13.2.6",
"@angular/core": "~13.2.6",
"@angular/fire": "^7.0.3",
"@angular/flex-layout": "^13.0.0-beta.38",
"@angular/forms": "~13.2.6",
"@angular/material": "^13.2.6",
"@angular/platform-browser": "~13.2.6",
"@angular/platform-browser-dynamic": "~13.2.6",
"@angular/router": "~13.2.6",
"@angular/animations": "~12.2.4",
"@angular/cdk": "~12.2.4",
"@angular/common": "~12.2.4",
"@angular/compiler": "~12.2.4",
"@angular/core": "~12.2.4",
"@angular/flex-layout": "^12.0.0-beta.34",
"@angular/forms": "~12.2.4",
"@angular/material": "^12.2.4",
"@angular/platform-browser": "~12.2.4",
"@angular/platform-browser-dynamic": "~12.2.4",
"@angular/router": "~12.2.4",
"moment": "^2.29.1",
"rxjs": "^6.6.6",
"tslib": "^2.3.1",
"tslib": "^2.0.0",
"zone.js": "^0.11.4"
},
"devDependencies": {
"@angular-devkit/architect": "^0.1302.6",
"@angular-devkit/build-angular": "~13.2.6",
"@angular-eslint/builder": "13.1.0",
"@angular-eslint/eslint-plugin": "13.1.0",
"@angular-eslint/eslint-plugin-template": "13.1.0",
"@angular-eslint/schematics": "13.1.0",
"@angular-eslint/template-parser": "13.1.0",
"@angular/cli": "~13.2.6",
"@angular/compiler-cli": "~13.2.6",
"@angular/language-service": "^13.2.6",
"@angular-devkit/architect": "^0.1200.0",
"@angular-devkit/build-angular": "~12.2.4",
"@angular-eslint/builder": "12.1.0",
"@angular-eslint/eslint-plugin": "12.1.0",
"@angular-eslint/eslint-plugin-template": "12.1.0",
"@angular-eslint/schematics": "12.5.0",
"@angular-eslint/template-parser": "12.1.0",
"@angular/cli": "~12.2.4",
"@angular/compiler-cli": "~12.2.4",
"@angular/language-service": "^12.2.4",
"@types/node": "^12.20.23",
"@typescript-eslint/eslint-plugin": "4.23.0",
"@typescript-eslint/parser": "4.23.0",
"eslint": "^7.26.0",
"firebase-tools": "^9.0.0",
"fs-extra": "^10.0.0",
"fuzzy": "^0.1.3",
"husky": "^5.1.3",
......@@ -52,7 +51,7 @@
"open": "^7.0.3",
"ts-node": "^8.10.2",
"tslint-angular": "^3.0.3",
"typescript": "~4.5.5"
"typescript": "~4.2.4"
},
"husky": {
"hooks": {
......
......@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.css'],
})
export class AppComponent {
title = 'lsd-ngx';
title = 'softmodem-ngx';
}
......@@ -2,6 +2,7 @@ import { ClipboardModule } from '@angular/cdk/clipboard/';
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatChipsModule } from '@angular/material/chips';
......@@ -17,30 +18,30 @@ import { MatMenuModule } from '@angular/material/menu';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatSelectModule } from '@angular/material/select';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatTableModule } from '@angular/material/table';
import { MatToolbarModule } from '@angular/material/toolbar';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { CommandsApi } from './api/commands.api';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CommandsComponent } from './components/commands/commands.component';
import { ErrorDialogComponent } from './components/error-dialog/error-dialog.component';
import { NavComponent } from './components/nav/nav.component';
import { InterceptorProviders } from './interceptors/interceptors';
import { LoadingService } from './services/loading.service';
import { CommandsComponent } from './components/commands/commands.component';
import { CommandsApi } from './api/commands.api';
import { MatSidenavModule } from '@angular/material/sidenav';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppRoutingModule } from './app-routing.module';
import { ReactiveFormsModule } from '@angular/forms';
@NgModule({
declarations: [
AppComponent,
NavComponent,
ErrorDialogComponent,
CommandsComponent,
ErrorDialogComponent
],
imports: [
MatSidenavModule,
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
......@@ -57,6 +58,7 @@ import { ReactiveFormsModule } from '@angular/forms';
MatDatepickerModule,
MatNativeDateModule,
MatToolbarModule,
MatSidenavModule,
MatListModule,
MatTableModule,
MatPaginatorModule,
......@@ -67,7 +69,6 @@ import { ReactiveFormsModule } from '@angular/forms';
MatGridListModule,
MatCardModule,
MatMenuModule,
MatSidenavModule,
],
providers: [
// services
......
......@@ -2,9 +2,9 @@
/* eslint-disable no-shadow */
/* eslint-disable eqeqeq */
/* eslint-disable @typescript-eslint/naming-convention */
import { Component, OnInit } from '@angular/core';
import { Observable, of } from 'rxjs';
import { map, mergeMap, tap } from 'rxjs/operators';
import { Component } from '@angular/core';
import { Observable } from 'rxjs';
import { map, tap } from 'rxjs/operators';
import { CommandsApi } from 'src/app/api/commands.api';
import { CommandCtrl } from 'src/app/controls/command.control';
import { LoadingService } from 'src/app/services/loading.service';
......@@ -22,7 +22,6 @@ export class CommandsComponent {
constructor(
public commandsApi: CommandsApi,
public autoSendApi: CommandsApi,
public loadingService: LoadingService,
) {
this.commandsCtrls$ = this.commandsApi.readCommands$().pipe(
......
......@@ -2,32 +2,38 @@
<mat-sidenav #drawer class="sidenav" fixedInViewport [attr.role]="(isHandset$ | async) ? 'dialog' : 'navigation'"
[mode]="(isHandset$ | async) ? 'over' : 'side'" [opened]="(isHandset$ | async) === false">
<mat-nav-list>
<a mat-list-item routerLink="/commands" routerLinkActive="active">Commands</a>
<a mat-list-item routerLink="/logs" routerLinkActive="active">Logs</a>
<a mat-list-item routerLink="/bookings" routerLinkActive="active">Month</a>
<a mat-list-item routerLink="/year" routerLinkActive="active">Year</a>
<a mat-list-item routerLink="/messages" routerLinkActive="active">Autosend</a>
<a mat-list-item routerLink="/cleaners" routerLinkActive="active">Cleaners</a>
<a mat-list-item routerLink="/user" routerLinkActive="active">Calendars</a>
</mat-nav-list>
</mat-sidenav>
<mat-sidenav-content>
<mat-toolbar>
<mat-toolbar-row fxLayout="row" fxLayoutAlign="space-between center">
<ng-template #not_loading>
<button mat-icon-button (click)="drawer.toggle()">
<mat-icon>menu</mat-icon>
</button>
<h1>OAI SoftModem</h1>
<h1>SOFTMODEM</h1>
</ng-template>
<ng-template #loading>
<mat-progress-spinner mode="indeterminate" diameter="40"> </mat-progress-spinner>
<mat-progress-spinner mode="indeterminate" diameter="40">
</mat-progress-spinner>
</ng-template>
<div fxLayout="row" fxLayoutAlign="start center">
<ng-container *ngIf="loadingService.isLoading$ | async; then loading; else not_loading">
</ng-container>
</div>
<div #notAuthenticated>
<button mat-raised-button color="primary">
login
</button>
</div>
</mat-toolbar-row>
</mat-toolbar>
......
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
import { Component } from '@angular/core';
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
import { Observable } from 'rxjs';
import { map, shareReplay } from 'rxjs/operators';
import { LoadingService } from 'src/app/services/loading.service';
......
/* eslint-disable no-shadow */
import { FormControl, FormGroup } from '@angular/forms';
import { IOption } from '../api/commands.api';
const enum OptionFCN {
key = 'key',
value = 'value',
}
export class Option {
key: string;
value: number;
constructor(ioption: IOption) {
this.key = ioption.key;
this.value = ioption.value;
}
}
export class OptionCtrl extends FormGroup {
constructor(ioption: IOption) {
super({});
const option = new Option(ioption);
this.addControl(OptionFCN.key, new FormControl(option.key));
this.addControl(OptionFCN.value, new FormControl(option.value));
}
api() {
const doc: IOption = {
key: this.keyFC.value,
value: this.valueFC.value,
};
return doc;
}
get keyFC() {
return this.get(OptionFCN.key) as FormControl;
}
set keyFC(control: FormControl) {
this.setControl(OptionFCN.key, control);
}
get valueFC() {
return this.get(OptionFCN.value) as FormControl;
}
setvalueFC(control: FormControl) {
this.setControl(OptionFCN.value, control);
}
}
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<title>ngx</title>
<title>SoftmodemNgx</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
......
**/.classpath
**/.dockerignore
**/.env
/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/charts
**/docker-compose*
**/Dockerfile*
/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
README.md
version: '3.4'
services:
backend:
container_name: api.dev
image: registry.gitlab.com/lsd5/backend/dev:latest
pull_policy: always
environment:
- NODE_ENV=development
ports:
- 3000:3000
- 9229:9229
command:
[
'node',
'--inspect=0.0.0.0:9229',
'-r',
'module-alias/register',
'dist/main.js'
]
frontend:
container_name: ngx.dev
image: registry.gitlab.com/lsd5/ngx/dev:latest
pull_policy: always
# build:
# context: .
# dockerfile: ./Dockerfile
environment:
- PORT=80
ports:
- 80:80
# DO NOT USE command : the Dockerfile CMD must be called in order to replace $PORT with sed
mongo:
container_name: db.dev
image: mongo:5
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=dev
ports:
- 27017:27017
command: mongod
server {
listen 0.0.0.0:$PORT;
location / {
root /usr/share/nginx/html;
index index.html;
}
}
/* eslint-disable no-shadow */
import { FormControl, FormGroup } from '@angular/forms';
import { IOption } from '../api/commands.api';
const enum OptionFCN {
key = 'key',
value = 'value',
}
export class Option {
key: string;
value: number;
constructor(ioption: IOption) {
this.key = ioption.key;
this.value = ioption.value;
}
}
export class OptionCtrl extends FormGroup {
constructor(ioption: IOption) {
super({});
const option = new Option(ioption);
this.addControl(OptionFCN.key, new FormControl(option.key));
this.addControl(OptionFCN.value, new FormControl(option.value));
}
api() {
const doc: IOption = {
key: this.keyFC.value,
value: this.valueFC.value,
};
return doc;
}
get keyFC() {
return this.get(OptionFCN.key) as FormControl;
}
set keyFC(control: FormControl) {
this.setControl(OptionFCN.key, control);
}
get valueFC() {
return this.get(OptionFCN.value) as FormControl;
}
setvalueFC(control: FormControl) {
this.setControl(OptionFCN.value, control);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment