mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-02 00:57:45 +00:00
Fix the TypeScript warnings
This commit is contained in:
parent
494af0c8c7
commit
254068ec39
@ -38,7 +38,7 @@ const App = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
}, []);
|
});
|
||||||
|
|
||||||
const onTLSDetected = (destAddress: string) => {
|
const onTLSDetected = (destAddress: string) => {
|
||||||
addressesWithTLS.add(destAddress);
|
addressesWithTLS.add(destAddress);
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import {singleEntryToHAR} from "./utils";
|
import {singleEntryToHAR} from "./utils";
|
||||||
import styles from './style/HarEntryDetailed.module.sass';
|
|
||||||
import HAREntryViewer from "./HarEntryViewer/HAREntryViewer";
|
import HAREntryViewer from "./HarEntryViewer/HAREntryViewer";
|
||||||
import {makeStyles} from "@material-ui/core";
|
import {makeStyles} from "@material-ui/core";
|
||||||
import Protocol, {ProtocolInterface} from "./Protocol"
|
import Protocol from "./Protocol"
|
||||||
import StatusCode from "./StatusCode";
|
import StatusCode from "./StatusCode";
|
||||||
import {EndpointPath} from "./EndpointPath";
|
import {EndpointPath} from "./EndpointPath";
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ import CollapsibleContainer from "../CollapsibleContainer";
|
|||||||
import FancyTextDisplay from "../FancyTextDisplay";
|
import FancyTextDisplay from "../FancyTextDisplay";
|
||||||
import Checkbox from "../Checkbox";
|
import Checkbox from "../Checkbox";
|
||||||
import ProtobufDecoder from "protobuf-decoder";
|
import ProtobufDecoder from "protobuf-decoder";
|
||||||
var jp = require('jsonpath');
|
|
||||||
|
|
||||||
interface HAREntryViewLineProps {
|
interface HAREntryViewLineProps {
|
||||||
label: string;
|
label: string;
|
||||||
@ -202,7 +201,7 @@ export const HAREntryPolicySectionContainer: React.FC<HAREntryPolicySectionConta
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const HAREntryTablePolicySection: React.FC<HAREntryPolicySectionProps> = ({service, title, color, response, latency, arrayToIterate}) => {
|
export const HAREntryTablePolicySection: React.FC<HAREntryPolicySectionProps> = ({service, title, color, response, latency, arrayToIterate}) => {
|
||||||
const base64ToJson = response.content.mimeType === "application/json; charset=utf-8" ? JSON.parse(Buffer.from(response.content.text, "base64").toString()) : {};
|
// const base64ToJson = response.content.mimeType === "application/json; charset=utf-8" ? JSON.parse(Buffer.from(response.content.text, "base64").toString()) : {};
|
||||||
return <React.Fragment>
|
return <React.Fragment>
|
||||||
{
|
{
|
||||||
arrayToIterate && arrayToIterate.length > 0 ?
|
arrayToIterate && arrayToIterate.length > 0 ?
|
||||||
|
@ -6,7 +6,7 @@ import {HAREntryTableSection, HAREntryBodySection, HAREntryTablePolicySection} f
|
|||||||
const SectionsRepresentation: React.FC<any> = ({data, color}) => {
|
const SectionsRepresentation: React.FC<any> = ({data, color}) => {
|
||||||
const sections = []
|
const sections = []
|
||||||
|
|
||||||
for (const [i, row] of data.entries()) {
|
data.forEach((row) => {
|
||||||
switch (row.type) {
|
switch (row.type) {
|
||||||
case "table":
|
case "table":
|
||||||
sections.push(
|
sections.push(
|
||||||
@ -21,7 +21,7 @@ const SectionsRepresentation: React.FC<any> = ({data, color}) => {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
return <>{sections}</>;
|
return <>{sections}</>;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user