Dr-Swopt пре 1 дан
родитељ
комит
ab2063a571

+ 2 - 1
src/app/components/history/history.component.ts

@@ -3,6 +3,7 @@ import { CommonModule } from '@angular/common';
 import { LocalHistoryService } from '../../services/local-history.service';
 import { RemoteInferenceService } from '../../core/services/remote-inference.service';
 import { SurveillanceService } from '../../services/surveillance.service';
+import { environment } from '../../../environments/environment';
 
 const GRADE_COLORS: Record<string, string> = {
   'Empty_Bunch': '#6C757D', 'Underripe': '#F9A825', 'Abnormal': '#DC3545',
@@ -60,7 +61,7 @@ export class HistoryComponent implements OnInit {
           timestamp: new Date(record.created_at).toLocaleString(),
           engine: 'API AI',
           isNormalized: false,
-          imageData: `http://localhost:3000/palm-oil/archive/${record.archive_id}`
+          imageData: `${environment.apiUrl}/palm-oil/archive/${record.archive_id}`
         }));
         this.batchGroups = this.groupByBatch(this.remoteHistoryRecords);
         this.loading = false;

+ 2 - 1
src/app/services/api.service.ts

@@ -1,12 +1,13 @@
 import { Injectable } from '@angular/core';
 import { HttpClient } from '@angular/common/http';
 import { Observable } from 'rxjs';
+import { environment } from '../../environments/environment';
 
 @Injectable({
   providedIn: 'root'
 })
 export class ApiService {
-  private apiUrl = 'http://localhost:3000';
+  private apiUrl = environment.apiUrl;
 
   constructor(private http: HttpClient) { }
 

+ 2 - 2
src/environments/environment.ts

@@ -1,6 +1,6 @@
 export const environment = {
   production: false,
-  apiUrl: 'http://localhost:3000',
-  nestWsUrl: 'http://localhost:3000',   // Socket.io host (monitor + vision + embedding)
+  apiUrl: 'http://192.168.100.100:3000',
+  nestWsUrl: 'http://192.168.100.100:3000',   // Socket.io host (monitor + vision + embedding)
   n8nWebhookUrl: 'http://localhost:5678/webhook/rag-query', // n8n RAG entry webhook
 };