From 492ea0616ed55e909b9a50a08b353c20c1934e2c Mon Sep 17 00:00:00 2001 From: mabashian Date: Fri, 24 Jan 2020 11:54:08 -0500 Subject: [PATCH] Moves util/workflow.jsx to components/Workflow/WorkflowUtils.jsx and updates imports --- awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx | 2 +- .../workflow.jsx => components/Workflow/WorkflowUtils.jsx} | 0 .../Workflow/WorkflowUtils.test.jsx} | 2 +- awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.jsx | 2 +- .../src/screens/Job/WorkflowOutput/WorkflowOutputGraph.jsx | 2 +- .../src/screens/Job/WorkflowOutput/WorkflowOutputLink.jsx | 2 +- .../src/screens/Job/WorkflowOutput/WorkflowOutputNode.jsx | 2 +- .../Template/WorkflowJobTemplateVisualizer/Visualizer.jsx | 2 +- .../Template/WorkflowJobTemplateVisualizer/VisualizerGraph.jsx | 2 +- .../Template/WorkflowJobTemplateVisualizer/VisualizerLink.jsx | 2 +- .../Template/WorkflowJobTemplateVisualizer/VisualizerNode.jsx | 2 +- 11 files changed, 10 insertions(+), 10 deletions(-) rename awx/ui_next/src/{util/workflow.jsx => components/Workflow/WorkflowUtils.jsx} (100%) rename awx/ui_next/src/{util/workflow.test.jsx => components/Workflow/WorkflowUtils.test.jsx} (99%) diff --git a/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx b/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx index a292ef1763..3b3f89e982 100644 --- a/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowStartNode.jsx @@ -4,7 +4,7 @@ import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { bool, func, shape } from 'prop-types'; import { PlusIcon } from '@patternfly/react-icons'; -import { constants as wfConstants } from '@util/workflow'; +import { constants as wfConstants } from '@components/Workflow/WorkflowUtils'; import { WorkflowActionTooltip, WorkflowActionTooltipItem, diff --git a/awx/ui_next/src/util/workflow.jsx b/awx/ui_next/src/components/Workflow/WorkflowUtils.jsx similarity index 100% rename from awx/ui_next/src/util/workflow.jsx rename to awx/ui_next/src/components/Workflow/WorkflowUtils.jsx diff --git a/awx/ui_next/src/util/workflow.test.jsx b/awx/ui_next/src/components/Workflow/WorkflowUtils.test.jsx similarity index 99% rename from awx/ui_next/src/util/workflow.test.jsx rename to awx/ui_next/src/components/Workflow/WorkflowUtils.test.jsx index 0cc1ad05a3..523cf55977 100644 --- a/awx/ui_next/src/util/workflow.test.jsx +++ b/awx/ui_next/src/components/Workflow/WorkflowUtils.test.jsx @@ -5,7 +5,7 @@ import { getLinkOverlayPoints, layoutGraph, getTranslatePointsForZoom, -} from './workflow'; +} from './WorkflowUtils'; describe('getScaleAndOffsetToFit', () => { const gBoundingClientRect = { diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.jsx index 6ff3a4350f..10d438876d 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutput.jsx @@ -4,7 +4,7 @@ import { t } from '@lingui/macro'; import styled from 'styled-components'; import { shape } from 'prop-types'; import { CardBody as PFCardBody } from '@patternfly/react-core'; -import { layoutGraph } from '@util/workflow'; +import { layoutGraph } from '@components/Workflow/WorkflowUtils'; import ContentError from '@components/ContentError'; import ContentLoading from '@components/ContentLoading'; import { WorkflowJobsAPI } from '@api'; diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.jsx index 0b65674907..571a3b7e06 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.jsx @@ -4,7 +4,7 @@ import { arrayOf, bool, shape, func } from 'prop-types'; import { getScaleAndOffsetToFit, getTranslatePointsForZoom, -} from '@util/workflow'; +} from '@components/Workflow/WorkflowUtils'; import { WorkflowOutputLink, WorkflowOutputNode, diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.jsx index 40178a67a0..d33c381943 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputLink.jsx @@ -4,7 +4,7 @@ import { generateLine, getLinePoints, getLinkOverlayPoints, -} from '@util/workflow'; +} from '@components/Workflow/WorkflowUtils'; function WorkflowOutputLink({ link, nodePositions, onUpdateLinkHelp }) { const ref = useRef(null); diff --git a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.jsx b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.jsx index 8b111bc80c..a54a5f6c7e 100644 --- a/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.jsx +++ b/awx/ui_next/src/screens/Job/WorkflowOutput/WorkflowOutputNode.jsx @@ -7,7 +7,7 @@ import { func, shape } from 'prop-types'; import { StatusIcon } from '@components/Sparkline'; import { WorkflowNodeTypeLetter } from '@components/Workflow'; import { secondsToHHMMSS } from '@util/dates'; -import { constants as wfConstants } from '@util/workflow'; +import { constants as wfConstants } from '@components/Workflow/WorkflowUtils'; const NodeG = styled.g` cursor: ${props => (props.job ? 'pointer' : 'default')}; diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.jsx index 8f003b29fb..98a578fc5a 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Visualizer.jsx @@ -5,7 +5,7 @@ import { t } from '@lingui/macro'; import styled from 'styled-components'; import { shape } from 'prop-types'; import { BaseSizes, Title, TitleLevel } from '@patternfly/react-core'; -import { layoutGraph } from '@util/workflow'; +import { layoutGraph } from '@components/Workflow/WorkflowUtils'; import ContentError from '@components/ContentError'; import ContentLoading from '@components/ContentLoading'; import { diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.jsx index 9e613f506c..abceda1a2d 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.jsx @@ -8,7 +8,7 @@ import { getScaleAndOffsetToFit, constants as wfConstants, getTranslatePointsForZoom, -} from '@util/workflow'; +} from '@components/Workflow/WorkflowUtils'; import { WorkflowHelp, WorkflowKey, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.jsx index b719189e9e..d069acfa0c 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerLink.jsx @@ -8,7 +8,7 @@ import { generateLine, getLinePoints, getLinkOverlayPoints, -} from '@util/workflow'; +} from '@components/Workflow/WorkflowUtils'; import { WorkflowActionTooltip, WorkflowActionTooltipItem, diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.jsx index 2519c4cf3a..8cfd094292 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerNode.jsx @@ -10,7 +10,7 @@ import { PlusIcon, TrashAltIcon, } from '@patternfly/react-icons'; -import { constants as wfConstants } from '@util/workflow'; +import { constants as wfConstants } from '@components/Workflow/WorkflowUtils'; import { WorkflowActionTooltip, WorkflowActionTooltipItem,