-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix: added Redeploy button that allows the user to sync the latest changes #41459
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 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
79037de
Added Redeploy button that allows the user to sync the latest changes…
tomjose92 77f8910
Made changes to show the redeploy button only for applications. And a…
tomjose92 6893a1d
Added a redeployAction to call the publish API but without opening th…
tomjose92 76557b8
Added selector getRedeployApplicationTrigger to identify what type of…
tomjose92 a99e10e
Added RocketDot svg icon to denote when App needs redeployment.
tomjose92 a481a1e
Added logic to show appropriate tooltip and rocket-dot icon, for the …
tomjose92 9adae23
added the check for gitstatus loading for tooltip and starticon logic.
tomjose92 184530a
Fixed issue where REDEPLOY_BUTTON_TOOLTIP fn to expect an argument.
tomjose92 9241cc3
Using useMemo instead of useCallback. Using enum instead of string fo…
tomjose92 c279af6
Removed additional logging related to redeploy inside ApplicationSaga…
tomjose92 665914d
Using const instead of enums with definition in ce. Added Deployment…
tomjose92 91df629
Updated messages. Using same message for button tooltip so no require…
tomjose92 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
5 changes: 5 additions & 0 deletions
5
app/client/packages/design-system/ads/src/__assets__/icons/ads/rocket-dot.svg
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
5 changes: 5 additions & 0 deletions
5
app/client/packages/design-system/widgets-old/src/assets/icons/ads/rocket-dot.svg
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { | ||
| REDEPLOY_APP_BUTTON_TOOLTIP, | ||
| REDEPLOY_APP_WARNING, | ||
| } from "ee/constants/messages"; | ||
|
|
||
| export const REDEPLOY_TRIGGERS = { | ||
| PendingDeployment: "PENDING_DEPLOYMENT", | ||
| } as const; | ||
|
|
||
| type ValueOf<T> = T[keyof T]; | ||
| export type RedeployTriggerValue = ValueOf<typeof REDEPLOY_TRIGGERS>; | ||
|
|
||
| export const REDEPLOY_WARNING_MESSAGE: Record< | ||
| RedeployTriggerValue, | ||
| () => string | ||
| > = { | ||
| [REDEPLOY_TRIGGERS.PendingDeployment]: REDEPLOY_APP_WARNING, | ||
| }; | ||
|
|
||
| export const REDEPLOY_BUTTON_TOOLTIP: Record< | ||
| RedeployTriggerValue, | ||
| () => string | ||
| > = { | ||
| [REDEPLOY_TRIGGERS.PendingDeployment]: REDEPLOY_APP_BUTTON_TOOLTIP, | ||
| }; |
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
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 "ce/constants/DeploymentConstants"; |
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
47 changes: 47 additions & 0 deletions
47
app/client/src/git/components/OpsModal/TabDeploy/RedeployWarning.tsx
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,47 @@ | ||
| import React from "react"; | ||
| import { createMessage } from "ee/constants/messages"; | ||
| import { | ||
| REDEPLOY_WARNING_MESSAGE, | ||
| type RedeployTriggerValue, | ||
| } from "ee/constants/DeploymentConstants"; | ||
| import { Callout, Text } from "@appsmith/ads"; | ||
| import styled from "styled-components"; | ||
|
|
||
| const Container = styled.div` | ||
| margin: 8px 0 16px; | ||
| `; | ||
|
|
||
| interface RedeployWarningProps { | ||
| redeployTrigger: RedeployTriggerValue | null; | ||
| } | ||
|
|
||
| const RedeployWarning: React.FC<RedeployWarningProps> = ({ | ||
| redeployTrigger, | ||
| }) => { | ||
| const redeployDocUrl = | ||
| "https://docs.appsmith.com/advanced-concepts/version-control-with-git/commit-and-push"; | ||
|
|
||
| return ( | ||
| <Container> | ||
| <Callout | ||
| data-testid="t--git-ops-redeploy-warning-callout" | ||
| kind="warning" | ||
| links={[ | ||
| { | ||
| children: "Learn more", | ||
| endIcon: "right-arrow", | ||
| to: redeployDocUrl, | ||
| target: "_blank", | ||
| }, | ||
| ]} | ||
| > | ||
| <Text kind="heading-xs"> | ||
| {redeployTrigger && | ||
| createMessage(REDEPLOY_WARNING_MESSAGE[redeployTrigger])} | ||
| </Text> | ||
| </Callout> | ||
| </Container> | ||
| ); | ||
| }; | ||
|
|
||
| export default RedeployWarning; |
Oops, something went wrong.
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.