rename instance to config,

simplify resource-chart code
This commit is contained in:
2025-04-02 20:39:38 +00:00
parent add58d849e
commit bd0387976f
12 changed files with 14 additions and 18 deletions

View File

@@ -7,12 +7,12 @@ import (
"github.com/gin-gonic/gin"
)
func HandleGETInstance(c *gin.Context) {
func HandleGETConfig(c *gin.Context) {
_, _, _, err := common.GetAuth(c)
if err == nil {
c.HTML(http.StatusOK, "html/instance.html", gin.H{
c.HTML(http.StatusOK, "html/config.html", gin.H{
"global": common.Global,
"page": "instance",
"page": "config",
})
} else {
c.Redirect(http.StatusFound, "/login.html")

View File

@@ -115,7 +115,7 @@ func HandleGETInstancesFragment(c *gin.Context) {
common.HandleNonFatalError(c, err)
}
c.Header("Content-Type", "text/plain")
common.TMPL.ExecuteTemplate(c.Writer, "templates/instances.frag", gin.H{
common.TMPL.ExecuteTemplate(c.Writer, "html/instances.frag", gin.H{
"instances": instances,
})
c.Status(http.StatusOK)