1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 05:49:40 +02:00

feat(environments): create async edge [EE-4480] (#8527)

This commit is contained in:
Chaim Lev-Ari 2023-03-01 20:33:05 +02:00 committed by GitHub
parent bc6a667a6b
commit c819d4e7f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 880 additions and 586 deletions

View file

@ -16,7 +16,7 @@ interface Props {
commands: CommandTab[];
platform?: Platform;
onPlatformChange?(platform: Platform): void;
hideAsyncMode?: boolean;
asyncMode?: boolean;
}
export function ScriptTabs({
@ -25,7 +25,7 @@ export function ScriptTabs({
edgeId,
commands,
platform,
hideAsyncMode = false,
asyncMode = false,
onPlatformChange = () => {},
}: Props) {
const agentDetails = useAgentDetails();
@ -40,14 +40,14 @@ export function ScriptTabs({
return null;
}
const { agentSecret, agentVersion, useEdgeAsyncMode } = agentDetails;
const { agentSecret, agentVersion } = agentDetails;
const options = commands.map((c) => {
const cmd = c.command(
agentVersion,
edgeKey,
values,
!hideAsyncMode && useEdgeAsyncMode,
asyncMode,
edgeId,
agentSecret
);
@ -67,14 +67,10 @@ export function ScriptTabs({
});
return (
<div className="row">
<div className="col-sm-12">
<NavTabs
selectedId={platform}
options={options}
onSelect={(id: Platform) => onPlatformChange(id)}
/>
</div>
</div>
<NavTabs
selectedId={platform}
options={options}
onSelect={(id: Platform) => onPlatformChange(id)}
/>
);
}