Improved docker support for deployment #70
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { throwError } from 'rxjs';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
import { Appsettings } from 'src/app/models/config/appsettings';
|
||||
import { SoftwareVersion } from 'src/app/models/config/software-version';
|
||||
import { Theme } from 'src/app/models/view/theme';
|
||||
import { Themes } from 'src/app/models/view/themes.enum';
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
import { Injectable } from "@angular/core";
|
||||
import { throwError } from "rxjs";
|
||||
import { catchError } from "rxjs/operators";
|
||||
import { Appsettings } from "src/app/models/config/appsettings";
|
||||
import { SoftwareVersion } from "src/app/models/config/software-version";
|
||||
import { Theme } from "src/app/models/view/theme";
|
||||
import { environment } from "../../../environments/environment";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -31,11 +31,11 @@ export class SettingsService {
|
||||
}
|
||||
|
||||
public getApiURL(): string {
|
||||
if (!this.appsettings || !this.appsettings.ApiURL) {
|
||||
if (!environment || !environment.apiURL) {
|
||||
console.error('ApiURL is not set!');
|
||||
return '';
|
||||
}
|
||||
return this.appsettings.ApiURL;
|
||||
return environment.apiURL;
|
||||
}
|
||||
|
||||
public getWebVersion(): SoftwareVersion | null {
|
||||
@@ -43,12 +43,11 @@ export class SettingsService {
|
||||
console.error('WebVersion is not set!');
|
||||
return null;
|
||||
}
|
||||
const webVersion = new SoftwareVersion(
|
||||
return new SoftwareVersion(
|
||||
this.appsettings.WebVersion.Major,
|
||||
this.appsettings.WebVersion.Minor,
|
||||
this.appsettings.WebVersion.Micro
|
||||
);
|
||||
return webVersion;
|
||||
}
|
||||
|
||||
public getThemes(): Theme[] | null {
|
||||
|
@@ -1,11 +1,10 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ToastOptions } from 'src/app/models/utils/toast-options';
|
||||
import { SettingsService } from '../settings/settings.service';
|
||||
import { SpinnerService } from '../spinner/spinner.service';
|
||||
import { ToastService } from '../toast/toast.service';
|
||||
import { Injectable } from "@angular/core";
|
||||
import { ToastOptions } from "src/app/models/utils/toast-options";
|
||||
import { SettingsService } from "../settings/settings.service";
|
||||
import { SpinnerService } from "../spinner/spinner.service";
|
||||
import { ToastService } from "../toast/toast.service";
|
||||
import io from "socket.io-client";
|
||||
import { MessageService } from 'primeng/api';
|
||||
import { MessageService } from "primeng/api";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -23,7 +22,7 @@ export class SocketService {
|
||||
}
|
||||
|
||||
startSocket() {
|
||||
this.socket = io(`${this.settingsService.getApiURL()}`)
|
||||
this.socket = io(`${this.settingsService.getApiURL()}`, {path: '/api/socket.io'})
|
||||
this.socket.on('connect', () => {
|
||||
if (this.disconnected) {
|
||||
if (this.spinnerService.showSpinnerState) {
|
||||
|
Reference in New Issue
Block a user