From b906a5be6aeca6739cb25d964741442d52c761f8 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Mon, 18 Nov 2024 14:38:42 +0000 Subject: [PATCH] move fed files --- .github/workflows/ci.yml | 16 +- src/supervisord/go.mod | 2 +- src/supervisord/version.go | 2 +- src/webgui/conf.html | 18 +- src/webgui/index.htm | 354 ++++++++++ src/webgui/index.html | 607 +++++++++--------- src/webgui/index.html.modify | 351 ---------- src/webgui/log.html | 12 +- src/webgui/login.html | 8 +- src/webgui/{js => static}/axios.min.js | 0 .../{css => static}/bootstrap-dialog.min.css | 0 .../{js => static}/bootstrap-dialog.min.js | 0 src/webgui/{css => static}/bootstrap-grid.css | 0 .../{css => static}/bootstrap-grid.css.map | 0 .../{css => static}/bootstrap-grid.min.css | 0 .../bootstrap-grid.min.css.map | 0 .../{css => static}/bootstrap-reboot.css | 0 .../{css => static}/bootstrap-reboot.css.map | 0 .../{css => static}/bootstrap-reboot.min.css | 0 .../bootstrap-reboot.min.css.map | 0 src/webgui/{ => static}/bootstrap-solid.svg | 0 .../{css => static}/bootstrap-table.css | 0 .../{js => static}/bootstrap-table.min.js | 0 src/webgui/{js => static}/bootstrap.bundle.js | 0 .../{js => static}/bootstrap.bundle.js.map | 0 .../{js => static}/bootstrap.bundle.min.js | 0 .../bootstrap.bundle.min.js.map | 0 src/webgui/{css => static}/bootstrap.css | 0 src/webgui/{css => static}/bootstrap.css.map | 0 src/webgui/{js => static}/bootstrap.js | 0 src/webgui/{js => static}/bootstrap.js.map | 0 src/webgui/{css => static}/bootstrap.min.css | 0 .../{css => static}/bootstrap.min.css.map | 0 src/webgui/{js => static}/bootstrap.min.js | 0 .../{js => static}/bootstrap.min.js.map | 0 src/webgui/{js => static}/common.js | 0 src/webgui/{js => static}/jquery-3.3.1.min.js | 0 src/webgui/{js => static}/popper.min.js | 0 src/webgui/{js => static}/popper.min.js.map | 0 src/webgui/{css => static}/signin.css | 0 40 files changed, 687 insertions(+), 683 deletions(-) create mode 100644 src/webgui/index.htm delete mode 100644 src/webgui/index.html.modify rename src/webgui/{js => static}/axios.min.js (100%) rename src/webgui/{css => static}/bootstrap-dialog.min.css (100%) rename src/webgui/{js => static}/bootstrap-dialog.min.js (100%) rename src/webgui/{css => static}/bootstrap-grid.css (100%) rename src/webgui/{css => static}/bootstrap-grid.css.map (100%) rename src/webgui/{css => static}/bootstrap-grid.min.css (100%) rename src/webgui/{css => static}/bootstrap-grid.min.css.map (100%) rename src/webgui/{css => static}/bootstrap-reboot.css (100%) rename src/webgui/{css => static}/bootstrap-reboot.css.map (100%) rename src/webgui/{css => static}/bootstrap-reboot.min.css (100%) rename src/webgui/{css => static}/bootstrap-reboot.min.css.map (100%) rename src/webgui/{ => static}/bootstrap-solid.svg (100%) rename src/webgui/{css => static}/bootstrap-table.css (100%) rename src/webgui/{js => static}/bootstrap-table.min.js (100%) rename src/webgui/{js => static}/bootstrap.bundle.js (100%) rename src/webgui/{js => static}/bootstrap.bundle.js.map (100%) rename src/webgui/{js => static}/bootstrap.bundle.min.js (100%) rename src/webgui/{js => static}/bootstrap.bundle.min.js.map (100%) rename src/webgui/{css => static}/bootstrap.css (100%) rename src/webgui/{css => static}/bootstrap.css.map (100%) rename src/webgui/{js => static}/bootstrap.js (100%) rename src/webgui/{js => static}/bootstrap.js.map (100%) rename src/webgui/{css => static}/bootstrap.min.css (100%) rename src/webgui/{css => static}/bootstrap.min.css.map (100%) rename src/webgui/{js => static}/bootstrap.min.js (100%) rename src/webgui/{js => static}/bootstrap.min.js.map (100%) rename src/webgui/{js => static}/common.js (100%) rename src/webgui/{js => static}/jquery-3.3.1.min.js (100%) rename src/webgui/{js => static}/popper.min.js (100%) rename src/webgui/{js => static}/popper.min.js.map (100%) rename src/webgui/{css => static}/signin.css (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abf85695..7e08f38f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,9 @@ jobs: - uses: actions/checkout@v4 - name: Build Docker run: | + echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + sed -i -E "s/v[0-9]+\.[0-9]+\.[0-9]+/${VERSION:-v0.0.0}/" "src/supervisord/version.go" + source ./tool.sh VER=$(date +%Y.%m%d.%H%M)${TAG_SUFFIX}; build_image_no_tag supervisord "alpine-${VER}" src/supervisord.Dockerfile --build-arg "BASE_NAMESPACE=library" --build-arg "BUILD_IMG=golang:alpine" --build-arg "BASE_IMG=alpine" @@ -45,17 +48,20 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22 + go-version: 1.23 - name: Build Binary run: | + echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + sed -i -E "s/v[0-9]+\.[0-9]+\.[0-9]+/${VERSION:-v0.0.0}/" "src/supervisord/version.go" + set -eux pwd && ls -alh * mkdir -pv build && mv src/etc src/webgui ./build/ cd src/supervisord go mod tidy && go test -v go build -v -o ../../build/ - cd ../../ - ls -alh build + cd ../../ && ls -alh build + ./build/supervisord version build_goreleaser: runs-on: ubuntu-latest @@ -64,7 +70,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22 + go-version: 1.23 - name: Install cross-compiler for linux/arm64, UPX env: @@ -79,6 +85,8 @@ jobs: export PATH="/opt/upx/:${PATH}" upx --version | grep -E '^upx' + echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + sed -i -E "s/v[0-9]+\.[0-9]+\.[0-9]+/${VERSION:-v0.0.0}/" "src/supervisord/version.go" cd src/supervisord && go mod tidy -e - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} diff --git a/src/supervisord/go.mod b/src/supervisord/go.mod index b6232f6c..405266c3 100644 --- a/src/supervisord/go.mod +++ b/src/supervisord/go.mod @@ -1,6 +1,6 @@ module supervisord -go 1.22 +go 1.23 require ( github.com/gorilla/mux v1.8.0 diff --git a/src/supervisord/version.go b/src/supervisord/version.go index df612034..b93cb07f 100644 --- a/src/supervisord/version.go +++ b/src/supervisord/version.go @@ -5,7 +5,7 @@ import ( ) // VERSION the version of supervisor -const VERSION = "v1.0.1" +const VERSION = "v0.0.0" // VersionCommand implement the flags.Commander interface type VersionCommand struct { diff --git a/src/webgui/conf.html b/src/webgui/conf.html index 0a2f7d07..084ee0fe 100644 --- a/src/webgui/conf.html +++ b/src/webgui/conf.html @@ -4,16 +4,14 @@ ConfFile - - - - - - - - + + + + + + + + diff --git a/src/webgui/index.htm b/src/webgui/index.htm new file mode 100644 index 00000000..d4d9edc2 --- /dev/null +++ b/src/webgui/index.htm @@ -0,0 +1,354 @@ + + + + + Go-Supervisor + + + + + + + + + + + + + + +

Go-Supervisor

+
+
+
+ + Prometheus + Grafana + + + + + +
+
+
+ + + + + + + + +
ProgramStateDescriptionAction
+
+
+ + + + + + + + diff --git a/src/webgui/index.html b/src/webgui/index.html index 2e04f9d1..5cc6cac7 100644 --- a/src/webgui/index.html +++ b/src/webgui/index.html @@ -1,22 +1,22 @@ - - + + Go-Supervisor - - - - - - - - - - - - + + + + + + + + - -

Go-Supervisor

-
-
-
- - Prometheus - Grafana - - - - - -
+ } + }); + } + + $(document).ready(function() { + list_programs(); + }); + + +

Go-Supervisor

+
+

Programs

+
+
+ + + + +
+
+
+ + + + + + + + +
ProgramStateDescriptionAction
+
-
- - - - - - - - -
ProgramStateDescriptionAction
-
-
-