2023-09-07 14:19:03 +00:00
|
|
|
import angular from 'angular';
|
2024-03-27 07:56:00 +00:00
|
|
|
import { SchemaOf } from 'yup';
|
2023-09-07 14:19:03 +00:00
|
|
|
|
|
|
|
import { r2a } from '@/react-tools/react2angular';
|
|
|
|
import { withUIRouter } from '@/react-tools/withUIRouter';
|
|
|
|
import { withCurrentUser } from '@/react-tools/withCurrentUser';
|
2023-10-22 09:32:05 +00:00
|
|
|
import { ServicesDatatable } from '@/react/docker/services/ListView/ServicesDatatable';
|
2023-10-23 10:52:49 +00:00
|
|
|
import { TasksDatatable } from '@/react/docker/services/ItemView/TasksDatatable';
|
2024-03-27 07:56:00 +00:00
|
|
|
import {
|
|
|
|
PortsMappingField,
|
|
|
|
portsMappingUtils,
|
|
|
|
PortsMappingValues,
|
|
|
|
} from '@/react/docker/services/ItemView/PortMappingField';
|
|
|
|
import { withFormValidation } from '@/react-tools/withFormValidation';
|
2023-09-07 14:19:03 +00:00
|
|
|
|
2024-03-27 07:56:00 +00:00
|
|
|
const ngModule = angular
|
2023-09-07 14:19:03 +00:00
|
|
|
.module('portainer.docker.react.components.services', [])
|
|
|
|
.component(
|
|
|
|
'dockerServiceTasksDatatable',
|
2023-10-23 10:52:49 +00:00
|
|
|
r2a(withUIRouter(withCurrentUser(TasksDatatable)), [
|
|
|
|
'serviceName',
|
|
|
|
'dataset',
|
|
|
|
'isSlotColumnVisible',
|
2023-09-07 14:19:03 +00:00
|
|
|
])
|
2023-10-22 09:32:05 +00:00
|
|
|
)
|
|
|
|
.component(
|
|
|
|
'dockerServicesDatatable',
|
|
|
|
r2a(withUIRouter(withCurrentUser(ServicesDatatable)), [
|
|
|
|
'dataset',
|
|
|
|
'isAddActionVisible',
|
|
|
|
'isStackColumnVisible',
|
|
|
|
'onRefresh',
|
|
|
|
'titleIcon',
|
|
|
|
])
|
2024-03-27 07:56:00 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
export const servicesModule = ngModule.name;
|
|
|
|
|
|
|
|
withFormValidation(
|
|
|
|
ngModule,
|
|
|
|
withUIRouter(withCurrentUser(PortsMappingField)),
|
|
|
|
'dockerServicePortsMappingField',
|
|
|
|
['disabled', 'readOnly', 'hasChanges', 'onReset', 'onSubmit'],
|
|
|
|
portsMappingUtils.validation as unknown as () => SchemaOf<PortsMappingValues>
|
|
|
|
);
|