Skip to content

Commit

Permalink
feat: differentiate between cache disabled and cache put failure (#719)
Browse files Browse the repository at this point in the history
fix: add icon for put failure

Signed-off-by: James <james@union.ai>
  • Loading branch information
james-union authored Mar 10, 2023
1 parent ffb161c commit be0e533
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/console/src/components/Executions/CacheStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { makeStyles, Theme } from '@material-ui/core/styles';
import CachedOutlined from '@material-ui/icons/CachedOutlined';
import ErrorOutlined from '@material-ui/icons/ErrorOutlined';
import InfoOutlined from '@material-ui/icons/InfoOutlined';
import SmsFailedOutlinedIcon from '@material-ui/icons/SmsFailedOutlined';
import classnames from 'classnames';
import { assertNever } from 'common/utils';
import { PublishedWithChangesOutlined } from 'components/common/PublishedWithChanges';
Expand Down Expand Up @@ -37,10 +38,14 @@ const NodeExecutionCacheStatusIcon: React.ComponentType<
}
> = React.forwardRef(({ status, ...props }, ref) => {
switch (status) {
case CatalogCacheStatus.CACHE_DISABLED:
case CatalogCacheStatus.CACHE_DISABLED: {
return <InfoOutlined {...props} ref={ref} data-testid="cache-icon" />;
}
case CatalogCacheStatus.CACHE_MISS:
case CatalogCacheStatus.CACHE_SKIPPED: {
return <InfoOutlined {...props} ref={ref} data-testid="cache-icon" />;
return (
<SmsFailedOutlinedIcon {...props} ref={ref} data-testid="cache-icon" />
);
}
case CatalogCacheStatus.CACHE_HIT: {
return <CachedOutlined {...props} ref={ref} data-testid="cache-icon" />;
Expand Down

0 comments on commit be0e533

Please sign in to comment.