diff --git a/.gitignore b/.gitignore index 68ae417..594473d 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,8 @@ go.work.sum # ignore local info data/ + + +web/components.json +web/navigation.json +web/pages.json diff --git a/web/components.json b/web/components.json deleted file mode 100644 index 8377a10..0000000 --- a/web/components.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - "components/login-gate/login-gate.js", - "components/api-client/api-client.js", - "components/side-nav/side-nav.js", - "components/logout-button/logout-button.js", - "components/side-panel/side-panel.js", - "components/date-display/date-display.js", - "components/form-vm/form-vm.js" -] diff --git a/web/components/api-client/api-client.js b/web/components/api-client/api-client.js index 1d4c104..4973e1e 100644 --- a/web/components/api-client/api-client.js +++ b/web/components/api-client/api-client.js @@ -12,7 +12,6 @@ // await api.agent.delete('/vpcs/vp-admin') // await api.agent.waitFor('/vms/i-test1', 'started') // -// Credentials come from .ready — no direct config.json dependency. // Phase 2: swap login-gate for oidc-gate → this component unchanged. export class ApiError extends Error { diff --git a/web/components/date-display/date-display.js b/web/components/date-display/date-display.js index c008c93..38f5598 100644 --- a/web/components/date-display/date-display.js +++ b/web/components/date-display/date-display.js @@ -1,5 +1,3 @@ -import { config } from '../../core/config.js' - const CSS = new URL('./date-display.css', import.meta.url).href class DateDisplay extends HTMLElement { @@ -14,7 +12,6 @@ class DateDisplay extends HTMLElement {
agent →
` - this.shadowRoot.getElementById('agent-url').textContent = config.agent_url this.#tick() this.#interval = setInterval(() => this.#tick(), 1000) } diff --git a/web/components/login-gate/login-gate.js b/web/components/login-gate/login-gate.js index 1de65de..929539b 100644 --- a/web/components/login-gate/login-gate.js +++ b/web/components/login-gate/login-gate.js @@ -44,7 +44,6 @@ class LoginGate extends HTMLElement { return } - // Load config.json defaults to pre-fill the form let defaults = {} try { const r = await fetch('./config.json') diff --git a/web/core/config.js b/web/core/config.js index 21618e4..51f9b56 100644 --- a/web/core/config.js +++ b/web/core/config.js @@ -1,5 +1,3 @@ -// Single source of truth for configuration. -// Phase 2: replace the fetch with a call to the orchestrator. const response = await fetch('./config.json') if (!response.ok) throw new Error('Failed to load config.json') diff --git a/web/navigation.json b/web/navigation.json deleted file mode 100644 index 773cf36..0000000 --- a/web/navigation.json +++ /dev/null @@ -1,29 +0,0 @@ -[ - { - "label": "Dashboard", - "href": "#/dashboard", - "icon": "dashboard" - }, - { - "type": "section", - "label": "Réseau" - }, - { - "label": "VPCs", - "href": "#/vpcs", - "icon": "vpc" - }, - { - "label": "Subnets", - "href": "#/subnets", - "icon": "subnet" - }, - { - "type": "separator" - }, - { - "label": "VMs", - "href": "#/vms", - "icon": "vm" - } -] diff --git a/web/pages.json b/web/pages.json deleted file mode 100644 index e018e51..0000000 --- a/web/pages.json +++ /dev/null @@ -1,34 +0,0 @@ -[ - { - "route": "dashboard", - "label": "Dashboard", - "icon": "dashboard", - "html": "pages/dashboard/index.html", - "css": "pages/dashboard/dashboard.css", - "js": "pages/dashboard/dashboard.js" - }, - { - "route": "vpcs", - "label": "VPCs", - "icon": "vpc", - "html": "pages/vpcs/index.html", - "css": null, - "js": null - }, - { - "route": "subnets", - "label": "Subnets", - "icon": "subnet", - "html": "pages/subnets/index.html", - "css": null, - "js": null - }, - { - "route": "vms", - "label": "VMs", - "icon": "vm", - "html": "pages/vms/index.html", - "css": null, - "js": null - } -] diff --git a/web/vpc.html b/web/vpc.html deleted file mode 100644 index 0961b64..0000000 --- a/web/vpc.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - two — dashboard - - - - - - - - -
-

two

- network orchestrator -
- -
- -
- - -
-
- - - -
- - -
-
-
- - - - -