-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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(ui): support diff for application list #20784
base: master
Are you sure you want to change the base?
feat(ui): support diff for application list #20784
Conversation
🔴 Preview Environment stopped on BunnyshellSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
54a3507
to
bebffb0
Compare
Signed-off-by: vivian.zhang <[email protected]>
bebffb0
to
a935890
Compare
@@ -553,6 +557,9 @@ export const ApplicationsList = (props: RouteComponentProps<{}>) => { | |||
deleteApplication={(appName, appNamespace) => | |||
AppUtils.deleteApplication(appName, appNamespace, ctx) | |||
} | |||
diffApplication={(appName, appNamespace) => | |||
ctx.navigation.goto('.', {diffApp: appName, appNamespace}, {replace: true}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does replace: true
do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the current entry in the history stack with the new entry. Thus, if you press the browser’s back button, you will return to the page before the list page.
@@ -109,6 +110,9 @@ export const ApplicationTiles = ({applications, syncApplication, refreshApplicat | |||
{applications.map((app, i) => { | |||
const source = getAppDefaultSource(app); | |||
const targetRevision = source ? source.targetRevision || 'HEAD' : 'Unknown'; | |||
const isDisabledDiff = | |||
app.status.sync.status === models.SyncStatuses.Synced || (!app.spec.source && (!app.spec.sources || app.spec.sources.length === 0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might just show it always for a consistent experience and more discoverability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a Diff button to each application on the application list page.
Fixes #20696
before:
after:
Checklist: