mirror of https://github.com/statping/statping
vue
parent
7151501fca
commit
db84aa0fbb
|
@ -29,7 +29,6 @@ RUN cd frontend && yarn install --pure-lockfile --network-timeout 1000000 && \
|
|||
COPY . ./
|
||||
|
||||
RUN make clean
|
||||
RUN make frontend-build
|
||||
RUN make compile
|
||||
RUN make build
|
||||
RUN chmod a+x statping && mv statping /go/bin/statping
|
||||
|
|
2
Makefile
2
Makefile
|
@ -60,7 +60,7 @@ docker-latest: docker-base
|
|||
docker-vue:
|
||||
docker build -t hunterlong/statping:vue --build-arg VERSION=${VERSION} .
|
||||
|
||||
push-vue: clean docker-base docker-vue
|
||||
push-vue: clean compile docker-base docker-vue
|
||||
docker push hunterlong/statping:base
|
||||
docker push hunterlong/statping:vue
|
||||
|
||||
|
|
1
go.mod
1
go.mod
|
@ -8,6 +8,7 @@ require (
|
|||
github.com/Microsoft/go-winio v0.4.14 // indirect
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
|
||||
github.com/ararog/timeago v0.0.0-20160328174124-e9969cf18b8d
|
||||
github.com/crazy-max/xgo v0.3.2 // indirect
|
||||
github.com/daaku/go.zipexe v1.0.1 // indirect
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
github.com/docker/distribution v2.7.1+incompatible // indirect
|
||||
|
|
2
go.sum
2
go.sum
|
@ -18,6 +18,8 @@ github.com/ararog/timeago v0.0.0-20160328174124-e9969cf18b8d h1:ZX0t+GA3MWiP7LWt
|
|||
github.com/ararog/timeago v0.0.0-20160328174124-e9969cf18b8d/go.mod h1:EcJ034SpbWy4heOSDiBZJRn3b5wKJM1b4sFfYeVAkI4=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/crazy-max/xgo v0.3.2 h1:A5KmtgpPVzzqJzYcEmzpM0zFgCCyUar1FSvHFXxLiWA=
|
||||
github.com/crazy-max/xgo v0.3.2/go.mod h1:9sA9qZWLR9koBkgNTcktix7/MVbYrLWNnIQvYYq6/DA=
|
||||
github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY=
|
||||
github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E=
|
||||
github.com/daaku/go.zipexe v1.0.1 h1:wV4zMsDOI2SZ2m7Tdz1Ps96Zrx+TzaK15VbUaGozw0M=
|
||||
|
|
|
@ -19,11 +19,11 @@ func Select() (*Core, error) {
|
|||
if !database.Available() {
|
||||
return nil, errors.New("database has not been initiated yet.")
|
||||
}
|
||||
exists := database.DB().HasTable("core")
|
||||
exists := DB().HasTable("core")
|
||||
if !exists {
|
||||
return nil, errors.New("core database has not been setup yet.")
|
||||
}
|
||||
db := database.DB().Find(&c).Debug()
|
||||
db := DB().Find(&c)
|
||||
if db.Error() != nil {
|
||||
return nil, db.Error()
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ func (c *Core) Create() error {
|
|||
Domain: c.Domain,
|
||||
MigrationId: time.Now().Unix(),
|
||||
}
|
||||
db := DB().FirstOrCreate(&newCore)
|
||||
db := DB().Create(&newCore)
|
||||
return db.Error()
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,6 @@ func Sample() error {
|
|||
Footer: null.NewNullString(""),
|
||||
}
|
||||
|
||||
db := database.DB().Create(&core)
|
||||
db := DB().Create(&core)
|
||||
return db.Error()
|
||||
}
|
||||
|
|
|
@ -38,18 +38,18 @@ func (u *User) Create() error {
|
|||
u.ApiKey = utils.NewSHA1Hash(5)
|
||||
u.ApiSecret = utils.NewSHA1Hash(10)
|
||||
|
||||
db := DB().Create(u)
|
||||
db := DB().Create(&u)
|
||||
return db.Error()
|
||||
}
|
||||
|
||||
func (u *User) Update() error {
|
||||
u.ApiKey = utils.NewSHA1Hash(5)
|
||||
u.ApiSecret = utils.NewSHA1Hash(10)
|
||||
db := DB().Update(u)
|
||||
db := DB().Update(&u)
|
||||
return db.Error()
|
||||
}
|
||||
|
||||
func (u *User) Delete() error {
|
||||
db := DB().Delete(u)
|
||||
db := DB().Delete(&u)
|
||||
return db.Error()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue