Files
MemShellParty/web/app/components/probeshell/shell-result.tsx
T
ReaJason d4e0640449
Dev Deploy / Build Jar (ubuntu-latest) (push) Has been cancelled
Dev Deploy / Build Jar (windows-latest) (push) Has been cancelled
MemShell IntegrationTest / jenkins (push) Has been cancelled
MemShell IntegrationTest / xxljob (push) Has been cancelled
MemShell IntegrationTest / dubbo (push) Has been cancelled
MemShell IntegrationTest / springwebmvc (push) Has been cancelled
MemShell IntegrationTest / springwebflux (push) Has been cancelled
MemShell IntegrationTest / struts2 (push) Has been cancelled
MemShell IntegrationTest / tomcat (push) Has been cancelled
MemShell IntegrationTest / glassfish (push) Has been cancelled
MemShell IntegrationTest / jbosseap (push) Has been cancelled
MemShell IntegrationTest / jetty (push) Has been cancelled
MemShell IntegrationTest / payara (push) Has been cancelled
MemShell IntegrationTest / wildfly (push) Has been cancelled
MemShell IntegrationTest / geronimo (push) Has been cancelled
MemShell IntegrationTest / jbossas (push) Has been cancelled
MemShell IntegrationTest / resin (push) Has been cancelled
MemShell IntegrationTest / weblogic (push) Has been cancelled
MemShell IntegrationTest / websphere7 (push) Has been cancelled
MemShell IntegrationTest / websphere (push) Has been cancelled
Dev Deploy / Docker Push (push) Has been cancelled
Dev Deploy / Deploy to Maven Central (push) Has been cancelled
Dev Deploy / Deploy to Northflank (push) Has been cancelled
refactor: rm useless code
2026-06-28 19:33:30 +08:00

54 lines
1.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { ProbeShellResult } from "@/types/probeshell";
import { useTranslation } from "react-i18next";
import { QuickUsage } from "@/components/probeshell/quick-usage";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import CodeViewer from "../code-viewer";
import { BasicInfo } from "./basic-info";
export default function ShellResult({
packResult,
packMethod,
generateResult,
}: Readonly<{
packResult: string | undefined;
packMethod: string;
generateResult?: ProbeShellResult;
}>) {
const { t } = useTranslation();
if (!generateResult) {
return <QuickUsage />;
}
const showCode = packMethod === "JSP";
const height = 600;
return (
<Tabs defaultValue="packResult">
<TabsList className="grid w-full grid-cols-1">
<TabsTrigger value="packResult">{t("common:generateResult")}</TabsTrigger>
</TabsList>
<TabsContent value="packResult" className="space-y-2">
<BasicInfo generateResult={generateResult} />
{packResult && (
<CodeViewer
code={packResult}
header={
<div className="flex items-center justify-between gap-2 text-xs">
<span>
{t("common:packerMethod")}{packMethod}
</span>
<span className="text-muted-foreground">({packResult?.length})</span>
</div>
}
wrapLongLines={!showCode}
showLineNumbers={showCode}
language={showCode ? "java" : "text"}
height={height}
/>
)}
</TabsContent>
</Tabs>
);
}