mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 04:49:01 +08:00
Fix: FE: pipelines: should be able to exit edit mode without making a change (#4335)
* fix: show cancel button on entering edit mode before any changes have been made * chore: align pipeline page save/cancel buttons to the right
This commit is contained in:
parent
722a38491e
commit
d65d75ef69
@ -506,8 +506,9 @@ function PipelineListsView({
|
|||||||
pagination={false}
|
pagination={false}
|
||||||
/>
|
/>
|
||||||
</DndProvider>
|
</DndProvider>
|
||||||
{showSaveButton && (
|
{isEditingActionMode && (
|
||||||
<SaveConfigButton
|
<SaveConfigButton
|
||||||
|
showSaveButton={Boolean(showSaveButton)}
|
||||||
onSaveConfigurationHandler={onSaveConfigurationHandler}
|
onSaveConfigurationHandler={onSaveConfigurationHandler}
|
||||||
onCancelConfigurationHandler={onCancelConfigurationHandler}
|
onCancelConfigurationHandler={onCancelConfigurationHandler}
|
||||||
/>
|
/>
|
||||||
|
@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { SaveConfigWrapper } from './styles';
|
import { SaveConfigWrapper } from './styles';
|
||||||
|
|
||||||
function SaveConfigButton({
|
function SaveConfigButton({
|
||||||
|
showSaveButton,
|
||||||
onSaveConfigurationHandler,
|
onSaveConfigurationHandler,
|
||||||
onCancelConfigurationHandler,
|
onCancelConfigurationHandler,
|
||||||
}: SaveConfigButtonTypes): JSX.Element {
|
}: SaveConfigButtonTypes): JSX.Element {
|
||||||
@ -11,6 +12,7 @@ function SaveConfigButton({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SaveConfigWrapper>
|
<SaveConfigWrapper>
|
||||||
|
{showSaveButton && (
|
||||||
<Button
|
<Button
|
||||||
key="submit"
|
key="submit"
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -19,6 +21,7 @@ function SaveConfigButton({
|
|||||||
>
|
>
|
||||||
{t('save_configuration')}
|
{t('save_configuration')}
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
<Button key="cancel" onClick={onCancelConfigurationHandler}>
|
<Button key="cancel" onClick={onCancelConfigurationHandler}>
|
||||||
{t('cancel')}
|
{t('cancel')}
|
||||||
</Button>
|
</Button>
|
||||||
@ -26,6 +29,7 @@ function SaveConfigButton({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
export interface SaveConfigButtonTypes {
|
export interface SaveConfigButtonTypes {
|
||||||
|
showSaveButton: boolean;
|
||||||
onSaveConfigurationHandler: VoidFunction;
|
onSaveConfigurationHandler: VoidFunction;
|
||||||
onCancelConfigurationHandler: VoidFunction;
|
onCancelConfigurationHandler: VoidFunction;
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,7 @@ export const ModeAndConfigWrapper = styled.div`
|
|||||||
|
|
||||||
export const SaveConfigWrapper = styled.div`
|
export const SaveConfigWrapper = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
gap: 0.938rem;
|
gap: 0.938rem;
|
||||||
margin-top: 1.25rem;
|
margin-top: 1.25rem;
|
||||||
`;
|
`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user