Skip to content

Commit a3a3489

Browse files
authored
Release v1.32.1 (#849)
- PLU-406: always show delete button on mobile] - PLU-405: only display executions for single pipe
2 parents 8a132ca + 21e9d15 commit a3a3489

File tree

22 files changed

+393
-126
lines changed

22 files changed

+393
-126
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,5 @@
105105
"tsconfig-paths": "^4.2.0",
106106
"type-fest": "4.10.3"
107107
},
108-
"version": "1.32.0"
108+
"version": "1.32.1"
109109
}

packages/backend/src/graphql/queries/get-executions.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,18 @@ const getExecutions: QueryResolvers['getExecutions'] = async (
1111
) => {
1212
const filterBuilder = (builder: ExtendedQueryBuilder<Execution>) => {
1313
builder.where('test_run', 'FALSE')
14+
builder.where('flow_id', params.flowId)
15+
1416
if (!('status' in params)) {
1517
builder.whereNull('status')
1618
}
1719
if (params.status) {
1820
builder.where('status', params.status)
1921
}
20-
if (params.searchInput) {
21-
builder.where('name', 'ilike', `%${params.searchInput}%`)
22-
}
2322
}
2423

2524
const executionsQuery = context.currentUser
2625
.$relatedQuery('executions')
27-
.withGraphFetched({
28-
flow: {
29-
steps: true,
30-
},
31-
})
3226
.where(filterBuilder)
3327
.orderBy('created_at', 'desc')
3428

packages/backend/src/graphql/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ type Query {
2525
getExecutions(
2626
limit: Int!
2727
offset: Int!
28+
flowId: String!
2829
status: String
29-
searchInput: String
3030
): PaginatedExecutions
3131
getExecutionSteps(
3232
executionId: String!

packages/backend/src/helpers/generate-error-email.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ function truncateFlowName(flowName: string) {
1414
: flowName
1515
}
1616

17-
export function createBodyErrorMessage(flowName: string): string {
17+
export function createBodyErrorMessage(
18+
flowName: string,
19+
pipeId: string,
20+
): string {
1821
const currDateTime = DateTime.now().toFormat('MMM dd yyyy, hh:mm a')
1922
const searchParams = new URLSearchParams()
2023
searchParams.set('status', 'failure')
21-
searchParams.set('input', flowName)
2224

2325
const appPrefixUrl = appConfig.isDev ? appConfig.webAppUrl : appConfig.baseUrl
24-
const redirectUrl = `/executions?${searchParams.toString()}`
26+
const redirectUrl = `/execution-pipe/${pipeId}?${searchParams.toString()}`
2527
const formattedUrl = `${appPrefixUrl}${redirectUrl}`
2628

2729
const bodyMessage = `
@@ -76,7 +78,7 @@ export async function sendErrorEmail(flow: Flow) {
7678

7779
await sendEmail({
7880
subject: `Plumber: Possible error on ${truncatedFlowName}`,
79-
body: createBodyErrorMessage(truncatedFlowName),
81+
body: createBodyErrorMessage(truncatedFlowName, flowId),
8082
recipient: userEmail,
8183
replyTo: '[email protected]',
8284
})

packages/frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frontend",
3-
"version": "1.32.0",
3+
"version": "1.32.1",
44
"scripts": {
55
"dev": "wait-on tcp:3000 && vite --host --force",
66
"build": "tsc && vite build --mode=${VITE_MODE:-prod}",

packages/frontend/src/components/FlowRow/index.tsx

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { IFlow } from '@plumber/types'
22

33
import { ReactElement } from 'react'
4+
import { BiChevronRight } from 'react-icons/bi'
45
import { Link } from 'react-router-dom'
56
import {
67
Card,
@@ -9,6 +10,7 @@ import {
910
Grid,
1011
GridItem,
1112
HStack,
13+
Icon,
1214
Text,
1315
VStack,
1416
} from '@chakra-ui/react'
@@ -22,10 +24,18 @@ import FlowContextMenu from './FlowContextMenu'
2224

2325
type FlowRowProps = {
2426
flow: IFlow
27+
isExecution?: boolean
28+
showMenu?: boolean
29+
showTimestamp?: boolean
2530
}
2631

2732
export default function FlowRow(props: FlowRowProps): ReactElement {
28-
const { flow } = props
33+
const {
34+
flow,
35+
showMenu = true,
36+
showTimestamp = true,
37+
isExecution = false,
38+
} = props
2939

3040
const createdAt = DateTime.fromMillis(parseInt(flow.createdAt, 10))
3141
const updatedAt = DateTime.fromMillis(parseInt(flow.updatedAt, 10))
@@ -42,12 +52,18 @@ export default function FlowRow(props: FlowRowProps): ReactElement {
4252
borderRadius={0}
4353
borderBottom="1px solid"
4454
borderBottomColor="base.divider.medium"
55+
minH={100}
4556
>
4657
<CardBody
4758
sx={{ cursor: 'pointer' }}
4859
p={0}
4960
as={Link}
50-
to={URLS.FLOW(flow.id)}
61+
to={
62+
isExecution ? URLS.EXECUTIONS_FOR_FLOW(flow.id) : URLS.FLOW(flow.id)
63+
}
64+
display="flex"
65+
alignItems="center"
66+
justifyContent="stretch"
5167
>
5268
<Grid
5369
templateAreas={{
@@ -63,6 +79,7 @@ export default function FlowRow(props: FlowRowProps): ReactElement {
6379
md: 'calc(30px * 3 + 8px * 2) minmax(0, auto) min-content',
6480
}}
6581
gap={6}
82+
flex={1}
6683
alignItems="center"
6784
py={6}
6885
px={{ base: 3, md: 8 }}
@@ -90,16 +107,18 @@ export default function FlowRow(props: FlowRowProps): ReactElement {
90107
>
91108
{flow?.name}
92109
</Text>
93-
<Text
94-
display="inline-block"
95-
w="100%"
96-
maxW="85%"
97-
color="base.content.medium"
98-
textStyle="body-2"
99-
>
100-
{isUpdated && `updated ${relativeUpdatedAt}`}
101-
{!isUpdated && `created ${relativeCreatedAt}`}
102-
</Text>
110+
{showTimestamp && (
111+
<Text
112+
display="inline-block"
113+
w="100%"
114+
maxW="85%"
115+
color="base.content.medium"
116+
textStyle="body-2"
117+
>
118+
{isUpdated && `updated ${relativeUpdatedAt}`}
119+
{!isUpdated && `created ${relativeCreatedAt}`}
120+
</Text>
121+
)}
103122
</VStack>
104123
</GridItem>
105124
<GridItem area="menu">
@@ -111,7 +130,11 @@ export default function FlowRow(props: FlowRowProps): ReactElement {
111130
<Text>{flow?.active ? 'Published' : 'Draft'}</Text>
112131
</Badge>
113132

114-
<FlowContextMenu flow={flow} />
133+
{showMenu ? (
134+
<FlowContextMenu flow={flow} />
135+
) : (
136+
<Icon boxSize={5} as={BiChevronRight} />
137+
)}
115138
</Flex>
116139
</GridItem>
117140
</Grid>

packages/frontend/src/components/Layout/NavigationSidebar.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useContext } from 'react'
2-
import { Link, useMatch } from 'react-router-dom'
2+
import { Link, matchPath, useLocation } from 'react-router-dom'
33
import { Box, Text } from '@chakra-ui/react'
44
import {
55
Badge,
@@ -20,8 +20,12 @@ function NavigationSidebarItem({
2020
link,
2121
closeDrawer,
2222
}: NavigationSidebarItemProps): JSX.Element {
23-
const { to, Icon: icon, text } = link
24-
const selected = useMatch({ path: to, end: true })
23+
const { pathname } = useLocation()
24+
25+
const { to, Icon: icon, text, otherLinks } = link
26+
const selected = [to, ...(otherLinks || [])].some((link) =>
27+
matchPath(link, pathname),
28+
)
2529

2630
return (
2731
<SidebarItem

packages/frontend/src/components/Layout/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export type DrawerLink = {
2323
Icon: React.ElementType
2424
text: string
2525
to: string
26+
otherLinks?: string[]
2627
isBottom?: boolean
2728
badge?: string
2829
}
@@ -47,6 +48,7 @@ const drawerLinks = [
4748
Icon: BiHistory,
4849
text: 'Executions',
4950
to: URLS.EXECUTIONS,
51+
otherLinks: [URLS.EXECUTIONS_FOR_FLOW_PATTERN, URLS.EXECUTION_PATTERN],
5052
},
5153
{
5254
Icon: BiBookOpen,

packages/frontend/src/components/SingleSelect/SelectContext.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export interface SharedSelectContextReturnProps<
3535
isRefreshLoading?: boolean
3636
/** Controls if user can add one arbitrary item of their choosing. */
3737
freeSolo?: boolean
38+
/** Variant of the select */
39+
variant?: string
3840
}
3941

4042
interface SelectContextReturn<Item extends ComboboxItem = ComboboxItem>

0 commit comments

Comments
 (0)