mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-19 06:38:04 +00:00
fix(ui): Reload policies on activate / deactivate (#5107)
This commit is contained in:
parent
51854a768d
commit
68e74f292f
@ -256,7 +256,7 @@ export const ManagePolicies = () => {
|
||||
deletePolicy({ variables: { urn: policy?.urn as string } }); // There must be a focus policy urn.
|
||||
setTimeout(function () {
|
||||
policiesRefetch();
|
||||
}, 2000);
|
||||
}, 3000);
|
||||
onCancelViewPolicy();
|
||||
},
|
||||
onCancel() {},
|
||||
@ -283,6 +283,9 @@ export const ManagePolicies = () => {
|
||||
input: toPolicyInput(newPolicy),
|
||||
},
|
||||
});
|
||||
setTimeout(function () {
|
||||
policiesRefetch();
|
||||
}, 3000);
|
||||
setShowViewPolicyModal(false);
|
||||
};
|
||||
|
||||
@ -297,7 +300,7 @@ export const ManagePolicies = () => {
|
||||
message.success('Successfully saved policy.');
|
||||
setTimeout(function () {
|
||||
policiesRefetch();
|
||||
}, 2000);
|
||||
}, 3000);
|
||||
onClosePolicyBuilder();
|
||||
};
|
||||
|
||||
@ -461,7 +464,7 @@ export const ManagePolicies = () => {
|
||||
dataSource={tableData}
|
||||
rowKey="urn"
|
||||
locale={{
|
||||
emptyText: <Empty description="No Ingestion Sources!" image={Empty.PRESENTED_IMAGE_SIMPLE} />,
|
||||
emptyText: <Empty description="No Policies!" image={Empty.PRESENTED_IMAGE_SIMPLE} />,
|
||||
}}
|
||||
pagination={false}
|
||||
/>
|
||||
|
@ -36,10 +36,6 @@ const SearchResultContent = styled.div`
|
||||
align-items: center;
|
||||
`;
|
||||
|
||||
const SearchResultDisplayName = styled.div`
|
||||
margin-right: 8px;
|
||||
`;
|
||||
|
||||
/**
|
||||
* Component used to construct the "actors" portion of a DataHub
|
||||
* access Policy by populating an ActorFilter object.
|
||||
@ -160,14 +156,12 @@ export default function PolicyActorForm({ policyType, actors, setActors }: Props
|
||||
<SearchResultContainer>
|
||||
<SearchResultContent>
|
||||
<CustomAvatar
|
||||
size={18}
|
||||
size={24}
|
||||
name={displayName}
|
||||
photoUrl={avatarUrl}
|
||||
isGroup={result.entity.type === EntityType.CorpGroup}
|
||||
/>
|
||||
<SearchResultDisplayName>
|
||||
<div>{displayName}</div>
|
||||
</SearchResultDisplayName>
|
||||
</SearchResultContent>
|
||||
</SearchResultContainer>
|
||||
);
|
||||
@ -186,7 +180,7 @@ export default function PolicyActorForm({ policyType, actors, setActors }: Props
|
||||
|
||||
const tagRender = (props) => {
|
||||
// eslint-disable-next-line react/prop-types
|
||||
const { label, closable, onClose } = props;
|
||||
const { label, closable, onClose, value } = props;
|
||||
const onPreventMouseDown = (event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
@ -197,7 +191,7 @@ export default function PolicyActorForm({ policyType, actors, setActors }: Props
|
||||
closable={closable}
|
||||
onClose={onClose}
|
||||
style={{
|
||||
padding: '0px 7px 0px 0px',
|
||||
padding: value === 'All' ? '0px 7px 0px 7px' : '0px 7px 0px 0px',
|
||||
marginRight: 3,
|
||||
display: 'flex',
|
||||
justifyContent: 'start',
|
||||
|
@ -246,7 +246,7 @@ export const AccessTokens = () => {
|
||||
dataSource={tableData}
|
||||
rowKey="urn"
|
||||
locale={{
|
||||
emptyText: <Empty description="No Ingestion Sources!" image={Empty.PRESENTED_IMAGE_SIMPLE} />,
|
||||
emptyText: <Empty description="No Access Tokens!" image={Empty.PRESENTED_IMAGE_SIMPLE} />,
|
||||
}}
|
||||
pagination={false}
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user