This commit is contained in:
31
main.go
31
main.go
@@ -184,24 +184,7 @@ func getScsiBusSharingVMs(client *govmomi.Client) error {
|
||||
|
||||
func generateBusSharingTable() string {
|
||||
// Define the HTML template
|
||||
htmlTemplate := `
|
||||
<table><tbody>
|
||||
<tr>
|
||||
<th>Vm Name</th>
|
||||
<th>Cluster Name</th>
|
||||
<th>Controller Name</th>
|
||||
<th>Sharing Type</th>
|
||||
</tr>
|
||||
{{range .}}
|
||||
<tr>
|
||||
<td>{{.VmName}}</td>
|
||||
<td>{{.ClusterName}}</td>
|
||||
<td>{{.ControllerName}}</td>
|
||||
<td>{{.SharingType}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody></table>
|
||||
`
|
||||
htmlTemplate := `<table><tbody><tr><th>Vm Name</th><th>Cluster Name</th><th>Controller Name</th><th>Sharing Type</th></tr>{{range .}}<tr><td>{{.VmName}}</td><td>{{.ClusterName}}</td><td>{{.ControllerName}}</td><td>{{.SharingType}}</td></tr>{{end}}</tbody></table>`
|
||||
|
||||
// Create a new template and parse the HTML template
|
||||
tmpl := template.Must(template.New("table").Parse(htmlTemplate))
|
||||
@@ -368,20 +351,20 @@ func main() {
|
||||
fmt.Printf("New Content: %v\n", newContent)
|
||||
|
||||
data := &goconfluence.Content{
|
||||
ID: c.ID,
|
||||
Type: c.Type,
|
||||
Title: c.Title,
|
||||
ID: *cPageId,
|
||||
Type: "page",
|
||||
Title: "VMs with SCSI Bus Sharing",
|
||||
Body: goconfluence.Body{
|
||||
Storage: goconfluence.Storage{
|
||||
Value: newContent,
|
||||
Representation: c.Body.Storage.Representation,
|
||||
Representation: "storage",
|
||||
},
|
||||
},
|
||||
Version: &goconfluence.Version{
|
||||
Number: 3,
|
||||
Number: 6,
|
||||
},
|
||||
Space: &goconfluence.Space{
|
||||
Key: c.Space.Key,
|
||||
Key: *cSpaceKey,
|
||||
},
|
||||
}
|
||||
//c.Body.Storage.Value = newContent
|
||||
|
Reference in New Issue
Block a user