-
Notifications
You must be signed in to change notification settings - Fork 7
feat: app status modal #707
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
Merged
Merged
Changes from 23 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
dd454fe
feat: add base AppStatusModal
AbhishekA1509 7218d58
feat: implement AppStatusBody component and integrate into AppStatusM…
AbhishekA1509 b1322a3
refactor: optimize ErrorBar component by replacing useEffect with use…
AbhishekA1509 04f7d19
feat: enhance AppStatusModal by adding ErrorBar component and refacto…
AbhishekA1509 6ad2556
chore: deprecated mark
AbhishekA1509 59627db
feat: enhance AppStatusModal with ConfigDrift functionality and refac…
AbhishekA1509 502fbf5
feat: add app detail fetching and enhance AppStatusModal with improve…
AbhishekA1509 c853b01
feat: enhance SegmentedControl by adding unique input IDs and improvi…
AbhishekA1509 0995322
feat: refactor AppStatusModal components for improved layout and acce…
AbhishekA1509 f3f4846
feat: add utility functions for app status management and update AppS…
AbhishekA1509 c1493b2
refactor: update AppStatusModal components for improved layout and st…
AbhishekA1509 b31ee60
refactor: remove CONFIG_DRIFT constant, update ConfigDriftModalProps …
AbhishekA1509 53de3f0
feat: add AppStatusContent component with styling for improved layout…
AbhishekA1509 43c4cc1
refactor: update AppStatusModal components to improve error handling …
AbhishekA1509 92dfeaf
refactor: simplify AppStatusModal components by removing unnecessary …
AbhishekA1509 4e7c1bd
feat: add new expand small icon and update constants for tenant insta…
AbhishekA1509 e609822
feat: add intermediate state to Toggle component with corresponding s…
AbhishekA1509 7395c1a
feat: enhance Toggle component to support controlled state management
AbhishekA1509 b1521b7
feat: deprecate debounce function and introduce useDebounce hook for …
AbhishekA1509 c1e1bd1
fix: update useRef type in useDebounce hook for better type safety
AbhishekA1509 64723a9
Merge branch 'develop' into feat/app-status-modal
AbhishekA1509 89bc6bb
refactor: streamline Drawer exports and enhance AppStatusModal title …
AbhishekA1509 7c19ab7
Merge pull request #717 from devtron-labs/feat/release-tenant-mapping
AbhishekA1509 054c9ee
fix: correct API endpoint formatting in AppStatusModal service
AbhishekA1509 efc5c03
fix: review comments
AbhishekA1509 0e7e4d6
refactor: reorganize EmptyState exports and enhance AppStatusModal co…
AbhishekA1509 9b253e0
fix: improve cleanup logic in AppStatusModal and handle missing statu…
AbhishekA1509 5e0d7a0
refactor: update SegmentedControl dependencies and improve StatusFilt…
AbhishekA1509 9e4f3dc
fix: ShowMoreText component usage in AppStatusModal
AbhishekA1509 c1b619e
feat: add buttonPadding prop to InfoIconTippy for customizable button…
AbhishekA1509 2ebf878
feat: add styles and update StatusFilterButtonComponent for improved UI
AbhishekA1509 eabc1f0
refactor: optimize SegmentedControl dependencies and enhance StatusFi…
AbhishekA1509 7785d2d
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-…
AbhishekA1509 2697181
chore: update version to 1.12.0-beta-4 in package.json and package-lo…
AbhishekA1509 22011fc
refactor: simplify key generation in StatusFilterButtonComponent
AbhishekA1509 60dcf5d
chore: update version to 1.12.0-beta-5 in package.json and package-lo…
AbhishekA1509 4f56e28
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-…
AbhishekA1509 69a523c
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-…
AbhishekA1509 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from './Drawer' |
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| import { ComponentProps, ReactNode } from 'react' | ||
|
|
||
| import { Tooltip } from '@Common/Tooltip' | ||
|
|
||
| import { ErrorBar } from '../Error' | ||
| import { ShowMoreText } from '../ShowMoreText' | ||
| import { AppStatus } from '../StatusComponent' | ||
| import AppStatusContent from './AppStatusContent' | ||
| import { APP_STATUS_CUSTOM_MESSAGES } from './constants' | ||
| import { AppStatusBodyProps } from './types' | ||
| import { getAppStatusMessageFromAppDetails } from './utils' | ||
|
|
||
| const InfoCardItem = ({ heading, value, isLast = false }: { heading: string; value: ReactNode; isLast?: boolean }) => ( | ||
| <div | ||
| className={`py-12 px-16 dc__grid dc__column-gap-16 info-card-item ${!isLast ? 'border__secondary--bottom' : ''}`} | ||
| > | ||
| <Tooltip content={heading}> | ||
| <h3 className="cn-9 fs-13 fw-4 lh-1-5 dc__truncate m-0 dc__no-shrink">{heading}</h3> | ||
| </Tooltip> | ||
|
|
||
| {typeof value === 'string' ? ( | ||
| <ShowMoreText key={`show-more-text-${value}`} textClass="cn-9 fs-13 fw-4 lh-1-5" text={value} /> | ||
| ) : ( | ||
| value | ||
| )} | ||
| </div> | ||
| ) | ||
|
|
||
| export const AppStatusBody = ({ appDetails, type, handleShowConfigDriftModal }: AppStatusBodyProps) => { | ||
| const appStatus = appDetails.resourceTree?.status?.toUpperCase() || appDetails.appStatus | ||
| const message = getAppStatusMessageFromAppDetails(appDetails) | ||
| const customMessage = | ||
| type === 'stack-manager' | ||
| ? 'The installation will complete when status for all the below resources become HEALTHY.' | ||
| : APP_STATUS_CUSTOM_MESSAGES[appDetails.resourceTree?.status?.toUpperCase()] | ||
|
|
||
| const infoCardItems: (Omit<ComponentProps<typeof InfoCardItem>, 'isLast'> & { id: number })[] = [ | ||
| { | ||
| id: 1, | ||
| heading: type !== 'stack-manager' ? 'Application Status' : 'Status', | ||
| value: appStatus ? <AppStatus status={appStatus} /> : '--', | ||
| }, | ||
| ...(message | ||
| ? [ | ||
| { | ||
| id: 2, | ||
| heading: 'Message', | ||
| value: message, | ||
| }, | ||
| ] | ||
| : []), | ||
| ...(customMessage | ||
| ? [ | ||
| { | ||
| id: 3, | ||
| heading: 'Message', | ||
| value: customMessage, | ||
| }, | ||
| ] | ||
| : []), | ||
| ] | ||
|
|
||
| return ( | ||
| <div className="flexbox-col px-20 dc__gap-16 dc__overflow-auto"> | ||
| {/* Info card */} | ||
| <div className="flexbox-col pt-20"> | ||
| <div className="flexbox-col br-8 border__primary bg__primary shadow__card--secondary"> | ||
| {infoCardItems.map((item, index) => ( | ||
| <InfoCardItem | ||
| key={item.id} | ||
| heading={item.heading} | ||
| value={item.value} | ||
| isLast={index === infoCardItems.length - 1} | ||
| /> | ||
| ))} | ||
| </div> | ||
| </div> | ||
|
|
||
| <ErrorBar appDetails={appDetails} useParentMargin={false} /> | ||
|
|
||
| <AppStatusContent appDetails={appDetails} handleShowConfigDriftModal={handleShowConfigDriftModal} /> | ||
| </div> | ||
| ) | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| .app-status-content { | ||
| .app-status-content { | ||
| &__row { | ||
| grid-template-columns: 150px 200px 100px auto; | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.