refs #1690 Add mercureUrl to config and refactor services to use ConfigService for API URLs
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
testing/ogGui-multibranch/pipeline/head There was a failure building this commit
Details
parent
40385bc73c
commit
dc99c2d2a7
|
@ -1,2 +1,2 @@
|
||||||
NG_APP_BASE_API_URL=https://127.0.0.1:8443
|
# NG_APP_BASE_API_URL=https://127.0.0.1:8443
|
||||||
NG_APP_OGCORE_MERCURE_BASE_URL=http://localhost:3000/.well-known/mercure
|
# NG_APP_OGCORE_MERCURE_BASE_URL=http://localhost:3000/.well-known/mercure
|
||||||
|
|
|
@ -13,7 +13,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { ToastrModule, ToastrService } from 'ngx-toastr';
|
import { ToastrModule, ToastrService } from 'ngx-toastr';
|
||||||
import { DataService } from '../users/users/data.service';
|
import { DataService } from '../users/users/data.service';
|
||||||
import { MatTableModule } from '@angular/material/table';
|
import { MatTableModule } from '@angular/material/table';
|
||||||
import { ConfigService } from '../../../services/config.service';
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
describe('EnvVarsComponent', () => {
|
describe('EnvVarsComponent', () => {
|
||||||
let component: EnvVarsComponent;
|
let component: EnvVarsComponent;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { ConfigService } from "../../../services/config.service";
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-env-vars',
|
selector: 'app-env-vars',
|
||||||
|
@ -9,7 +9,6 @@ import { ConfigService } from "../../../services/config.service";
|
||||||
styleUrl: './env-vars.component.css'
|
styleUrl: './env-vars.component.css'
|
||||||
})
|
})
|
||||||
export class EnvVarsComponent {
|
export class EnvVarsComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
|
||||||
envVars: { name: string; value: string }[] = [];
|
envVars: { name: string; value: string }[] = [];
|
||||||
displayedColumns: string[] = ['name', 'value'];
|
displayedColumns: string[] = ['name', 'value'];
|
||||||
private apiUrl: string;
|
private apiUrl: string;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||||
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
|
||||||
import {DataService} from "../data.service";
|
import {DataService} from "../data.service";
|
||||||
import {ToastrService} from "ngx-toastr";
|
import {ToastrService} from "ngx-toastr";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-add-role-modal',
|
selector: 'app-add-role-modal',
|
||||||
|
@ -11,9 +12,9 @@ import {ToastrService} from "ngx-toastr";
|
||||||
styleUrls: ['./add-role-modal.component.css']
|
styleUrls: ['./add-role-modal.component.css']
|
||||||
})
|
})
|
||||||
export class AddRoleModalComponent {
|
export class AddRoleModalComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
|
||||||
roleForm: FormGroup<any>;
|
roleForm: FormGroup<any>;
|
||||||
roleId: string | null = null;
|
roleId: string | null = null;
|
||||||
|
baseUrl: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialogRef: MatDialogRef<AddRoleModalComponent>,
|
public dialogRef: MatDialogRef<AddRoleModalComponent>,
|
||||||
|
@ -21,8 +22,10 @@ export class AddRoleModalComponent {
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
private toastService: ToastrService
|
private toastService: ToastrService,
|
||||||
|
private configService: ConfigService
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.roleForm = this.fb.group({
|
this.roleForm = this.fb.group({
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
superAdmin: [false],
|
superAdmin: [false],
|
||||||
|
|
|
@ -2,15 +2,19 @@ import { Injectable } from '@angular/core';
|
||||||
import {HttpClient, HttpParams} from '@angular/common/http';
|
import {HttpClient, HttpParams} from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
private apiUrl = `${this.baseUrl}/user-groups?page=1&itemsPerPage=1000`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/user-groups?page=1&itemsPerPage=1000`;
|
||||||
|
}
|
||||||
|
|
||||||
getUserGroups(filters: { [key: string]: string }): Observable<{ totalItems: any; data: any }> {
|
getUserGroups(filters: { [key: string]: string }): Observable<{ totalItems: any; data: any }> {
|
||||||
const params = new HttpParams({ fromObject: filters });
|
const params = new HttpParams({ fromObject: filters });
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { MatDialog } from '@angular/material/dialog';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { DataService } from './data.service';
|
import { DataService } from './data.service';
|
||||||
import { ConfigService } from '../../../../services/config.service';
|
import { ConfigService } from '@services/config.service';
|
||||||
import { MatDivider } from '@angular/material/divider';
|
import { MatDivider } from '@angular/material/divider';
|
||||||
import { MatFormField } from '@angular/material/form-field';
|
import { MatFormField } from '@angular/material/form-field';
|
||||||
import { MatLabel } from '@angular/material/form-field';
|
import { MatLabel } from '@angular/material/form-field';
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { DataService } from "./data.service";
|
||||||
import { PageEvent } from "@angular/material/paginator";
|
import { PageEvent } from "@angular/material/paginator";
|
||||||
import { DeleteModalComponent } from '../../../../shared/delete_modal/delete-modal/delete-modal.component';
|
import { DeleteModalComponent } from '../../../../shared/delete_modal/delete-modal/delete-modal.component';
|
||||||
import { AddRoleModalComponent } from './add-role-modal/add-role-modal.component';
|
import { AddRoleModalComponent } from './add-role-modal/add-role-modal.component';
|
||||||
import { ConfigService } from '../../../../services/config.service';
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-roles',
|
selector: 'app-roles',
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { DataService } from "../data.service";
|
import { DataService } from "../data.service";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
interface UserGroup {
|
interface UserGroup {
|
||||||
'@id': string;
|
'@id': string;
|
||||||
|
@ -17,7 +18,7 @@ interface UserGroup {
|
||||||
styleUrls: ['./add-user-modal.component.css']
|
styleUrls: ['./add-user-modal.component.css']
|
||||||
})
|
})
|
||||||
export class AddUserModalComponent implements OnInit {
|
export class AddUserModalComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
@Output() userAdded = new EventEmitter<void>();
|
@Output() userAdded = new EventEmitter<void>();
|
||||||
@Output() userEdited = new EventEmitter<void>();
|
@Output() userEdited = new EventEmitter<void>();
|
||||||
userForm: FormGroup<any>;
|
userForm: FormGroup<any>;
|
||||||
|
@ -38,8 +39,10 @@ export class AddUserModalComponent implements OnInit {
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
private toastService: ToastrService
|
private toastService: ToastrService,
|
||||||
|
private configService: ConfigService
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.userForm = this.fb.group({
|
this.userForm = this.fb.group({
|
||||||
username: ['', Validators.required],
|
username: ['', Validators.required],
|
||||||
password: ['', Validators.required],
|
password: ['', Validators.required],
|
||||||
|
|
|
@ -3,15 +3,19 @@ import { Injectable } from '@angular/core';
|
||||||
import {HttpClient, HttpParams} from '@angular/common/http';
|
import {HttpClient, HttpParams} from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
private apiUrl = `${this.baseUrl}/users?page=1&itemsPerPage=1000`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/users?page=1&itemsPerPage=1000`;
|
||||||
|
}
|
||||||
|
|
||||||
getUsers(filters: { [key: string]: string }): Observable<{ totalItems: any; data: any }> {
|
getUsers(filters: { [key: string]: string }): Observable<{ totalItems: any; data: any }> {
|
||||||
const params = new HttpParams({ fromObject: filters });
|
const params = new HttpParams({ fromObject: filters });
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { AddUserModalComponent } from './add-user-modal/add-user-modal.component
|
||||||
import { DeleteModalComponent } from '../../../../shared/delete_modal/delete-modal/delete-modal.component';
|
import { DeleteModalComponent } from '../../../../shared/delete_modal/delete-modal/delete-modal.component';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { DataService } from "./data.service";
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-users',
|
selector: 'app-users',
|
||||||
|
@ -13,7 +13,8 @@ import { DataService } from "./data.service";
|
||||||
styleUrls: ['./users.component.css']
|
styleUrls: ['./users.component.css']
|
||||||
})
|
})
|
||||||
export class UsersComponent implements OnInit {
|
export class UsersComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
filters: { [key: string]: string } = {};
|
filters: { [key: string]: string } = {};
|
||||||
loading: boolean = false;
|
loading: boolean = false;
|
||||||
|
@ -50,14 +51,15 @@ export class UsersComponent implements OnInit {
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/users`;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
|
private configService: ConfigService,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private dataService: DataService,
|
|
||||||
private toastService: ToastrService
|
private toastService: ToastrService
|
||||||
) {}
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/users`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.search();
|
this.search();
|
||||||
|
|
|
@ -9,6 +9,7 @@ import { PageEvent } from "@angular/material/paginator";
|
||||||
import { CreateCalendarComponent } from "./create-calendar/create-calendar.component";
|
import { CreateCalendarComponent } from "./create-calendar/create-calendar.component";
|
||||||
import { DeleteModalComponent } from "../../shared/delete_modal/delete-modal/delete-modal.component";
|
import { DeleteModalComponent } from "../../shared/delete_modal/delete-modal/delete-modal.component";
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-calendar',
|
selector: 'app-calendar',
|
||||||
|
@ -16,7 +17,8 @@ import { JoyrideService } from 'ngx-joyride';
|
||||||
styleUrl: './calendar.component.css'
|
styleUrl: './calendar.component.css'
|
||||||
})
|
})
|
||||||
export class CalendarComponent implements OnInit {
|
export class CalendarComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
images: { downloadUrl: string; name: string; uuid: string }[] = [];
|
images: { downloadUrl: string; name: string; uuid: string }[] = [];
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
|
@ -52,15 +54,18 @@ export class CalendarComponent implements OnInit {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
private apiUrl = `${this.baseUrl}/remote-calendars`;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
|
private configService: ConfigService,
|
||||||
private joyrideService: JoyrideService
|
private joyrideService: JoyrideService
|
||||||
) {}
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/remote-calendars`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.search();
|
this.search();
|
||||||
|
|
|
@ -2,6 +2,7 @@ import {Component, Inject} from '@angular/core';
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-calendar-rule',
|
selector: 'app-create-calendar-rule',
|
||||||
|
@ -9,7 +10,7 @@ import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
|
||||||
styleUrl: './create-calendar-rule.component.css'
|
styleUrl: './create-calendar-rule.component.css'
|
||||||
})
|
})
|
||||||
export class CreateCalendarRuleComponent {
|
export class CreateCalendarRuleComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
name: string = '';
|
name: string = '';
|
||||||
remoteCalendarRules: any[] = [];
|
remoteCalendarRules: any[] = [];
|
||||||
weekDays: string[] = ['Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado', 'Domingo'];
|
weekDays: string[] = ['Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado', 'Domingo'];
|
||||||
|
@ -29,9 +30,12 @@ export class CreateCalendarRuleComponent {
|
||||||
constructor(
|
constructor(
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
|
private configService: ConfigService,
|
||||||
public dialogRef: MatDialogRef<CreateCalendarRuleComponent>,
|
public dialogRef: MatDialogRef<CreateCalendarRuleComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any,
|
@Inject(MAT_DIALOG_DATA) public data: any,
|
||||||
) { }
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.calendarId = this.data.calendar
|
this.calendarId = this.data.calendar
|
||||||
|
|
|
@ -5,6 +5,7 @@ import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from "@angular/material/dialog
|
||||||
import { CreateCalendarRuleComponent } from "../create-calendar-rule/create-calendar-rule.component";
|
import { CreateCalendarRuleComponent } from "../create-calendar-rule/create-calendar-rule.component";
|
||||||
import { DataService } from "../data.service";
|
import { DataService } from "../data.service";
|
||||||
import { DeleteModalComponent } from "../../../shared/delete_modal/delete-modal/delete-modal.component";
|
import { DeleteModalComponent } from "../../../shared/delete_modal/delete-modal/delete-modal.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-calendar',
|
selector: 'app-create-calendar',
|
||||||
|
@ -12,7 +13,7 @@ import {DeleteModalComponent} from "../../../shared/delete_modal/delete-modal/de
|
||||||
styleUrl: './create-calendar.component.css'
|
styleUrl: './create-calendar.component.css'
|
||||||
})
|
})
|
||||||
export class CreateCalendarComponent implements OnInit {
|
export class CreateCalendarComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
name: string = '';
|
name: string = '';
|
||||||
remoteCalendarRules: any[] = [];
|
remoteCalendarRules: any[] = [];
|
||||||
isEditMode: boolean = false;
|
isEditMode: boolean = false;
|
||||||
|
@ -22,11 +23,14 @@ export class CreateCalendarComponent implements OnInit {
|
||||||
constructor(
|
constructor(
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
|
private configService: ConfigService,
|
||||||
public dialogRef: MatDialogRef<CreateCalendarComponent>,
|
public dialogRef: MatDialogRef<CreateCalendarComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any,
|
@Inject(MAT_DIALOG_DATA) public data: any,
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
) { }
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.data) {
|
if (this.data) {
|
||||||
|
|
|
@ -2,15 +2,19 @@ import { Injectable } from '@angular/core';
|
||||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
private apiUrl = `${this.baseUrl}/remote-calendars?page=1&itemsPerPage=1000`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/remote-calendars?page=1&itemsPerPage=1000`;
|
||||||
|
}
|
||||||
|
|
||||||
getRemoteCalendars(filters: { [key: string]: string }): Observable<any[]> {
|
getRemoteCalendars(filters: { [key: string]: string }): Observable<any[]> {
|
||||||
const params = new HttpParams({ fromObject: filters });
|
const params = new HttpParams({ fromObject: filters });
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { DeleteModalComponent } from '../../../shared/delete_modal/delete-modal/
|
||||||
import { MatTableDataSource } from "@angular/material/table";
|
import { MatTableDataSource } from "@angular/material/table";
|
||||||
import { DatePipe } from "@angular/common";
|
import { DatePipe } from "@angular/common";
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-commands-groups',
|
selector: 'app-commands-groups',
|
||||||
|
@ -15,7 +16,8 @@ import { JoyrideService } from 'ngx-joyride';
|
||||||
styleUrls: ['./commands-groups.component.css']
|
styleUrls: ['./commands-groups.component.css']
|
||||||
})
|
})
|
||||||
export class CommandsGroupsComponent implements OnInit {
|
export class CommandsGroupsComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
filters: { [key: string]: string | boolean } = {};
|
filters: { [key: string]: string | boolean } = {};
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
|
@ -47,10 +49,12 @@ export class CommandsGroupsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
private apiUrl = `${this.baseUrl}/command-groups`;
|
|
||||||
|
|
||||||
constructor(private http: HttpClient, private dialog: MatDialog, private toastService: ToastrService,
|
constructor(private http: HttpClient, private dialog: MatDialog, private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService) {}
|
private configService: ConfigService, private joyrideService: JoyrideService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/command-groups`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.search();
|
this.search();
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { HttpClient } from '@angular/common/http';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-command-group',
|
selector: 'app-create-command-group',
|
||||||
|
@ -10,21 +11,25 @@ import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
||||||
styleUrls: ['./create-command-group.component.css']
|
styleUrls: ['./create-command-group.component.css']
|
||||||
})
|
})
|
||||||
export class CreateCommandGroupComponent implements OnInit {
|
export class CreateCommandGroupComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
availableCommands: any[] = [];
|
availableCommands: any[] = [];
|
||||||
selectedCommands: any[] = [];
|
selectedCommands: any[] = [];
|
||||||
groupName: string = '';
|
groupName: string = '';
|
||||||
enabled: boolean = true;
|
enabled: boolean = true;
|
||||||
editing: boolean = false;
|
editing: boolean = false;
|
||||||
loading: boolean = false;
|
loading: boolean = false;
|
||||||
private apiUrl = `${this.baseUrl}/commands`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private dialogRef: MatDialogRef<CreateCommandGroupComponent>,
|
private dialogRef: MatDialogRef<CreateCommandGroupComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
|
private configService: ConfigService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {}
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/commands`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loadAvailableCommands();
|
this.loadAvailableCommands();
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-detail-command-group',
|
selector: 'app-detail-command-group',
|
||||||
|
@ -10,7 +11,7 @@ import { ToastrService } from 'ngx-toastr';
|
||||||
styleUrls: ['./detail-command-group.component.css']
|
styleUrls: ['./detail-command-group.component.css']
|
||||||
})
|
})
|
||||||
export class DetailCommandGroupComponent implements OnInit {
|
export class DetailCommandGroupComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
form!: FormGroup;
|
form!: FormGroup;
|
||||||
clients: any[] = [];
|
clients: any[] = [];
|
||||||
showClientSelect = false;
|
showClientSelect = false;
|
||||||
|
@ -21,9 +22,12 @@ export class DetailCommandGroupComponent implements OnInit {
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any,
|
@Inject(MAT_DIALOG_DATA) public data: any,
|
||||||
private dialogRef: MatDialogRef<DetailCommandGroupComponent>,
|
private dialogRef: MatDialogRef<DetailCommandGroupComponent>,
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
|
private configService: ConfigService,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private toastService: ToastrService
|
private toastService: ToastrService
|
||||||
) { }
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.form = this.fb.group({
|
this.form = this.fb.group({
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { CreateTaskComponent } from './create-task/create-task.component';
|
||||||
import { DetailTaskComponent } from './detail-task/detail-task.component';
|
import { DetailTaskComponent } from './detail-task/detail-task.component';
|
||||||
import { DeleteModalComponent } from '../../../shared/delete_modal/delete-modal/delete-modal.component';
|
import { DeleteModalComponent } from '../../../shared/delete_modal/delete-modal/delete-modal.component';
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-commands-task',
|
selector: 'app-commands-task',
|
||||||
|
@ -13,7 +14,7 @@ import { JoyrideService } from 'ngx-joyride';
|
||||||
styleUrls: ['./commands-task.component.css']
|
styleUrls: ['./commands-task.component.css']
|
||||||
})
|
})
|
||||||
export class CommandsTaskComponent implements OnInit {
|
export class CommandsTaskComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
tasks: any[] = [];
|
tasks: any[] = [];
|
||||||
filters: { [key: string]: string | boolean } = {};
|
filters: { [key: string]: string | boolean } = {};
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
|
@ -22,10 +23,14 @@ export class CommandsTaskComponent implements OnInit {
|
||||||
pageSizeOptions: number[] = [5, 10, 20, 40, 100];
|
pageSizeOptions: number[] = [5, 10, 20, 40, 100];
|
||||||
displayedColumns: string[] = ['taskid', 'notes', 'name', 'scheduledDate', 'enabled', 'actions'];
|
displayedColumns: string[] = ['taskid', 'notes', 'name', 'scheduledDate', 'enabled', 'actions'];
|
||||||
loading: boolean = false;
|
loading: boolean = false;
|
||||||
private apiUrl = `${this.baseUrl}/command-tasks`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient, private dialog: MatDialog, private toastService: ToastrService,
|
constructor(private http: HttpClient, private dialog: MatDialog, private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService) {}
|
private configService: ConfigService,
|
||||||
|
private joyrideService: JoyrideService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/command-tasks`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loadTasks();
|
this.loadTasks();
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { HttpClient } from '@angular/common/http';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-task',
|
selector: 'app-create-task',
|
||||||
|
@ -10,12 +11,12 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
styleUrls: ['./create-task.component.css']
|
styleUrls: ['./create-task.component.css']
|
||||||
})
|
})
|
||||||
export class CreateTaskComponent implements OnInit {
|
export class CreateTaskComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
taskForm: FormGroup;
|
taskForm: FormGroup;
|
||||||
availableCommandGroups: any[] = [];
|
availableCommandGroups: any[] = [];
|
||||||
selectedGroupCommands: any[] = [];
|
selectedGroupCommands: any[] = [];
|
||||||
availableIndividualCommands: any[] = [];
|
availableIndividualCommands: any[] = [];
|
||||||
apiUrl = `${this.baseUrl}/command-tasks`;
|
apiUrl: string;
|
||||||
editing: boolean = false;
|
editing: boolean = false;
|
||||||
availableOrganizationalUnits: any[] = [];
|
availableOrganizationalUnits: any[] = [];
|
||||||
selectedUnitChildren: any[] = [];
|
selectedUnitChildren: any[] = [];
|
||||||
|
@ -25,10 +26,13 @@ export class CreateTaskComponent implements OnInit {
|
||||||
constructor(
|
constructor(
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
|
private configService: ConfigService,
|
||||||
private toastr: ToastrService,
|
private toastr: ToastrService,
|
||||||
public dialogRef: MatDialogRef<CreateTaskComponent>,
|
public dialogRef: MatDialogRef<CreateTaskComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/command-tasks`;
|
||||||
this.taskForm = this.fb.group({
|
this.taskForm = this.fb.group({
|
||||||
commandGroup: ['', Validators.required],
|
commandGroup: ['', Validators.required],
|
||||||
extraCommands: [[]],
|
extraCommands: [[]],
|
||||||
|
|
|
@ -7,9 +7,10 @@ import { DatePipe } from '@angular/common';
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
import { MatDialog } from "@angular/material/dialog";
|
import { MatDialog } from "@angular/material/dialog";
|
||||||
import { InputDialogComponent } from "./input-dialog/input-dialog.component";
|
import { InputDialogComponent } from "./input-dialog/input-dialog.component";
|
||||||
import { ProgressBarMode, MatProgressBarModule } from '@angular/material/progress-bar';
|
import { ProgressBarMode } from '@angular/material/progress-bar';
|
||||||
import { DeleteModalComponent } from "../../../../shared/delete_modal/delete-modal/delete-modal.component";
|
import { DeleteModalComponent } from "../../../../shared/delete_modal/delete-modal/delete-modal.component";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-task-logs',
|
selector: 'app-task-logs',
|
||||||
|
@ -17,8 +18,8 @@ import {ToastrService} from "ngx-toastr";
|
||||||
styleUrls: ['./task-logs.component.css']
|
styleUrls: ['./task-logs.component.css']
|
||||||
})
|
})
|
||||||
export class TaskLogsComponent implements OnInit {
|
export class TaskLogsComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
mercureUrl: string = import.meta.env.NG_APP_OGCORE_MERCURE_BASE_URL;
|
mercureUrl: string;
|
||||||
traces: any[] = [];
|
traces: any[] = [];
|
||||||
groupedTraces: any[] = [];
|
groupedTraces: any[] = [];
|
||||||
commands: any[] = [];
|
commands: any[] = [];
|
||||||
|
@ -92,8 +93,12 @@ export class TaskLogsComponent implements OnInit {
|
||||||
private joyrideService: JoyrideService,
|
private joyrideService: JoyrideService,
|
||||||
private dialog: MatDialog,
|
private dialog: MatDialog,
|
||||||
private cdr: ChangeDetectorRef,
|
private cdr: ChangeDetectorRef,
|
||||||
|
private configService: ConfigService,
|
||||||
private toastService: ToastrService
|
private toastService: ToastrService
|
||||||
) { }
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.mercureUrl = this.configService.mercureUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loadTraces();
|
this.loadTraces();
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { CreateCommandComponent } from './create-command/create-command.componen
|
||||||
import { DeleteModalComponent } from '../../../shared/delete_modal/delete-modal/delete-modal.component';
|
import { DeleteModalComponent } from '../../../shared/delete_modal/delete-modal/delete-modal.component';
|
||||||
import { MatTableDataSource } from '@angular/material/table';
|
import { MatTableDataSource } from '@angular/material/table';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import { ExecuteCommandComponent } from './execute-command/execute-command.component';
|
import { ConfigService } from '@services/config.service';
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -16,7 +16,8 @@ import { JoyrideService } from 'ngx-joyride';
|
||||||
styleUrls: ['./commands.component.css']
|
styleUrls: ['./commands.component.css']
|
||||||
})
|
})
|
||||||
export class CommandsComponent implements OnInit {
|
export class CommandsComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
filters: { [key: string]: string | boolean } = {};
|
filters: { [key: string]: string | boolean } = {};
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
|
@ -48,10 +49,12 @@ export class CommandsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
private apiUrl = `${this.baseUrl}/commands`;
|
|
||||||
|
|
||||||
constructor(private http: HttpClient, private dialog: MatDialog, private toastService: ToastrService,
|
constructor(private http: HttpClient, private dialog: MatDialog, private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService) {}
|
private joyrideService: JoyrideService, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/commands`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.search();
|
this.search();
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { DataService } from "../data.service";
|
import { DataService } from "../data.service";
|
||||||
|
import { ConfigService } from "@services/config.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-command',
|
selector: 'app-create-command',
|
||||||
|
@ -11,9 +12,8 @@ import {DataService} from "../data.service";
|
||||||
styleUrls: ['./create-command.component.css']
|
styleUrls: ['./create-command.component.css']
|
||||||
})
|
})
|
||||||
export class CreateCommandComponent {
|
export class CreateCommandComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
createCommandForm: FormGroup<any>;
|
createCommandForm: FormGroup<any>;
|
||||||
private apiUrl = `${this.baseUrl}/commands`;
|
|
||||||
commandId: string | null = null;
|
commandId: string | null = null;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -21,9 +21,11 @@ export class CreateCommandComponent {
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
public dialogRef: MatDialogRef<CreateCommandComponent>,
|
public dialogRef: MatDialogRef<CreateCommandComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
|
private configService: ConfigService,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.createCommandForm = this.fb.group({
|
this.createCommandForm = this.fb.group({
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
script: [''],
|
script: [''],
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
|
@ -8,10 +8,16 @@ import { catchError, map } from 'rxjs/operators';
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
private apiUrl = `${this.baseUrl}/commands?page=1&itemsPerPage=1000`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(
|
||||||
|
private http: HttpClient,
|
||||||
|
private configService: ConfigService
|
||||||
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/commands?page=1&itemsPerPage=1000`;
|
||||||
|
}
|
||||||
|
|
||||||
getCommands(filters: { [key: string]: string }): Observable<{ totalItems: any; data: any }> {
|
getCommands(filters: { [key: string]: string }): Observable<{ totalItems: any; data: any }> {
|
||||||
const params = new HttpParams({ fromObject: filters });
|
const params = new HttpParams({ fromObject: filters });
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dial
|
||||||
import { CreateCommandComponent } from '../create-command/create-command.component';
|
import { CreateCommandComponent } from '../create-command/create-command.component';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-command-detail',
|
selector: 'app-command-detail',
|
||||||
|
@ -11,7 +12,7 @@ import { ToastrService } from 'ngx-toastr';
|
||||||
styleUrls: ['./command-detail.component.css']
|
styleUrls: ['./command-detail.component.css']
|
||||||
})
|
})
|
||||||
export class CommandDetailComponent implements OnInit {
|
export class CommandDetailComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
form!: FormGroup;
|
form!: FormGroup;
|
||||||
clients: any[] = [];
|
clients: any[] = [];
|
||||||
showClientSelect = false;
|
showClientSelect = false;
|
||||||
|
@ -20,12 +21,15 @@ export class CommandDetailComponent implements OnInit {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
|
private configService: ConfigService,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
public dialogRef: MatDialogRef<CommandDetailComponent>,
|
public dialogRef: MatDialogRef<CommandDetailComponent>,
|
||||||
private dialog: MatDialog,
|
private dialog: MatDialog,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) { }
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.form = this.fb.group({
|
this.form = this.fb.group({
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import {Component, Inject, Input, OnInit, SimpleChanges} from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material/dialog';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-execute-command',
|
selector: 'app-execute-command',
|
||||||
|
@ -16,7 +15,7 @@ export class ExecuteCommandComponent implements OnInit {
|
||||||
@Input() buttonText: string = 'Ejecutar Comandos';
|
@Input() buttonText: string = 'Ejecutar Comandos';
|
||||||
@Input() icon: string = 'terminal';
|
@Input() icon: string = 'terminal';
|
||||||
@Input() disabled: boolean = false;
|
@Input() disabled: boolean = false;
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
loading: boolean = true;
|
loading: boolean = true;
|
||||||
|
|
||||||
arrayCommands: any[] = [
|
arrayCommands: any[] = [
|
||||||
|
@ -36,12 +35,12 @@ export class ExecuteCommandComponent implements OnInit {
|
||||||
client: any = {};
|
client: any = {};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private dialog: MatDialog,
|
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private fb: FormBuilder,
|
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
private configService: ConfigService,
|
||||||
private toastService: ToastrService
|
private toastService: ToastrService
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
|
@ -2,11 +2,11 @@ import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { DatePipe } from "@angular/common";
|
import { DatePipe } from "@angular/common";
|
||||||
import { MatTableDataSource } from "@angular/material/table";
|
import { MatTableDataSource } from "@angular/material/table";
|
||||||
import {PartitionAssistantComponent} from "./partition-assistant/partition-assistant.component";
|
|
||||||
import { MatDialog } from "@angular/material/dialog";
|
import { MatDialog } from "@angular/material/dialog";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { ManageClientComponent } from "../../shared/clients/manage-client/manage-client.component";
|
import { ManageClientComponent } from "../../shared/clients/manage-client/manage-client.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
interface ClientInfo {
|
interface ClientInfo {
|
||||||
property: string;
|
property: string;
|
||||||
|
@ -19,7 +19,7 @@ interface ClientInfo {
|
||||||
styleUrl: './client-main-view.component.css'
|
styleUrl: './client-main-view.component.css'
|
||||||
})
|
})
|
||||||
export class ClientMainViewComponent implements OnInit {
|
export class ClientMainViewComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
@ViewChild('assistantContainer') assistantContainer!: ElementRef;
|
@ViewChild('assistantContainer') assistantContainer!: ElementRef;
|
||||||
clientUuid: string;
|
clientUuid: string;
|
||||||
clientData: any = {};
|
clientData: any = {};
|
||||||
|
@ -91,9 +91,11 @@ export class ClientMainViewComponent implements OnInit {
|
||||||
constructor(
|
constructor(
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private dialog: MatDialog,
|
private dialog: MatDialog,
|
||||||
|
private configService: ConfigService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private toastService: ToastrService
|
private toastService: ToastrService
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
const url = window.location.href;
|
const url = window.location.href;
|
||||||
const segments = url.split('/');
|
const segments = url.split('/');
|
||||||
this.clientUuid = segments[segments.length - 1];
|
this.clientUuid = segments[segments.length - 1];
|
||||||
|
|
|
@ -4,13 +4,15 @@ import {ToastrService} from "ngx-toastr";
|
||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
import { MatTableDataSource } from "@angular/material/table";
|
import { MatTableDataSource } from "@angular/material/table";
|
||||||
import { SelectionModel } from "@angular/cdk/collections";
|
import { SelectionModel } from "@angular/cdk/collections";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-image',
|
selector: 'app-create-image',
|
||||||
templateUrl: './create-image.component.html',
|
templateUrl: './create-image.component.html',
|
||||||
styleUrl: './create-image.component.css'
|
styleUrl: './create-image.component.css'
|
||||||
})
|
})
|
||||||
export class CreateClientImageComponent {
|
export class CreateClientImageComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
@Output() dataChange = new EventEmitter<any>();
|
@Output() dataChange = new EventEmitter<any>();
|
||||||
|
|
||||||
errorMessage = '';
|
errorMessage = '';
|
||||||
|
@ -57,10 +59,12 @@ export class CreateClientImageComponent {
|
||||||
constructor(
|
constructor(
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
|
private configService: ConfigService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
) {
|
||||||
) {}
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.clientId = this.route.snapshot.paramMap.get('id');
|
this.clientId = this.route.snapshot.paramMap.get('id');
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
import { Component, EventEmitter, Output } from '@angular/core';
|
||||||
import { MatTableDataSource } from "@angular/material/table";
|
import { MatTableDataSource } from "@angular/material/table";
|
||||||
import { SelectionModel } from "@angular/cdk/collections";
|
import { SelectionModel } from "@angular/cdk/collections";
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-deploy-image',
|
selector: 'app-deploy-image',
|
||||||
|
@ -11,7 +12,7 @@ import {ActivatedRoute, Router} from "@angular/router";
|
||||||
styleUrl: './deploy-image.component.css'
|
styleUrl: './deploy-image.component.css'
|
||||||
})
|
})
|
||||||
export class DeployImageComponent {
|
export class DeployImageComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
@Output() dataChange = new EventEmitter<any>();
|
@Output() dataChange = new EventEmitter<any>();
|
||||||
|
|
||||||
errorMessage = '';
|
errorMessage = '';
|
||||||
|
@ -96,9 +97,10 @@ export class DeployImageComponent {
|
||||||
constructor(
|
constructor(
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private route: ActivatedRoute,
|
private configService: ConfigService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
const navigation = this.router.getCurrentNavigation();
|
const navigation = this.router.getCurrentNavigation();
|
||||||
this.clientData = navigation?.extras?.state?.['clientData'];
|
this.clientData = navigation?.extras?.state?.['clientData'];
|
||||||
this.clientId = this.clientData?.[0]['@id'];
|
this.clientId = this.clientData?.[0]['@id'];
|
||||||
|
|
|
@ -6,6 +6,7 @@ import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import { PARTITION_TYPES } from '../../../../../shared/constants/partition-types';
|
import { PARTITION_TYPES } from '../../../../../shared/constants/partition-types';
|
||||||
import { FILESYSTEM_TYPES } from '../../../../../shared/constants/filesystem-types';
|
import { FILESYSTEM_TYPES } from '../../../../../shared/constants/filesystem-types';
|
||||||
import {toUnredirectedSourceFile} from "@angular/compiler-cli/src/ngtsc/util/src/typescript";
|
import {toUnredirectedSourceFile} from "@angular/compiler-cli/src/ngtsc/util/src/typescript";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
interface Partition {
|
interface Partition {
|
||||||
uuid?: string;
|
uuid?: string;
|
||||||
|
@ -27,7 +28,8 @@ interface Partition {
|
||||||
styleUrls: ['./partition-assistant.component.css']
|
styleUrls: ['./partition-assistant.component.css']
|
||||||
})
|
})
|
||||||
export class PartitionAssistantComponent {
|
export class PartitionAssistantComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
@Output() dataChange = new EventEmitter<any>();
|
@Output() dataChange = new EventEmitter<any>();
|
||||||
partitionTypes = PARTITION_TYPES;
|
partitionTypes = PARTITION_TYPES;
|
||||||
filesystemTypes = FILESYSTEM_TYPES;
|
filesystemTypes = FILESYSTEM_TYPES;
|
||||||
|
@ -42,8 +44,6 @@ export class PartitionAssistantComponent {
|
||||||
clientData: any = [];
|
clientData: any = [];
|
||||||
loading: boolean = false;
|
loading: boolean = false;
|
||||||
|
|
||||||
private apiUrl: string = this.baseUrl + '/partitions';
|
|
||||||
|
|
||||||
view: [number, number] = [400, 300];
|
view: [number, number] = [400, 300];
|
||||||
showLegend = true;
|
showLegend = true;
|
||||||
showLabels = true;
|
showLabels = true;
|
||||||
|
@ -53,7 +53,10 @@ export class PartitionAssistantComponent {
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
private configService: ConfigService,
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = this.baseUrl + '/partitions';
|
||||||
const navigation = this.router.getCurrentNavigation();
|
const navigation = this.router.getCurrentNavigation();
|
||||||
this.clientData = navigation?.extras?.state?.['clientData'];
|
this.clientData = navigation?.extras?.state?.['clientData'];
|
||||||
this.clientId = this.clientData[0]['@id'];
|
this.clientId = this.clientData[0]['@id'];
|
||||||
|
|
|
@ -23,6 +23,7 @@ import { SelectionModel } from "@angular/cdk/collections";
|
||||||
import { ManageClientComponent } from "./shared/clients/manage-client/manage-client.component";
|
import { ManageClientComponent } from "./shared/clients/manage-client/manage-client.component";
|
||||||
import { debounceTime } from 'rxjs/operators';
|
import { debounceTime } from 'rxjs/operators';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
enum NodeType {
|
enum NodeType {
|
||||||
OrganizationalUnit = 'organizational-unit',
|
OrganizationalUnit = 'organizational-unit',
|
||||||
|
@ -38,8 +39,8 @@ enum NodeType {
|
||||||
styleUrls: ['./groups.component.css'],
|
styleUrls: ['./groups.component.css'],
|
||||||
})
|
})
|
||||||
export class GroupsComponent implements OnInit, OnDestroy {
|
export class GroupsComponent implements OnInit, OnDestroy {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
mercureUrl: string = import.meta.env.NG_APP_OGCORE_MERCURE_BASE_URL;
|
mercureUrl: string;
|
||||||
organizationalUnits: UnidadOrganizativa[] = [];
|
organizationalUnits: UnidadOrganizativa[] = [];
|
||||||
selectedUnidad: UnidadOrganizativa | null = null;
|
selectedUnidad: UnidadOrganizativa | null = null;
|
||||||
selectedDetail: UnidadOrganizativa | null = null;
|
selectedDetail: UnidadOrganizativa | null = null;
|
||||||
|
@ -103,8 +104,11 @@ export class GroupsComponent implements OnInit, OnDestroy {
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private bottomSheet: MatBottomSheet,
|
private bottomSheet: MatBottomSheet,
|
||||||
private joyrideService: JoyrideService,
|
private joyrideService: JoyrideService,
|
||||||
private toastr: ToastrService
|
private toastr: ToastrService,
|
||||||
|
private configService: ConfigService
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.mercureUrl = this.configService.mercureUrl;
|
||||||
this.treeFlattener = new MatTreeFlattener<TreeNode, FlatNode>(
|
this.treeFlattener = new MatTreeFlattener<TreeNode, FlatNode>(
|
||||||
this.transformer,
|
this.transformer,
|
||||||
(node) => node.level,
|
(node) => node.level,
|
||||||
|
|
|
@ -3,18 +3,22 @@ import {HttpClient, HttpParams} from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
import { UnidadOrganizativa } from '../model/model';
|
import { UnidadOrganizativa } from '../model/model';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
|
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
|
private clientsUrl: string;
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/organizational-units?page=1&itemsPerPage=1000`;
|
constructor(private http: HttpClient, private configService: ConfigService) {
|
||||||
private clientsUrl = `${this.baseUrl}/clients`;
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/organizational-units?page=1&itemsPerPage=1000`;
|
||||||
constructor(private http: HttpClient) {}
|
this.clientsUrl = `${this.baseUrl}/clients`;
|
||||||
|
}
|
||||||
|
|
||||||
getOrganizationalUnits(search: string = ''): Observable<UnidadOrganizativa[]> {
|
getOrganizationalUnits(search: string = ''): Observable<UnidadOrganizativa[]> {
|
||||||
let url = `${this.apiUrl}&type=organizational-unit`;
|
let url = `${this.apiUrl}&type=organizational-unit`;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { ClientViewComponent } from "../client-view/client-view.component";
|
||||||
import { CdkDragMove } from '@angular/cdk/drag-drop';
|
import { CdkDragMove } from '@angular/cdk/drag-drop';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
interface GroupedClients {
|
interface GroupedClients {
|
||||||
organizationalUnitName: string;
|
organizationalUnitName: string;
|
||||||
|
@ -16,12 +17,14 @@ interface GroupedClients {
|
||||||
styleUrls: ['./classroom-view.component.css']
|
styleUrls: ['./classroom-view.component.css']
|
||||||
})
|
})
|
||||||
export class ClassroomViewComponent implements OnInit, OnChanges {
|
export class ClassroomViewComponent implements OnInit, OnChanges {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
@Input() clients: any[] = [];
|
@Input() clients: any[] = [];
|
||||||
@Input() pcInTable: number = 5;
|
@Input() pcInTable: number = 5;
|
||||||
groupedClients: GroupedClients[] = [];
|
groupedClients: GroupedClients[] = [];
|
||||||
|
|
||||||
constructor(public dialog: MatDialog, private http: HttpClient, private toastService: ToastrService) { }
|
constructor(public dialog: MatDialog, private http: HttpClient, private toastService: ToastrService, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.groupClientsByOrganizationalUnit();
|
this.groupClientsByOrganizationalUnit();
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Component, Inject, OnInit, Optional } from '@angular/core';
|
import { Component, Inject, OnInit, Optional } from '@angular/core';
|
||||||
import { MatDialogRef } from "@angular/material/dialog";
|
import { MatDialogRef } from "@angular/material/dialog";
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import {MatSnackBar} from "@angular/material/snack-bar";
|
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { MAT_DIALOG_DATA } from "@angular/material/dialog";
|
import { MAT_DIALOG_DATA } from "@angular/material/dialog";
|
||||||
import { DataService } from '../../../services/data.service';
|
import { DataService } from '../../../services/data.service';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-multiple-client',
|
selector: 'app-create-multiple-client',
|
||||||
|
@ -12,7 +12,7 @@ import { DataService } from '../../../services/data.service';
|
||||||
styleUrl: './create-multiple-client.component.css'
|
styleUrl: './create-multiple-client.component.css'
|
||||||
})
|
})
|
||||||
export class CreateMultipleClientComponent implements OnInit {
|
export class CreateMultipleClientComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string = this.configService.apiUrl;
|
||||||
parentUnits: any[] = [];
|
parentUnits: any[] = [];
|
||||||
parentUnitsWithPaths: { id: string, name: string, path: string }[] = [];
|
parentUnitsWithPaths: { id: string, name: string, path: string }[] = [];
|
||||||
uploadedClients: any[] = [];
|
uploadedClients: any[] = [];
|
||||||
|
@ -26,10 +26,12 @@ export class CreateMultipleClientComponent implements OnInit{
|
||||||
@Optional() private dialogRef: MatDialogRef<CreateMultipleClientComponent>,
|
@Optional() private dialogRef: MatDialogRef<CreateMultipleClientComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) private data: any,
|
@Inject(MAT_DIALOG_DATA) private data: any,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private snackBar: MatSnackBar,
|
private configService: ConfigService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private dataService: DataService
|
private dataService: DataService
|
||||||
) {}
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loadParentUnits();
|
this.loadParentUnits();
|
||||||
|
|
|
@ -2,9 +2,9 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||||
import { Component, Inject, OnInit } from '@angular/core';
|
import { Component, Inject, OnInit } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { DataService } from '../../../services/data.service';
|
import { DataService } from '../../../services/data.service';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-manage-client',
|
selector: 'app-manage-client',
|
||||||
|
@ -12,7 +12,7 @@ import { DataService } from '../../../services/data.service';
|
||||||
styleUrls: ['./manage-client.component.css']
|
styleUrls: ['./manage-client.component.css']
|
||||||
})
|
})
|
||||||
export class ManageClientComponent implements OnInit {
|
export class ManageClientComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
clientForm!: FormGroup;
|
clientForm!: FormGroup;
|
||||||
parentUnits: any[] = [];
|
parentUnits: any[] = [];
|
||||||
parentUnitsWithPaths: { id: string, name: string, path: string }[] = [];
|
parentUnitsWithPaths: { id: string, name: string, path: string }[] = [];
|
||||||
|
@ -38,11 +38,12 @@ export class ManageClientComponent implements OnInit {
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
private dialogRef: MatDialogRef<ManageClientComponent>,
|
private dialogRef: MatDialogRef<ManageClientComponent>,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private snackBar: MatSnackBar,
|
private configService: ConfigService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.isEditMode = !!data?.uuid;
|
this.isEditMode = !!data?.uuid;
|
||||||
this.dialogTitle = this.isEditMode ? 'editClientDialogTitle' : 'addClientDialogTitle';
|
this.dialogTitle = this.isEditMode ? 'editClientDialogTitle' : 'addClientDialogTitle';
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-execute-command-ou',
|
selector: 'app-execute-command-ou',
|
||||||
|
@ -14,15 +15,17 @@ export class ExecuteCommandOuComponent implements OnInit {
|
||||||
clients: any[] = [];
|
clients: any[] = [];
|
||||||
commands: any[] = [];
|
commands: any[] = [];
|
||||||
commandGroups: any[] = [];
|
commandGroups: any[] = [];
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private dialogRef: MatDialogRef<ExecuteCommandOuComponent>,
|
private dialogRef: MatDialogRef<ExecuteCommandOuComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any,
|
@Inject(MAT_DIALOG_DATA) public data: any,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
|
private configService: ConfigService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.form = this.fb.group({
|
this.form = this.fb.group({
|
||||||
selectedCommand: [null],
|
selectedCommand: [null],
|
||||||
selectedCommandGroup: [null],
|
selectedCommandGroup: [null],
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { DataService } from "../../../services/data.service";
|
import { DataService } from "../../../services/data.service";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-manage-organizational-unit',
|
selector: 'app-manage-organizational-unit',
|
||||||
|
@ -11,7 +12,7 @@ import { ToastrService } from "ngx-toastr";
|
||||||
styleUrls: ['./manage-organizational-unit.component.css']
|
styleUrls: ['./manage-organizational-unit.component.css']
|
||||||
})
|
})
|
||||||
export class ManageOrganizationalUnitComponent implements OnInit {
|
export class ManageOrganizationalUnitComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
isLinear = true;
|
isLinear = true;
|
||||||
generalFormGroup: FormGroup;
|
generalFormGroup: FormGroup;
|
||||||
additionalInfoFormGroup: FormGroup;
|
additionalInfoFormGroup: FormGroup;
|
||||||
|
@ -55,11 +56,12 @@ export class ManageOrganizationalUnitComponent implements OnInit {
|
||||||
private dialogRef: MatDialogRef<ManageOrganizationalUnitComponent>,
|
private dialogRef: MatDialogRef<ManageOrganizationalUnitComponent>,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
|
private configService: ConfigService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
this.isEditMode = !!data?.uuid;
|
this.isEditMode = !!data?.uuid;
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.generalFormGroup = this._formBuilder.group({
|
this.generalFormGroup = this._formBuilder.group({
|
||||||
name: [null, Validators.required],
|
name: [null, Validators.required],
|
||||||
parent: [data?.parent ? data.parent['@id'] : null],
|
parent: [data?.parent ? data.parent['@id'] : null],
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { HttpClient } from '@angular/common/http';
|
||||||
import { Component, Inject, OnInit } from '@angular/core';
|
import { Component, Inject, OnInit } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
||||||
import { DatePipe } from "@angular/common";
|
import { DatePipe } from "@angular/common";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-show-organizational-unit',
|
selector: 'app-show-organizational-unit',
|
||||||
|
@ -9,7 +10,7 @@ import {DatePipe} from "@angular/common";
|
||||||
styleUrl: './show-organizational-unit.component.css'
|
styleUrl: './show-organizational-unit.component.css'
|
||||||
})
|
})
|
||||||
export class ShowOrganizationalUnitComponent implements OnInit {
|
export class ShowOrganizationalUnitComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
displayedColumns: string[] = ['property', 'value'];
|
displayedColumns: string[] = ['property', 'value'];
|
||||||
currentCalendar: any;
|
currentCalendar: any;
|
||||||
ou: any;
|
ou: any;
|
||||||
|
@ -26,8 +27,10 @@ export class ShowOrganizationalUnitComponent implements OnInit {
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any,
|
@Inject(MAT_DIALOG_DATA) public data: any,
|
||||||
private dialogRef: MatDialogRef<ShowOrganizationalUnitComponent>,
|
private dialogRef: MatDialogRef<ShowOrganizationalUnitComponent>,
|
||||||
|
private configService: ConfigService,
|
||||||
private http: HttpClient
|
private http: HttpClient
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import {HttpClient} from '@angular/common/http';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
||||||
import { DataService } from "../data.service";
|
import { DataService } from "../data.service";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-image',
|
selector: 'app-create-image',
|
||||||
|
@ -11,7 +12,7 @@ import {DataService} from "../data.service";
|
||||||
styleUrls: ['./create-image.component.css']
|
styleUrls: ['./create-image.component.css']
|
||||||
})
|
})
|
||||||
export class CreateImageComponent implements OnInit {
|
export class CreateImageComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
imageForm: FormGroup<any>;
|
imageForm: FormGroup<any>;
|
||||||
imageId: string | null = null;
|
imageId: string | null = null;
|
||||||
softwareProfiles: any[] = [];
|
softwareProfiles: any[] = [];
|
||||||
|
@ -26,9 +27,11 @@ export class CreateImageComponent implements OnInit {
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
public dialogRef: MatDialogRef<CreateImageComponent>,
|
public dialogRef: MatDialogRef<CreateImageComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
|
private configService: ConfigService,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.imageForm = this.fb.group({
|
this.imageForm = this.fb.group({
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
description: [''],
|
description: [''],
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
private apiUrl = `${this.baseUrl}/images?page=1&itemsPerPage=1000`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/images?page=1&itemsPerPage=1000`;
|
||||||
|
}
|
||||||
|
|
||||||
getImages(filters: { [key: string]: string }): Observable<{ totalItems: any; data: any }> {
|
getImages(filters: { [key: string]: string }): Observable<{ totalItems: any; data: any }> {
|
||||||
const params = new HttpParams({ fromObject: filters });
|
const params = new HttpParams({ fromObject: filters });
|
||||||
|
|
|
@ -3,6 +3,7 @@ import {HttpClient} from "@angular/common/http";
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-export-image',
|
selector: 'app-export-image',
|
||||||
|
@ -10,7 +11,7 @@ import {Router} from "@angular/router";
|
||||||
styleUrl: './export-image.component.css'
|
styleUrl: './export-image.component.css'
|
||||||
})
|
})
|
||||||
export class ExportImageComponent implements OnInit {
|
export class ExportImageComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
loading: boolean = true;
|
loading: boolean = true;
|
||||||
repositories: any[] = [];
|
repositories: any[] = [];
|
||||||
selectedRepositories: any[] = [];
|
selectedRepositories: any[] = [];
|
||||||
|
@ -19,10 +20,11 @@ export class ExportImageComponent implements OnInit {
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
public dialogRef: MatDialogRef<ExportImageComponent>,
|
public dialogRef: MatDialogRef<ExportImageComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
|
private configService: ConfigService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: { image: any, imageImageRepository: any }
|
@Inject(MAT_DIALOG_DATA) public data: { image: any, imageImageRepository: any }
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
|
@ -2,10 +2,9 @@ import {Component, Input, OnInit} from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { MatTableDataSource } from '@angular/material/table';
|
import { MatTableDataSource } from '@angular/material/table';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import { CreateImageComponent } from './create-image/create-image.component';
|
import { CreateImageComponent } from './create-image/create-image.component';
|
||||||
import {Observable} from "rxjs";
|
import { ConfigService } from '@services/config.service';
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -14,7 +13,8 @@ import { JoyrideService } from 'ngx-joyride';
|
||||||
styleUrls: ['./images.component.css']
|
styleUrls: ['./images.component.css']
|
||||||
})
|
})
|
||||||
export class ImagesComponent implements OnInit {
|
export class ImagesComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
itemsPerPage: number = 10;
|
itemsPerPage: number = 10;
|
||||||
|
@ -57,16 +57,18 @@ export class ImagesComponent implements OnInit {
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/images`;
|
|
||||||
@Input() repositoryUuid: any
|
@Input() repositoryUuid: any
|
||||||
private repositoryId: any;
|
private repositoryId: any;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private toastService: ToastrService,
|
private configService: ConfigService,
|
||||||
private joyrideService: JoyrideService,
|
private joyrideService: JoyrideService,
|
||||||
) {}
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/images`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.repositoryUuid) {
|
if (this.repositoryUuid) {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { Router } from '@angular/router';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { jwtDecode } from "jwt-decode";
|
import { jwtDecode } from "jwt-decode";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-login',
|
selector: 'app-login',
|
||||||
|
@ -19,14 +20,16 @@ export class LoginComponent {
|
||||||
isLoading: boolean = false;
|
isLoading: boolean = false;
|
||||||
decodedToken: any;
|
decodedToken: any;
|
||||||
|
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
private configService: ConfigService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private translateService: TranslateService
|
private translateService: TranslateService
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
const savedLanguage = localStorage.getItem('language') || 'es';
|
const savedLanguage = localStorage.getItem('language') || 'es';
|
||||||
this.translateService.use(savedLanguage);
|
this.translateService.use(savedLanguage);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { DataService } from "../data.service";
|
import { DataService } from "../data.service";
|
||||||
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-menu',
|
selector: 'app-create-menu',
|
||||||
|
@ -12,7 +13,7 @@ import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
||||||
styleUrl: './create-menu.component.css'
|
styleUrl: './create-menu.component.css'
|
||||||
})
|
})
|
||||||
export class CreateMenuComponent implements OnInit {
|
export class CreateMenuComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
menuForm: FormGroup<any>;
|
menuForm: FormGroup<any>;
|
||||||
menuId: string | null = null;
|
menuId: string | null = null;
|
||||||
softwareProfiles: any[] = [];
|
softwareProfiles: any[] = [];
|
||||||
|
@ -24,9 +25,11 @@ export class CreateMenuComponent implements OnInit{
|
||||||
public dialogRef: MatDialogRef<CreateMenuComponent>,
|
public dialogRef: MatDialogRef<CreateMenuComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
|
private configService: ConfigService,
|
||||||
private sanitizer: DomSanitizer,
|
private sanitizer: DomSanitizer,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.menuForm = this.fb.group({
|
this.menuForm = this.fb.group({
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
publicUrl: ['', Validators.required],
|
publicUrl: ['', Validators.required],
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
|
@ -8,10 +8,13 @@ import { catchError, map } from 'rxjs/operators';
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
private apiUrl = `${this.baseUrl}/menus?page=1&itemsPerPage=1000`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/menus?page=1&itemsPerPage=1000`;
|
||||||
|
}
|
||||||
|
|
||||||
getMenus(filters: { [key: string]: string }): Observable<{ totalItems: any; data: any }> {
|
getMenus(filters: { [key: string]: string }): Observable<{ totalItems: any; data: any }> {
|
||||||
const params = new HttpParams({ fromObject: filters });
|
const params = new HttpParams({ fromObject: filters });
|
||||||
|
|
|
@ -8,6 +8,7 @@ import {JoyrideService} from "ngx-joyride";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { DeleteModalComponent } from "../../shared/delete_modal/delete-modal/delete-modal.component";
|
import { DeleteModalComponent } from "../../shared/delete_modal/delete-modal/delete-modal.component";
|
||||||
import { CreateMenuComponent } from "./create-menu/create-menu.component";
|
import { CreateMenuComponent } from "./create-menu/create-menu.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-menus',
|
selector: 'app-menus',
|
||||||
|
@ -15,7 +16,8 @@ import {CreateMenuComponent} from "./create-menu/create-menu.component";
|
||||||
styleUrl: './menus.component.css'
|
styleUrl: './menus.component.css'
|
||||||
})
|
})
|
||||||
export class MenusComponent implements OnInit {
|
export class MenusComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
itemsPerPage: number = 10;
|
itemsPerPage: number = 10;
|
||||||
|
@ -57,15 +59,17 @@ export class MenusComponent implements OnInit {
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/menus`;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService,
|
private joyrideService: JoyrideService,
|
||||||
private router: Router
|
private router: Router,
|
||||||
) {}
|
private configService: ConfigService
|
||||||
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/menus`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.search();
|
this.search();
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-ogboot-status',
|
selector: 'app-ogboot-status',
|
||||||
|
@ -9,7 +10,7 @@ import {ToastrService} from "ngx-toastr";
|
||||||
styleUrls: ['./ogboot-status.component.css']
|
styleUrls: ['./ogboot-status.component.css']
|
||||||
})
|
})
|
||||||
export class OgbootStatusComponent implements OnInit {
|
export class OgbootStatusComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
diskUsage: any = {};
|
diskUsage: any = {};
|
||||||
servicesStatus: any = {};
|
servicesStatus: any = {};
|
||||||
installedOglives: any[] = [];
|
installedOglives: any[] = [];
|
||||||
|
@ -29,8 +30,11 @@ export class OgbootStatusComponent implements OnInit {
|
||||||
constructor(
|
constructor(
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private joyrideService: JoyrideService,
|
private joyrideService: JoyrideService,
|
||||||
|
private configService: ConfigService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
) {}
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loadStatus();
|
this.loadStatus();
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { DataService as TemplateDataService } from './../pxe/data.service';
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string = this.configService.apiUrl;
|
||||||
private apiUrl = `${this.baseUrl}/pxe-boot-files?page=1&itemsPerPage=1000`;
|
private apiUrl = `${this.baseUrl}/pxe-boot-files?page=1&itemsPerPage=1000`;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
|
|
@ -2,8 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { PageEvent } from '@angular/material/paginator';
|
import { ConfigService } from '@services/config.service';
|
||||||
import {Observable} from "rxjs";
|
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -12,7 +11,7 @@ import { JoyrideService } from 'ngx-joyride';
|
||||||
styleUrls: ['./pxe-boot-files.component.css']
|
styleUrls: ['./pxe-boot-files.component.css']
|
||||||
})
|
})
|
||||||
export class PxeBootFilesComponent implements OnInit {
|
export class PxeBootFilesComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
|
||||||
availableOrganizationalUnits: any[] = [];
|
availableOrganizationalUnits: any[] = [];
|
||||||
selectedUnitChildren: any[] = [];
|
selectedUnitChildren: any[] = [];
|
||||||
|
@ -33,8 +32,10 @@ export class PxeBootFilesComponent implements OnInit {
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
|
private configService: ConfigService,
|
||||||
private joyrideService: JoyrideService
|
private joyrideService: JoyrideService
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.taskForm = this.fb.group({
|
this.taskForm = this.fb.group({
|
||||||
organizationalUnit: ['', Validators.required],
|
organizationalUnit: ['', Validators.required],
|
||||||
selectedChild: ['', Validators.required]
|
selectedChild: ['', Validators.required]
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { HttpClient } from '@angular/common/http';
|
||||||
import { Component, Inject, OnInit } from '@angular/core';
|
import { Component, Inject, OnInit } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-image',
|
selector: 'app-create-image',
|
||||||
|
@ -9,7 +10,7 @@ import { ToastrService } from 'ngx-toastr';
|
||||||
styleUrls: ['./create-image.component.css']
|
styleUrls: ['./create-image.component.css']
|
||||||
})
|
})
|
||||||
export class CreatePXEImageComponent implements OnInit {
|
export class CreatePXEImageComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
downloads: any[] = [];
|
downloads: any[] = [];
|
||||||
selectedDownload: any;
|
selectedDownload: any;
|
||||||
isEditMode: boolean = false;
|
isEditMode: boolean = false;
|
||||||
|
@ -18,10 +19,13 @@ export class CreatePXEImageComponent implements OnInit {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
|
private configService: ConfigService,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
public dialogRef: MatDialogRef<CreatePXEImageComponent>,
|
public dialogRef: MatDialogRef<CreatePXEImageComponent>,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) { }
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.fetchDownloads();
|
this.fetchDownloads();
|
||||||
|
|
|
@ -2,15 +2,19 @@ import { Injectable } from '@angular/core';
|
||||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
private apiUrl = `${this.baseUrl}/og-lives?page=1&itemsPerPage=1000`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/og-lives?page=1&itemsPerPage=1000`;
|
||||||
|
}
|
||||||
|
|
||||||
getImages(filters: { [key: string]: string }): Observable<any[]> {
|
getImages(filters: { [key: string]: string }): Observable<any[]> {
|
||||||
const params = new HttpParams({ fromObject: filters });
|
const params = new HttpParams({ fromObject: filters });
|
||||||
|
|
|
@ -12,6 +12,7 @@ import {DataService} from "./data.service";
|
||||||
import { Observable } from "rxjs";
|
import { Observable } from "rxjs";
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
import { ServerInfoDialogComponent } from "../../ogdhcp/server-info-dialog/server-info-dialog.component";
|
import { ServerInfoDialogComponent } from "../../ogdhcp/server-info-dialog/server-info-dialog.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-pxe-images',
|
selector: 'app-pxe-images',
|
||||||
|
@ -19,7 +20,8 @@ import {ServerInfoDialogComponent} from "../../ogdhcp/server-info-dialog/server-
|
||||||
styleUrls: ['./pxe-images.component.css']
|
styleUrls: ['./pxe-images.component.css']
|
||||||
})
|
})
|
||||||
export class PXEimagesComponent implements OnInit {
|
export class PXEimagesComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
images: { downloadUrl: string; name: string; uuid: string }[] = [];
|
images: { downloadUrl: string; name: string; uuid: string }[] = [];
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
|
@ -66,15 +68,17 @@ export class PXEimagesComponent implements OnInit {
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/og-lives`;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
|
private configService: ConfigService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService
|
private joyrideService: JoyrideService
|
||||||
) {}
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/og-lives`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { DeleteModalComponent } from "../../../../shared/delete_modal/delete-modal/delete-modal.component";
|
import { DeleteModalComponent } from "../../../../shared/delete_modal/delete-modal/delete-modal.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-pxe-template',
|
selector: 'app-create-pxe-template',
|
||||||
|
@ -11,7 +12,7 @@ import { DeleteModalComponent } from "../../../../shared/delete_modal/delete-mod
|
||||||
styleUrls: ['./create-pxe-template.component.css']
|
styleUrls: ['./create-pxe-template.component.css']
|
||||||
})
|
})
|
||||||
export class CreatePxeTemplateComponent implements OnInit {
|
export class CreatePxeTemplateComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
templateForm!: FormGroup;
|
templateForm!: FormGroup;
|
||||||
previewContent: string = '';
|
previewContent: string = '';
|
||||||
isEditMode: boolean = false;
|
isEditMode: boolean = false;
|
||||||
|
@ -54,10 +55,13 @@ exit`
|
||||||
public dialogRef: MatDialogRef<CreatePxeTemplateComponent>,
|
public dialogRef: MatDialogRef<CreatePxeTemplateComponent>,
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
|
private configService: ConfigService,
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {}
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.isEditMode = !!this.data;
|
this.isEditMode = !!this.data;
|
||||||
|
|
|
@ -3,15 +3,19 @@ import { Injectable } from '@angular/core';
|
||||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
private apiUrl = `${this.baseUrl}/pxe-templates?page=1&itemsPerPage=1000`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/pxe-templates?page=1&itemsPerPage=1000`;
|
||||||
|
}
|
||||||
|
|
||||||
getPxeTemplates(filters: { [key: string]: string }): Observable<any[]> {
|
getPxeTemplates(filters: { [key: string]: string }): Observable<any[]> {
|
||||||
const params = new HttpParams({ fromObject: filters });
|
const params = new HttpParams({ fromObject: filters });
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { CreatePxeTemplateComponent } from './create-pxeTemplate/create-pxe-template.component'; // Asegúrate de que el path sea correcto
|
import { CreatePxeTemplateComponent } from './create-pxeTemplate/create-pxe-template.component';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { MatTableDataSource } from '@angular/material/table';
|
import { MatTableDataSource } from '@angular/material/table';
|
||||||
import { PageEvent } from '@angular/material/paginator';
|
import { PageEvent } from '@angular/material/paginator';
|
||||||
|
@ -12,6 +12,7 @@ import {Observable} from "rxjs";
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
import { DeleteModalComponent } from "../../../shared/delete_modal/delete-modal/delete-modal.component";
|
import { DeleteModalComponent } from "../../../shared/delete_modal/delete-modal/delete-modal.component";
|
||||||
import { ServerInfoDialogComponent } from "../../ogdhcp/server-info-dialog/server-info-dialog.component";
|
import { ServerInfoDialogComponent } from "../../ogdhcp/server-info-dialog/server-info-dialog.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-pxe',
|
selector: 'app-pxe',
|
||||||
|
@ -19,7 +20,8 @@ import {ServerInfoDialogComponent} from "../../ogdhcp/server-info-dialog/server-
|
||||||
styleUrls: ['./pxe.component.css']
|
styleUrls: ['./pxe.component.css']
|
||||||
})
|
})
|
||||||
export class PxeComponent {
|
export class PxeComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
pxeTemplates: any[] = [];
|
pxeTemplates: any[] = [];
|
||||||
currentPage: number = 1;
|
currentPage: number = 1;
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
|
@ -58,15 +60,17 @@ export class PxeComponent {
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/pxe-templates`;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
private joyrideService: JoyrideService
|
private joyrideService: JoyrideService,
|
||||||
) { }
|
private configService: ConfigService
|
||||||
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/pxe-templates`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { Component, Inject } from '@angular/core';
|
import { Component, Inject } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA } from "@angular/material/dialog";
|
import { MAT_DIALOG_DATA } from "@angular/material/dialog";
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { ConfigService } from "@services/config.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-show-template-content',
|
selector: 'app-show-template-content',
|
||||||
|
@ -8,12 +9,14 @@ import {HttpClient} from "@angular/common/http";
|
||||||
styleUrl: './show-template-content.component.css'
|
styleUrl: './show-template-content.component.css'
|
||||||
})
|
})
|
||||||
export class ShowTemplateContentComponent {
|
export class ShowTemplateContentComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
displayedColumns: string[] = ['property', 'value'];
|
displayedColumns: string[] = ['property', 'value'];
|
||||||
generalData: any[] = [];
|
generalData: any[] = [];
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any,
|
@Inject(MAT_DIALOG_DATA) public data: any,
|
||||||
private http: HttpClient
|
private http: HttpClient,
|
||||||
|
private configService: ConfigService
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import {MatDialogRef, MAT_DIALOG_DATA, MatDialog} from '@angular/material/dialog
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { OperationResultDialogComponent } from "../operation-result-dialog/operation-result-dialog.component";
|
import { OperationResultDialogComponent } from "../operation-result-dialog/operation-result-dialog.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-add-clients-to-subnet',
|
selector: 'app-add-clients-to-subnet',
|
||||||
|
@ -11,7 +12,7 @@ import {OperationResultDialogComponent} from "../operation-result-dialog/operati
|
||||||
styleUrls: ['./add-clients-to-subnet.component.css']
|
styleUrls: ['./add-clients-to-subnet.component.css']
|
||||||
})
|
})
|
||||||
export class AddClientsToSubnetComponent implements OnInit {
|
export class AddClientsToSubnetComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
units: any[] = [];
|
units: any[] = [];
|
||||||
clients: any[] = [];
|
clients: any[] = [];
|
||||||
selectedClients: string[] = [];
|
selectedClients: string[] = [];
|
||||||
|
@ -25,8 +26,11 @@ export class AddClientsToSubnetComponent implements OnInit {
|
||||||
public dialogRef: MatDialogRef<AddClientsToSubnetComponent>,
|
public dialogRef: MatDialogRef<AddClientsToSubnetComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
|
private configService: ConfigService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: { subnetUuid: string, subnetName: string }
|
@Inject(MAT_DIALOG_DATA) public data: { subnetUuid: string, subnetName: string }
|
||||||
) {}
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { Component, Inject, OnInit } from '@angular/core';
|
||||||
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
|
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-subnet',
|
selector: 'app-create-subnet',
|
||||||
|
@ -10,7 +11,7 @@ import { ToastrService } from 'ngx-toastr';
|
||||||
styleUrls: ['./create-subnet.component.css']
|
styleUrls: ['./create-subnet.component.css']
|
||||||
})
|
})
|
||||||
export class CreateSubnetComponent implements OnInit {
|
export class CreateSubnetComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
subnetForm: FormGroup;
|
subnetForm: FormGroup;
|
||||||
isEditMode: boolean = false;
|
isEditMode: boolean = false;
|
||||||
subnetId: string | null = null;
|
subnetId: string | null = null;
|
||||||
|
@ -19,10 +20,12 @@ export class CreateSubnetComponent implements OnInit {
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
|
private configService: ConfigService,
|
||||||
public dialogRef: MatDialogRef<CreateSubnetComponent>,
|
public dialogRef: MatDialogRef<CreateSubnetComponent>,
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.subnetForm = this.fb.group({
|
this.subnetForm = this.fb.group({
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
netmask: ['', Validators.required],
|
netmask: ['', Validators.required],
|
||||||
|
|
|
@ -11,6 +11,7 @@ import { Observable } from "rxjs";
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
import { DeleteModalComponent } from "../../shared/delete_modal/delete-modal/delete-modal.component";
|
import { DeleteModalComponent } from "../../shared/delete_modal/delete-modal/delete-modal.component";
|
||||||
import { ShowClientsComponent } from "./show-clients/show-clients.component";
|
import { ShowClientsComponent } from "./show-clients/show-clients.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
export interface Subnet {
|
export interface Subnet {
|
||||||
'@id': string;
|
'@id': string;
|
||||||
|
@ -36,7 +37,7 @@ export interface Subnet {
|
||||||
styleUrls: ['./og-dhcp-subnets.component.css']
|
styleUrls: ['./og-dhcp-subnets.component.css']
|
||||||
})
|
})
|
||||||
export class OgDhcpSubnetsComponent implements OnInit {
|
export class OgDhcpSubnetsComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
displayedColumns: string[] = ['id', 'name', 'netmask', 'ipAddress', 'synchronized', 'serverId', 'clients', 'actions'];
|
displayedColumns: string[] = ['id', 'name', 'netmask', 'ipAddress', 'synchronized', 'serverId', 'clients', 'actions'];
|
||||||
dataSource = new MatTableDataSource<Subnet>([]);
|
dataSource = new MatTableDataSource<Subnet>([]);
|
||||||
length = 0;
|
length = 0;
|
||||||
|
@ -59,10 +60,13 @@ export class OgDhcpSubnetsComponent implements OnInit {
|
||||||
{ columnDef: 'clients', header: 'Lista de clientes', cell: (subnet: Subnet) => `${subnet.clients}` },
|
{ columnDef: 'clients', header: 'Lista de clientes', cell: (subnet: Subnet) => `${subnet.clients}` },
|
||||||
];
|
];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/subnets`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(public dialog: MatDialog, private http: HttpClient, private toastService: ToastrService,
|
constructor(public dialog: MatDialog, private http: HttpClient, private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService) { }
|
private joyrideService: JoyrideService, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/subnets`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
|
@ -5,6 +5,7 @@ import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from "@angular/material/dialog
|
||||||
import { MatTableDataSource } from "@angular/material/table";
|
import { MatTableDataSource } from "@angular/material/table";
|
||||||
import { Client } from "../../groups/model/model";
|
import { Client } from "../../groups/model/model";
|
||||||
import { DeleteModalComponent } from "../../../shared/delete_modal/delete-modal/delete-modal.component";
|
import { DeleteModalComponent } from "../../../shared/delete_modal/delete-modal/delete-modal.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-show-clients',
|
selector: 'app-show-clients',
|
||||||
|
@ -12,7 +13,7 @@ import {DeleteModalComponent} from "../../../shared/delete_modal/delete-modal/de
|
||||||
styleUrl: './show-clients.component.css'
|
styleUrl: './show-clients.component.css'
|
||||||
})
|
})
|
||||||
export class ShowClientsComponent implements OnInit {
|
export class ShowClientsComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
dataSource = new MatTableDataSource<Client>([]);
|
dataSource = new MatTableDataSource<Client>([]);
|
||||||
length = 0;
|
length = 0;
|
||||||
itemsPerPage: number = 10;
|
itemsPerPage: number = 10;
|
||||||
|
@ -48,8 +49,11 @@ export class ShowClientsComponent implements OnInit {
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
public dialogRef: MatDialogRef<ShowClientsComponent>,
|
public dialogRef: MatDialogRef<ShowClientsComponent>,
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
|
private configService: ConfigService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) { }
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.data) {
|
if (this.data) {
|
||||||
|
@ -89,7 +93,8 @@ export class ShowClientsComponent implements OnInit {
|
||||||
this.toastService.error(error.error['hydra:description']);
|
this.toastService.error(error.error['hydra:description']);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}})
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onNoClick(): void {
|
onNoClick(): void {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-status',
|
selector: 'app-status',
|
||||||
|
@ -8,7 +9,7 @@ import { JoyrideService } from 'ngx-joyride';
|
||||||
styleUrl: './status.component.css'
|
styleUrl: './status.component.css'
|
||||||
})
|
})
|
||||||
export class StatusComponent {
|
export class StatusComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
diskUsage: any = {};
|
diskUsage: any = {};
|
||||||
servicesStatus: any = {};
|
servicesStatus: any = {};
|
||||||
subnets: any[] = [];
|
subnets: any[] = [];
|
||||||
|
@ -25,8 +26,9 @@ export class StatusComponent {
|
||||||
domain: ['#FF6384', '#3f51b5']
|
domain: ['#FF6384', '#3f51b5']
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(private http: HttpClient,
|
constructor(private http: HttpClient, private joyrideService: JoyrideService, private configService: ConfigService) {
|
||||||
private joyrideService: JoyrideService) {}
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loadStatus();
|
this.loadStatus();
|
||||||
|
|
|
@ -4,6 +4,7 @@ import {HttpClient} from "@angular/common/http";
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { DataService } from "../../software/data.service";
|
import { DataService } from "../../software/data.service";
|
||||||
|
import { ConfigService } from "@services/config.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-operative-system',
|
selector: 'app-create-operative-system',
|
||||||
|
@ -11,9 +12,8 @@ import {DataService} from "../../software/data.service";
|
||||||
styleUrl: './create-operative-system.component.css'
|
styleUrl: './create-operative-system.component.css'
|
||||||
})
|
})
|
||||||
export class CreateOperativeSystemComponent {
|
export class CreateOperativeSystemComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
formGroup: FormGroup<any>;
|
formGroup: FormGroup<any>;
|
||||||
private apiUrl = `${this.baseUrl}/software`;
|
|
||||||
operativeSystemId: string | null = null;
|
operativeSystemId: string | null = null;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -22,8 +22,10 @@ export class CreateOperativeSystemComponent {
|
||||||
public dialogRef: MatDialogRef<CreateOperativeSystemComponent>,
|
public dialogRef: MatDialogRef<CreateOperativeSystemComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
|
private configService: ConfigService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.formGroup = this.fb.group({
|
this.formGroup = this.fb.group({
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,11 +5,11 @@ import {MatDialog} from "@angular/material/dialog";
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { DataService } from "../software/data.service";
|
import { DataService } from "../software/data.service";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import {CreateSoftwareComponent} from "../software/create-software/create-software.component";
|
|
||||||
import { DeleteModalComponent } from "../../shared/delete_modal/delete-modal/delete-modal.component";
|
import { DeleteModalComponent } from "../../shared/delete_modal/delete-modal/delete-modal.component";
|
||||||
import { PageEvent } from "@angular/material/paginator";
|
import { PageEvent } from "@angular/material/paginator";
|
||||||
import { CreateOperativeSystemComponent } from "./create-operative-system/create-operative-system.component";
|
import { CreateOperativeSystemComponent } from "./create-operative-system/create-operative-system.component";
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-operative-system',
|
selector: 'app-operative-system',
|
||||||
|
@ -17,7 +17,8 @@ import { JoyrideService } from 'ngx-joyride';
|
||||||
styleUrl: './operative-system.component.css'
|
styleUrl: './operative-system.component.css'
|
||||||
})
|
})
|
||||||
export class OperativeSystemComponent {
|
export class OperativeSystemComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
images: { downloadUrl: string; name: string; uuid: string }[] = [];
|
images: { downloadUrl: string; name: string; uuid: string }[] = [];
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
|
@ -48,15 +49,16 @@ export class OperativeSystemComponent {
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/operative-systems`;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private dataService: DataService,
|
private configService: ConfigService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService
|
private joyrideService: JoyrideService
|
||||||
) {}
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/operative-systems`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.search();
|
this.search();
|
||||||
|
|
|
@ -4,6 +4,7 @@ import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
||||||
|
import { ConfigService } from "@services/config.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-backup-image',
|
selector: 'app-backup-image',
|
||||||
|
@ -11,7 +12,7 @@ import {FormBuilder, FormGroup, Validators} from "@angular/forms";
|
||||||
styleUrl: './backup-image.component.css'
|
styleUrl: './backup-image.component.css'
|
||||||
})
|
})
|
||||||
export class BackupImageComponent implements OnInit {
|
export class BackupImageComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
loading: boolean = false;
|
loading: boolean = false;
|
||||||
form!: FormGroup;
|
form!: FormGroup;
|
||||||
|
|
||||||
|
@ -21,9 +22,10 @@ export class BackupImageComponent implements OnInit {
|
||||||
public dialogRef: MatDialogRef<BackupImageComponent>,
|
public dialogRef: MatDialogRef<BackupImageComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
private configService: ConfigService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: { imageImageRepository: any }
|
@Inject(MAT_DIALOG_DATA) public data: { imageImageRepository: any }
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
|
@ -3,6 +3,7 @@ import {HttpClient} from "@angular/common/http";
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
import { ConfigService } from "@services/config.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-convert-image',
|
selector: 'app-convert-image',
|
||||||
|
@ -10,7 +11,7 @@ import {Router} from "@angular/router";
|
||||||
styleUrl: './convert-image.component.css'
|
styleUrl: './convert-image.component.css'
|
||||||
})
|
})
|
||||||
export class ConvertImageComponent {
|
export class ConvertImageComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
loading: boolean = true;
|
loading: boolean = true;
|
||||||
imageName: string = '';
|
imageName: string = '';
|
||||||
|
|
||||||
|
@ -19,9 +20,10 @@ export class ConvertImageComponent {
|
||||||
public dialogRef: MatDialogRef<ConvertImageComponent>,
|
public dialogRef: MatDialogRef<ConvertImageComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
private configService: ConfigService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: { repositoryUuid: any, name: string }
|
@Inject(MAT_DIALOG_DATA) public data: { repositoryUuid: any, name: string }
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import {HttpClient} from "@angular/common/http";
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { DataService } from "../../images/data.service";
|
import { DataService } from "../../images/data.service";
|
||||||
|
import { ConfigService } from "@services/config.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-repository',
|
selector: 'app-create-repository',
|
||||||
|
@ -11,7 +12,7 @@ import {DataService} from "../../images/data.service";
|
||||||
styleUrl: './create-repository.component.css'
|
styleUrl: './create-repository.component.css'
|
||||||
})
|
})
|
||||||
export class CreateRepositoryComponent {
|
export class CreateRepositoryComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
imageForm: FormGroup<any>;
|
imageForm: FormGroup<any>;
|
||||||
repositoryId: string | null = null;
|
repositoryId: string | null = null;
|
||||||
softwareProfiles: any[] = [];
|
softwareProfiles: any[] = [];
|
||||||
|
@ -22,8 +23,10 @@ export class CreateRepositoryComponent {
|
||||||
public dialogRef: MatDialogRef<CreateRepositoryComponent>,
|
public dialogRef: MatDialogRef<CreateRepositoryComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
|
private configService: ConfigService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
this.imageForm = this.fb.group({
|
this.imageForm = this.fb.group({
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
ip: [''],
|
ip: [''],
|
||||||
|
|
|
@ -3,6 +3,7 @@ import {HttpClient} from "@angular/common/http";
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-import-image',
|
selector: 'app-import-image',
|
||||||
|
@ -10,7 +11,7 @@ import {Router} from "@angular/router";
|
||||||
styleUrl: './import-image.component.css'
|
styleUrl: './import-image.component.css'
|
||||||
})
|
})
|
||||||
export class ImportImageComponent implements OnInit {
|
export class ImportImageComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
loading: boolean = true;
|
loading: boolean = true;
|
||||||
imageName: string = '';
|
imageName: string = '';
|
||||||
|
|
||||||
|
@ -19,9 +20,10 @@ export class ImportImageComponent implements OnInit{
|
||||||
public dialogRef: MatDialogRef<ImportImageComponent>,
|
public dialogRef: MatDialogRef<ImportImageComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
private configService: ConfigService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: { repositoryUuid: any, name: string }
|
@Inject(MAT_DIALOG_DATA) public data: { repositoryUuid: any, name: string }
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import {DatePipe} from "@angular/common";
|
||||||
import { Observable } from "rxjs";
|
import { Observable } from "rxjs";
|
||||||
import { MatDialog } from "@angular/material/dialog";
|
import { MatDialog } from "@angular/material/dialog";
|
||||||
import { ServerInfoDialogComponent } from "../../ogdhcp/server-info-dialog/server-info-dialog.component";
|
import { ServerInfoDialogComponent } from "../../ogdhcp/server-info-dialog/server-info-dialog.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-main-repository-view',
|
selector: 'app-main-repository-view',
|
||||||
|
@ -16,7 +17,8 @@ import {ServerInfoDialogComponent} from "../../ogdhcp/server-info-dialog/server-
|
||||||
styleUrl: './main-repository-view.component.css'
|
styleUrl: './main-repository-view.component.css'
|
||||||
})
|
})
|
||||||
export class MainRepositoryViewComponent implements OnInit {
|
export class MainRepositoryViewComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
repositoryForm: FormGroup<any>;
|
repositoryForm: FormGroup<any>;
|
||||||
repositoryId: string | null = null;
|
repositoryId: string | null = null;
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
|
@ -81,7 +83,6 @@ export class MainRepositoryViewComponent implements OnInit {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
private apiUrl = `${this.baseUrl}/images`;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
|
@ -90,7 +91,10 @@ export class MainRepositoryViewComponent implements OnInit {
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
|
private configService: ConfigService
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/images`;
|
||||||
this.repositoryForm = this.fb.group({
|
this.repositoryForm = this.fb.group({
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
ip: [''],
|
ip: [''],
|
||||||
|
|
|
@ -8,6 +8,7 @@ import {DeleteModalComponent} from "../../shared/delete_modal/delete-modal/delet
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
import {CreateRepositoryComponent} from "./create-repository/create-repository.component";
|
import {CreateRepositoryComponent} from "./create-repository/create-repository.component";
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-repositories',
|
selector: 'app-repositories',
|
||||||
|
@ -15,7 +16,8 @@ import { Router } from '@angular/router';
|
||||||
styleUrl: './repositories.component.css'
|
styleUrl: './repositories.component.css'
|
||||||
})
|
})
|
||||||
export class RepositoriesComponent implements OnInit {
|
export class RepositoriesComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
itemsPerPage: number = 10;
|
itemsPerPage: number = 10;
|
||||||
|
@ -52,15 +54,17 @@ export class RepositoriesComponent implements OnInit {
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/image-repositories`;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService,
|
private joyrideService: JoyrideService,
|
||||||
private router: Router
|
private router: Router,
|
||||||
) {}
|
private configService: ConfigService
|
||||||
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/image-repositories`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.search();
|
this.search();
|
||||||
|
|
|
@ -12,6 +12,7 @@ import {BackupImageComponent} from "../backup-image/backup-image.component";
|
||||||
import {ServerInfoDialogComponent} from "../../ogdhcp/server-info-dialog/server-info-dialog.component";
|
import {ServerInfoDialogComponent} from "../../ogdhcp/server-info-dialog/server-info-dialog.component";
|
||||||
import {ImportImageComponent} from "../import-image/import-image.component";
|
import {ImportImageComponent} from "../import-image/import-image.component";
|
||||||
import {ConvertImageComponent} from "../convert-image/convert-image.component";
|
import {ConvertImageComponent} from "../convert-image/convert-image.component";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-repository-images',
|
selector: 'app-repository-images',
|
||||||
|
@ -19,7 +20,8 @@ import {ConvertImageComponent} from "../convert-image/convert-image.component";
|
||||||
styleUrl: './repository-images.component.css'
|
styleUrl: './repository-images.component.css'
|
||||||
})
|
})
|
||||||
export class RepositoryImagesComponent implements OnInit {
|
export class RepositoryImagesComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
itemsPerPage: number = 10;
|
itemsPerPage: number = 10;
|
||||||
|
@ -63,7 +65,6 @@ export class RepositoryImagesComponent implements OnInit {
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/image-image-repositories`;
|
|
||||||
@Input() repositoryUuid: any
|
@Input() repositoryUuid: any
|
||||||
private repositoryId: any;
|
private repositoryId: any;
|
||||||
|
|
||||||
|
@ -72,7 +73,11 @@ export class RepositoryImagesComponent implements OnInit {
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService,
|
private joyrideService: JoyrideService,
|
||||||
) {}
|
private configService: ConfigService
|
||||||
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/image-image-repositories`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.repositoryUuid) {
|
if (this.repositoryUuid) {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { DataService as SoftwareService } from '../../software/data.service';
|
||||||
import { DataService } from '../data.service';
|
import { DataService } from '../data.service';
|
||||||
import { Observable, startWith } from 'rxjs';
|
import { Observable, startWith } from 'rxjs';
|
||||||
import { debounceTime, switchMap, map } from 'rxjs/operators';
|
import { debounceTime, switchMap, map } from 'rxjs/operators';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-software-profile',
|
selector: 'app-create-software-profile',
|
||||||
|
@ -14,9 +15,9 @@ import { debounceTime, switchMap, map } from 'rxjs/operators';
|
||||||
styleUrls: ['./create-software-profile.component.css']
|
styleUrls: ['./create-software-profile.component.css']
|
||||||
})
|
})
|
||||||
export class CreateSoftwareProfileComponent implements OnInit {
|
export class CreateSoftwareProfileComponent implements OnInit {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
formGroup: FormGroup;
|
formGroup: FormGroup;
|
||||||
private apiUrl = `${this.baseUrl}/software-profiles`;
|
|
||||||
softwareCollection: any[] = [];
|
softwareCollection: any[] = [];
|
||||||
organizationalUnits: any[] = [];
|
organizationalUnits: any[] = [];
|
||||||
operativeSystems: any[] = [];
|
operativeSystems: any[] = [];
|
||||||
|
@ -33,8 +34,11 @@ export class CreateSoftwareProfileComponent implements OnInit {
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private softwareDataService: SoftwareService,
|
private softwareDataService: SoftwareService,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
|
private configService: ConfigService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/software-profiles`;
|
||||||
this.formGroup = this.fb.group({
|
this.formGroup = this.fb.group({
|
||||||
description: [''],
|
description: [''],
|
||||||
comments: [''],
|
comments: [''],
|
||||||
|
|
|
@ -2,15 +2,19 @@ import { Injectable } from '@angular/core';
|
||||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
private apiUrl = `${this.baseUrl}/software-profiles`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/software-profiles`;
|
||||||
|
}
|
||||||
|
|
||||||
getSoftwareProfiles(filters: { [key: string]: string }): Observable<any[]> {
|
getSoftwareProfiles(filters: { [key: string]: string }): Observable<any[]> {
|
||||||
const params = new HttpParams({ fromObject: filters });
|
const params = new HttpParams({ fromObject: filters });
|
||||||
|
|
|
@ -9,6 +9,7 @@ import {DeleteModalComponent} from "../../shared/delete_modal/delete-modal/delet
|
||||||
import { PageEvent } from "@angular/material/paginator";
|
import { PageEvent } from "@angular/material/paginator";
|
||||||
import { CreateSoftwareProfileComponent } from "./create-software-profile/create-software-profile.component";
|
import { CreateSoftwareProfileComponent } from "./create-software-profile/create-software-profile.component";
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-software-profile',
|
selector: 'app-software-profile',
|
||||||
|
@ -16,7 +17,8 @@ import { JoyrideService } from 'ngx-joyride';
|
||||||
styleUrl: './software-profile.component.css'
|
styleUrl: './software-profile.component.css'
|
||||||
})
|
})
|
||||||
export class SoftwareProfileComponent {
|
export class SoftwareProfileComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
images: { downloadUrl: string; name: string; uuid: string }[] = [];
|
images: { downloadUrl: string; name: string; uuid: string }[] = [];
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
|
@ -52,15 +54,17 @@ export class SoftwareProfileComponent {
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/software-profiles`;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService
|
private joyrideService: JoyrideService,
|
||||||
) {}
|
private configService: ConfigService
|
||||||
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/software-profiles`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.search();
|
this.search();
|
||||||
|
|
|
@ -4,6 +4,7 @@ import {HttpClient} from "@angular/common/http";
|
||||||
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
||||||
import { ToastrService } from "ngx-toastr";
|
import { ToastrService } from "ngx-toastr";
|
||||||
import { DataService } from "../data.service";
|
import { DataService } from "../data.service";
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-create-software',
|
selector: 'app-create-software',
|
||||||
|
@ -11,9 +12,9 @@ import {DataService} from "../data.service";
|
||||||
styleUrl: './create-software.component.css'
|
styleUrl: './create-software.component.css'
|
||||||
})
|
})
|
||||||
export class CreateSoftwareComponent {
|
export class CreateSoftwareComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
formGroup: FormGroup<any>;
|
formGroup: FormGroup<any>;
|
||||||
private apiUrl = `${this.baseUrl}/software`;
|
private apiUrl: string;
|
||||||
softwareId: string | null = null;
|
softwareId: string | null = null;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -22,8 +23,11 @@ export class CreateSoftwareComponent {
|
||||||
public dialogRef: MatDialogRef<CreateSoftwareComponent>,
|
public dialogRef: MatDialogRef<CreateSoftwareComponent>,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
|
private configService: ConfigService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any
|
@Inject(MAT_DIALOG_DATA) public data: any
|
||||||
) {
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/software`;
|
||||||
this.formGroup = this.fb.group({
|
this.formGroup = this.fb.group({
|
||||||
name: ['', Validators.required],
|
name: ['', Validators.required],
|
||||||
description: [''],
|
description: [''],
|
||||||
|
|
|
@ -2,15 +2,19 @@ import { Injectable } from '@angular/core';
|
||||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
private apiUrl = `${this.baseUrl}/software`;
|
private apiUrl: string;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient, private configService: ConfigService) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/software`;
|
||||||
|
}
|
||||||
|
|
||||||
getSoftwareCollection(filters: { [key: string]: string }): Observable<any[]> {
|
getSoftwareCollection(filters: { [key: string]: string }): Observable<any[]> {
|
||||||
const params = new HttpParams({ fromObject: filters });
|
const params = new HttpParams({ fromObject: filters });
|
||||||
|
|
|
@ -9,6 +9,7 @@ import {DeleteModalComponent} from "../../shared/delete_modal/delete-modal/delet
|
||||||
import { PageEvent } from "@angular/material/paginator";
|
import { PageEvent } from "@angular/material/paginator";
|
||||||
import { CreateSoftwareComponent } from "./create-software/create-software.component";
|
import { CreateSoftwareComponent } from "./create-software/create-software.component";
|
||||||
import { JoyrideService } from 'ngx-joyride';
|
import { JoyrideService } from 'ngx-joyride';
|
||||||
|
import { ConfigService } from '@services/config.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-software',
|
selector: 'app-software',
|
||||||
|
@ -16,7 +17,8 @@ import { JoyrideService } from 'ngx-joyride';
|
||||||
styleUrl: './software.component.css'
|
styleUrl: './software.component.css'
|
||||||
})
|
})
|
||||||
export class SoftwareComponent {
|
export class SoftwareComponent {
|
||||||
baseUrl: string = import.meta.env.NG_APP_BASE_API_URL;
|
baseUrl: string;
|
||||||
|
private apiUrl: string;
|
||||||
images: { downloadUrl: string; name: string; uuid: string }[] = [];
|
images: { downloadUrl: string; name: string; uuid: string }[] = [];
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
length: number = 0;
|
length: number = 0;
|
||||||
|
@ -57,15 +59,17 @@ export class SoftwareComponent {
|
||||||
];
|
];
|
||||||
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
displayedColumns = [...this.columns.map(column => column.columnDef), 'actions'];
|
||||||
|
|
||||||
private apiUrl = `${this.baseUrl}/software`;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private dataService: DataService,
|
private dataService: DataService,
|
||||||
private toastService: ToastrService,
|
private toastService: ToastrService,
|
||||||
private joyrideService: JoyrideService
|
private joyrideService: JoyrideService,
|
||||||
) {}
|
private configService: ConfigService
|
||||||
|
) {
|
||||||
|
this.baseUrl = this.configService.apiUrl;
|
||||||
|
this.apiUrl = `${this.baseUrl}/software`;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.search();
|
this.search();
|
||||||
|
|
|
@ -25,4 +25,8 @@ export class ConfigService {
|
||||||
get apiUrl(): string {
|
get apiUrl(): string {
|
||||||
return this.config.apiUrl;
|
return this.config.apiUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get mercureUrl(): string {
|
||||||
|
return this.config.mercureUrl;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"apiUrl": "https://127.0.0.1:8443"
|
"apiUrl": "https://127.0.0.1:8443",
|
||||||
|
"mercureUrl": "http://localhost:3000/.well-known/mercure"
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,11 @@
|
||||||
"lib": [
|
"lib": [
|
||||||
"ES2022",
|
"ES2022",
|
||||||
"dom"
|
"dom"
|
||||||
]
|
],
|
||||||
|
"baseUrl": "./",
|
||||||
|
"paths": {
|
||||||
|
"@services/*": ["src/app/services/*"],
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"enableI18nLegacyMessageIdFormat": false,
|
"enableI18nLegacyMessageIdFormat": false,
|
||||||
|
|
Loading…
Reference in New Issue