Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External chain static resource localization.Fix the template applicat… #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
557 changes: 179 additions & 378 deletions pkg/sloop/webserver/bindata.go

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pkg/sloop/webserver/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func viewKeyHandler(tables typed.Tables) http.HandlerFunc {
}
data.Payload = template.HTML(string(prettyJson))

debugViewKeyTemplate, err := getTemplate(debugViewKeyTemplateFile, _webfilesDebugviewkeyHtml)
debugViewKeyTemplate, err := getTemplate(debugViewKeyTemplateFile, _webfiles_debugviewkey_html)
if err != nil {
logWebError(err, "failed to parse template", request, writer)
return
Expand Down Expand Up @@ -202,7 +202,7 @@ func listKeysHandler(tables typed.Tables) http.HandlerFunc {

writer.Header().Set("content-type", "text/html")

debugListKeysTemplate, err := getTemplate(debugListKeysTemplateFile, _webfilesDebuglistkeysHtml)
debugListKeysTemplate, err := getTemplate(debugListKeysTemplateFile, _webfiles_debuglistkeys_html)
if err != nil {
logWebError(err, "failed to parse template", request, writer)
return
Expand Down Expand Up @@ -343,7 +343,7 @@ func histogramHandler(tables typed.Tables) http.HandlerFunc {
}
writer.Header().Set("content-type", "text/html")

debugHistogramTemplate, err := getTemplate(debugHistogramFile, _webfilesDebughistogramHtml)
debugHistogramTemplate, err := getTemplate(debugHistogramFile, _webfiles_debughistogram_html)
if err != nil {
logWebError(err, "failed to parse histogram template", request, writer)
return
Expand All @@ -358,7 +358,7 @@ func histogramHandler(tables typed.Tables) http.HandlerFunc {

func configHandler(config string) http.HandlerFunc {
return func(writer http.ResponseWriter, request *http.Request) {
debugConfigTemplate, err := getTemplate(debugConfigTemplateFile, _webfilesDebugconfigHtml)
debugConfigTemplate, err := getTemplate(debugConfigTemplateFile, _webfiles_debugconfig_html)
if err != nil {
logWebError(err, "failed to parse template", request, writer)
return
Expand All @@ -373,7 +373,7 @@ func configHandler(config string) http.HandlerFunc {

func debugHandler() http.HandlerFunc {
return func(writer http.ResponseWriter, request *http.Request) {
debugTemplate, err := getTemplate(debugTemplateFile, _webfilesDebugHtml)
debugTemplate, err := getTemplate(debugTemplateFile, _webfiles_debug_html)
if err != nil {
logWebError(err, "failed to parse template", request, writer)
return
Expand All @@ -398,7 +398,7 @@ type badgerTableInfo struct {

func debugBadgerTablesHandler(db badgerwrap.DB) http.HandlerFunc {
return func(writer http.ResponseWriter, request *http.Request) {
debugBadgerTablesTemplate, err := getTemplate(debugBadgerTablesTemplateFile, _webfilesDebugtablesHtml)
debugBadgerTablesTemplate, err := getTemplate(debugBadgerTablesTemplateFile, _webfiles_debugtables_html)
if err != nil {
logWebError(err, "failed to parse template", request, writer)
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/sloop/webserver/indexhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type indexData struct {

func indexHandler(config WebConfig) http.HandlerFunc {
return func(writer http.ResponseWriter, request *http.Request) {
indexTemplate, err := getTemplate(indexTemplateFile, _webfilesIndexHtml)
indexTemplate, err := getTemplate(indexTemplateFile, _webfiles_index_html)
if err != nil {
logWebError(err, "Template.New failed", request, writer)
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/sloop/webserver/resourcehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func runTextTemplate(templateStr string, data interface{}) (string, error) {

func resourceHandler(resLinks []ResourceLinkTemplate, currentContext string) http.HandlerFunc {
return func(writer http.ResponseWriter, request *http.Request) {
resourceTemplate, err := getTemplate(resourceTemplateFile, _webfilesResourceHtml)
resourceTemplate, err := getTemplate(resourceTemplateFile, _webfiles_resource_html)
if err != nil {
logWebError(err, "Template.New failed", request, writer)
return
Expand Down
3 changes: 3 additions & 0 deletions pkg/sloop/webserver/webfiles/axios.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions pkg/sloop/webserver/webfiles/bootstrap.min.css

Large diffs are not rendered by default.

Loading