Skip to content
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

fix: console showing subworkflows as unknown #570

Merged
merged 3 commits into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { checkForDynamicExecutions } from 'components/common/utils';
import { convertToPlainNodes } from './helpers';
import { ChartHeader } from './chartHeader';
import { useScaleContext } from './scaleContext';
import { TaskNames } from './taskNames';
import { TaskNames } from './TaskNames';
import { getChartDurationData } from './TimelineChart/chartData';
import { TimelineChart } from './TimelineChart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { formatDateLocalTimezone, formatDateUTC, millisecondsToHMS } from 'commo
import { timestampToDate } from 'common/utils';
import { useCommonStyles } from 'components/common/styles';
import { isEqual } from 'lodash';
import { CatalogCacheStatus, NodeExecutionPhase } from 'models/Execution/enums';
import { TaskNodeMetadata } from 'models/Execution/types';
import { NodeExecutionPhase } from 'models/Execution/enums';
import * as React from 'react';
import { useNodeExecutionContext } from '../contextProvider/NodeExecutionDetails';
import { ExecutionStatusBadge } from '../ExecutionStatusBadge';
Expand Down Expand Up @@ -107,15 +106,6 @@ const DisplayType: React.FC<NodeExecutionCellRendererData> = ({ execution }) =>
return <Typography color="textSecondary">{type}</Typography>;
};

const hiddenCacheStatuses = [CatalogCacheStatus.CACHE_MISS, CatalogCacheStatus.CACHE_DISABLED];
function hasCacheStatus(taskNodeMetadata?: TaskNodeMetadata): taskNodeMetadata is TaskNodeMetadata {
if (!taskNodeMetadata) {
return false;
}
const { cacheStatus } = taskNodeMetadata;
return !hiddenCacheStatuses.includes(cacheStatus);
}

Comment on lines -110 to -118
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed unused code

export function generateColumns(
styles: ReturnType<typeof useColumnStyles>,
): NodeExecutionColumnDefinition[] {
Expand Down
5 changes: 5 additions & 0 deletions packages/zapp/console/src/components/WorkflowGraph/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ export function isExpanded(node: any) {
* @returns boolean
*/
export const checkIfObjectsAreSame = (a, b) => {
// if one of the objects is null (undefined), objects can't be the same
if ((!a || !b) && a != b) {
olga-union marked this conversation as resolved.
Show resolved Hide resolved
return false;
}

for (const k in a) {
if (a[k] != b[k]) {
return false;
Expand Down