-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from MZC-CSC/main
mc-web-console Initial code push and documentation
- Loading branch information
Showing
832 changed files
with
138,862 additions
and
24 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-env"] | ||
} |
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,24 @@ | ||
app_root: . | ||
ignored_folders: | ||
- vendor | ||
- log | ||
- logs | ||
- assets | ||
- public | ||
- grifts | ||
- tmp | ||
- bin | ||
- node_modules | ||
- .sass-cache | ||
included_extensions: | ||
- .go | ||
- .env | ||
build_path: tmp | ||
build_delay: 200ns | ||
build_target_path: "./cmd/app" | ||
binary_name: mc_web_console-build | ||
command_flags: [] | ||
enable_colors: true | ||
log_name: buffalo | ||
http: | ||
port: $PORT |
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,23 @@ | ||
version: "2" | ||
checks: | ||
method-lines: | ||
config: | ||
threshold: 100 | ||
plugins: | ||
fixme: | ||
enabled: true | ||
gofmt: | ||
enabled: true | ||
golint: | ||
enabled: true | ||
govet: | ||
enabled: true | ||
exclude_patterns: | ||
- grifts/**/* | ||
- "**/*_test.go" | ||
- "*_test.go" | ||
- "**_test.go" | ||
- logs/* | ||
- public/* | ||
- templates/* | ||
- "**/node_modules/" |
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,10 @@ | ||
node_modules/ | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
*.log | ||
bin/ |
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,21 @@ | ||
## for dynamic target, using ${CBWS_TARGET} | ||
# common WIP env for test/demo set export CBWS_TARGET= | ||
export CBWS_TARGET=localhost | ||
|
||
## localhost | ||
export SPIDER_URL=http://${CBWS_TARGET}:1024/spider | ||
export TUMBLE_URL=http://${CBWS_TARGET}:1323/tumblebug | ||
export DRAGONFLY_URL=http://${CBWS_TARGET}:9090/dragonfly | ||
export API_GW=http://${CBWS_TARGET}:8000 | ||
|
||
export LADYBUG_URL=${API_GW}/ladybug | ||
export MCKS_URL=http://${CBWS_TARGET}:1470/mcks | ||
|
||
export LoginUser=admin | ||
export LoginEmail=admin | ||
export LoginPassword=admin | ||
export LoginAccessSecret=<input access secret> | ||
export LoginRefreshSecret=<input refresh secret> | ||
|
||
export API_USERNAME=<api userName for using Tumblebug> | ||
export API_PASSWORD=<api password for using Tumblebug> |
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,33 @@ | ||
vendor/ | ||
**/*.log | ||
**/*.sqlite | ||
.idea/ | ||
bin/ | ||
tmp/ | ||
node_modules/ | ||
.sass-cache/ | ||
public/assets/ | ||
.vscode/ | ||
.grifter/ | ||
.env | ||
**/.DS_Store | ||
*.pid | ||
coverage | ||
coverage.data | ||
.svn | ||
.console_history | ||
.sass-cache/* | ||
.jhw-cache/ | ||
jhw.* | ||
*.sublime* | ||
dist/ | ||
generated/ | ||
.vendor/ | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
database.yml |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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,9 @@ | ||
enableGlobalCache: true | ||
|
||
logFilters: | ||
- code: YN0013 | ||
level: discard | ||
|
||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-3.3.1.cjs |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,44 @@ | ||
# This is a multi-stage Dockerfile and requires >= Docker 17.05 | ||
# https://docs.docker.com/engine/userguide/eng-image/multistage-build/ | ||
FROM gobuffalo/buffalo:v0.18.12 as builder | ||
|
||
ENV GOPROXY http://proxy.golang.org | ||
|
||
RUN mkdir -p /src/web_console | ||
WORKDIR /src/web_console | ||
|
||
# this will cache the npm install step, unless package.json changes | ||
ADD package.json . | ||
ADD yarn.lock .yarnrc.yml ./ | ||
RUN mkdir .yarn | ||
COPY .yarn .yarn | ||
RUN yarn install | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
ADD . . | ||
RUN buffalo build --static -o /bin/app | ||
|
||
FROM alpine | ||
RUN apk add --no-cache bash | ||
RUN apk add --no-cache ca-certificates | ||
|
||
WORKDIR /bin/ | ||
|
||
COPY --from=builder /bin/app . | ||
|
||
# Uncomment to run the binary in "production" mode: | ||
# ENV GO_ENV=production | ||
|
||
# Bind the app to 0.0.0.0 so it can be seen from outside the container | ||
ENV ADDR=0.0.0.0 | ||
|
||
EXPOSE 3000 | ||
|
||
# Uncomment to run the migrations before running the binary: | ||
# CMD /bin/app migrate; /bin/app | ||
CMD exec /bin/app |
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,24 @@ | ||
package actions | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/gobuffalo/suite/v4" | ||
) | ||
|
||
type ActionSuite struct { | ||
*suite.Action | ||
} | ||
|
||
func Test_ActionSuite(t *testing.T) { | ||
action, err := suite.NewActionWithFixtures(App(), os.DirFS("../fixtures")) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
as := &ActionSuite{ | ||
Action: action, | ||
} | ||
suite.Run(t, as) | ||
} |
Oops, something went wrong.