From f293f4b38024af18afbad5af595d6d53321c358a Mon Sep 17 00:00:00 2001 From: Siarhei Iukou Date: Tue, 14 Jan 2025 08:15:22 +0300 Subject: [PATCH] EPMRPP-97602 || fix conflicts --- app/localization/translated/be.json | 18 +- app/localization/translated/es.json | 18 +- app/localization/translated/ru.json | 18 +- app/localization/translated/uk.json | 18 +- app/localization/translated/zh.json | 18 +- .../usersToolbar/usersEntities.jsx | 264 ------------------ 6 files changed, 5 insertions(+), 349 deletions(-) delete mode 100644 app/src/pages/admin/allUsersPage/usersToolbar/usersEntities.jsx diff --git a/app/localization/translated/be.json b/app/localization/translated/be.json index 972ebbc570..73caf951a3 100644 --- a/app/localization/translated/be.json +++ b/app/localization/translated/be.json @@ -2189,21 +2189,5 @@ "launchPatternAnalysisModal.title": "Патэрн-аналіз запускаў", "notFoundPage.oops": "Упс. Здаецца, Вы згубіліся.", "notFoundPage.pageNotExist": "Старонка, якую Вы шукаеце, не існуе.", - "notFoundPage.toHome": "Забярыце мяне адсюль", - "usersGrid.accountTypeGithub": "Github", - "usersGrid.accountTypeInternal": "Унутраны", - "usersGrid.accountTypeLdap": "Ldap", - "usersGrid.accountTypeSaml": "Saml", - "usersGrid.accountTypeScim": "SCIM", - "usersGrid.accountTypeUpsa": "UPSA", - "usersGrid.contains": "Змяшчае", - "usersGrid.email": "Эл. пошта", - "usersGrid.lastLogin": "Апошні ўваход", - "usersGrid.name": "Iмя", - "usersGrid.project": "Праект", - "usersGrid.role": "Роль", - "usersGrid.roleAdmin": "Адмін", - "usersGrid.roleNonAdmin": "Не Адмін", - "usersGrid.type": "Тып", - "usersGrid.user": "Лагін" + "notFoundPage.toHome": "Забярыце мяне адсюль" } diff --git a/app/localization/translated/es.json b/app/localization/translated/es.json index 556a3cee27..ffc3692455 100644 --- a/app/localization/translated/es.json +++ b/app/localization/translated/es.json @@ -2189,21 +2189,5 @@ "launchPatternAnalysisModal.title": "Análisis de patrones de ejecuciones", "notFoundPage.oops": "Ups. Página no encontrada.", "notFoundPage.pageNotExist": "La página que busca no existe.", - "notFoundPage.toHome": "Llévame de aquí", - "usersGrid.accountTypeGithub": "Github", - "usersGrid.accountTypeInternal": "Interno", - "usersGrid.accountTypeLdap": "Ldap", - "usersGrid.accountTypeSaml": "Saml", - "usersGrid.accountTypeScim": "SCIM", - "usersGrid.accountTypeUpsa": "UPSA", - "usersGrid.contains": "Contiene", - "usersGrid.email": "Correo electrónico", - "usersGrid.lastLogin": "Último acceso", - "usersGrid.name": "Nombre", - "usersGrid.project": "Proyecto", - "usersGrid.role": "Rol", - "usersGrid.roleAdmin": "Admin", - "usersGrid.roleNonAdmin": "No Admin", - "usersGrid.type": "Tipo", - "usersGrid.user": "Usuario" + "notFoundPage.toHome": "Llévame de aquí" } diff --git a/app/localization/translated/ru.json b/app/localization/translated/ru.json index fe1379c1db..8f9fca7264 100644 --- a/app/localization/translated/ru.json +++ b/app/localization/translated/ru.json @@ -2189,21 +2189,5 @@ "launchPatternAnalysisModal.title": "Паттерн-анализ запусков", "notFoundPage.oops": "Упс. Страница не найдена.", "notFoundPage.pageNotExist": "Страница, которую Вы ищете, не существует.", - "notFoundPage.toHome": "Заберите меня отсюда", - "usersGrid.accountTypeGithub": "Github", - "usersGrid.accountTypeInternal": "Внутренний", - "usersGrid.accountTypeLdap": "Ldap", - "usersGrid.accountTypeSaml": "Saml", - "usersGrid.accountTypeScim": "SCIM", - "usersGrid.accountTypeUpsa": "UPSA", - "usersGrid.contains": "Содержит", - "usersGrid.email": "Эл. почта", - "usersGrid.lastLogin": "Последний вход", - "usersGrid.name": "Имя", - "usersGrid.project": "Проект", - "usersGrid.role": "Роль", - "usersGrid.roleAdmin": "Админ", - "usersGrid.roleNonAdmin": "Не Админ", - "usersGrid.type": "Тип", - "usersGrid.user": "Логин" + "notFoundPage.toHome": "Заберите меня отсюда" } diff --git a/app/localization/translated/uk.json b/app/localization/translated/uk.json index 5834ce6db1..d09bdc2d63 100644 --- a/app/localization/translated/uk.json +++ b/app/localization/translated/uk.json @@ -2189,21 +2189,5 @@ "launchPatternAnalysisModal.title": "Патерн-аналіз запусків", "notFoundPage.oops": "Упс. Сторінка не знайдена.", "notFoundPage.pageNotExist": "Сторінка, яку Ви шукаєте, не існує.", - "notFoundPage.toHome": "Заберіть мене звідси", - "usersGrid.accountTypeGithub": "На GitHub", - "usersGrid.accountTypeInternal": "Внутрішній", - "usersGrid.accountTypeLdap": "У LDAP", - "usersGrid.accountTypeSaml": "Saml", - "usersGrid.accountTypeScim": "SCIM", - "usersGrid.accountTypeUpsa": "УПСА", - "usersGrid.contains": "Містить", - "usersGrid.email": "Ел. пошта", - "usersGrid.lastLogin": "Останній вхід", - "usersGrid.name": "Ім’я", - "usersGrid.project": "Проект", - "usersGrid.role": "Роль", - "usersGrid.roleAdmin": "Адмін", - "usersGrid.roleNonAdmin": "Не Адмін", - "usersGrid.type": "Тип", - "usersGrid.user": "Логін" + "notFoundPage.toHome": "Заберіть мене звідси" } diff --git a/app/localization/translated/zh.json b/app/localization/translated/zh.json index b89be29583..b0177649b8 100644 --- a/app/localization/translated/zh.json +++ b/app/localization/translated/zh.json @@ -2189,21 +2189,5 @@ "launchPatternAnalysisModal.title": "模板分析测试任务", "notFoundPage.oops": "哎呀,看起来您迷路了。", "notFoundPage.pageNotExist": "您要查找的页面不存在。", - "notFoundPage.toHome": "带我离开这里", - "usersGrid.accountTypeGithub": "Github", - "usersGrid.accountTypeInternal": "内部", - "usersGrid.accountTypeLdap": "Ldap", - "usersGrid.accountTypeSaml": "Saml", - "usersGrid.accountTypeScim": "SCIM", - "usersGrid.accountTypeUpsa": "UPSA", - "usersGrid.contains": "包含", - "usersGrid.email": "电子邮箱", - "usersGrid.lastLogin": "上次登录", - "usersGrid.name": "姓名", - "usersGrid.project": "项目", - "usersGrid.role": "角色", - "usersGrid.roleAdmin": "管理", - "usersGrid.roleNonAdmin": "非管理", - "usersGrid.type": "类型", - "usersGrid.user": "登录" + "notFoundPage.toHome": "带我离开这里" } diff --git a/app/src/pages/admin/allUsersPage/usersToolbar/usersEntities.jsx b/app/src/pages/admin/allUsersPage/usersToolbar/usersEntities.jsx deleted file mode 100644 index a0d3a13080..0000000000 --- a/app/src/pages/admin/allUsersPage/usersToolbar/usersEntities.jsx +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright 2019 EPAM Systems - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Component } from 'react'; -import PropTypes from 'prop-types'; -import { injectIntl, defineMessages } from 'react-intl'; -import { - EntityContains, - EntityInputConditional, - EntityDropdown, - EntityItemStartTime, - EntitySearch, -} from 'components/filterEntities'; -import { - CONDITION_CNT, - CONDITION_IN, - CONDITION_BETWEEN, - CONDITION_HAS, -} from 'components/filterEntities/constants'; -import { bindDefaultValue } from 'components/filterEntities/utils'; -import { USER, ADMINISTRATOR } from 'common/constants/accountRoles'; -import { INTERNAL, LDAP, UPSA, GITHUB, SAML, SCIM } from 'common/constants/accountType'; -import { - EMAIL, - FULL_NAME, - ROLE, - TYPE, - LAST_LOGIN, - PROJECT, - USER as LOGIN, - USERS, -} from 'common/constants/userObjectTypes'; - -import { URLS } from 'common/urls'; -import { ADMIN_ALL_USERS_PAGE_EVENTS } from 'components/main/analytics/events'; - -const messages = defineMessages({ - contains: { id: 'usersGrid.contains', defaultMessage: 'Contains' }, - name: { id: 'usersGrid.name', defaultMessage: 'Name' }, - role: { id: 'usersGrid.role', defaultMessage: 'Role' }, - type: { id: 'usersGrid.type', defaultMessage: 'Type' }, - email: { id: 'usersGrid.email', defaultMessage: 'Email' }, - lastLogin: { id: 'usersGrid.lastLogin', defaultMessage: 'Last login' }, - user: { id: 'usersGrid.user', defaultMessage: 'Login' }, - project: { id: 'usersGrid.project', defaultMessage: 'Project' }, - roleAdmin: { - id: 'usersGrid.roleAdmin', - defaultMessage: 'Admin', - }, - roleNonAdmin: { - id: 'usersGrid.roleNonAdmin', - defaultMessage: 'Non-admin', - }, - accountTypeInternal: { - id: 'usersGrid.accountTypeInternal', - defaultMessage: 'Internal', - }, - accountTypeLdap: { - id: 'usersGrid.accountTypeLdap', - defaultMessage: 'Ldap', - }, - accountTypeUpsa: { - id: 'usersGrid.accountTypeUpsa', - defaultMessage: 'UPSA', - }, - accountTypeGithub: { - id: 'usersGrid.accountTypeGithub', - defaultMessage: 'Github', - }, - accountTypeSaml: { - id: 'usersGrid.accountTypeSaml', - defaultMessage: 'Saml', - }, - accountTypeScim: { - id: 'usersGrid.accountTypeScim', - defaultMessage: 'SCIM', - }, -}); - -@injectIntl -export class UsersEntities extends Component { - static propTypes = { - intl: PropTypes.object.isRequired, - filterValues: PropTypes.object, - render: PropTypes.func.isRequired, - }; - - static defaultProps = { - filterValues: {}, - }; - getEntities = () => { - const { - intl: { formatMessage }, - } = this.props; - return [ - { - id: USERS, - component: EntityContains, - value: this.bindDefaultValue(USERS), - title: formatMessage(messages.contains), - active: true, - removable: false, - }, - { - id: FULL_NAME, - component: EntityInputConditional, - value: this.bindDefaultValue(FULL_NAME, { - condition: CONDITION_CNT, - }), - title: formatMessage(messages.name), - active: true, - removable: false, - customProps: { - maxLength: 256, - }, - }, - { - id: ROLE, - component: EntityDropdown, - value: this.bindDefaultValue(ROLE, { - condition: CONDITION_IN, - }), - title: formatMessage(messages.role), - active: true, - removable: false, - customProps: { - options: [ - { - value: ADMINISTRATOR, - label: formatMessage(messages.roleAdmin), - }, - { - value: USER, - label: formatMessage(messages.roleNonAdmin), - }, - ], - multiple: true, - selectAll: true, - }, - }, - { - id: TYPE, - component: EntityDropdown, - value: this.bindDefaultValue(TYPE, { - condition: CONDITION_IN, - }), - title: formatMessage(messages.type), - active: true, - removable: false, - customProps: { - options: [ - { - label: formatMessage(messages.accountTypeInternal), - value: INTERNAL, - }, - { - label: formatMessage(messages.accountTypeUpsa), - value: UPSA, - }, - { - label: formatMessage(messages.accountTypeGithub), - value: GITHUB, - }, - { - label: formatMessage(messages.accountTypeLdap), - value: LDAP, - }, - { - label: formatMessage(messages.accountTypeSaml), - value: SAML, - }, - { - label: formatMessage(messages.accountTypeScim), - value: SCIM, - }, - ], - multiple: true, - selectAll: true, - }, - }, - { - id: LOGIN, - component: EntityInputConditional, - value: this.bindDefaultValue(LOGIN, { - condition: CONDITION_CNT, - }), - title: formatMessage(messages.user), - active: true, - removable: false, - customProps: { - placeholder: null, - }, - }, - { - id: EMAIL, - component: EntityInputConditional, - value: this.bindDefaultValue(EMAIL, { - condition: CONDITION_CNT, - }), - title: formatMessage(messages.email), - active: true, - removable: false, - customProps: { - placeholder: null, - maxLength: 256, - }, - }, - { - id: LAST_LOGIN, - component: EntityItemStartTime, - value: this.bindDefaultValue(LAST_LOGIN, { - value: '', - condition: CONDITION_BETWEEN, - }), - title: formatMessage(messages.lastLogin), - active: true, - removable: false, - customProps: { - withoutDynamic: true, - events: ADMIN_ALL_USERS_PAGE_EVENTS.REFINE_FILTERS_PANEL_EVENTS.commonEvents, - }, - }, - { - id: PROJECT, - component: EntitySearch, - value: this.bindDefaultValue(PROJECT, { - condition: CONDITION_HAS, - }), - title: formatMessage(messages.project), - active: true, - removable: false, - customProps: { - getURI: URLS.projectNameSearch, - placeholder: null, - creatable: false, - inputProps: { - maxlength: 256, - }, - }, - }, - ]; - }; - bindDefaultValue = bindDefaultValue; - render() { - const { render, ...rest } = this.props; - return render({ - ...rest, - filterEntities: this.getEntities(), - }); - } -}