cognee/cognee-frontend/src/ui/elements/StatusIndicator.tsx
Boris 773b15a645
feat: websockets for pipeline update streaming (#851)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.

---------

Co-authored-by: hajdul88 <52442977+hajdul88@users.noreply.github.com>
Co-authored-by: lxobr <122801072+lxobr@users.noreply.github.com>
Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com>
Co-authored-by: Hande <159312713+hande-k@users.noreply.github.com>
Co-authored-by: Vasilije <8619304+Vasilije1990@users.noreply.github.com>
2025-06-11 20:29:26 +02:00

22 lines
666 B
TypeScript

export default function StatusIndicator({ status }: { status: "DATASET_PROCESSING_COMPLETED" | string }) {
const statusColor = {
DATASET_PROCESSING_STARTED: "#ffd500",
DATASET_PROCESSING_INITIATED: "#ffd500",
DATASET_PROCESSING_COMPLETED: "#53ff24",
DATASET_PROCESSING_ERRORED: "#ff5024",
};
const isSuccess = status === "DATASET_PROCESSING_COMPLETED";
return (
<div
style={{
width: "16px",
height: "16px",
borderRadius: "4px",
background: statusColor[status as keyof typeof statusColor],
}}
title={isSuccess ? "Dataset cognified" : "Cognify data in order to explore it"}
/>
);
}