MCPcopy Create free account
hub / github.com/ScrapeGraphAI/scrapecraft / OutputView

Function OutputView

frontend/src/components/Pipeline/OutputView.tsx:5–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import LoadingSpinner from '../Common/LoadingSpinner';
4
5const OutputView: React.FC = () => {
6 const { currentPipeline, executionResults } = usePipelineStore();
7
8 if (!currentPipeline) {
9 return (
10 <div className="h-full flex items-center justify-center text-muted">
11 <p>No pipeline selected</p>
12 </div>
13 );
14 }
15
16 if (currentPipeline.status === 'running') {
17 return (
18 <div className="h-full flex flex-col items-center justify-center">
19 <LoadingSpinner />
20 <p className="mt-4 text-muted">Executing pipeline...</p>
21 </div>
22 );
23 }
24
25 if (!executionResults || executionResults.length === 0) {
26 return (
27 <div className="h-full flex flex-col items-center justify-center text-muted">
28 <p className="text-lg mb-2">No execution results yet</p>
29 <p className="text-sm">Click "Run Pipeline" to execute your scraping code</p>
30 </div>
31 );
32 }
33
34 return (
35 <div className="h-full flex flex-col p-4">
36 <div className="mb-4">
37 <h3 className="text-lg font-semibold mb-2">Execution Results</h3>
38 <div className="text-sm text-muted">
39 Status: <span className={`font-medium ${
40 currentPipeline.status === 'completed' ? 'text-success' :
41 currentPipeline.status === 'failed' ? 'text-error' :
42 'text-muted'
43 }`}>
44 {currentPipeline.status}
45 </span>
46 </div>
47 </div>
48
49 <div className="flex-1 overflow-y-auto space-y-4">
50 {executionResults.map((result, index) => (
51 <div key={index} className="card">
52 <div className="flex items-start justify-between mb-2">
53 <h4 className="font-medium">
54 Result {index + 1}
55 {result.url && <span className="text-sm text-muted ml-2">({result.url})</span>}
56 </h4>
57 {result.success !== undefined && (
58 <span className={`text-sm ${result.success ? 'text-success' : 'text-error'}`}>
59 {result.success ? '✓ Success' : '✗ Failed'}
60 </span>
61 )}
62 </div>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected