move instance card icon logic to template
This commit is contained in:
@@ -47,115 +47,3 @@ var MimeTypes = map[string]MimeType{
|
||||
Minifier: nil,
|
||||
},
|
||||
}
|
||||
|
||||
type Icon struct {
|
||||
ID string
|
||||
Src string
|
||||
Alt string
|
||||
Clickable bool
|
||||
}
|
||||
|
||||
var Icons = map[string]map[string]Icon{
|
||||
"running": {
|
||||
"status": {
|
||||
Src: "images/status/active.svg",
|
||||
Alt: "Instance is running",
|
||||
Clickable: false,
|
||||
},
|
||||
"power": {
|
||||
Src: "images/actions/instance/stop.svg",
|
||||
Alt: "Shutdown Instance",
|
||||
Clickable: true,
|
||||
},
|
||||
"config": {
|
||||
Src: "images/actions/instance/config-inactive.svg",
|
||||
Alt: "Change Configuration (Inactive)",
|
||||
Clickable: false,
|
||||
},
|
||||
"console": {
|
||||
Src: "images/actions/instance/console-active.svg",
|
||||
Alt: "Open Console",
|
||||
Clickable: true,
|
||||
},
|
||||
"delete": {
|
||||
Src: "images/actions/delete-inactive.svg",
|
||||
Alt: "Delete Instance (Inactive)",
|
||||
Clickable: false,
|
||||
},
|
||||
},
|
||||
"stopped": {
|
||||
"status": {
|
||||
Src: "images/status/inactive.svg",
|
||||
Alt: "Instance is stopped",
|
||||
Clickable: false,
|
||||
},
|
||||
"power": {
|
||||
Src: "images/actions/instance/start.svg",
|
||||
Alt: "Start Instance",
|
||||
Clickable: true,
|
||||
},
|
||||
"config": {
|
||||
Src: "images/actions/instance/config-active.svg",
|
||||
Alt: "Change Configuration",
|
||||
Clickable: true,
|
||||
},
|
||||
"console": {
|
||||
Src: "images/actions/instance/console-inactive.svg",
|
||||
Alt: "Open Console (Inactive)",
|
||||
Clickable: false,
|
||||
},
|
||||
"delete": {
|
||||
Src: "images/actions/delete-active.svg",
|
||||
Alt: "Delete Instance",
|
||||
Clickable: true,
|
||||
},
|
||||
},
|
||||
"loading": {
|
||||
"status": {
|
||||
Src: "images/status/loading.svg",
|
||||
Alt: "Instance is loading",
|
||||
Clickable: false,
|
||||
},
|
||||
"power": {
|
||||
Src: "images/status/loading.svg",
|
||||
Alt: "Loading Instance",
|
||||
Clickable: false,
|
||||
},
|
||||
"config": {
|
||||
Src: "images/actions/instance/config-inactive.svg",
|
||||
Alt: "Change Configuration (Inactive)",
|
||||
Clickable: false,
|
||||
},
|
||||
"console": {
|
||||
Src: "images/actions/instance/console-inactive.svg",
|
||||
Alt: "Open Console (Inactive)",
|
||||
Clickable: false,
|
||||
},
|
||||
"delete": {
|
||||
Src: "images/actions/delete-inactive.svg",
|
||||
Alt: "Delete Instance (Inactive)",
|
||||
Clickable: false,
|
||||
},
|
||||
},
|
||||
"online": {
|
||||
"status": {
|
||||
Src: "images/status/active.svg",
|
||||
Alt: "Node is online",
|
||||
Clickable: false,
|
||||
},
|
||||
},
|
||||
"offline": {
|
||||
"status": {
|
||||
Src: "images/status/inactive.svg",
|
||||
Alt: "Node is offline",
|
||||
Clickable: false,
|
||||
},
|
||||
},
|
||||
"unknown": {
|
||||
"status": {
|
||||
Src: "images/status/inactive.svg",
|
||||
Alt: "Node is offline",
|
||||
Clickable: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@@ -38,3 +38,10 @@ type Auth struct {
|
||||
Token string
|
||||
CSRF string
|
||||
}
|
||||
|
||||
type Icon struct {
|
||||
ID string
|
||||
Src string
|
||||
Alt string
|
||||
Clickable bool
|
||||
}
|
||||
|
Reference in New Issue
Block a user