mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
Some checks failed
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:s390x platform:linux version:]) (push) Has been cancelled
/ triage (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
ci / build_images (map[arch:arm platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Test / test-client (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:linux]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
Test / test-server (map[arch:arm64 platform:linux]) (push) Has been cancelled
ci / build_manifests (push) Has been cancelled
265 lines
6.8 KiB
TypeScript
265 lines
6.8 KiB
TypeScript
import angular from 'angular';
|
|
|
|
import { r2a } from '@/react-tools/react2angular';
|
|
import { withCurrentUser } from '@/react-tools/withCurrentUser';
|
|
import { withReactQuery } from '@/react-tools/withReactQuery';
|
|
import { withUIRouter } from '@/react-tools/withUIRouter';
|
|
import { AnnotationsBeTeaser } from '@/react/kubernetes/annotations/AnnotationsBeTeaser';
|
|
import { withFormValidation } from '@/react-tools/withFormValidation';
|
|
import { GroupAssociationTable } from '@/react/portainer/environments/environment-groups/components/GroupAssociationTable';
|
|
import { AssociatedEnvironmentsSelector } from '@/react/portainer/environments/environment-groups/components/AssociatedEnvironmentsSelector';
|
|
import { HelmRepositoryDatatable } from '@/react/portainer/account/AccountView/HelmRepositoryDatatable';
|
|
import { withControlledInput } from '@/react-tools/withControlledInput';
|
|
|
|
import {
|
|
EnvironmentVariablesFieldset,
|
|
EnvironmentVariablesPanel,
|
|
envVarValidation,
|
|
} from '@@/form-components/EnvironmentVariablesFieldset';
|
|
import { Icon } from '@@/Icon';
|
|
import { ReactQueryDevtoolsWrapper } from '@@/ReactQueryDevtoolsWrapper';
|
|
import { PageHeader } from '@@/PageHeader';
|
|
import { TagSelector } from '@@/TagSelector';
|
|
import { Loading } from '@@/Widget/Loading';
|
|
import { PasswordCheckHint } from '@@/PasswordCheckHint';
|
|
import { Tooltip } from '@@/Tip/Tooltip';
|
|
import { Badge } from '@@/Badge';
|
|
import { TableColumnHeaderAngular } from '@@/datatables/TableHeaderCell';
|
|
import { DashboardItem } from '@@/DashboardItem';
|
|
import { SearchBar } from '@@/datatables/SearchBar';
|
|
import { FallbackImage } from '@@/FallbackImage';
|
|
import { BadgeIcon } from '@@/BadgeIcon';
|
|
import { TeamsSelector } from '@@/TeamsSelector';
|
|
import { TerminalTooltip } from '@@/TerminalTooltip';
|
|
import { PortainerSelect } from '@@/form-components/PortainerSelect';
|
|
import { Slider } from '@@/form-components/Slider';
|
|
import { TagButton } from '@@/TagButton';
|
|
import { BETeaserButton } from '@@/BETeaserButton';
|
|
import { CodeEditor } from '@@/CodeEditor';
|
|
import { HelpLink } from '@@/PageHeader/HelpLink';
|
|
|
|
import { fileUploadField } from './file-upload-field';
|
|
import { switchField } from './switch-field';
|
|
import { customTemplatesModule } from './custom-templates';
|
|
import { gitFormModule } from './git-form';
|
|
import { settingsModule } from './settings';
|
|
import { accessControlModule } from './access-control';
|
|
import { environmentsModule } from './environments';
|
|
import { registriesModule } from './registries';
|
|
import { accountModule } from './account';
|
|
|
|
export const ngModule = angular
|
|
.module('portainer.app.react.components', [
|
|
accessControlModule,
|
|
customTemplatesModule,
|
|
environmentsModule,
|
|
gitFormModule,
|
|
registriesModule,
|
|
settingsModule,
|
|
accountModule,
|
|
])
|
|
.component(
|
|
'tagSelector',
|
|
r2a(withUIRouter(withReactQuery(TagSelector)), [
|
|
'allowCreate',
|
|
'onChange',
|
|
'value',
|
|
])
|
|
)
|
|
.component(
|
|
'beTeaserButton',
|
|
r2a(BETeaserButton, [
|
|
'featureId',
|
|
'heading',
|
|
'message',
|
|
'buttonText',
|
|
'className',
|
|
'buttonClassName',
|
|
])
|
|
)
|
|
.component(
|
|
'tagButton',
|
|
r2a(TagButton, ['value', 'label', 'title', 'onRemove'])
|
|
)
|
|
|
|
.component(
|
|
'portainerTooltip',
|
|
r2a(Tooltip, ['message', 'position', 'className', 'setHtmlMessage', 'size'])
|
|
)
|
|
.component('terminalTooltip', r2a(TerminalTooltip, []))
|
|
.component('badge', r2a(Badge, ['type', 'className']))
|
|
.component('fileUploadField', fileUploadField)
|
|
.component('porSwitchField', switchField)
|
|
.component(
|
|
'passwordCheckHint',
|
|
r2a(withReactQuery(PasswordCheckHint), [
|
|
'forceChangePassword',
|
|
'passwordValid',
|
|
])
|
|
)
|
|
.component('rdLoading', r2a(Loading, []))
|
|
.component(
|
|
'tableColumnHeader',
|
|
r2a(TableColumnHeaderAngular, [
|
|
'colTitle',
|
|
'canSort',
|
|
'isSorted',
|
|
'isSortedDesc',
|
|
])
|
|
)
|
|
.component(
|
|
'pageHeader',
|
|
r2a(withUIRouter(withReactQuery(withCurrentUser(PageHeader))), [
|
|
'title',
|
|
'breadcrumbs',
|
|
'loading',
|
|
'onReload',
|
|
'reload',
|
|
'id',
|
|
])
|
|
)
|
|
.component(
|
|
'fallbackImage',
|
|
r2a(FallbackImage, ['src', 'fallbackIcon', 'alt', 'className'])
|
|
)
|
|
.component('prIcon', r2a(Icon, ['className', 'icon', 'mode', 'size', 'spin']))
|
|
.component(
|
|
'reactQueryDevTools',
|
|
r2a(withReactQuery(ReactQueryDevtoolsWrapper), [])
|
|
)
|
|
.component(
|
|
'helpLink',
|
|
r2a(withUIRouter(withReactQuery(HelpLink)), [
|
|
'docLink',
|
|
'target',
|
|
'children',
|
|
])
|
|
)
|
|
.component(
|
|
'dashboardItem',
|
|
r2a(DashboardItem, [
|
|
'icon',
|
|
'type',
|
|
'value',
|
|
'to',
|
|
'params',
|
|
'children',
|
|
'pluralType',
|
|
'isLoading',
|
|
'isRefetching',
|
|
'dataCy',
|
|
'iconClass',
|
|
])
|
|
)
|
|
.component(
|
|
'datatableSearchbar',
|
|
r2a(SearchBar, [
|
|
'data-cy',
|
|
'onChange',
|
|
'value',
|
|
'placeholder',
|
|
'children',
|
|
'className',
|
|
])
|
|
)
|
|
.component('badgeIcon', r2a(BadgeIcon, ['icon', 'size', 'iconClass']))
|
|
.component(
|
|
'teamsSelector',
|
|
r2a(TeamsSelector, [
|
|
'onChange',
|
|
'value',
|
|
'dataCy',
|
|
'inputId',
|
|
'name',
|
|
'placeholder',
|
|
'teams',
|
|
'disabled',
|
|
])
|
|
)
|
|
.component(
|
|
'porSelect',
|
|
r2a(PortainerSelect, [
|
|
'name',
|
|
'inputId',
|
|
'placeholder',
|
|
'disabled',
|
|
'data-cy',
|
|
'bindToBody',
|
|
'value',
|
|
'onChange',
|
|
'options',
|
|
'isMulti',
|
|
'isClearable',
|
|
'components',
|
|
'isLoading',
|
|
'noOptionsMessage',
|
|
'aria-label',
|
|
])
|
|
)
|
|
.component(
|
|
'porSlider',
|
|
r2a(Slider, [
|
|
'min',
|
|
'max',
|
|
'step',
|
|
'value',
|
|
'onChange',
|
|
'visibleTooltip',
|
|
'dataCy',
|
|
'disabled',
|
|
])
|
|
)
|
|
.component(
|
|
'reactCodeEditor',
|
|
r2a(CodeEditor, [
|
|
'id',
|
|
'placeholder',
|
|
'yaml',
|
|
'dockerFile',
|
|
'shell',
|
|
'readonly',
|
|
'onChange',
|
|
'value',
|
|
'height',
|
|
])
|
|
)
|
|
.component(
|
|
'groupAssociationTable',
|
|
r2a(withReactQuery(GroupAssociationTable), [
|
|
'emptyContentLabel',
|
|
'onClickRow',
|
|
'query',
|
|
'title',
|
|
'data-cy',
|
|
])
|
|
)
|
|
.component('annotationsBeTeaser', r2a(AnnotationsBeTeaser, []))
|
|
.component(
|
|
'associatedEndpointsSelector',
|
|
r2a(withReactQuery(AssociatedEnvironmentsSelector), ['onChange', 'value'])
|
|
)
|
|
.component(
|
|
'helmRepositoryDatatable',
|
|
r2a(
|
|
withUIRouter(withReactQuery(withCurrentUser(HelmRepositoryDatatable))),
|
|
[]
|
|
)
|
|
);
|
|
|
|
export const componentsModule = ngModule.name;
|
|
|
|
withFormValidation(
|
|
ngModule,
|
|
withControlledInput(EnvironmentVariablesFieldset, { values: 'onChange' }),
|
|
'environmentVariablesFieldset',
|
|
['canUndoDelete'],
|
|
envVarValidation
|
|
);
|
|
|
|
withFormValidation(
|
|
ngModule,
|
|
withControlledInput(EnvironmentVariablesPanel, { values: 'onChange' }),
|
|
'environmentVariablesPanel',
|
|
['explanation', 'showHelpMessage', 'isFoldable'],
|
|
envVarValidation
|
|
);
|