mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
fix(edge): introduce pause and rollback status [EE-5992] (#10465)
This commit is contained in:
parent
877dc1e236
commit
7c91780eb7
4 changed files with 41 additions and 7 deletions
|
@ -6,6 +6,7 @@ import { EdgeStackStatus, StatusType } from '@/react/edge/edge-stacks/types';
|
|||
import { useEnvironmentList } from '@/react/portainer/environments/queries';
|
||||
import { useParamState } from '@/react/hooks/useParamState';
|
||||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
||||
|
||||
import { Datatable } from '@@/datatables';
|
||||
import { useTableStateWithoutStorage } from '@@/datatables/useTableState';
|
||||
|
@ -78,6 +79,21 @@ export function EnvironmentsDatatable() {
|
|||
]
|
||||
);
|
||||
|
||||
const envStatusSelectOptions = [
|
||||
{ value: StatusType.Pending, label: 'Pending' },
|
||||
{ value: StatusType.Acknowledged, label: 'Acknowledged' },
|
||||
{ value: StatusType.ImagesPulled, label: 'Images pre-pulled' },
|
||||
{ value: StatusType.Running, label: 'Deployed' },
|
||||
{ value: StatusType.Error, label: 'Failed' },
|
||||
];
|
||||
if (isBE) {
|
||||
envStatusSelectOptions.concat([
|
||||
{ value: StatusType.PausedDeploying, label: 'Paused' },
|
||||
{ value: StatusType.RollingBack, label: 'Rolling back' },
|
||||
{ value: StatusType.RolledBack, label: 'Rolled back' },
|
||||
]);
|
||||
}
|
||||
|
||||
return (
|
||||
<Datatable
|
||||
columns={columns}
|
||||
|
@ -99,13 +115,7 @@ export function EnvironmentsDatatable() {
|
|||
bindToBody
|
||||
value={statusFilter}
|
||||
onChange={(e) => setStatusFilter(e ?? undefined)}
|
||||
options={[
|
||||
{ value: StatusType.Pending, label: 'Pending' },
|
||||
{ value: StatusType.Acknowledged, label: 'Acknowledged' },
|
||||
{ value: StatusType.ImagesPulled, label: 'Images pre-pulled' },
|
||||
{ value: StatusType.Running, label: 'Deployed' },
|
||||
{ value: StatusType.Error, label: 'Failed' },
|
||||
]}
|
||||
options={envStatusSelectOptions}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue