Skip to content
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 @@ -10,17 +10,19 @@ const convertServerRecord = (record: ServerProcessingService) =>
new ProcessingService(record)

export const useProcessingServiceDetails = (
processingServiceId: string
processingServiceId: string,
projectId?: string
): {
processingService?: ProcessingService
isLoading: boolean
isFetching: boolean
error?: unknown
} => {
const params = projectId ? `?project_id=${projectId}` : ''
const { data, isLoading, isFetching, error } =
useAuthorizedQuery<ProcessingService>({
queryKey: [API_ROUTES.PROCESSING_SERVICES, processingServiceId],
url: `${API_URL}/${API_ROUTES.PROCESSING_SERVICES}/${processingServiceId}`,
queryKey: [API_ROUTES.PROCESSING_SERVICES, processingServiceId, projectId],
url: `${API_URL}/${API_ROUTES.PROCESSING_SERVICES}/${processingServiceId}/${params}`,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
})

const processingService = useMemo(
Expand Down
4 changes: 3 additions & 1 deletion ui/src/data-services/models/processing-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ export class ProcessingService extends Entity {
color: string
} {
if (this.isAsync) {
return ProcessingService.getStatusInfo('UNKNOWN')
// Async services derive status from heartbeat
const status_code = this.lastSeenLive ? 'ONLINE' : 'UNKNOWN'
return ProcessingService.getStatusInfo(status_code)
}
const status_code = this.lastSeenLive ? 'ONLINE' : 'OFFLINE'
return ProcessingService.getStatusInfo(status_code)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const ProcessingServiceDetailsDialog = ({ id }: { id: string }) => {
const navigate = useNavigate()
const { projectId } = useParams()
const { processingService, isLoading, error } =
useProcessingServiceDetails(id)
useProcessingServiceDetails(id, projectId)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

return (
<Dialog.Root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ const config: FormConfig = {
},
endpoint_url: {
label: 'Endpoint URL',
description: 'Processing service endpoint.',
rules: {
required: true,
},
description:
'Processing service endpoint. Leave empty for pull-mode services that register themselves.',
},
Comment thread
mihow marked this conversation as resolved.
description: {
label: translate(STRING.FIELD_LABEL_DESCRIPTION),
Expand Down
Loading