-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added log viewer, set JS versions through go generate
- Loading branch information
Showing
10 changed files
with
90 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/forceu/gokapi | ||
|
||
go 1.19 | ||
go 1.20 | ||
|
||
require ( | ||
git.mills.io/prologic/bitcask v1.0.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/sh | ||
#Called by go generate | ||
#Sets the version number in the template automatically | ||
#Sets the version numbers in the template automatically | ||
sed -i 's/{{define "version"}}.*{{end}}/{{define "version"}}'$1'{{end}}/g' ../../internal/webserver/web/templates/string_constants.tmpl | ||
echo "Set version in web template" | ||
echo "Updated version in web template" | ||
sed -i 's/{{define "js_admin_version"}}.*{{end}}/{{define "js_admin_version"}}'$2'{{end}}/g' ../../internal/webserver/web/templates/string_constants.tmpl | ||
sed -i 's/{{define "js_dropzone_version"}}.*{{end}}/{{define "js_dropzone_version"}}'$3'{{end}}/g' ../../internal/webserver/web/templates/string_constants.tmpl | ||
sed -i 's/{{define "js_e2eversion"}}.*{{end}}/{{define "js_e2eversion"}}'$4'{{end}}/g' ../../internal/webserver/web/templates/string_constants.tmpl | ||
echo "Updated JS version numbers" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{{ define "logs" }} | ||
{{ template "header" . }} | ||
<div class="row"> | ||
<div class="col"> | ||
<div id="container" class="card" style="width: 80%"> | ||
<div class="card-body"> | ||
<h3 class="card-title">Log File</h3> | ||
<br> | ||
|
||
<textarea class="form-control" id="logviewer" rows="20" readonly> | ||
{{ .Logs }}</textarea> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script> | ||
let textarea = document.getElementById('logviewer'); | ||
textarea.scrollTop = textarea.scrollHeight; | ||
|
||
window.setTimeout( function() { | ||
window.location.reload(); | ||
}, 30000); | ||
</script> | ||
{{ template "footer" }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
// Change these for rebranding | ||
{{define "app_name"}}Gokapi{{end}} | ||
{{define "version"}}1.6.1{{end}} | ||
|
||
// Specifies the version of JS files, so that the browser doesn't | ||
// use a cached version, if the file has been updated | ||
{{define "js_admin_version"}}13{{end}} | ||
{{define "js_dropzone_version"}}3{{end}} | ||
{{define "js_e2eversion"}}1{{end}} |