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:
parent
bc6a667a6b
commit
c819d4e7f7
59 changed files with 880 additions and 586 deletions
|
@ -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)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue