Skip to content

Commit

Permalink
feat: upgrade frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
naiba committed Dec 7, 2024
1 parent 5b5e006 commit fb38706
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 28 deletions.
10 changes: 6 additions & 4 deletions .github/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ def sync_to_gitee(tag: str, body: str, files: slice):
f"Request failed with status code {release_api_response.status_code}")

print(f"Gitee release id: {release_id}")

# 仅保留最新 Release 以防超出 Gitee 仓库配额
try:
delete_gitee_releases(release_id, api_client,
release_api_uri, access_token)

asset_api_uri = f"{release_api_uri}/{release_id}/attach_files"

for file_path in files:
Expand All @@ -119,10 +125,6 @@ def sync_to_gitee(tag: str, body: str, files: slice):
print(
f"Request failed with status code {asset_api_response.status_code}")

# 仅保留最新 Release 以防超出 Gitee 仓库配额
try:
delete_gitee_releases(release_id, api_client,
release_api_uri, access_token)
except ValueError as e:
print(e)

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- uses: robinraju/release-downloader@v1
with:
repository: nezhahq/user-frontend
tag: v1.0.12
tag: v1.1.0
fileName: dist.zip
latest: true
extract: true
Expand Down
28 changes: 14 additions & 14 deletions proto/nezha.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions proto/nezha.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ service NezhaService {
rpc RequestTask(stream TaskResult) returns (stream Task) {}
rpc IOStream(stream IOStreamData) returns (stream IOStreamData) {}
rpc ReportGeoIP(GeoIP) returns (GeoIP) {}
rpc ReportSystemInfo2(Host) returns (Unit64Receipt) {}
rpc ReportSystemInfo2(Host) returns (Uint64Receipt) {}
}

message Host {
Expand Down Expand Up @@ -67,7 +67,7 @@ message TaskResult {

message Receipt { bool proced = 1; }

message Unit64Receipt { uint64 data = 1; }
message Uint64Receipt { uint64 data = 1; }

message IOStreamData { bytes data = 1; }

Expand Down
10 changes: 5 additions & 5 deletions proto/nezha_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions service/rpc/nezha.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ func (s *NezhaHandler) ReportSystemInfo(c context.Context, r *pb.Host) (*pb.Rece
return &pb.Receipt{Proced: true}, nil
}

func (s *NezhaHandler) ReportSystemInfo2(c context.Context, r *pb.Host) (*pb.Unit64Receipt, error) {
func (s *NezhaHandler) ReportSystemInfo2(c context.Context, r *pb.Host) (*pb.Uint64Receipt, error) {
s.onReportSystemInfo(c, r)
return &pb.Unit64Receipt{Data: singleton.DashboardBootTime}, nil
return &pb.Uint64Receipt{Data: singleton.DashboardBootTime}, nil
}

func (s *NezhaHandler) IOStream(stream pb.NezhaService_IOStreamServer) error {
Expand Down

0 comments on commit fb38706

Please sign in to comment.