Skip to content

Commit

Permalink
Make timepicker component work again
Browse files Browse the repository at this point in the history
  • Loading branch information
bclswl0827 committed Aug 8, 2024
1 parent a60171a commit 0e50a2d
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Starting from v2.2.5, all notable changes to this project will be documented in this file.

## v3.0.4

### Bug Fixes

- Fixed an issue where the timepicker component in the frontend would not update the selected time when the time range was changed.

## v3.0.3

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apk update && apk add --no-cache git bash wget curl make npm && \
npm install && make && \
cd ../../docs && make && \
cd ../cmd && go mod tidy && \
go build -ldflags "-s -w -X main.version=$VERSION -X main.release=docker_build" -trimpath -o /tmp/observer *.go
go build -ldflags "-s -w -X main.version=$VERSION -X main.release=dockerbuild" -trimpath -o /tmp/observer *.go

FROM alpine:latest

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.0.3
v3.0.4
1 change: 1 addition & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func init() {
// @description This is APIv1 documentation for AnyShake Observer, please set `server_settings.debug` to `false` in `config.json` when deploying to production environment in case of any security issues.
func main() {
args := parseCommandLine()
printVersion()

var conf config.Config
err := conf.Read(args.Path)
Expand Down
6 changes: 3 additions & 3 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (

var (
release = "unknown"
version = "Custom build"
version = "custombuild"
description = "Constructing Real-time Seismic Network Ambitiously"
)

func printVersion() {
copyright := "© AnyShake " + fmt.Sprintf("%d", time.Now().Year()) + ". All Rights Reversed."
version = concat(
"Observer ", version, " (", description, ")\nRelease: ", version, "-", release, " ",
runtime.Version(), " ", runtime.GOOS, "/", runtime.GOARCH, "\n", copyright,
"AnyShake Observer ", version, " (", description, ")\nRelease: ", version, "-", release, " ",
runtime.Version(), " ", runtime.GOOS, "/", runtime.GOARCH, "\n", copyright, "\n",
)

fmt.Println(version)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
REACT_APP_VERSION=v3.0.3
REACT_APP_RELEASE=ac50096d-20240808200400
REACT_APP_VERSION=v3.0.4
REACT_APP_RELEASE=a60171a8-20240808222943
8 changes: 4 additions & 4 deletions frontend/src/src/views/History/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ const History = (props: RouterComponentProps) => {
end_time: searchParams.has("end") ? Number(searchParams.get("end")) : currentTimestamp
});

const handleTimeChange = (value: number, end: boolean) =>
const handleTimeChange = (value: number, is_end_time: boolean) =>
setQueryDuration((prev) => {
if (end) {
return { ...prev, end: value };
if (is_end_time) {
return { ...prev, end_time: value };
}
return { ...prev, start: value };
return { ...prev, start_time: value };
});

const [form, setForm] = useState<FormProps & { values?: Record<string, string | number> }>({
Expand Down
2 changes: 0 additions & 2 deletions services/watchdog/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ func (s *WatchdogService) Start(options *services.Options, waitGroup *sync.WaitG
case <-ticker.C:
if prevUpdatedAt == explorerDeps.Health.UpdatedAt {
logger.GetLogger(s.GetServiceName()).Warnf("device is not responding, checking again in next %d seconds", int(CHECK_INTERVAL.Seconds()))
} else {
logger.GetLogger(s.GetServiceName()).Infof("device works perfectly, checking again in next %d seconds", int(CHECK_INTERVAL.Seconds()))
}
prevUpdatedAt = explorerDeps.Health.UpdatedAt
}
Expand Down
2 changes: 1 addition & 1 deletion services/watchdog/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ package watchdog

import "time"

const CHECK_INTERVAL = 30 * time.Second
const CHECK_INTERVAL = 5 * time.Second

type WatchdogService struct{}

0 comments on commit 0e50a2d

Please sign in to comment.