Repository navigation
feat: 대시보드 종별 등록 개체 수를 운영 통계 API 값으로 보여 줌 (#52) - #53
Merged
Merged
Conversation
Stats에 speciesCounts를 추가하고 SpeciesCountPanel이 그 값을 보여 준다. 퍼블리싱용 고정 데이터(data.ts)는 지운다. 목록이 비면 안내 문구를 보여 준다.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
대시보드 "종별 등록 개체 수" 패널이 퍼블리싱용 고정 데이터를 쓰고 있었다. 운영 통계 API(
GET /api/v1/admin/stats)의speciesCounts로 바꾼다. (#34 후속, tail-server#189, tail-server#162)closes #52
변경 사항
Stats타입에speciesCounts(speciesId, name, count)를 추가했다SpeciesCountPanel이Dashboard에서 받은 값을 보여 주고, 고정 데이터(data.ts)는 지웠다speciesId: null, "직접 입력")도 한 줄로 보여 준다. 서버가 많은 순으로 정렬해 주므로 다시 정렬하지 않는다Math.max(1, ...))을 둬서 모든 count가 0이어도 NaN이 되지 않는다확인 방법
typecheck, eslint, prettier,npm test(30개) 통과참고
speciesCounts가 없으면(tail-server#189 배포 전) 대시보드 본문에서 에러가 난다