From 8971ae6091d9e7d7b306b0747b1a097b04f009ef Mon Sep 17 00:00:00 2001 From: Thomas HERVE Date: Tue, 2 Apr 2024 09:38:21 +0200 Subject: [PATCH 1/2] Fix core --- core/app/handlers/core.py | 2 +- .../src/app/main-game/main-game.component.css | 0 .../app/main-game/main-game.component.html | 1 + .../app/main-game/main-game.component.spec.ts | 23 +++++++++++++++++++ .../src/app/main-game/main-game.component.ts | 15 ++++++++++++ 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 frontend/src/app/main-game/main-game.component.css create mode 100644 frontend/src/app/main-game/main-game.component.html create mode 100644 frontend/src/app/main-game/main-game.component.spec.ts create mode 100644 frontend/src/app/main-game/main-game.component.ts diff --git a/core/app/handlers/core.py b/core/app/handlers/core.py index 918540d..b0b0cae 100644 --- a/core/app/handlers/core.py +++ b/core/app/handlers/core.py @@ -61,7 +61,7 @@ def delete_room(body): pods_list = v1.list_namespaced_pod(namespace=namespace) pods = [item.metadata.name for item in pods_list.items] - if not f"instance-{body["instance"]}" in pods: + if not f"instance-{body['instance']}" in pods: return "Instance " + body["instance"] + " does not exist" v1.delete_namespaced_pod(namespace=namespace, name='instance-'+body["instance"]) diff --git a/frontend/src/app/main-game/main-game.component.css b/frontend/src/app/main-game/main-game.component.css new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/app/main-game/main-game.component.html b/frontend/src/app/main-game/main-game.component.html new file mode 100644 index 0000000..c0f9900 --- /dev/null +++ b/frontend/src/app/main-game/main-game.component.html @@ -0,0 +1 @@ +

main-game works!

diff --git a/frontend/src/app/main-game/main-game.component.spec.ts b/frontend/src/app/main-game/main-game.component.spec.ts new file mode 100644 index 0000000..e01cb73 --- /dev/null +++ b/frontend/src/app/main-game/main-game.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MainGameComponent } from './main-game.component'; + +describe('MainGameComponent', () => { + let component: MainGameComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ MainGameComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(MainGameComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/frontend/src/app/main-game/main-game.component.ts b/frontend/src/app/main-game/main-game.component.ts new file mode 100644 index 0000000..d05d8cc --- /dev/null +++ b/frontend/src/app/main-game/main-game.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-main-game', + templateUrl: './main-game.component.html', + styleUrls: ['./main-game.component.css'] +}) +export class MainGameComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} From 43b78ef9225aa10b0a520c8c276dccba059fa90e Mon Sep 17 00:00:00 2001 From: Thomas HERVE Date: Tue, 2 Apr 2024 09:40:52 +0200 Subject: [PATCH 2/2] Fix core --- core/app/handlers/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/app/handlers/core.py b/core/app/handlers/core.py index b0b0cae..ceedc4d 100644 --- a/core/app/handlers/core.py +++ b/core/app/handlers/core.py @@ -71,7 +71,7 @@ def delete_room(body): networking = client.NetworkingV1Api() current_ingress = networking.read_namespaced_ingress(name=ingress, namespace=namespace) current_ingress_paths = current_ingress.spec.rules[0].http.paths - current_ingress_paths = list(filter(lambda x: x.backend.service.name != f"instance-{body["instance"]}", current_ingress_paths)) + current_ingress_paths = list(filter(lambda x: x.backend.service.name != f"instance-{body['instance']}", current_ingress_paths)) current_ingress.spec.rules[0].http.paths = current_ingress_paths networking.patch_namespaced_ingress(ingress, namespace, current_ingress)