Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mwylde committed Jun 21, 2024
1 parent d2d1a5d commit b056cad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion crates/arroyo-api/src/udfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ pub async fn create_udf(
api_queries::execute_create_udf(
&client,
&pub_id,
&auth_data.user_id,
&auth_data.organization_id,
&auth_data.user_id,
&req.prefix,
&udf_name,
&req.definition,
Expand Down
7 changes: 3 additions & 4 deletions webui/src/lib/data_fetching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,11 @@ const connectionTablesFetcher = () => {
};
};

export const useConnectionTables = (limit: number) => {
export const useConnectionTables = (limit: number, refresh?: boolean) => {
const options = refresh ? { refreshInterval: 5000 } : {};
const { data, isLoading, mutate, size, setSize } = useSWRInfinite<
schemas['ConnectionTableCollection']
>(connectionTablesKey(limit), connectionTablesFetcher(), {
refreshInterval: 5000,
});
>(connectionTablesKey(limit), connectionTablesFetcher(), options);

return {
connectionTablePages: data,
Expand Down
2 changes: 1 addition & 1 deletion webui/src/routes/pipelines/CatalogTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ConnectionTable, useConnectionTables } from '../../lib/data_fetching';
import { Catalog } from './Catalog';

const CatalogTab: React.FC = () => {
const { connectionTablePages, connectionTablesLoading } = useConnectionTables(200);
const { connectionTablePages, connectionTablesLoading } = useConnectionTables(200, false);

let connectionTables: ConnectionTable[] = [];
let catalogTruncated = false;
Expand Down
5 changes: 1 addition & 4 deletions webui/src/routes/pipelines/CreatePipeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,11 @@ export function CreatePipeline() {
const [operatorErrors, setOperatorErrors] = useState<JobLogMessage[]>([]);
const [queryInput, setQueryInput] = useState<string>('');
const [queryInputToCheck, setQueryInputToCheck] = useState<string | undefined>(undefined);
const { operatorMetricGroups } = useJobMetrics(pipelineId, job?.id);
const { isOpen, onOpen, onClose } = useDisclosure();
const [options, setOptions] = useState<SqlOptions>({ parallelism: 4, checkpointMS: 5000 });
const navigate = useNavigate();
const [startError, setStartError] = useState<string | null>(null);
const [tabIndex, setTabIndex] = useState<number>(0);
const { connectionTablesLoading } = useConnectionTables(50);
const queryParams = useQuery();
const { pipeline: copyFrom, pipelineLoading: copyFromLoading } = usePipeline(
queryParams.get('from') ?? undefined
Expand Down Expand Up @@ -213,7 +211,7 @@ export function CreatePipeline() {
}, [sidebarElement]);

// Top-level loading state
if (copyFromLoading || connectionTablesLoading || !localUdfs) {
if (copyFromLoading || !localUdfs) {
return <Loading />;
}

Expand Down Expand Up @@ -388,7 +386,6 @@ export function CreatePipeline() {
>
<PipelineGraphViewer
graph={queryValidation.graph}
operatorMetricGroups={operatorMetricGroups}
setActiveOperator={() => {}}
/>
</Box>
Expand Down

0 comments on commit b056cad

Please sign in to comment.