Compare commits
2 Commits
3ceba1a117
...
0f0bdf19c3
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f0bdf19c3 | |||
| 6d1bb09167 |
@@ -38,7 +38,7 @@ func Header() templ.Component {
|
||||
var templ_7745c5c3_Var2 templ.SafeURL
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs("/assets/css/output@" + version.Value + ".css")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `core/header.templ`, Line: 12, Col: 61}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/core/header.templ`, Line: 12, Col: 61}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
||||
@@ -27,6 +27,7 @@ templ Index(info BuildInfo) {
|
||||
<a class="web2-button" href="/snapshots/hourly">Hourly Snapshots</a>
|
||||
<a class="web2-button" href="/snapshots/daily">Daily Snapshots</a>
|
||||
<a class="web2-button" href="/snapshots/monthly">Monthly Snapshots</a>
|
||||
<a class="web2-button" href="/swagger/">Swagger UI</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -47,14 +47,14 @@ func Index(info BuildInfo) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<body class=\"flex flex-col min-h-screen web2-bg\"><main class=\"flex-grow web2-shell space-y-8\"><section class=\"web2-header\"><div class=\"flex flex-col gap-4 md:flex-row md:items-center md:justify-between\"><div><div class=\"web2-pill\">vCTP Console</div><h1 class=\"mt-3 text-4xl font-bold\">Build Intelligence Dashboard</h1><p class=\"mt-2 text-sm opacity-90\">A glossy, snapshot-ready view of what is running.</p></div><div class=\"flex flex-wrap gap-3\"><a class=\"web2-button\" href=\"/snapshots/hourly\">Hourly Snapshots</a> <a class=\"web2-button\" href=\"/snapshots/daily\">Daily Snapshots</a> <a class=\"web2-button\" href=\"/snapshots/monthly\">Monthly Snapshots</a></div></div></section><section class=\"grid gap-6 md:grid-cols-3\"><div class=\"web2-card\"><p class=\"text-xs uppercase tracking-[0.2em] text-slate-400\">Build Time</p><p class=\"mt-3 text-xl font-semibold\">")
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<body class=\"flex flex-col min-h-screen web2-bg\"><main class=\"flex-grow web2-shell space-y-8\"><section class=\"web2-header\"><div class=\"flex flex-col gap-4 md:flex-row md:items-center md:justify-between\"><div><div class=\"web2-pill\">vCTP Console</div><h1 class=\"mt-3 text-4xl font-bold\">Build Intelligence Dashboard</h1><p class=\"mt-2 text-sm opacity-90\">A glossy, snapshot-ready view of what is running.</p></div><div class=\"flex flex-wrap gap-3\"><a class=\"web2-button\" href=\"/snapshots/hourly\">Hourly Snapshots</a> <a class=\"web2-button\" href=\"/snapshots/daily\">Daily Snapshots</a> <a class=\"web2-button\" href=\"/snapshots/monthly\">Monthly Snapshots</a> <a class=\"web2-button\" href=\"/swagger/\">Swagger UI</a></div></div></section><section class=\"grid gap-6 md:grid-cols-3\"><div class=\"web2-card\"><p class=\"text-xs uppercase tracking-[0.2em] text-slate-400\">Build Time</p><p class=\"mt-3 text-xl font-semibold\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(info.BuildTime)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/index.templ`, Line: 37, Col: 59}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/views/index.templ`, Line: 38, Col: 59}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -67,7 +67,7 @@ func Index(info BuildInfo) templ.Component {
|
||||
var templ_7745c5c3_Var3 string
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(info.SHA1Ver)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/index.templ`, Line: 41, Col: 57}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/views/index.templ`, Line: 42, Col: 57}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -80,7 +80,7 @@ func Index(info BuildInfo) templ.Component {
|
||||
var templ_7745c5c3_Var4 string
|
||||
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(info.GoVersion)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/index.templ`, Line: 45, Col: 59}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/views/index.templ`, Line: 46, Col: 59}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
||||
@@ -140,7 +140,7 @@ func SnapshotListPage(title string, subtitle string, entries []SnapshotEntry) te
|
||||
var templ_7745c5c3_Var5 string
|
||||
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/snapshots.templ`, Line: 34, Col: 49}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/views/snapshots.templ`, Line: 34, Col: 49}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -153,7 +153,7 @@ func SnapshotListPage(title string, subtitle string, entries []SnapshotEntry) te
|
||||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(subtitle)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/snapshots.templ`, Line: 35, Col: 51}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/views/snapshots.templ`, Line: 35, Col: 51}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -166,7 +166,7 @@ func SnapshotListPage(title string, subtitle string, entries []SnapshotEntry) te
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(len(entries))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/snapshots.templ`, Line: 44, Col: 83}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/views/snapshots.templ`, Line: 44, Col: 83}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -184,7 +184,7 @@ func SnapshotListPage(title string, subtitle string, entries []SnapshotEntry) te
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(entry.Label)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/snapshots.templ`, Line: 49, Col: 71}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/views/snapshots.templ`, Line: 49, Col: 71}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -197,7 +197,7 @@ func SnapshotListPage(title string, subtitle string, entries []SnapshotEntry) te
|
||||
var templ_7745c5c3_Var9 templ.SafeURL
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinURLErrs(entry.Link)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views/snapshots.templ`, Line: 50, Col: 45}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/views/snapshots.templ`, Line: 50, Col: 45}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
||||
@@ -4,6 +4,8 @@ import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type JSONRawMessage json.RawMessage
|
||||
|
||||
type CloudEventReceived struct {
|
||||
CloudEvent struct {
|
||||
ID string `json:"id"`
|
||||
@@ -53,7 +55,7 @@ type CloudEventReceived struct {
|
||||
Value string `json:"Value"`
|
||||
} `json:"Vm"`
|
||||
} `json:"Vm"`
|
||||
ConfigSpec *json.RawMessage `json:"configSpec"`
|
||||
ConfigSpec *JSONRawMessage `json:"configSpec" swaggertype:"object"`
|
||||
ConfigChanges *ConfigChangesReceived `json:"configChanges"` // Modified to separate struct
|
||||
} `json:"data"`
|
||||
} `json:"cloudEvent"`
|
||||
|
||||
@@ -665,7 +665,156 @@ const docTemplate = `{
|
||||
},
|
||||
"definitions": {
|
||||
"models.CloudEventReceived": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cloudEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ChainId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"ChangeTag": {
|
||||
"type": "string"
|
||||
},
|
||||
"ComputeResource": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ComputeResource": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
"Value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CreatedTime": {
|
||||
"description": "Modified from time.Time",
|
||||
"type": "string"
|
||||
},
|
||||
"Datacenter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Datacenter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
"Value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Ds": {},
|
||||
"Dvs": {},
|
||||
"FullFormattedMessage": {
|
||||
"type": "string"
|
||||
},
|
||||
"Host": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Host": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
"Value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Key": {
|
||||
"type": "integer"
|
||||
},
|
||||
"Net": {},
|
||||
"NewParent": {
|
||||
"$ref": "#/definitions/models.CloudEventResourcePool"
|
||||
},
|
||||
"OldParent": {
|
||||
"$ref": "#/definitions/models.CloudEventResourcePool"
|
||||
},
|
||||
"SrcTemplate": {
|
||||
"$ref": "#/definitions/models.CloudEventVm"
|
||||
},
|
||||
"Template": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"UserName": {
|
||||
"type": "string"
|
||||
},
|
||||
"Vm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Name": {
|
||||
"type": "string"
|
||||
},
|
||||
"Vm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
"Value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"configChanges": {
|
||||
"description": "Modified to separate struct",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.ConfigChangesReceived"
|
||||
}
|
||||
]
|
||||
},
|
||||
"configSpec": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"specversion": {
|
||||
"type": "string"
|
||||
},
|
||||
"time": {
|
||||
"description": "Modified from time.Time",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.CloudEventResourcePool": {
|
||||
"type": "object",
|
||||
@@ -705,6 +854,14 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ConfigChangesReceived": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"modified": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ImportReceived": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -654,7 +654,156 @@
|
||||
},
|
||||
"definitions": {
|
||||
"models.CloudEventReceived": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cloudEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ChainId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"ChangeTag": {
|
||||
"type": "string"
|
||||
},
|
||||
"ComputeResource": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ComputeResource": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
"Value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CreatedTime": {
|
||||
"description": "Modified from time.Time",
|
||||
"type": "string"
|
||||
},
|
||||
"Datacenter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Datacenter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
"Value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Ds": {},
|
||||
"Dvs": {},
|
||||
"FullFormattedMessage": {
|
||||
"type": "string"
|
||||
},
|
||||
"Host": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Host": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
"Value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Key": {
|
||||
"type": "integer"
|
||||
},
|
||||
"Net": {},
|
||||
"NewParent": {
|
||||
"$ref": "#/definitions/models.CloudEventResourcePool"
|
||||
},
|
||||
"OldParent": {
|
||||
"$ref": "#/definitions/models.CloudEventResourcePool"
|
||||
},
|
||||
"SrcTemplate": {
|
||||
"$ref": "#/definitions/models.CloudEventVm"
|
||||
},
|
||||
"Template": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"UserName": {
|
||||
"type": "string"
|
||||
},
|
||||
"Vm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Name": {
|
||||
"type": "string"
|
||||
},
|
||||
"Vm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
"Value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"configChanges": {
|
||||
"description": "Modified to separate struct",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.ConfigChangesReceived"
|
||||
}
|
||||
]
|
||||
},
|
||||
"configSpec": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"specversion": {
|
||||
"type": "string"
|
||||
},
|
||||
"time": {
|
||||
"description": "Modified from time.Time",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.CloudEventResourcePool": {
|
||||
"type": "object",
|
||||
@@ -694,6 +843,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ConfigChangesReceived": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"modified": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ImportReceived": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -1,5 +1,101 @@
|
||||
definitions:
|
||||
models.CloudEventReceived:
|
||||
properties:
|
||||
cloudEvent:
|
||||
properties:
|
||||
data:
|
||||
properties:
|
||||
ChainId:
|
||||
type: integer
|
||||
ChangeTag:
|
||||
type: string
|
||||
ComputeResource:
|
||||
properties:
|
||||
ComputeResource:
|
||||
properties:
|
||||
Type:
|
||||
type: string
|
||||
Value:
|
||||
type: string
|
||||
type: object
|
||||
Name:
|
||||
type: string
|
||||
type: object
|
||||
CreatedTime:
|
||||
description: Modified from time.Time
|
||||
type: string
|
||||
Datacenter:
|
||||
properties:
|
||||
Datacenter:
|
||||
properties:
|
||||
Type:
|
||||
type: string
|
||||
Value:
|
||||
type: string
|
||||
type: object
|
||||
Name:
|
||||
type: string
|
||||
type: object
|
||||
Ds: {}
|
||||
Dvs: {}
|
||||
FullFormattedMessage:
|
||||
type: string
|
||||
Host:
|
||||
properties:
|
||||
Host:
|
||||
properties:
|
||||
Type:
|
||||
type: string
|
||||
Value:
|
||||
type: string
|
||||
type: object
|
||||
Name:
|
||||
type: string
|
||||
type: object
|
||||
Key:
|
||||
type: integer
|
||||
Net: {}
|
||||
NewParent:
|
||||
$ref: '#/definitions/models.CloudEventResourcePool'
|
||||
OldParent:
|
||||
$ref: '#/definitions/models.CloudEventResourcePool'
|
||||
SrcTemplate:
|
||||
$ref: '#/definitions/models.CloudEventVm'
|
||||
Template:
|
||||
type: boolean
|
||||
UserName:
|
||||
type: string
|
||||
Vm:
|
||||
properties:
|
||||
Name:
|
||||
type: string
|
||||
Vm:
|
||||
properties:
|
||||
Type:
|
||||
type: string
|
||||
Value:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
configChanges:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.ConfigChangesReceived'
|
||||
description: Modified to separate struct
|
||||
configSpec:
|
||||
type: object
|
||||
type: object
|
||||
id:
|
||||
type: string
|
||||
source:
|
||||
type: string
|
||||
specversion:
|
||||
type: string
|
||||
time:
|
||||
description: Modified from time.Time
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
models.CloudEventResourcePool:
|
||||
properties:
|
||||
@@ -25,6 +121,11 @@ definitions:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
models.ConfigChangesReceived:
|
||||
properties:
|
||||
modified:
|
||||
type: string
|
||||
type: object
|
||||
models.ImportReceived:
|
||||
properties:
|
||||
Cluster:
|
||||
|
||||
Reference in New Issue
Block a user