Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

Commit 5cb1b0c

Browse files
committed
Better function name.
1 parent de445c4 commit 5cb1b0c

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

.github/workflows/webui.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ jobs:
7171
- name: Install dependencies
7272
run: yarn install
7373
- name: Check format
74-
run: Format check
74+
run: yarn format:check
7575
- name: Check eslint
76-
run: Lint check
76+
run: yarn lint
7777
- name: Build with Next.js
7878
run: yarn next build
7979
- name: Static HTML export with Next.js

web-ui/src/pages/streaming/builder/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { ReactFlowProvider, useReactFlow } from 'reactflow'
2828
import { useDebouncedCallback } from 'use-debounce'
2929
import { removePrefix } from 'src/utils'
3030
import { useReplacePlaceholder } from 'src/streaming/builder/hooks/useSqlPlaceholderClick'
31-
import { projectToProjectWithSchema } from 'src/types/program'
31+
import { parseProjectSchema } from 'src/types/program'
3232
import { connectorConnects, useAddConnector } from 'src/streaming/builder/hooks/useAddIoNode'
3333
import MissingSchemaDialog from 'src/streaming/builder/NoSchemaDialog'
3434
import useStatusNotification from 'src/components/errors/useStatusNotification'
@@ -125,7 +125,7 @@ export const PipelineWithProvider = (props: {
125125
setMissingSchemaDialog(false)
126126
}
127127

128-
const programWithSchema = projectToProjectWithSchema(foundProject)
128+
const programWithSchema = parseProjectSchema(foundProject)
129129
if (attachedConnectors) {
130130
invalidConnections = attachedConnectors.filter(attached_connector => {
131131
return !connectorConnects(attached_connector, programWithSchema.schema)

web-ui/src/pages/streaming/introspection/[config]/[view].tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { useEffect, useRef, useState } from 'react'
1212
import PageHeader from 'src/layouts/components/page-header'
1313
import { ConfigDescr, ConfigId, ProjectDescr } from 'src/types/manager'
1414
import { parse } from 'csv-parse'
15-
import { projectToProjectWithSchema } from 'src/types/program'
15+
import { parseProjectSchema } from 'src/types/program'
1616

1717
const IntrospectInputOutput = () => {
1818
const apiRef = useGridApiRef()
@@ -29,7 +29,7 @@ const IntrospectInputOutput = () => {
2929
useEffect(() => {
3030
if (!projectQuery.isLoading && !projectQuery.isError && viewName) {
3131
if (projectQuery.data && projectQuery.data.schema) {
32-
const program = projectToProjectWithSchema(projectQuery.data)
32+
const program = parseProjectSchema(projectQuery.data)
3333
const view = program.schema['outputs'].find(v => v.name === viewName)
3434
if (view) {
3535
const id = [{ field: 'genId', headerName: 'genId', flex: 0.1 }]

web-ui/src/streaming/builder/NodeTypes/SqlPlaceholderNode.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Autocomplete, CardContent, TextField, Typography } from '@mui/material'
77
import { useQuery } from '@tanstack/react-query'
88

99
import { PlaceholderNode } from '../NodeTypes'
10-
import { projectToProjectWithSchema, ProjectWithSchema } from 'src/types/program'
10+
import { parseProjectSchema, ProjectWithSchema } from 'src/types/program'
1111
import useSqlPlaceholderClick from '../hooks/useSqlPlaceholderClick'
1212
import { ProjectDescr } from 'src/types/manager'
1313

@@ -24,7 +24,7 @@ const SqlPlaceHolderNode = (props: NodeProps) => {
2424
const { isLoading, isError, data } = useQuery<ProjectDescr[]>(['project'])
2525
useEffect(() => {
2626
if (!isLoading && !isError) {
27-
setPrograms(data.filter(p => p.schema).map(projectToProjectWithSchema))
27+
setPrograms(data.filter(p => p.schema).map(parseProjectSchema))
2828
}
2929
}, [isLoading, isError, data])
3030

web-ui/src/types/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface ProjectWithSchema {
1111
schema: Schema
1212
}
1313

14-
export function projectToProjectWithSchema(project: ProjectDescr): ProjectWithSchema {
14+
export function parseProjectSchema(project: ProjectDescr): ProjectWithSchema {
1515
return {
1616
name: project.name,
1717
project_id: project.project_id,

0 commit comments

Comments
 (0)