fix(docker/containers): show teaser for webhook

refactor/EE-2307/EE-5207/container-base-form
Chaim Lev-Ari 2023-09-26 10:16:21 +03:00
parent 3b96877616
commit 46c278ffc9
2 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,6 @@
import _ from 'lodash-es';
import { confirmDestructive } from '@@/modals/confirm';
import { FeatureId } from '@/react/portainer/feature-flags/enums';
import { buildConfirmButton } from '@@/modals/utils';
import { commandsTabUtils } from '@/react/docker/containers/CreateView/CommandsTab';
@ -77,9 +76,9 @@ angular.module('portainer.docker').controller('CreateContainerController', [
$scope.create = create;
$scope.endpoint = endpoint;
$scope.containerWebhookFeature = FeatureId.CONTAINER_WEBHOOK;
$scope.isAdmin = Authentication.isAdmin();
const userDetails = this.Authentication.getUserDetails();
const userDetails = Authentication.getUserDetails();
$scope.formValues = {
commands: commandsTabUtils.getDefaultViewModel(),

View File

@ -9,6 +9,7 @@ import { NodeSelector } from '@/react/docker/agent/NodeSelector';
import { useIsSwarm } from '@/react/docker/proxy/queries/useInfo';
import { useEnvironmentId } from '@/react/hooks/useEnvironmentId';
import { isAgentEnvironment } from '@/react/portainer/environments/utils';
import { FeatureId } from '@/react/portainer/feature-flags/enums';
import { FormControl } from '@@/form-components/FormControl';
import { FormSection } from '@@/form-components/FormSection';
@ -119,6 +120,7 @@ export function BaseForm({
onChange={(enableWebhook) =>
onChange({ ...values, enableWebhook })
}
featureId={FeatureId.CONTAINER_WEBHOOK}
/>
</div>
</div>