mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-23 06:48:47 +00:00
cleaning
This commit is contained in:
parent
0e0b51b42c
commit
ef5b68a0c5
@ -28,7 +28,7 @@ const CollapsibleContainer: React.FC<Props> = ({title, children, isExpanded, onC
|
||||
onClick={(e) => {
|
||||
if (onClick) {
|
||||
onClick(e)
|
||||
if (passiveOnClick != true)
|
||||
if (passiveOnClick !== true)
|
||||
return;
|
||||
}
|
||||
_setExpanded(!_isExpanded)
|
||||
|
@ -19,13 +19,7 @@ export const HarEntriesList: React.FC<HarEntriesListProps> = ({entries, focusedE
|
||||
}
|
||||
}, [entriesDiv, totalCount])
|
||||
|
||||
// Reverse entries for displaying in ascending order
|
||||
// const entries = harStore.data.currentPagedResults.value.slice();
|
||||
return <>
|
||||
{/*{!isKafka && harStore.data.latestErrorType === ErrorType.TIMEOUT && <div>Timed out - many entries. Try to remove filters and try again</div>}*/}
|
||||
{/*{!isKafka && harStore.data.latestErrorType === ErrorType.GENERAL && <div>Error getting entries</div>}*/}
|
||||
{/*{!isKafka && harStore.data.isInitialized && harStore.data.fetchedCount === 0 && <div>No entries found</div>}*/}
|
||||
{/*{isKafka && selectedModelStore.kafka.sampleMessages.isLoading && <LoadingOverlay delay={0}/>}*/}
|
||||
<div ref={entriesDiv} className={styles.list}>
|
||||
{entries?.map(entry => <HarEntry key={entry.id}
|
||||
entry={entry}
|
||||
|
@ -23,9 +23,7 @@ interface HAREntryProps {
|
||||
export const HarEntry: React.FC<HAREntryProps> = ({entry, setFocusedEntryId, isSelected}) => {
|
||||
|
||||
return <>
|
||||
<div
|
||||
className={`${styles.row} ${isSelected ? styles.rowSelected : ''}`} onClick={() => setFocusedEntryId(entry.id)}
|
||||
>
|
||||
<div className={`${styles.row} ${isSelected ? styles.rowSelected : ''}`} onClick={() => setFocusedEntryId(entry.id)}>
|
||||
{entry.statusCode && <div>
|
||||
<StatusCode statusCode={entry.statusCode}/>
|
||||
</div>}
|
||||
@ -35,9 +33,7 @@ export const HarEntry: React.FC<HAREntryProps> = ({entry, setFocusedEntryId, isS
|
||||
{entry.service}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={styles.timestamp}>{new Date(+entry.timestamp*1000)?.toLocaleString()}</div>
|
||||
|
||||
</div>
|
||||
</>
|
||||
};
|
@ -28,7 +28,7 @@ const HarEntryTitle: React.FC<any> = ({har}) => {
|
||||
|
||||
const {log: {entries}} = har;
|
||||
const {response, request, timings: {receive}} = entries[0];
|
||||
const {method, url, postData} = request;
|
||||
const {method, url} = request;
|
||||
const {status, statusText, bodySize} = response;
|
||||
|
||||
|
||||
@ -47,8 +47,6 @@ const HarEntryTitle: React.FC<any> = ({har}) => {
|
||||
|
||||
export const HAREntryDetailed: React.FC<HarEntryDetailedProps> = ({classes, harEntry}) => {
|
||||
const har = singleEntryToHAR(harEntry);
|
||||
// const contractVirtualizationStore = useContractVirtualizationStore();
|
||||
// const contractVirtualizationDemoEnabled = useFeature('contractVirtualizationDemo');
|
||||
|
||||
return <>
|
||||
{har && <HarEntryTitle har={har}/>}
|
||||
@ -56,11 +54,7 @@ export const HAREntryDetailed: React.FC<HarEntryDetailedProps> = ({classes, harE
|
||||
{har && <HAREntryViewer
|
||||
harObject={har}
|
||||
className={classes?.root ?? styles.har}
|
||||
// isResponseMocked={contractVirtualizationDemoEnabled && contractVirtualizationStore.virtualServices.value.indexOf(har?.log?.entries[0]?.service) > -1}
|
||||
// showTitle={!extendedTitle}
|
||||
/>}
|
||||
{/*{(harEntry?.isLoading) && <LoadingIndicator className={styles.loader}/>}*/}
|
||||
{/*{(harEntry?.isError) && <div>Error loading HAR entry</div>}*/}
|
||||
</>
|
||||
</>
|
||||
};
|
||||
|
@ -3,16 +3,13 @@ import styles from './HAREntryViewer.module.sass';
|
||||
import Tabs from "../Tabs";
|
||||
import {HAREntryTableSection, HAREntryBodySection} from "./HAREntrySections";
|
||||
import useToggle from "../../hooks/use-toggle";
|
||||
import {formatSize} from "../utils";
|
||||
|
||||
const CONTENT_TYPE_KEY = 'content-type';
|
||||
const MIME_TYPE_KEY = 'mimeType';
|
||||
|
||||
|
||||
const HAREntryDisplay: React.FC<any> = ({entry, isCollapsed: initialIsCollapsed, isResponseMocked, showTitle}) => {
|
||||
const HAREntryDisplay: React.FC<any> = ({entry, isCollapsed: initialIsCollapsed, isResponseMocked}) => {
|
||||
const {request, response, timings: {receive}} = entry;
|
||||
const {method, url, postData} = request;
|
||||
const {status, statusText, bodySize} = response;
|
||||
const { url, postData} = request;
|
||||
|
||||
const TABS = [
|
||||
{tab: 'request'},
|
||||
|
Loading…
Reference in New Issue
Block a user