Skip to content

Commit

Permalink
Optimization for frontend performance
Browse files Browse the repository at this point in the history
  • Loading branch information
bclswl0827 committed Mar 5, 2024
1 parent 07ab91a commit dbb3086
Show file tree
Hide file tree
Showing 226 changed files with 24,300 additions and 23,880 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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

## v2.9.0

- Frontend refactoring: use functional components and hooks
- Support Butterworth bandpass filter in frontend waveform data processing
- API /api/v1/mseed: use unix timestamp as file modification time response
- Check for remote server error before parsing earthquake event data from SCEA API

## v2.8.1

- Show disk usage of current working directory
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.8.1
v2.9.0
2 changes: 1 addition & 1 deletion app/v1/mseed/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func getMiniSEEDList(conf *config.Conf) ([]MiniSEEDFile, error) {
files = append(files, MiniSEEDFile{
TTL: fileTTL,
Name: info.Name(),
Time: modTime.Format(time.RFC3339),
Time: modTime.UnixMilli(),
Size: fmt.Sprintf("%d MB", info.Size()/1024/1024),
})
}
Expand Down
2 changes: 1 addition & 1 deletion app/v1/mseed/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Binding struct {

type MiniSEEDFile struct {
TTL int `json:"ttl"`
Time string `json:"time"`
Time int64 `json:"time"`
Size string `json:"size"`
Name string `json:"name"`
}
4 changes: 3 additions & 1 deletion app/v1/trace/scea-b.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ func (s *SCEA_B) Parse(data []byte) (map[string]any, error) {
var result map[string]any
err := json.Unmarshal(data, &result)
if err != nil {
fmt.Println(result)
return nil, err
}
if result["code"].(float64) != 0 {
return nil, fmt.Errorf("server error: %s", result["msg"])
}

return result, nil
}
Expand Down
2 changes: 1 addition & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ const docTemplate = `{
"type": "string"
},
"time": {
"type": "string"
"type": "integer"
},
"ttl": {
"type": "integer"
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
"type": "string"
},
"time": {
"type": "string"
"type": "integer"
},
"ttl": {
"type": "integer"
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ definitions:
size:
type: string
time:
type: string
type: integer
ttl:
type: integer
type: object
Expand Down
2 changes: 1 addition & 1 deletion feature/seedlink/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (s *SeedLink) handleBuffer(gp *publisher.Geophone, buffer *seedlink.SeedLin

// Write buffer to file every 10 minutes
if time.Now().UTC().Minute()%10 == 0 {
file, err := os.OpenFile(buffer.File, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
file, err := os.OpenFile(buffer.File, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
return err
}
Expand Down
94 changes: 47 additions & 47 deletions frontend/dist/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
{
"files": {
"main.css": "/static/css/main.40ace055.css",
"main.js": "/static/js/main.71322421.js",
"static/css/290.525e2941.chunk.css": "/static/css/290.525e2941.chunk.css",
"static/js/290.4f498365.chunk.js": "/static/js/290.4f498365.chunk.js",
"static/js/735.26a45829.chunk.js": "/static/js/735.26a45829.chunk.js",
"static/js/252.5327abb2.chunk.js": "/static/js/252.5327abb2.chunk.js",
"static/js/253.480b4667.chunk.js": "/static/js/253.480b4667.chunk.js",
"static/js/332.60fa82e5.chunk.js": "/static/js/332.60fa82e5.chunk.js",
"static/js/377.f0e1c66a.chunk.js": "/static/js/377.f0e1c66a.chunk.js",
"static/js/144.5b8fabfd.chunk.js": "/static/js/144.5b8fabfd.chunk.js",
"static/js/59.a77c052b.chunk.js": "/static/js/59.a77c052b.chunk.js",
"static/js/596.0088f6dd.chunk.js": "/static/js/596.0088f6dd.chunk.js",
"static/js/366.14cf3b89.chunk.js": "/static/js/366.14cf3b89.chunk.js",
"static/js/165.41b9296d.chunk.js": "/static/js/165.41b9296d.chunk.js",
"static/js/979.14e4e415.chunk.js": "/static/js/979.14e4e415.chunk.js",
"static/js/822.ae40dac1.chunk.js": "/static/js/822.ae40dac1.chunk.js",
"static/js/912.b577a56b.chunk.js": "/static/js/912.b577a56b.chunk.js",
"static/js/669.c0f124af.chunk.js": "/static/js/669.c0f124af.chunk.js",
"static/media/gear-solid.svg": "/static/media/gear-solid.bf34f9d52ff44a67baec8a0d4220d3a3.svg",
"static/media/bug-solid.svg": "/static/media/bug-solid.7f781f9ddd35c29f11111e36602dcc87.svg",
"static/media/earth-americas-solid.svg": "/static/media/earth-americas-solid.4105ee3951f1c7ac60331fccafc17c1f.svg",
"static/media/link-solid.svg": "/static/media/link-solid.49819f951200a220d9839699fbccd8de.svg",
"static/media/link-slash-solid.svg": "/static/media/link-slash-solid.7893b9a51ad07ceedeb88c9649c58439.svg",
"static/media/maximize-solid.svg": "/static/media/maximize-solid.daad92d8ce4bd4922c4d8d2bc5ee889f.svg",
"static/media/hourglass-half-solid.svg": "/static/media/hourglass-half-solid.1e8dc3284939ca52c0fd542da1fbf89b.svg",
"static/media/house-solid.svg": "/static/media/house-solid.716027ddb007f9cd5ea3128e4b7e45fd.svg",
"static/media/cloud-arrow-down-solid.svg": "/static/media/cloud-arrow-down-solid.44bdf9a1a61d1e1230b601cca127925f.svg",
"static/media/download-solid.svg": "/static/media/download-solid.c03efc3b28bb5b5b2ceee2ebbb9b4f55.svg",
"static/media/folder-open-regular.svg": "/static/media/folder-open-regular.db4ef4ac307b2a72056b659ae4f7dac9.svg",
"static/media/file-waveform-solid.svg": "/static/media/file-waveform-solid.c48c7f768376cd38d8254b34614dfd9a.svg",
"static/media/server-solid.svg": "/static/media/server-solid.4f75c3131b23af426eabd5c91035829b.svg",
"static/media/paper-plane-solid.svg": "/static/media/paper-plane-solid.e1f40db20eab51657c5490a69c103292.svg",
"static/media/spinner-solid.svg": "/static/media/spinner-solid.71f9ca7d042dcd0fd05a55e608a63a64.svg",
"static/media/rss-solid.svg": "/static/media/rss-solid.167813b1d681372ed1d98e45b6b6c0f7.svg",
"static/media/square-caret-up-solid.svg": "/static/media/square-caret-up-solid.0573794ec033f5ce25c1076e3ac596e3.svg",
"static/media/circle-xmark-solid.svg": "/static/media/circle-xmark-solid.ea0857c87457d25b161c3a37ad4e3845.svg",
"static/media/wave-square-solid.svg": "/static/media/wave-square-solid.9a0bef3f9e813a5716a30eed4fa8020e.svg",
"static/media/arrow-up-solid.svg": "/static/media/arrow-up-solid.25f1775e7ee2dd4c2bc2f2c3c07116bf.svg",
"static/media/circle-check-solid.svg": "/static/media/circle-check-solid.3fb46b8931cbbf9f966175f42b55a087.svg",
"static/media/circle-exclamation-solid.svg": "/static/media/circle-exclamation-solid.d6230f4a460d784515ba71d97d1caddf.svg",
"static/media/clock-solid.svg": "/static/media/clock-solid.23025348eaec720a2439930b37d677ee.svg",
"static/media/angle-right-solid.svg": "/static/media/angle-right-solid.cda594ece7082478d17a05a0a0e148f5.svg",
"static/media/location-dot-solid.svg": "/static/media/location-dot-solid.763794361437464c10451de38cd290f7.svg",
"index.html": "/index.html",
"static/media/getFetch.cjs": "/static/media/getFetch.40f37ddea2378391108f.cjs"
"main.css": "./static/css/main.87b912ec.css",
"main.js": "./static/js/main.8a2feefb.js",
"static/css/398.d6bfd15f.chunk.css": "./static/css/398.d6bfd15f.chunk.css",
"static/js/398.c8228dff.chunk.js": "./static/js/398.c8228dff.chunk.js",
"static/js/73.e52fa58f.chunk.js": "./static/js/73.e52fa58f.chunk.js",
"static/js/263.1e5bdafe.chunk.js": "./static/js/263.1e5bdafe.chunk.js",
"static/js/600.4361e201.chunk.js": "./static/js/600.4361e201.chunk.js",
"static/js/45.6253252a.chunk.js": "./static/js/45.6253252a.chunk.js",
"static/js/699.bfe1a060.chunk.js": "./static/js/699.bfe1a060.chunk.js",
"static/js/654.ff569d5a.chunk.js": "./static/js/654.ff569d5a.chunk.js",
"static/js/548.a7a825fc.chunk.js": "./static/js/548.a7a825fc.chunk.js",
"static/js/925.33fda54f.chunk.js": "./static/js/925.33fda54f.chunk.js",
"static/js/974.8dde0f3d.chunk.js": "./static/js/974.8dde0f3d.chunk.js",
"static/js/4.d126994b.chunk.js": "./static/js/4.d126994b.chunk.js",
"static/js/84.5e2e5e1b.chunk.js": "./static/js/84.5e2e5e1b.chunk.js",
"static/js/39.19e82dc5.chunk.js": "./static/js/39.19e82dc5.chunk.js",
"static/js/717.bc51ac50.chunk.js": "./static/js/717.bc51ac50.chunk.js",
"static/media/github.svg": "./static/media/github.7ef913a817353b753f86393c71e91790.svg",
"index.html": "./index.html",
"static/media/gear-solid.svg": "./static/media/gear-solid.bf34f9d52ff44a67baec8a0d4220d3a3.svg",
"static/media/bug-solid.svg": "./static/media/bug-solid.7f781f9ddd35c29f11111e36602dcc87.svg",
"static/media/earth-americas-solid.svg": "./static/media/earth-americas-solid.4105ee3951f1c7ac60331fccafc17c1f.svg",
"static/media/link-solid.svg": "./static/media/link-solid.49819f951200a220d9839699fbccd8de.svg",
"static/media/link-slash-solid.svg": "./static/media/link-slash-solid.7893b9a51ad07ceedeb88c9649c58439.svg",
"static/media/maximize-solid.svg": "./static/media/maximize-solid.daad92d8ce4bd4922c4d8d2bc5ee889f.svg",
"static/media/hourglass-half-solid.svg": "./static/media/hourglass-half-solid.1e8dc3284939ca52c0fd542da1fbf89b.svg",
"static/media/house-solid.svg": "./static/media/house-solid.716027ddb007f9cd5ea3128e4b7e45fd.svg",
"static/media/cloud-arrow-down-solid.svg": "./static/media/cloud-arrow-down-solid.44bdf9a1a61d1e1230b601cca127925f.svg",
"static/media/download-solid.svg": "./static/media/download-solid.c03efc3b28bb5b5b2ceee2ebbb9b4f55.svg",
"static/media/folder-open-regular.svg": "./static/media/folder-open-regular.db4ef4ac307b2a72056b659ae4f7dac9.svg",
"static/media/file-waveform-solid.svg": "./static/media/file-waveform-solid.c48c7f768376cd38d8254b34614dfd9a.svg",
"static/media/server-solid.svg": "./static/media/server-solid.4f75c3131b23af426eabd5c91035829b.svg",
"static/media/paper-plane-solid.svg": "./static/media/paper-plane-solid.e1f40db20eab51657c5490a69c103292.svg",
"static/media/rss-solid.svg": "./static/media/rss-solid.167813b1d681372ed1d98e45b6b6c0f7.svg",
"static/media/square-caret-up-solid.svg": "./static/media/square-caret-up-solid.0573794ec033f5ce25c1076e3ac596e3.svg",
"static/media/circle-xmark-solid.svg": "./static/media/circle-xmark-solid.ea0857c87457d25b161c3a37ad4e3845.svg",
"static/media/wave-square-solid.svg": "./static/media/wave-square-solid.9a0bef3f9e813a5716a30eed4fa8020e.svg",
"static/media/xmark-solid.svg": "./static/media/xmark-solid.33c889ee6afa3ed57684011608af6238.svg",
"static/media/arrow-up-solid.svg": "./static/media/arrow-up-solid.25f1775e7ee2dd4c2bc2f2c3c07116bf.svg",
"static/media/circle-check-solid.svg": "./static/media/circle-check-solid.3fb46b8931cbbf9f966175f42b55a087.svg",
"static/media/circle-exclamation-solid.svg": "./static/media/circle-exclamation-solid.d6230f4a460d784515ba71d97d1caddf.svg",
"static/media/clock-solid.svg": "./static/media/clock-solid.23025348eaec720a2439930b37d677ee.svg",
"static/media/angle-right-solid.svg": "./static/media/angle-right-solid.cda594ece7082478d17a05a0a0e148f5.svg",
"static/media/location-dot-solid.svg": "./static/media/location-dot-solid.763794361437464c10451de38cd290f7.svg",
"static/media/ellipsis-solid.svg": "./static/media/ellipsis-solid.e3aced2a80c2b888104322b1ae60b47f.svg"
},
"entrypoints": [
"static/css/main.40ace055.css",
"static/js/main.71322421.js"
"static/css/main.87b912ec.css",
"static/js/main.8a2feefb.js"
]
}
Loading

0 comments on commit dbb3086

Please sign in to comment.