Skip to content

Commit 0c83f3a

Browse files
authored
Merge pull request #1 from IGoRFonin/master
change admin ui to MegaFon team implementation
2 parents fe3c927 + f60b421 commit 0c83f3a

File tree

4 files changed

+52
-151
lines changed

4 files changed

+52
-151
lines changed

.circleci/config.yml

Lines changed: 0 additions & 145 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: test and release
2+
3+
on: push
4+
5+
jobs:
6+
main:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Set up Go
15+
uses: actions/setup-go@v3
16+
with:
17+
go-version: 1.16.7
18+
19+
- name: Install statik
20+
run: |
21+
GO111MODULE=off go get github.com/rakyll/statik
22+
23+
- name: Build ui
24+
run: make build-ui
25+
26+
- name: Build
27+
run: GIT_TAG_NAME=master-$GITHUB_RUN_NUMBER make build
28+
29+
- name: Install gox
30+
run: |
31+
GO111MODULE=off go get github.com/mitchellh/gox
32+
33+
- name: Build cross platform releases
34+
if: startsWith(github.ref, 'refs/tags/')
35+
env:
36+
GOPATH: /home/runner/go
37+
run: |
38+
GIT_TAG_NAME=master-$GITHUB_RUN_NUMBER SHELL=/bin/bash ./build-release.sh
39+
40+
- name: Release
41+
if: startsWith(github.ref, 'refs/tags/')
42+
uses: softprops/action-gh-release@v1
43+
with:
44+
files: target/hoverfly_bundle_*

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ build:
3939
go build -ldflags "-X main.hoverctlVersion=$(GIT_TAG_NAME)" -o ../target/hoverctl
4040

4141
build-ui:
42-
wget https://github.com/SpectoLabs/hoverfly-ui/releases/download/$(GIT_TAG_NAME)/$(GIT_TAG_NAME).zip
43-
unzip $(GIT_TAG_NAME).zip -d hoverfly-ui
42+
wget https://github.com/MegafonWebLab/hoverfly-ui/releases/download/v0.1.2/release.zip
43+
unzip release.zip -d hoverfly-ui
4444
cd core && \
45-
statik -src=../hoverfly-ui
46-
rm -rf $(GIT_TAG_NAME).zip
45+
statik -src=../hoverfly-ui/build
46+
rm -rf release.zip
4747
rm -rf hoverfly-ui
4848

4949
benchmark:

core/admin.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ func (this *AdminApi) addDashboardRoutes(router *bone.Mux) *bone.Mux {
8282
w.WriteHeader(200)
8383
}
8484

85-
router.HandleFunc("/dashboard", indexHandler)
86-
router.HandleFunc("/login", indexHandler)
85+
router.HandleFunc("/simulations/edit/:id", indexHandler)
86+
router.HandleFunc("/simulations/new", indexHandler)
87+
router.HandleFunc("/simulations", indexHandler)
88+
router.HandleFunc("/settings", indexHandler)
8789
router.Handle("/", http.FileServer(statikFS))
8890
router.Handle("/*.js", http.FileServer(statikFS))
8991
router.Handle("/*.css", http.FileServer(statikFS))

0 commit comments

Comments
 (0)