Spaces:
Sleeping
Sleeping
Commit
·
b9fa64b
1
Parent(s):
738bb6b
add
Browse files
frontend/src/components/features/comparison/GraphSelector.tsx
CHANGED
|
@@ -462,110 +462,7 @@ export const GraphSelector: React.FC<GraphSelectorProps> = ({
|
|
| 462 |
)}
|
| 463 |
</div>
|
| 464 |
|
| 465 |
-
{/* Selection Summary */}
|
| 466 |
-
{(selectedGraph1 || selectedGraph2) && (
|
| 467 |
-
<Card className="border-2 border-dashed border-muted-foreground/20">
|
| 468 |
-
<CardHeader className="pb-3">
|
| 469 |
-
<CardTitle className="text-lg font-semibold flex items-center gap-2">
|
| 470 |
-
<div className="w-2 h-2 rounded-full bg-primary"></div>
|
| 471 |
-
Selection Summary
|
| 472 |
-
</CardTitle>
|
| 473 |
-
</CardHeader>
|
| 474 |
-
<CardContent>
|
| 475 |
-
<div className="space-y-4">
|
| 476 |
-
<div className="flex items-center gap-2">
|
| 477 |
-
<span className="text-sm font-medium">
|
| 478 |
-
{(selectedGraph1 ? 1 : 0) + (selectedGraph2 ? 1 : 0)} of 2
|
| 479 |
-
graphs selected
|
| 480 |
-
</span>
|
| 481 |
-
{canCompare && (
|
| 482 |
-
<Badge
|
| 483 |
-
variant="default"
|
| 484 |
-
className="bg-green-500 hover:bg-green-600"
|
| 485 |
-
>
|
| 486 |
-
Ready to Compare
|
| 487 |
-
</Badge>
|
| 488 |
-
)}
|
| 489 |
-
</div>
|
| 490 |
-
|
| 491 |
-
{canCompare && (
|
| 492 |
-
<div className="space-y-3">
|
| 493 |
-
<div className="p-4 bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-lg">
|
| 494 |
-
<div className="flex items-center gap-2 mb-3">
|
| 495 |
-
<div className="w-2 h-2 rounded-full bg-green-500"></div>
|
| 496 |
-
<span className="text-sm text-green-700 font-semibold">
|
| 497 |
-
Comparison Ready
|
| 498 |
-
</span>
|
| 499 |
-
</div>
|
| 500 |
-
<div className="grid grid-cols-2 gap-4">
|
| 501 |
-
<div className="space-y-2">
|
| 502 |
-
<div className="flex items-center gap-2">
|
| 503 |
-
<div className="w-5 h-5 rounded-full bg-blue-500 text-white text-xs flex items-center justify-center font-bold">
|
| 504 |
-
1
|
| 505 |
-
</div>
|
| 506 |
-
<span className="font-semibold text-sm">Graph 1</span>
|
| 507 |
-
</div>
|
| 508 |
-
<div className="pl-7">
|
| 509 |
-
<div
|
| 510 |
-
className="font-medium text-sm text-foreground whitespace-normal break-words"
|
| 511 |
-
title={getGraphDisplayName(selectedGraph1!)}
|
| 512 |
-
>
|
| 513 |
-
{getGraphDisplayName(selectedGraph1!)}
|
| 514 |
-
</div>
|
| 515 |
-
<div className="flex items-center gap-2 mt-1">
|
| 516 |
-
<Badge variant="outline" className="text-xs">
|
| 517 |
-
{selectedGraph1!.graph_type}
|
| 518 |
-
</Badge>
|
| 519 |
-
<span className="text-xs text-muted-foreground">
|
| 520 |
-
{selectedGraph1!.entity_count} entities
|
| 521 |
-
</span>
|
| 522 |
-
</div>
|
| 523 |
-
</div>
|
| 524 |
-
</div>
|
| 525 |
-
<div className="space-y-2">
|
| 526 |
-
<div className="flex items-center gap-2">
|
| 527 |
-
<div className="w-5 h-5 rounded-full bg-green-500 text-white text-xs flex items-center justify-center font-bold">
|
| 528 |
-
2
|
| 529 |
-
</div>
|
| 530 |
-
<span className="font-semibold text-sm">Graph 2</span>
|
| 531 |
-
</div>
|
| 532 |
-
<div className="pl-7">
|
| 533 |
-
<div
|
| 534 |
-
className="font-medium text-sm text-foreground whitespace-normal break-words"
|
| 535 |
-
title={getGraphDisplayName(selectedGraph2!)}
|
| 536 |
-
>
|
| 537 |
-
{getGraphDisplayName(selectedGraph2!)}
|
| 538 |
-
</div>
|
| 539 |
-
<div className="flex items-center gap-2 mt-1">
|
| 540 |
-
<Badge variant="outline" className="text-xs">
|
| 541 |
-
{selectedGraph2!.graph_type}
|
| 542 |
-
</Badge>
|
| 543 |
-
<span className="text-xs text-muted-foreground">
|
| 544 |
-
{selectedGraph2!.entity_count} entities
|
| 545 |
-
</span>
|
| 546 |
-
</div>
|
| 547 |
-
</div>
|
| 548 |
-
</div>
|
| 549 |
-
</div>
|
| 550 |
-
</div>
|
| 551 |
-
</div>
|
| 552 |
-
)}
|
| 553 |
-
|
| 554 |
-
{(!selectedGraph1 || !selectedGraph2) && (
|
| 555 |
-
<div className="p-3 bg-muted/30 border border-muted rounded-lg">
|
| 556 |
-
<p className="text-sm text-muted-foreground text-center">
|
| 557 |
-
Select{" "}
|
| 558 |
-
{!selectedGraph1 && !selectedGraph2
|
| 559 |
-
? "2 graphs"
|
| 560 |
-
: "1 more graph"}{" "}
|
| 561 |
-
to enable comparison
|
| 562 |
-
</p>
|
| 563 |
-
</div>
|
| 564 |
-
)}
|
| 565 |
-
</div>
|
| 566 |
-
</CardContent>
|
| 567 |
-
</Card>
|
| 568 |
-
)}
|
| 569 |
</div>
|
| 570 |
);
|
| 571 |
};
|
|
|
|
| 462 |
)}
|
| 463 |
</div>
|
| 464 |
|
| 465 |
+
{/* Selection Summary removed */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 466 |
</div>
|
| 467 |
);
|
| 468 |
};
|