From 51d434d46bb3998f1edd81596bd3d74dc062652d Mon Sep 17 00:00:00 2001 From: Javier Palomo Date: Mon, 28 Feb 2022 16:43:39 +0100 Subject: [PATCH] fix(web-templates): use CleanedBasePath for static content (#2079) * fix(web-templates): use CleanedBasePath for static content When setting '--atlantis-url' this static content 404s. For example, we can see this when comparig: - /lock --> works seamless with a custom `--atlantis-url` - /jobs --> doesn't work when using a custom `--atlantis-url` * fix(web-templates): regenerate bindata_assetfs --- server/controllers/templates/web_templates.go | 52 +++++++++---------- server/static/bindata_assetfs.go | 20 +++---- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/server/controllers/templates/web_templates.go b/server/controllers/templates/web_templates.go index defe8f29d..9a954dae9 100644 --- a/server/controllers/templates/web_templates.go +++ b/server/controllers/templates/web_templates.go @@ -367,11 +367,11 @@ var ProjectJobsTemplate = template.Must(template.New("blank.html.tmpl").Parse(` atlantis - - - - - + + + + + - - + +
- +

atlantis

diff --git a/server/static/bindata_assetfs.go b/server/static/bindata_assetfs.go index 1bf61639d..ef90aaf14 100644 --- a/server/static/bindata_assetfs.go +++ b/server/static/bindata_assetfs.go @@ -102,7 +102,7 @@ func staticCssCustomCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "static/css/custom.css", size: 6946, mode: os.FileMode(420), modTime: time.Unix(1641777138, 0)} + info := bindataFileInfo{name: "static/css/custom.css", size: 6946, mode: os.FileMode(420), modTime: time.Unix(1635422826, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -122,7 +122,7 @@ func staticCssNormalizeCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "static/css/normalize.css", size: 7797, mode: os.FileMode(420), modTime: time.Unix(1641777138, 0)} + info := bindataFileInfo{name: "static/css/normalize.css", size: 7797, mode: os.FileMode(420), modTime: time.Unix(1635422826, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -142,7 +142,7 @@ func staticCssSkeletonCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "static/css/skeleton.css", size: 11452, mode: os.FileMode(420), modTime: time.Unix(1641777138, 0)} + info := bindataFileInfo{name: "static/css/skeleton.css", size: 11452, mode: os.FileMode(420), modTime: time.Unix(1635422826, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -162,7 +162,7 @@ func staticCssXtermCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "static/css/xterm.css", size: 4077, mode: os.FileMode(420), modTime: time.Unix(1588609078, 0)} + info := bindataFileInfo{name: "static/css/xterm.css", size: 4077, mode: os.FileMode(420), modTime: time.Unix(1643624040, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -182,7 +182,7 @@ func staticImagesAtlantisIconPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "static/images/atlantis-icon.png", size: 4238, mode: os.FileMode(420), modTime: time.Unix(1641777138, 0)} + info := bindataFileInfo{name: "static/images/atlantis-icon.png", size: 4238, mode: os.FileMode(420), modTime: time.Unix(1635422826, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -202,7 +202,7 @@ func staticImagesAtlantisIcon_512Png() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "static/images/atlantis-icon_512.png", size: 49782, mode: os.FileMode(420), modTime: time.Unix(1641777138, 0)} + info := bindataFileInfo{name: "static/images/atlantis-icon_512.png", size: 49782, mode: os.FileMode(420), modTime: time.Unix(1635422826, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -222,7 +222,7 @@ func staticJsJquery351MinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "static/js/jquery-3.5.1.min.js", size: 89476, mode: os.FileMode(420), modTime: time.Unix(1641777138, 0)} + info := bindataFileInfo{name: "static/js/jquery-3.5.1.min.js", size: 89476, mode: os.FileMode(420), modTime: time.Unix(1635422826, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -242,7 +242,7 @@ func staticJsXterm490Js() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "static/js/xterm-4.9.0.js", size: 299239, mode: os.FileMode(420), modTime: time.Unix(1641787410, 0)} + info := bindataFileInfo{name: "static/js/xterm-4.9.0.js", size: 299239, mode: os.FileMode(420), modTime: time.Unix(1643624040, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -262,7 +262,7 @@ func staticJsXtermAddonAttach060Js() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "static/js/xterm-addon-attach-0.6.0.js", size: 3651, mode: os.FileMode(420), modTime: time.Unix(1641787403, 0)} + info := bindataFileInfo{name: "static/js/xterm-addon-attach-0.6.0.js", size: 3651, mode: os.FileMode(420), modTime: time.Unix(1643624040, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -282,7 +282,7 @@ func staticJsXtermAddonFit040Js() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "static/js/xterm-addon-fit-0.4.0.js", size: 3621, mode: os.FileMode(420), modTime: time.Unix(1641787399, 0)} + info := bindataFileInfo{name: "static/js/xterm-addon-fit-0.4.0.js", size: 3621, mode: os.FileMode(420), modTime: time.Unix(1643624040, 0)} a := &asset{bytes: bytes, info: info} return a, nil }