mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(edge/stacks): migrate envs table to react [EE-5613] (#9093)
This commit is contained in:
parent
dfc1a7b1d7
commit
11571fd6ea
24 changed files with 652 additions and 281 deletions
|
@ -0,0 +1,39 @@
|
|||
import { Search } from 'lucide-react';
|
||||
import { useCurrentStateAndParams } from '@uirouter/react';
|
||||
|
||||
import { Environment } from '@/react/portainer/environments/types';
|
||||
|
||||
import { Button } from '@@/buttons';
|
||||
import { Link } from '@@/Link';
|
||||
import { Icon } from '@@/Icon';
|
||||
|
||||
import { LogsActions } from './LogsActions';
|
||||
|
||||
interface Props {
|
||||
environment: Environment;
|
||||
}
|
||||
|
||||
export function EnvironmentActions({ environment }: Props) {
|
||||
const {
|
||||
params: { stackId: edgeStackId },
|
||||
} = useCurrentStateAndParams();
|
||||
|
||||
return (
|
||||
<div className="space-x-2">
|
||||
{environment.Snapshots.length > 0 && (
|
||||
<Link
|
||||
to="edge.browse.containers"
|
||||
params={{ environmentId: environment.Id, edgeStackId }}
|
||||
className="!text-inherit hover:!no-underline"
|
||||
>
|
||||
<Button color="none" title="Browse Snapshot">
|
||||
<Icon icon={Search} className="searchIcon" />
|
||||
</Button>
|
||||
</Link>
|
||||
)}
|
||||
{environment.Edge.AsyncMode && (
|
||||
<LogsActions environmentId={environment.Id} edgeStackId={edgeStackId} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue