Skip to content

Commit

Permalink
WX-1583 Remove inaccurate error message (#4789)
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Watts <1156625+nawatts@users.noreply.github.com>
  • Loading branch information
aednichols and nawatts authored Apr 26, 2024
1 parent 06f6361 commit 6f5fa0f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/workspace-data/Data.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ const DataTableActions = ({
}) => {
const {
workspace: { namespace, name },
workspaceSubmissionStats: { runningSubmissionsCount },
} = workspace;

const isSet = tableName.endsWith('_set');
Expand Down Expand Up @@ -449,7 +448,6 @@ const DataTableActions = ({
workspace,
selectedDataType: tableName,
selectedEntities: entities,
runningSubmissionsCount,
}),
savingVersion &&
h(DataTableSaveVersionModal, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,6 @@ const EntitiesContent = ({
workspace,
selectedEntities: selectedKeys,
selectedDataType: entityKey,
runningSubmissionsCount,
}),
showColumnProvenance &&
h(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const EntityDeleter = ({ onDismiss, onSuccess, namespace, name, selectedE
runningSubmissionsCount > 0 &&
b({ style: { display: 'block', margin: '1rem 0' } }, [
`WARNING: ${runningSubmissionsCount} workflows are currently running in this workspace. ` +
'Deleting the following data could cause failures if a workflow is using this data.',
'Deleting the following entries could cause workflows using them to fail.',
]),
moreToDelete &&
b({ style: { display: 'block', margin: '1rem 0' } }, [
Expand Down
20 changes: 7 additions & 13 deletions src/workspace-data/data-table/entity-service/ExportDataModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ const InfoTile = ({ isError = false, content }) => {
]);
};

const displayEntities = (entities, runningSubmissionsCount, showType) => {
const displayEntities = (entities, showType) => {
return _.map(
([i, entity]) =>
div(
{
style: {
borderTop: i === 0 && runningSubmissionsCount === 0 ? undefined : Style.standardLine,
borderTop: i === 0 ? undefined : Style.standardLine,
padding: '0.6rem 1.25rem',
...Style.noWrapEllipsis,
},
Expand All @@ -45,7 +45,7 @@ const displayEntities = (entities, runningSubmissionsCount, showType) => {
);
};

export const ExportDataModal = ({ onDismiss, selectedDataType, selectedEntities, runningSubmissionsCount, workspace }) => {
export const ExportDataModal = ({ onDismiss, selectedDataType, selectedEntities, workspace }) => {
// State
const [hardConflicts, setHardConflicts] = useState([]);
const [softConflicts, setSoftConflicts] = useState([]);
Expand Down Expand Up @@ -126,12 +126,6 @@ export const ExportDataModal = ({ onDismiss, selectedDataType, selectedEntities,
},
},
[
runningSubmissionsCount > 0 &&
InfoTile({
content:
`WARNING: ${runningSubmissionsCount} workflows are currently running in this workspace. ` +
'Copying the following data could cause failures if a workflow is using this data.',
}),
!(!!hardConflicts.length || !!additionalDeletions.length || !!softConflicts.length) &&
h(Fragment, [
h(FormLabel, { required: true }, ['Destination']),
Expand Down Expand Up @@ -161,10 +155,10 @@ export const ExportDataModal = ({ onDismiss, selectedDataType, selectedEntities,
// Row height calculation is font size * line height + padding + border
div({ style: { maxHeight: 'calc((1em * 1.15 + 1.2rem + 1px) * 10.5)', overflowY: 'auto', margin: '0 -1.25rem' } }, [
...Utils.cond(
[!!additionalDeletions.length, () => displayEntities(additionalDeletions, runningSubmissionsCount, true)],
[!!hardConflicts.length, () => displayEntities(hardConflicts, runningSubmissionsCount, true)],
[!!softConflicts.length, () => displayEntities(softConflicts, runningSubmissionsCount, true)],
() => displayEntities(selectedEntities, runningSubmissionsCount, false)
[!!additionalDeletions.length, () => displayEntities(additionalDeletions, true)],
[!!hardConflicts.length, () => displayEntities(hardConflicts, true)],
[!!softConflicts.length, () => displayEntities(softConflicts, true)],
() => displayEntities(selectedEntities, false)
),
]),
div(
Expand Down

0 comments on commit 6f5fa0f

Please sign in to comment.