Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide runner response (fixes #3553) #3564

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
13 changes: 13 additions & 0 deletions packages/bruno-app/src/components/RunnerResults/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { runCollectionFolder, cancelRunnerExecution } from 'providers/ReduxStore
import { resetCollectionRunner } from 'providers/ReduxStore/slices/collections';
import { findItemInCollection, getTotalRequestCountInCollection } from 'utils/collections';
import { IconRefresh, IconCircleCheck, IconCircleX, IconCheck, IconX, IconRun } from '@tabler/icons';
import { IconRefresh, IconCircleCheck, IconCircleX, IconCheck, IconX, IconRun,IconEyeOff } from '@tabler/icons';
import slash from 'utils/common/slash';
import ResponsePane from './ResponsePane';
import StyledWrapper from './StyledWrapper';
Expand Down Expand Up @@ -183,10 +184,19 @@ export default function RunnerResults({ collection }) {
{item.status !== 'error' && item.status !== 'completed' ? (
<IconRefresh className="animate-spin ml-1" size={18} strokeWidth={1.5} />
) : item.responseReceived?.status ? (

selectedItem && JSON.stringify(item) === JSON.stringify(selectedItem) ? (
<span className="text-xs link cursor-pointer ml-2" onClick={() => setSelectedItem(null)}>
<IconEyeOff size={20} strokeWidth={1.5} />
</span>
) : (

<span className="text-xs link cursor-pointer" onClick={() => setSelectedItem(item)}>
(<span className="mr-1">{item.responseReceived?.status}</span>
<span>{item.responseReceived?.statusText}</span>)
</span>

)
) : (
<span className="danger text-xs cursor-pointer" onClick={() => setSelectedItem(item)}>
(request failed)
Expand Down Expand Up @@ -265,6 +275,9 @@ export default function RunnerResults({ collection }) {
<IconCircleX className="test-failure" size={20} strokeWidth={1.5} />
)}
</span>
<span className="text-xs link cursor-pointer ml-2" onClick={() => setSelectedItem(null)}>
<IconEyeOff size={20} strokeWidth={1.5} />
</span>
</div>
{/* <div className='px-3 mb-4 font-medium'>{selectedItem.relativePath}</div> */}
<ResponsePane item={selectedItem} collection={collection} />
Expand Down