Skip to content

Commit

Permalink
Merge pull request #3529 from reportportal/rc/5.9.0 (Release 5.9.0)
Browse files Browse the repository at this point in the history
Release 5.9.0
  • Loading branch information
AmsterGet authored Jul 10, 2023
2 parents 480c638 + 5ec2eac commit 6231541
Show file tree
Hide file tree
Showing 115 changed files with 2,868 additions and 805 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY ./app/ /usr/src/app/
RUN export NODE_OPTIONS="--max-old-space-size=4096"
RUN npm ci && npm run lint && npm run test:coverage && npm run build
RUN npm ci && npm run build

FROM nginxinc/nginx-unprivileged:alpine

Expand Down
73 changes: 45 additions & 28 deletions app/localization/translated/be.json

Large diffs are not rendered by default.

75 changes: 46 additions & 29 deletions app/localization/translated/ru.json

Large diffs are not rendered by default.

75 changes: 46 additions & 29 deletions app/localization/translated/uk.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions app/src/common/constants/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export const COMMON_LOCALE_KEYS = defineMessages({
id: 'Common.close',
defaultMessage: 'Close',
},
COPY_TO_CLIPBOARD: {
id: 'Common.copyToClipboard',
defaultMessage: 'Copy to Clipboard',
},
UPDATE: {
id: 'Common.update',
defaultMessage: 'Update',
Expand All @@ -41,6 +45,10 @@ export const COMMON_LOCALE_KEYS = defineMessages({
id: 'Common.confirm',
defaultMessage: 'Confirm',
},
GENERATE: {
id: 'Common.generate',
defaultMessage: 'Generate',
},
SEND: {
id: 'Common.send',
defaultMessage: 'Send',
Expand Down
19 changes: 19 additions & 0 deletions app/src/common/constants/userProfileRoutes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright 2023 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.
*/

export const API_KEYS_ROUTE = 'apiKeys';
export const PROJECT_ASSIGNMENT_ROUTE = 'assignedProjects';
export const CONFIG_EXAMPLES_ROUTE = 'configExamples';
Binary file not shown.
309 changes: 309 additions & 0 deletions app/src/common/css/fonts/Roboto-Bold/Roboto-Bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
305 changes: 305 additions & 0 deletions app/src/common/css/fonts/Roboto-Medium/Roboto-Medium.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
308 changes: 308 additions & 0 deletions app/src/common/css/fonts/Roboto-Regular/Roboto-Regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions app/src/common/css/fonts/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@
'./Roboto-Mono-Regular/Roboto-Mono-Regular',
'RobotoMono'
);
@include font-face('Roboto-Regular', './Roboto-Regular/Roboto-Regular', 'Roboto-Regular');
@include font-face('Roboto-Medium', './Roboto-Medium/Roboto-Medium', 'Roboto-Medium');
@include font-face('Roboto-Bold', './Roboto-Bold/Roboto-Bold', 'Roboto-Bold');
1 change: 1 addition & 0 deletions app/src/common/css/variables/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@ $COLOR--error: #f36c4a;
$COLOR--dark-gray-2: #646464;
$COLOR--light-gray: #ddddde;
$COLOR--gray-95: #f2f2f2;
$COLOR--japanese-koi: #e6532e;
3 changes: 3 additions & 0 deletions app/src/common/css/variables/font-variable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ $FONT-LIGHT: OpenSans-Light;
$FONT-REGULAR: OpenSans;
$FONT-CONDBOLD: OpenSansCondBold;
$FONT-MONOSPACE: Roboto-Mono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
$FONT-ROBOTO-REGULAR: Roboto-Regular;
$FONT-ROBOTO-MEDIUM: Roboto-Medium;
$FONT-ROBOTO-BOLD: Roboto-Bold;
4 changes: 3 additions & 1 deletion app/src/common/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ export const URLS = {
})}`,
launchAnalyze: (activeProject) => `${urlBase}${activeProject}/launch/analyze`,
login: () => `${uatBase}sso/oauth/token`,
apiToken: () => `${uatBase}sso/me/apitoken`,
sessionToken: () => `${uatBase}sso/me`,

apiKeys: (userId) => `${urlBase}user/${userId}/api-keys`,
apiKeyById: (userId, apiKeyId) => `${urlBase}user/${userId}/api-keys/${apiKeyId}`,

project: (activeProject) => `${urlBase}project/${activeProject}`,
addProject: () => `${urlBase}project`,
projectNames: () => `${urlBase}project/names`,
Expand Down
8 changes: 5 additions & 3 deletions app/src/common/utils/referenceDictionary.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ export const referenceDictionary = {
rpGitHub: 'https://github.com/reportportal',
rpFacebook: 'https://www.facebook.com/ReportPortal.io',
rpTwitter: 'http://twitter.com/ReportPortal_io',
rpYoutube: 'http://youtube.com/c/ReportPortalCommunity',
rpVk: 'https://vk.com/reportportal_io',
rpSlack: 'https://slack.epmrpp.reportportal.io/',
rpYoutube: 'https://youtube.com/c/ReportPortal',
rpLinkedin: 'https://linkedin.com/company/reportportal',
rpSlack: 'https://slack.epmrpp.reportportal.io',
rpEmail: 'mailto:[email protected]',
rpEpam: 'https://www.epam.com/',
rpEpamPolicy: 'https://privacy.epam.com/core/interaction/showpolicy?type=PrivacyPolicy',
rpEpamNotice: 'https://privacy.epam.com/core/interaction/showpolicy?type=CommonPrivacyNotice',
rpEpamCommonPolicy:
'https://privacy.epam.com/core/interaction/showpolicy?type=CommonPrivacyPolicy',
};
3 changes: 3 additions & 0 deletions app/src/common/utils/validation/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,6 @@ export const createNotificationRecipientsValidator = (informOwner) => (value) =>
isNotEmptyArray(value) || informOwner;
export const notificationLaunchNames = (value) =>
isEmpty(value) || !value.length || value.every(launchName);
export const apiKeyName = composeValidators([isNotEmpty, lengthRange(1, 40)]);
export const uniqueApiKeyName = (names) => (value) =>
names.every((name) => name.toLowerCase() !== value.trim().toLowerCase());
17 changes: 17 additions & 0 deletions app/src/components/buttons/ghostButton/ghostButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@
}
}

&.color-red {
color: $COLOR--tomato;
vertical-align: middle;

&.transparent-border {
background-color: transparent;
border-color: transparent;
}

&.transparent-border-hover {
&:hover {
background-color: transparent;
border-color: transparent;
}
}
}

&.color-topaz:not(.disabled) {
border-color: $COLOR--topaz;
color: $COLOR--topaz;
Expand Down
8 changes: 8 additions & 0 deletions app/src/components/fields/fieldErrorHint/fieldErrorHint.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ const messages = defineMessages({
id: 'EditItemModal.descriptionHint',
defaultMessage: "Description should have size from '0' to '2048' symbols",
},
apiKeyNameWrongSizeHint: {
id: 'GenerateApiKeyModal.apiKeyNameWrongSizeHint',
defaultMessage: 'API Key name should have size from 1 to 40 characters',
},
apiKeyNameUniqueHint: {
id: 'GenerateApiKeyModal.apiKeyNameUniqueHint',
defaultMessage: 'API Key with the same name already exists',
},
});

@injectIntl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ import { UserItem } from './userItem';

const isValidNewOption = (inputValue) => validate.email(inputValue);
const isOptionUnique = (inputValue, options) =>
!options.some((option) => option.userLogin === inputValue || option.email === inputValue);
!options.some(
(option) =>
option.userLogin === inputValue || option.email.toLowerCase() === inputValue.toLowerCase(),
);
const newOptionCreator = (inputValue) => ({
externalUser: true,
userLogin: inputValue,
Expand Down
6 changes: 3 additions & 3 deletions app/src/components/main/analytics/events/loginPageEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export const LOGIN_PAGE_EVENTS = {
action: 'Click on Icon YouTube on Welcome screen',
label: 'Transition to YouTube',
},
CLICK_VK_ICON: {
CLICK_LINKEDIN_ICON: {
category: LOGIN_PAGE,
action: 'Click on Icon VK on Welcome screen',
label: 'Transition to VK',
action: 'Click on Icon Linkedin on Welcome screen',
label: 'Transition to Linkedin',
},
CLICK_SLACK_ICON: {
category: LOGIN_PAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ const messages = defineMessages({
id: 'TestItemsPage.successMultiple',
defaultMessage: 'Items were deleted',
},
fetchApiKeysError: {
id: 'ProfilePage.apiKeys.fetchApiKeysError',
defaultMessage: 'An error occurred during fetch API keys',
},
});

@injectIntl
Expand Down
38 changes: 9 additions & 29 deletions app/src/controllers/administrate/projects/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,16 @@
* limitations under the License.
*/

import { takeEvery, takeLatest, race, take, all, put, select, call } from 'redux-saga/effects';
import { takeEvery, takeLatest, all, put, select, call } from 'redux-saga/effects';
import { fetchDataAction } from 'controllers/fetch';
import { URLS } from 'common/urls';
import { showNotification, NOTIFICATION_TYPES } from 'controllers/notification';
import {
assignedProjectsSelector,
ASSIGN_TO_RROJECT,
ASSIGN_TO_RROJECT_SUCCESS,
ASSIGN_TO_RROJECT_ERROR,
assignToProjectSuccessAction,
} from 'controllers/user';
import { assignToProjectSuccessAction } from 'controllers/user';
import { PROJECT_TYPE_INTERNAL } from 'common/constants/projectsObjectTypes';
import { SETTINGS } from 'common/constants/projectSections';
import { fetch, getStorageItem, setStorageItem } from 'common/utils';
import { PROJECT_PAGE } from 'controllers/pages';
import { confirmSaga, hideModalAction } from 'controllers/modal';
import { hideModalAction } from 'controllers/modal';
import { PROJECT_MANAGER } from 'common/constants/projectRoles';
import {
NAMESPACE,
Expand Down Expand Up @@ -143,26 +137,12 @@ function* watchDeleteProject() {
}

function* navigateToProject({ payload }) {
const { project, confirmModalOptions } = payload;
const assignedProjects = yield select(assignedProjectsSelector);
let isAssigned = !!assignedProjects[project.projectName];
if (!isAssigned) {
const isConfirmed = yield call(confirmSaga, confirmModalOptions);
if (isConfirmed) {
yield put({ type: ASSIGN_TO_RROJECT, payload: project });
const assignResult = yield race({
isAssigned: take(ASSIGN_TO_RROJECT_SUCCESS),
noAssigned: take(ASSIGN_TO_RROJECT_ERROR),
});
isAssigned = !!assignResult.isAssigned;
}
}
if (isAssigned) {
yield put({
type: PROJECT_PAGE,
payload: { projectId: project.projectName },
});
}
const { project } = payload;

yield put({
type: PROJECT_PAGE,
payload: { projectId: project.projectName },
});
}

function* watchNavigateToProject() {
Expand Down
5 changes: 5 additions & 0 deletions app/src/controllers/appInfo/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ export const ANALYICS_INSTANCE_KEY = 'server.details.instance';
export const ANALYTICS_ALL_KEY = 'server.analytics.all';
export const OLD_HISTORY_KEY = 'history_old';
export const GA_MEASUREMENT_ID = 'ga_measurement_id';
export const INSTANCE_TYPE = 'instance_type';
export const NOT_PROVIDED = 'not provided';
export const EPAM = 'EPAM';
export const SAAS = 'SaaS';
export const DEDICATED = 'Dedicated';
4 changes: 4 additions & 0 deletions app/src/controllers/appInfo/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
ANALYTICS_ALL_KEY,
OLD_HISTORY_KEY,
GA_MEASUREMENT_ID,
INSTANCE_TYPE,
NOT_PROVIDED,
} from './constants';

export const appInfoSelector = (state) => state.appInfo || {};
Expand Down Expand Up @@ -52,3 +54,5 @@ export const flushDataInSelector = (state) =>
(apiJobsSelector(state).flushingDataTrigger || {}).triggersIn || null;

export const gaMeasurementIdSelector = (state) => environmentSelector(state)[GA_MEASUREMENT_ID];
export const instanceTypeSelector = (state) =>
environmentSelector(state)[INSTANCE_TYPE] || NOT_PROVIDED;
24 changes: 3 additions & 21 deletions app/src/controllers/dashboard/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ import { NOTIFICATION_TYPES } from 'controllers/notification/constants';
import { redirect } from 'redux-first-router';
import { URLS } from 'common/urls';
import { fetchDataAction, createFetchPredicate } from 'controllers/fetch';
import { activeProjectSelector, apiTokenStringSelector, userIdSelector } from 'controllers/user';
import { activeProjectSelector, userIdSelector } from 'controllers/user';
import { hideModalAction } from 'controllers/modal';
import { fetch, updateToken } from 'common/utils/fetch';
import { fetch } from 'common/utils/fetch';
import { setStorageItem } from 'common/utils/storageUtils';
import { tokenSelector } from 'controllers/auth';
import {
PROJECT_DASHBOARD_ITEM_PAGE,
PROJECT_DASHBOARD_PAGE,
Expand All @@ -46,16 +45,10 @@ import {
UPDATE_DASHBOARD,
UPDATE_DASHBOARD_WIDGETS,
REMOVE_DASHBOARD_SUCCESS,
CHANGE_FULL_SCREEN_MODE,
TOGGLE_FULL_SCREEN_MODE,
INCREASE_TOTAL_DASHBOARDS_LOCALLY,
DECREASE_TOTAL_DASHBOARDS_LOCALLY,
} from './constants';
import {
dashboardFullScreenModeSelector,
dashboardItemsSelector,
querySelector,
} from './selectors';
import { dashboardItemsSelector, querySelector } from './selectors';
import {
addDashboardSuccessAction,
deleteDashboardSuccessAction,
Expand Down Expand Up @@ -197,13 +190,6 @@ function changeVisibilityType({ payload: visibilityType }) {
setStorageItem(DASHBOARDS_VISIBILITY_TYPE_STORAGE_KEY, visibilityType);
}

function* updateTokenAccordingToFullscreenMode() {
const fullScreenMode = yield select(dashboardFullScreenModeSelector);
const selector = fullScreenMode ? apiTokenStringSelector : tokenSelector;
const token = yield select(selector);
yield call(updateToken, token);
}

export function* dashboardSagas() {
yield all([
yield takeEvery(FETCH_DASHBOARDS, fetchDashboards),
Expand All @@ -214,9 +200,5 @@ export function* dashboardSagas() {
yield takeEvery(REMOVE_DASHBOARD, removeDashboard),
yield takeEvery(CHANGE_VISIBILITY_TYPE, changeVisibilityType),
yield takeEvery(REMOVE_DASHBOARD_SUCCESS, redirectAfterDelete),
yield takeEvery(
[CHANGE_FULL_SCREEN_MODE, TOGGLE_FULL_SCREEN_MODE],
updateTokenAccordingToFullscreenMode,
),
]);
}
2 changes: 1 addition & 1 deletion app/src/controllers/fetch/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const fetchReducer = (namespace, options = DEFAULT_OPTIONS) => (
const contentPath = options.contentPath || DEFAULT_OPTIONS.contentPath;
switch (type) {
case FETCH_SUCCESS:
return contentPath ? payload[contentPath] : payload;
return contentPath && payload[contentPath] ? payload[contentPath] : payload;
case CONCAT_FETCH_SUCCESS: {
const data = contentPath ? payload[contentPath] : payload;

Expand Down
1 change: 0 additions & 1 deletion app/src/controllers/modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ export { showModalAction, hideModalAction, confirmModalAction } from './actionCr
export { modalReducer } from './reducer';
export { activeModalSelector } from './selectors';
export { getModal, addModal } from './modalsMap';
export { confirmSaga } from './sagas';
export { withModal } from './withModal';
2 changes: 2 additions & 0 deletions app/src/controllers/pages/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const PROJECT_USERDEBUG_TEST_ITEM_PAGE = 'PROJECT_USERDEBUG_TEST_ITEM_PAG
export const PROJECT_LOG_PAGE = 'PROJECT_LOG_PAGE';
export const PROJECT_USERDEBUG_LOG_PAGE = 'PROJECT_USERDEBUG_LOG_PAGE';
export const USER_PROFILE_PAGE = 'USER_PROFILE_PAGE';
export const USER_PROFILE_SUB_PAGE = 'USER_PROFILE_SUB_PAGE';
export const HISTORY_PAGE = 'HISTORY_PAGE';
export const UNIQUE_ERRORS_PAGE = 'UNIQUE_ERRORS_PAGE';
export const TEST_ITEM_PAGE = 'TEST_ITEM_PAGE';
Expand Down Expand Up @@ -82,6 +83,7 @@ export const pageNames = {
PROJECT_USERDEBUG_PAGE,
PROJECT_USERDEBUG_TEST_ITEM_PAGE,
USER_PROFILE_PAGE,
USER_PROFILE_SUB_PAGE,
LOGIN_PAGE,
REGISTRATION_PAGE,
TEST_ITEM_PAGE,
Expand Down
2 changes: 2 additions & 0 deletions app/src/controllers/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export {
currentPathSelector,
pluginPageSelector,
pluginRouteSelector,
userProfileRouteSelector,
} from './selectors';
export { updatePagePropertiesAction, clearPageStateAction } from './actionCreators';

Expand Down Expand Up @@ -67,6 +68,7 @@ export {
PROJECT_USERDEBUG_PAGE,
PROJECT_USERDEBUG_TEST_ITEM_PAGE,
USER_PROFILE_PAGE,
USER_PROFILE_SUB_PAGE,
LOGIN_PAGE,
REGISTRATION_PAGE,
HISTORY_PAGE,
Expand Down
2 changes: 2 additions & 0 deletions app/src/controllers/pages/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export const pluginsTabSelector = (state) => payloadSelector(state).pluginsTab;
export const pluginPageSelector = (state) => payloadSelector(state).pluginPage;
export const pluginRouteSelector = (state) => payloadSelector(state).pluginRoute;

export const userProfileRouteSelector = (state) => payloadSelector(state).profileRoute;

export const pageSelector = (state) => pageNames[state.location.type] || NO_PAGE;
export const projectSectionSelector = (state) => payloadSelector(state).projectSection || '';
export const querySelector = createSelector(locationSelector, (location) => location.query || {});
Expand Down
Loading

0 comments on commit 6231541

Please sign in to comment.