environment fix
parent
33c4608152
commit
035ebaf6a7
|
|
@ -43,7 +43,7 @@
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
"maximumWarning": "2kb",
|
"maximumWarning": "2kb",
|
||||||
"maximumError": "4kb"
|
"maximumError": "6kb"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"fileReplacements": [
|
"fileReplacements": [
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
"@angular/platform-browser-dynamic": "^16.0.0",
|
"@angular/platform-browser-dynamic": "^16.0.0",
|
||||||
"@angular/router": "^16.0.0",
|
"@angular/router": "^16.0.0",
|
||||||
"@syncfusion/ej2-angular-gantt": "^26.2.4",
|
"@syncfusion/ej2-angular-gantt": "^26.2.4",
|
||||||
"@syncfusion/ej2-material-theme": "^26.2.4",
|
|
||||||
"jquery": "^3.6.1",
|
"jquery": "^3.6.1",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"rxjs": "^7.8.0",
|
"rxjs": "^7.8.0",
|
||||||
|
|
@ -5111,12 +5110,6 @@
|
||||||
"@syncfusion/ej2-popups": "~26.2.5"
|
"@syncfusion/ej2-popups": "~26.2.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@syncfusion/ej2-material-theme": {
|
|
||||||
"version": "26.2.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-material-theme/-/ej2-material-theme-26.2.7.tgz",
|
|
||||||
"integrity": "sha512-UeUBuUmAfiTr5UUJwlpbhTf0gDZDTbp1qpayhu3BeZeT9YThju0PkZW95cYxgzOfmdn06SVUxbFqOjIWL7IWbg==",
|
|
||||||
"license": "SEE LICENSE IN license"
|
|
||||||
},
|
|
||||||
"node_modules/@syncfusion/ej2-navigations": {
|
"node_modules/@syncfusion/ej2-navigations": {
|
||||||
"version": "26.2.7",
|
"version": "26.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-navigations/-/ej2-navigations-26.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-navigations/-/ej2-navigations-26.2.7.tgz",
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,12 @@
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "npm run generate-env && ng serve",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"watch": "ng build --watch --configuration development",
|
"watch": "ng build --watch --configuration development",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"compodoc": "npx compodoc -p tsconfig.doc.json"
|
"compodoc": "npx compodoc -p tsconfig.doc.json",
|
||||||
|
"generate-env": "npx ts-node -O \"{\\\"module\\\":\\\"commonjs\\\"}\" -e \"const fs = require('fs'); const path = require('path'); const { environment } = require(path.join(process.cwd(), './src/environments/', (process.argv[1] || 'environment.ts'))); fs.writeFileSync(path.join(process.cwd(), './src/assets/environment.json'), JSON.stringify(environment));\""
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { InjectionToken } from '@angular/core'
|
||||||
|
import { AppConfig } from 'src/environments/models/environment.model'
|
||||||
|
|
||||||
|
// export class AppConfig {
|
||||||
|
// serviceUrl: string
|
||||||
|
// someSecret: string
|
||||||
|
// toggle1: boolean
|
||||||
|
// }
|
||||||
|
|
||||||
|
export let APP_CONFIG = new InjectionToken<AppConfig>('APP_CONFIG')
|
||||||
|
|
@ -51,6 +51,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
|
|
||||||
NttGanttComponent,
|
NttGanttComponent,
|
||||||
StateDialogComponent,
|
StateDialogComponent,
|
||||||
ImplementerDialogComponent,
|
ImplementerDialogComponent,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
import { JsonPipe } from '@angular/common';
|
import { JsonPipe } from '@angular/common';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Inject, Injectable } from '@angular/core';
|
||||||
import { ResourceFields } from '@syncfusion/ej2-angular-gantt';
|
import { ResourceFields } from '@syncfusion/ej2-angular-gantt';
|
||||||
import { LanguageService } from './language.service';
|
import { LanguageService } from './language.service';
|
||||||
import { ErrorService } from './error.service';
|
import { ErrorService } from './error.service';
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
|
import { AppConfig } from 'src/environments/models/environment.model';
|
||||||
|
import { APP_CONFIG } from './app.config';
|
||||||
|
|
||||||
interface Preset {
|
interface Preset {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
@ -36,7 +38,8 @@ export class DataService {
|
||||||
private totalSize: number = null;
|
private totalSize: number = null;
|
||||||
private user: string = null;
|
private user: string = null;
|
||||||
public userSupportGroup: string;
|
public userSupportGroup: string;
|
||||||
public authUrl = 'https://itsm-dev-neu-rsso.asfinag.at/rsso/start?bypass-auth=true&tenant=itsm-dev-neu&goto=https://itsm-dev-neu.asfinag.at/arsys/calendar';
|
//public authUrl = 'https://itsm-dev-neu-rsso.asfinag.at/rsso/start?bypass-auth=true&tenant=itsm-dev-neu&goto=https://itsm-dev-neu.asfinag.at/arsys/calendar';
|
||||||
|
private config: AppConfig;
|
||||||
|
|
||||||
//public selectedLanguage: string = 'DE';
|
//public selectedLanguage: string = 'DE';
|
||||||
|
|
||||||
|
|
@ -45,7 +48,7 @@ export class DataService {
|
||||||
* @param languageService injection of the languageService
|
* @param languageService injection of the languageService
|
||||||
* @param http representation of the HttpClient
|
* @param http representation of the HttpClient
|
||||||
*/
|
*/
|
||||||
constructor(public languageService: LanguageService, private http: HttpClient, public errorService: ErrorService, private location: Location) {
|
constructor(@Inject(APP_CONFIG) config: AppConfig, public languageService: LanguageService, private http: HttpClient, public errorService: ErrorService, private location: Location) {
|
||||||
this.getUser().then((res: any )=>{
|
this.getUser().then((res: any )=>{
|
||||||
this.user = res.userId;
|
this.user = res.userId;
|
||||||
});
|
});
|
||||||
|
|
@ -66,10 +69,12 @@ export class DataService {
|
||||||
this.userSupportGroup = res.name;
|
this.userSupportGroup = res.name;
|
||||||
console.log(this.userSupportGroup);
|
console.log(this.userSupportGroup);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.config=config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public redirectToAuthUrl() {
|
public redirectToAuthUrl() {
|
||||||
window.location.href = this.authUrl;
|
window.location.href = this.config.rssoUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -164,7 +169,7 @@ export class DataService {
|
||||||
public async getUser(){
|
public async getUser(){
|
||||||
const promise = new Promise(resolve=>{
|
const promise = new Promise(resolve=>{
|
||||||
let res : any;
|
let res : any;
|
||||||
this.http.get('http://localhost:8080/api/getUser')
|
this.http.get(this.config.backendUrl+'/getUser')
|
||||||
.subscribe((response: any)=>{
|
.subscribe((response: any)=>{
|
||||||
res = response;
|
res = response;
|
||||||
resolve(res);
|
resolve(res);
|
||||||
|
|
@ -184,7 +189,7 @@ export class DataService {
|
||||||
public async initPresets(){
|
public async initPresets(){
|
||||||
const promise = new Promise(resolve=>{
|
const promise = new Promise(resolve=>{
|
||||||
let res = {presets: [], selectedPreset: '', userPreferences: {}, presetGroups: []};
|
let res = {presets: [], selectedPreset: '', userPreferences: {}, presetGroups: []};
|
||||||
this.http.get('http://localhost:8080/api/initPresets')
|
this.http.get(this.config.backendUrl+'/initPresets')
|
||||||
.subscribe((response: any)=>{
|
.subscribe((response: any)=>{
|
||||||
console.log(response);
|
console.log(response);
|
||||||
if(response.status == 500){
|
if(response.status == 500){
|
||||||
|
|
@ -276,7 +281,7 @@ export class DataService {
|
||||||
let strigifiedResource = JSON.stringify(serializableResource);
|
let strigifiedResource = JSON.stringify(serializableResource);
|
||||||
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
||||||
console.log(resJson);
|
console.log(resJson);
|
||||||
this.http.post('http://localhost:8080/api/selectPreset', resJson).subscribe((response:any)=>{
|
this.http.post(this.config.backendUrl+'/selectPreset', resJson).subscribe((response:any)=>{
|
||||||
resolve(response);
|
resolve(response);
|
||||||
console.log(response);
|
console.log(response);
|
||||||
},(error:any)=>{
|
},(error:any)=>{
|
||||||
|
|
@ -296,7 +301,7 @@ export class DataService {
|
||||||
let strigifiedResource = JSON.stringify(serializableResource);
|
let strigifiedResource = JSON.stringify(serializableResource);
|
||||||
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
||||||
console.log(resJson);
|
console.log(resJson);
|
||||||
this.http.post('http://localhost:8080/api/savePreset', resJson).subscribe((response:any)=>{
|
this.http.post(this.config.backendUrl+'/savePreset', resJson).subscribe((response:any)=>{
|
||||||
resolve(response);
|
resolve(response);
|
||||||
console.log(response);
|
console.log(response);
|
||||||
},(error:any)=>{
|
},(error:any)=>{
|
||||||
|
|
@ -316,7 +321,7 @@ export class DataService {
|
||||||
let serializableResource = {id: preset.id, definition: JSON.stringify(preset.definition)};
|
let serializableResource = {id: preset.id, definition: JSON.stringify(preset.definition)};
|
||||||
let strigifiedResource = JSON.stringify(serializableResource);
|
let strigifiedResource = JSON.stringify(serializableResource);
|
||||||
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
||||||
this.http.post('http://localhost:8080/api/updatePreset', resJson).subscribe((response:any)=>{
|
this.http.post(this.config.backendUrl+'/updatePreset', resJson).subscribe((response:any)=>{
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},(error:any)=>{
|
},(error:any)=>{
|
||||||
resolve(error);
|
resolve(error);
|
||||||
|
|
@ -334,7 +339,7 @@ export class DataService {
|
||||||
let serializableResource = {id: preset.id, newName: preset.name};
|
let serializableResource = {id: preset.id, newName: preset.name};
|
||||||
let strigifiedResource = JSON.stringify(serializableResource);
|
let strigifiedResource = JSON.stringify(serializableResource);
|
||||||
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
||||||
this.http.post('http://localhost:8080/api/renamePreset', resJson).subscribe((response:any)=>{
|
this.http.post(this.config.backendUrl+'/renamePreset', resJson).subscribe((response:any)=>{
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},(error:any)=>{
|
},(error:any)=>{
|
||||||
resolve(error);
|
resolve(error);
|
||||||
|
|
@ -352,7 +357,7 @@ export class DataService {
|
||||||
let serializableResource = {id: preset.id};
|
let serializableResource = {id: preset.id};
|
||||||
let strigifiedResource = JSON.stringify(serializableResource);
|
let strigifiedResource = JSON.stringify(serializableResource);
|
||||||
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
||||||
this.http.post('http://localhost:8080/api/deletePreset', resJson).subscribe((response:any)=>{
|
this.http.post(this.config.backendUrl+'/deletePreset', resJson).subscribe((response:any)=>{
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},(error:any)=>{
|
},(error:any)=>{
|
||||||
resolve(error);
|
resolve(error);
|
||||||
|
|
@ -371,7 +376,7 @@ export class DataService {
|
||||||
let strigifiedResource = JSON.stringify(serializableResource);
|
let strigifiedResource = JSON.stringify(serializableResource);
|
||||||
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
||||||
console.log(resJson);
|
console.log(resJson);
|
||||||
this.http.post('http://localhost:8080/api/editUserPreferences', resJson).subscribe((response:any)=>{
|
this.http.post(this.config.backendUrl+'/editUserPreferences', resJson).subscribe((response:any)=>{
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},(error:any)=>{
|
},(error:any)=>{
|
||||||
resolve(error);
|
resolve(error);
|
||||||
|
|
@ -387,7 +392,7 @@ export class DataService {
|
||||||
public async fetchStates(){
|
public async fetchStates(){
|
||||||
const promise = new Promise(resolve=>{
|
const promise = new Promise(resolve=>{
|
||||||
let res : any[] = [];
|
let res : any[] = [];
|
||||||
this.http.get('http://localhost:8080/api/getStates')
|
this.http.get(this.config.backendUrl+'/getStates')
|
||||||
.subscribe((response: any)=>{
|
.subscribe((response: any)=>{
|
||||||
console.log("###\n");
|
console.log("###\n");
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
|
@ -411,7 +416,7 @@ export class DataService {
|
||||||
public async fetchSupportGroups(){
|
public async fetchSupportGroups(){
|
||||||
const promise = new Promise(resolve=>{
|
const promise = new Promise(resolve=>{
|
||||||
let res : any[] = [];
|
let res : any[] = [];
|
||||||
this.http.get('http://localhost:8080/api/getSupportGroups')
|
this.http.get(this.config.backendUrl+'/getSupportGroups')
|
||||||
.subscribe((response: any)=>{
|
.subscribe((response: any)=>{
|
||||||
response.forEach(supportGroup => {
|
response.forEach(supportGroup => {
|
||||||
res.push(supportGroup)
|
res.push(supportGroup)
|
||||||
|
|
@ -433,7 +438,7 @@ export class DataService {
|
||||||
public async fetchContracts(){
|
public async fetchContracts(){
|
||||||
const promise = new Promise(resolve=>{
|
const promise = new Promise(resolve=>{
|
||||||
let res : any[] = [];
|
let res : any[] = [];
|
||||||
this.http.get('http://localhost:8080/api/getContracts')
|
this.http.get(this.config.backendUrl+'/getContracts')
|
||||||
.subscribe((response: any)=>{
|
.subscribe((response: any)=>{
|
||||||
response.forEach(contract => {
|
response.forEach(contract => {
|
||||||
res.push(contract)
|
res.push(contract)
|
||||||
|
|
@ -451,7 +456,7 @@ export class DataService {
|
||||||
// public async fetchPaketTypes(){
|
// public async fetchPaketTypes(){
|
||||||
// const promise = new Promise(resolve=>{
|
// const promise = new Promise(resolve=>{
|
||||||
// let res : any[] = [];
|
// let res : any[] = [];
|
||||||
// this.http.get('http://localhost:8080/api/getPackageTypes')
|
// this.http.get(this.config.backendUrl+'/getPackageTypes')
|
||||||
// .subscribe((response: any)=>{
|
// .subscribe((response: any)=>{
|
||||||
// response.forEach(paketType => {
|
// response.forEach(paketType => {
|
||||||
// res.push(paketType)
|
// res.push(paketType)
|
||||||
|
|
@ -469,7 +474,7 @@ export class DataService {
|
||||||
public async fetchUserSupportGroup(){
|
public async fetchUserSupportGroup(){
|
||||||
const promise = new Promise(resolve=>{
|
const promise = new Promise(resolve=>{
|
||||||
let res : any = {};
|
let res : any = {};
|
||||||
this.http.get('http://localhost:8080/api/getUserSupportGroup')
|
this.http.get(this.config.backendUrl+'/getUserSupportGroup')
|
||||||
.subscribe((response: any)=>{
|
.subscribe((response: any)=>{
|
||||||
this.userSupportGroup = res.name;
|
this.userSupportGroup = res.name;
|
||||||
res = response;
|
res = response;
|
||||||
|
|
@ -495,7 +500,7 @@ export class DataService {
|
||||||
let stringyfiedData = JSON.stringify(obj);
|
let stringyfiedData = JSON.stringify(obj);
|
||||||
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
|
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
|
||||||
let res : any[] = [];
|
let res : any[] = [];
|
||||||
this.http.post('http://localhost:8080/api/fetchPlanTimes', dataJson)
|
this.http.post(this.config.backendUrl+'/fetchPlanTimes', dataJson)
|
||||||
.subscribe((response: any[])=>{
|
.subscribe((response: any[])=>{
|
||||||
response.forEach(week => {
|
response.forEach(week => {
|
||||||
res.push(week);
|
res.push(week);
|
||||||
|
|
@ -518,7 +523,7 @@ export class DataService {
|
||||||
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
|
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
|
||||||
// console.log(dataJson);
|
// console.log(dataJson);
|
||||||
let res : any[] = [];
|
let res : any[] = [];
|
||||||
this.http.post('http://localhost:8080/api/getImplementer', dataJson)
|
this.http.post(this.config.backendUrl+'/getImplementer', dataJson)
|
||||||
.subscribe((response: any)=>{
|
.subscribe((response: any)=>{
|
||||||
response.members.forEach(implementer => {
|
response.members.forEach(implementer => {
|
||||||
res.push(implementer)
|
res.push(implementer)
|
||||||
|
|
@ -538,7 +543,7 @@ export class DataService {
|
||||||
let serializableResource = { resourceId: change.resourceId, d2: change.tasks[1].StartDate, changeNr: change.changeNr, state: change.state};
|
let serializableResource = { resourceId: change.resourceId, d2: change.tasks[1].StartDate, changeNr: change.changeNr, state: change.state};
|
||||||
let strigifiedResource = JSON.stringify(serializableResource);
|
let strigifiedResource = JSON.stringify(serializableResource);
|
||||||
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
let resJson = JSON.parse(strigifiedResource) as typeof strigifiedResource;
|
||||||
this.http.post('http://localhost:8080/api/updateChange', resJson).subscribe((response:any)=>{
|
this.http.post(this.config.backendUrl+'/updateChange', resJson).subscribe((response:any)=>{
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},(error:any)=>{
|
},(error:any)=>{
|
||||||
resolve(error);
|
resolve(error);
|
||||||
|
|
@ -558,7 +563,7 @@ export class DataService {
|
||||||
let stringyfiedData = JSON.stringify(obj);
|
let stringyfiedData = JSON.stringify(obj);
|
||||||
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
|
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
|
||||||
// console.log(dataJson);
|
// console.log(dataJson);
|
||||||
this.http.post('http://localhost:8080/api/updateState', dataJson).subscribe((response:any)=>{
|
this.http.post(this.config.backendUrl+'/updateState', dataJson).subscribe((response:any)=>{
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},(error:any)=>{
|
},(error:any)=>{
|
||||||
resolve(error);
|
resolve(error);
|
||||||
|
|
@ -580,7 +585,7 @@ export class DataService {
|
||||||
let stringyfiedData = JSON.stringify(obj);
|
let stringyfiedData = JSON.stringify(obj);
|
||||||
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
|
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
|
||||||
// console.log(dataJson);
|
// console.log(dataJson);
|
||||||
this.http.post('http://localhost:8080/api/updateImplementer', dataJson).subscribe((response:any)=>{
|
this.http.post(this.config.backendUrl+'/updateImplementer', dataJson).subscribe((response:any)=>{
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},(error:any)=>{
|
},(error:any)=>{
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
@ -602,7 +607,7 @@ export class DataService {
|
||||||
let stringyfiedData = JSON.stringify(obj);
|
let stringyfiedData = JSON.stringify(obj);
|
||||||
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
|
let dataJson = JSON.parse(stringyfiedData) as typeof stringyfiedData;
|
||||||
console.log(dataJson);
|
console.log(dataJson);
|
||||||
this.http.post('http://localhost:8080/api/updateApproval', dataJson).subscribe((response:any)=>{
|
this.http.post(this.config.backendUrl+'/updateApproval', dataJson).subscribe((response:any)=>{
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},(error:any)=>{
|
},(error:any)=>{
|
||||||
resolve(error);
|
resolve(error);
|
||||||
|
|
@ -627,7 +632,7 @@ export class DataService {
|
||||||
let first : boolean = true;
|
let first : boolean = true;
|
||||||
let res : any[] = [];
|
let res : any[] = [];
|
||||||
console.log(dataJson);
|
console.log(dataJson);
|
||||||
this.http.post('http://localhost:8080/api/getChanges', dataJson)
|
this.http.post(this.config.backendUrl+'/getChanges', dataJson)
|
||||||
.subscribe((response:any)=>{
|
.subscribe((response:any)=>{
|
||||||
console.log("ALL CHANGES ##############\n",response);
|
console.log("ALL CHANGES ##############\n",response);
|
||||||
this.totalSize = response.totalSize;
|
this.totalSize = response.totalSize;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{"production":false,"rssoUrl":"http://orf.at","backendUrl":"http://localhost:8080/api"}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { AppConfig } from './models/environment.model';
|
||||||
|
|
||||||
|
export const environment: AppConfig = {
|
||||||
|
production: true,
|
||||||
|
rssoUrl: "{{ $rssoUrl }}",
|
||||||
|
backendUrl: "{{ $backendUrl }}"
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { AppConfig } from './models/environment.model';
|
||||||
|
|
||||||
|
export const environment: AppConfig = {
|
||||||
|
production: false,
|
||||||
|
rssoUrl: "sadasdsadsadasd",
|
||||||
|
backendUrl: "http://localhost:8080/api"
|
||||||
|
};
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
export const environment = {
|
|
||||||
production: true
|
|
||||||
};
|
|
||||||
|
|
@ -1,16 +1,7 @@
|
||||||
// This file can be replaced during build by using the `fileReplacements` array.
|
import { AppConfig } from './models/environment.model';
|
||||||
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
|
|
||||||
// The list of file replacements can be found in `angular.json`.
|
|
||||||
|
|
||||||
export const environment = {
|
export const environment: AppConfig = {
|
||||||
production: false
|
production: false,
|
||||||
};
|
rssoUrl: "http://orf.at",
|
||||||
|
backendUrl: "http://localhost:8080/api"
|
||||||
/*
|
};
|
||||||
* 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.
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
export interface AppConfig {
|
||||||
|
production: boolean;
|
||||||
|
rssoUrl: string;
|
||||||
|
backendUrl: string;
|
||||||
|
}
|
||||||
|
|
@ -1,14 +1,24 @@
|
||||||
import { enableProdMode } from '@angular/core';
|
import { enableProdMode } from '@angular/core';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import {registerLicense} from '@syncfusion/ej2-base'
|
import { registerLicense } from '@syncfusion/ej2-base'
|
||||||
import { AppModule } from './app/app.module';
|
import { AppModule } from './app/app.module';
|
||||||
import { environment } from './environments/environment';
|
import { AppComponent } from './app/app.component';
|
||||||
|
import { APP_CONFIG } from './app/app.config';
|
||||||
|
|
||||||
registerLicense("Ngo9BigBOggjHTQxAR8/V1NCaF5cXmZCf1FpRmJGdld5fUVHYVZUTXxaS00DNHVRdkdnWXdedXRcQmJeVUZzV0Y=");
|
registerLicense("Ngo9BigBOggjHTQxAR8/V1NCaF5cXmZCf1FpRmJGdld5fUVHYVZUTXxaS00DNHVRdkdnWXdedXRcQmJeVUZzV0Y=");
|
||||||
if (environment.production) {
|
|
||||||
enableProdMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
fetch('/assets/environment.json')
|
||||||
.catch(err => console.error(err));
|
.then((response) => response.json())
|
||||||
|
.then((config) => {
|
||||||
|
if (config.production) {
|
||||||
|
enableProdMode()
|
||||||
|
}
|
||||||
|
|
||||||
|
platformBrowserDynamic([{ provide: APP_CONFIG, useValue: config }]).bootstrapModule(AppModule)
|
||||||
|
.catch(err => console.error(err));
|
||||||
|
})
|
||||||
|
|
||||||
|
//bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue