feat: add SQS + EventBridge
This commit is contained in:
@@ -5,6 +5,7 @@ import {invokeCloudResource} from "@/api/cloudProxyClient";
|
||||
import type {ServerlessInvokeResult} from "@/api/cloudProxyClient";
|
||||
import type {CloudProvider} from "@/types/cloud";
|
||||
import type {CloudResource} from "@/types/resource";
|
||||
import {LogsQueryPanel} from "./LogsQueryPanel";
|
||||
|
||||
interface ServerlessInvokePanelProps {
|
||||
cloud: CloudProvider;
|
||||
@@ -22,6 +23,7 @@ export function ServerlessInvokePanel({
|
||||
const [showLog, setShowLog] = useState(false);
|
||||
const [copied, setCopied] = useState(false);
|
||||
const [validationError, setValidationError] = useState<string | null>(null);
|
||||
const [logsRefreshKey, setLogsRefreshKey] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
setPayload("{\n \n}");
|
||||
@@ -29,6 +31,7 @@ export function ServerlessInvokePanel({
|
||||
setShowLog(false);
|
||||
setCopied(false);
|
||||
setValidationError(null);
|
||||
setLogsRefreshKey(0);
|
||||
}, [resource?.id]);
|
||||
|
||||
const isSupportedResource =
|
||||
@@ -54,6 +57,7 @@ export function ServerlessInvokePanel({
|
||||
setInvokeResult(result);
|
||||
setShowLog(false);
|
||||
setCopied(false);
|
||||
setLogsRefreshKey((value) => value + 1);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -221,6 +225,14 @@ const clearPayload = () => {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{cloud === "aws" && invokeResult && (
|
||||
<LogsQueryPanel
|
||||
cloud={cloud}
|
||||
logGroupName={`/aws/lambda/${resource.name}`}
|
||||
runtimeReachable={runtimeReachable}
|
||||
autoRunKey={logsRefreshKey}
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user