Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new resources page and support agent pagination #2406

Merged
merged 6 commits into from
May 13, 2024

Conversation

agatha197
Copy link
Contributor

@agatha197 agatha197 commented May 7, 2024

resolves https://github.com/lablup/giftbox/issues/668

This pull request includes updates to the GraphQL schema in schema.graphql with added fields and types. It also introduces new React components: AgentDetailModal, AgentList, AgentSettingModal, ResourcesPage, ResourceAvailableGageBar, and modifications in existing components like WebUISider. Changes include handling form submissions, displaying resource information, and improving user interactions. This PR also removes unnecessary code related to sliders and task generation in several components.


What's changed

  • New agent page that support pagination query
  • Refresh switch to refetch agent data
  • Most of them replace the existing agent list, but the Allocation, Utilization, and agent detail modals are refactored more generally.

Checklist for reviewer

Screenshots

  • pageSize: 2 (you can modify pageSize by query string or right bottom selection)
    Screenshot 2024-05-08 at 8.41.48 PM.png
  • pageSize: 10
    image.png
  • detail modal
    image.png
  • setting modal
    image.png

Checklist: (if applicable)

  • Mention to the original issue
  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup): for multiple agent list, please use 10.100.64.15
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @agatha197 and the rest of your teammates on Graphite Graphite

Copy link

github-actions bot commented May 8, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
2.71% (-0.07% 🔻)
118/4349
🔴 Branches
2.93% (-0.21% 🔻)
87/2968
🔴 Functions
1.33% (-0.06% 🔻)
19/1429
🔴 Lines
2.67% (-0.07% 🔻)
114/4267
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / AgentDetailModal.tsx
0% 0% 0% 0%
🔴
... / AgentSettingModal.tsx
0% 0% 0% 0%
🔴
... / AgentList.tsx
0% 0% 0% 0%
🔴
... / AutoRefreshSwitch.tsx
0% 0% 0% 0%
🔴
... / BAIProgressWithLabel.tsx
0% 0% 0% 0%
🔴
... / ResourcesPage.tsx
0% 0% 0% 0%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴 helper/index.tsx
46.34% (-2.77% 🔻)
33.08% (-5.32% 🔻)
25% (-3% 🔻)
49.53% (-2.51% 🔻)

Test suite run success

32 tests passing in 4 suites.

Report generated by 🧪jest coverage report action from 4991647

@agatha197 agatha197 marked this pull request as ready for review May 8, 2024 11:26
@agatha197 agatha197 requested review from yomybaby and lizable May 9, 2024 00:59
@agatha197 agatha197 added type:enhance Add new features urgency:4 As soon as feasible, implementation is essential. platform:general impact:visible This change is visible to users. field:UI / UX labels May 9, 2024
@agatha197 agatha197 added this to the 24.03 milestone May 9, 2024
@github-actions github-actions bot added area:ux UI / UX issue. area:i18n Localization labels May 9, 2024
@agatha197 agatha197 changed the title feat: new resources page feat: new resources page and support agent pagination May 9, 2024
src/components/backend-ai-webui.ts Show resolved Hide resolved
react/src/components/MainLayout/WebUISider.tsx Outdated Show resolved Hide resolved
react/src/pages/ResourcesPage.tsx Outdated Show resolved Hide resolved
react/src/components/AgentList.tsx Show resolved Hide resolved
react/src/components/AgentList.tsx Show resolved Hide resolved
react/src/components/AgentList.tsx Show resolved Hide resolved
react/src/components/AgentDetailModal.tsx Outdated Show resolved Hide resolved
react/src/components/AgentDetailModal.tsx Show resolved Hide resolved
react/src/components/AgentDetailModal.tsx Show resolved Hide resolved
react/src/components/AgentSettingModal.tsx Show resolved Hide resolved
@agatha197 agatha197 force-pushed the feature/agent-pagination branch 2 times, most recently from 61b920d to 70b23db Compare May 9, 2024 07:23
@agatha197 agatha197 requested a review from yomybaby May 9, 2024 07:24
@agatha197 agatha197 force-pushed the feature/agent-pagination branch 3 times, most recently from e762c68 to f730559 Compare May 9, 2024 08:31
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agatha197 agatha197 merged commit 781d70e into main May 13, 2024
7 checks passed
@agatha197 agatha197 deleted the feature/agent-pagination branch May 13, 2024 01:38
agatha197 added a commit that referenced this pull request May 13, 2024
* feat: new resources page

* cosmetic touches and bordered table

* Use Segment component for status and refactor codes related to the fetch transition

* table sorter by GraphQL order

* refactor: sorter setting and remove architecture sorter

* remove auto refresh feature

---------

Co-authored-by: Jong Eun Lee <jongeun@lablup.com>
agatha197 added a commit that referenced this pull request May 20, 2024
* feat: new resources page

* cosmetic touches and bordered table

* Use Segment component for status and refactor codes related to the fetch transition

* table sorter by GraphQL order

* refactor: sorter setting and remove architecture sorter

* remove auto refresh feature

---------

Co-authored-by: Jong Eun Lee <jongeun@lablup.com>
agatha197 added a commit that referenced this pull request May 21, 2024
* feat: new resources page

* cosmetic touches and bordered table

* Use Segment component for status and refactor codes related to the fetch transition

* table sorter by GraphQL order

* refactor: sorter setting and remove architecture sorter

* remove auto refresh feature

---------

Co-authored-by: Jong Eun Lee <jongeun@lablup.com>
yomybaby added a commit that referenced this pull request May 22, 2024
* feat: new resources page

* cosmetic touches and bordered table

* Use Segment component for status and refactor codes related to the fetch transition

* table sorter by GraphQL order

* refactor: sorter setting and remove architecture sorter

* remove auto refresh feature

---------

Co-authored-by: Jong Eun Lee <jongeun@lablup.com>
agatha197 added a commit that referenced this pull request May 22, 2024
* feat: new resources page

* cosmetic touches and bordered table

* Use Segment component for status and refactor codes related to the fetch transition

* table sorter by GraphQL order

* refactor: sorter setting and remove architecture sorter

* remove auto refresh feature

---------

Co-authored-by: Jong Eun Lee <jongeun@lablup.com>
agatha197 added a commit that referenced this pull request May 23, 2024
* feat: new resources page

* cosmetic touches and bordered table

* Use Segment component for status and refactor codes related to the fetch transition

* table sorter by GraphQL order

* refactor: sorter setting and remove architecture sorter

* remove auto refresh feature

---------

Co-authored-by: Jong Eun Lee <jongeun@lablup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:i18n Localization area:ux UI / UX issue. field:UI / UX impact:visible This change is visible to users. platform:general size:XL 500~ LoC type:enhance Add new features urgency:4 As soon as feasible, implementation is essential.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants