Skip to content

Commit

Permalink
Updated frontend for k8s and fixed a backend bug to correctly color t…
Browse files Browse the repository at this point in the history
…he machines
  • Loading branch information
dlampel committed Feb 9, 2024
1 parent 363d0a4 commit ff6d544
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Docker Container Build

on:
push:
branches: [ "master", "mqtt-test"]
branches: [ "master", "mqtt-test" ]
pull_request:
branches: [ "master" ]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: .NET build and test

on:
push:
branches: [ "master", "mqtt-test"]
branches: [ "master", "mqtt-test" ]
pull_request:
branches: [ "master" ]

Expand Down
2 changes: 1 addition & 1 deletion Simulator/MPS/MPS_BS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private void Work()

//MyLogger.Info("We got a write and reset the wait!");
InEvent.Reset();
GotConnection= true;
GotConnection = true;
//HandleBasicTasks();
switch (MQTT ? MqttHelper.InNodes.ActionId : InNodes.ActionId.Value)
{
Expand Down
1 change: 1 addition & 0 deletions Simulator/MPS/Mps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ public void HandleBasicTasks()
BasicEvent.WaitOne();
//MyLogger.Info("We got a write and reset the wait!");
BasicEvent.Reset();
GotConnection = true;
var actionId = 0;
if (MQTT)
{
Expand Down
11 changes: 9 additions & 2 deletions frontend/src/app/services/zones.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ export class ZonesService {
private Client: HttpClient;
private robots : Zone[] | undefined;
private BaseUrl : string;
constructor(private http: HttpClient) {
constructor(http: HttpClient) {
this.Client = http;
this.BaseUrl = "http://localhost:8000/";

for (let i = 0; i < document.head.children.length; i++) {
if(document.head.children.item(i)?.tagName == "BASE") {
const baseHref = document.head.children.item(i)?.getAttribute("href");
if (baseHref != "/") {
this.BaseUrl = "api/";
}
}
}
}

getZones(): Observable<Zone[]> {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>HttpClient Example</title>
<title>Agent-Sim</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
Expand Down

0 comments on commit ff6d544

Please sign in to comment.