@rh-support/manage 1.1.4 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.d.ts.map +1 -1
- package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.js +8 -5
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.js +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.d.ts +0 -2
- package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.js +26 -5
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManageGroupUsers.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/ManageGroupUsers/ManageGroupUsers.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ManageGroupUsers.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/ManageGroupUsers/ManageGroupUsers.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,gBAAgB,mBAgN5B,CAAC"}
|
|
@@ -130,15 +130,18 @@ export const ManageGroupUsers = () => {
|
|
|
130
130
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
131
131
|
}, [location.pathname]);
|
|
132
132
|
return (React.createElement("section", { id: "manage-groups" },
|
|
133
|
-
React.createElement(AlertMessage, { variant: AlertType.INFO, show: loggedInUserRights.data.isOrgAdmin() && !loggedInUsersAccount.data.hasGroupACLs, isInline: true, className: "pf-u-mb-md" },
|
|
134
|
-
React.createElement(
|
|
133
|
+
React.createElement(AlertMessage, { variant: AlertType.INFO, show: loggedInUserRights.data.isOrgAdmin() && !loggedInUsersAccount.data.hasGroupACLs, isInline: true, className: "pf-u-mb-md", title: t("Case Group Access Control Lists (ACLs) haven't been activated on your account.") },
|
|
134
|
+
React.createElement("p", null,
|
|
135
135
|
React.createElement(Trans, { i18nKey: "i18nRequestControl" },
|
|
136
|
-
"
|
|
136
|
+
"You can set permissions on groups but settings won't take effect until",
|
|
137
|
+
' ',
|
|
138
|
+
React.createElement("a", { href: "https://access.redhat.com/solutions/175763", rel: "noopener noreferrer", target: "_blank" }, "Case Group ACLs"),
|
|
139
|
+
' ',
|
|
140
|
+
"is activated on your account. Please contact your Technical Account Manager or",
|
|
137
141
|
' ',
|
|
138
142
|
React.createElement("a", { href: "/support/contact/technicalSupport/", rel: "noopener noreferrer", target: "_blank" }, "Red Hat Technical Support"),
|
|
139
143
|
' ',
|
|
140
|
-
"
|
|
141
|
-
".")),
|
|
144
|
+
"to request Case Group ACLs activation."))),
|
|
142
145
|
React.createElement("header", null,
|
|
143
146
|
React.createElement("h2", null, t('Groups')),
|
|
144
147
|
React.createElement("p", null, t('Add or edit groups to easily filter while searching through cases.'))),
|
|
@@ -16,5 +16,5 @@ export const PerformanceMetricsSelect = ({ placeholderText, title, onSelectCallb
|
|
|
16
16
|
" ",
|
|
17
17
|
title,
|
|
18
18
|
" ")),
|
|
19
|
-
React.createElement(Select, { variant: SelectVariant.single, placeholderText: placeholderText, "aria-label": "Select Input with descriptions", onToggle: onToggle, onSelect: onSelect, selections: selected, isOpen: isOpen,
|
|
19
|
+
React.createElement(Select, { variant: SelectVariant.single, placeholderText: placeholderText, "aria-label": "Select Input with descriptions", onToggle: onToggle, onSelect: onSelect, selections: selected, isOpen: isOpen, isDisabled: isLoading }, options.map((option, index) => (React.createElement(SelectOption, { key: index, value: optionValue(option) }))))));
|
|
20
20
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { ITopContentEditState } from '../../../reducers/TopContentReducer';
|
|
3
2
|
interface IProps {
|
|
4
3
|
isModalOpen: boolean;
|
|
5
4
|
onHideModal: () => void;
|
|
6
|
-
filteredTC: ITopContentEditState[];
|
|
7
5
|
selectedVersionProp: string;
|
|
8
6
|
selectedProduct: string;
|
|
9
7
|
}
|
package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionPerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VersionPerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.tsx"],"names":[],"mappings":"AAaA,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAUhE,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,MAAM,CAmGhD,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { pcm } from '@cee-eng/hydrajs';
|
|
1
11
|
import { Button, ButtonVariant, Flex, FlexItem, Modal, ModalVariant, Title, TitleSizes, } from '@patternfly/react-core';
|
|
12
|
+
import { useFetch } from '@rh-support/components';
|
|
2
13
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
3
14
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
15
|
import { useTopContentContext } from '../../../context/TopContentProvider';
|
|
@@ -6,14 +17,24 @@ import { useVersionsDiffer } from '../../../hooks/useVersionsDiffer';
|
|
|
6
17
|
import { flagContentUsage, isMajorVersion } from '../../../reducers/TopContentHelpers';
|
|
7
18
|
import { ContentAccordion } from './ContentAccordion';
|
|
8
19
|
import { PerformanceMetricsSelect } from './PerformanceMetricsSelect';
|
|
9
|
-
export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal,
|
|
20
|
+
export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal, selectedVersionProp, selectedProduct, }) => {
|
|
10
21
|
const { t } = useTranslation();
|
|
11
22
|
const isMajorProjectVersion = isMajorVersion(selectedVersionProp);
|
|
12
|
-
const [selectedVersion, setVersion] = useState(
|
|
23
|
+
const [selectedVersion, setVersion] = useState(undefined);
|
|
13
24
|
const [selectedCategory, setSelectedCategory] = useState('');
|
|
14
25
|
const [selectedContent, setSelectedContent] = useState([]);
|
|
15
26
|
const { categoryUsage } = useTopContentContext();
|
|
16
|
-
const
|
|
27
|
+
const { request: getTopContent, isFetching: isTopContentLoading, data: topContent, } = useFetch(pcm.topContent.getTopContent, { initialData: [] });
|
|
28
|
+
const flagContentEditState = useMemo(() => flagContentUsage(topContent, categoryUsage, selectedVersion), [topContent, categoryUsage, selectedVersion]);
|
|
29
|
+
const onVersionSelect = (e, selectedOption) => __awaiter(void 0, void 0, void 0, function* () {
|
|
30
|
+
setVersion(selectedOption);
|
|
31
|
+
getTopContent &&
|
|
32
|
+
(yield getTopContent({
|
|
33
|
+
product: selectedProduct,
|
|
34
|
+
version: selectedOption,
|
|
35
|
+
sortby: 'rank',
|
|
36
|
+
}));
|
|
37
|
+
});
|
|
17
38
|
const [isLoading, versionDifference] = useVersionsDiffer(selectedProduct, selectedVersionProp);
|
|
18
39
|
useEffect(() => {
|
|
19
40
|
var _a;
|
|
@@ -38,9 +59,9 @@ export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal, filteredTC
|
|
|
38
59
|
React.createElement("br", null),
|
|
39
60
|
React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
|
|
40
61
|
React.createElement(FlexItem, { className: "pf-u-w-50 pf-u-pr-md", style: { marginRight: 'unset' } },
|
|
41
|
-
React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a version'), title: t(`Version using ${selectedVersionProp}`), onSelectCallback:
|
|
62
|
+
React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a version'), title: t(`Version using ${selectedVersionProp}`), onSelectCallback: onVersionSelect, options: isMajorProjectVersion ? versionDifference : [selectedVersionProp], optionValue: (option) => option, isLoading: isLoading })),
|
|
42
63
|
React.createElement(FlexItem, { className: "pf-u-w-50 pf-u-pl-md" },
|
|
43
|
-
React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a category'), title: t('Categories'), options: flagContentEditState, optionValue: (option) => option.categoryName, onSelectCallback: (e, selectedOption) => setSelectedCategory(selectedOption) })))),
|
|
64
|
+
React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a category'), title: t('Categories'), options: flagContentEditState, optionValue: (option) => option.categoryName, onSelectCallback: (e, selectedOption) => setSelectedCategory(selectedOption), isLoading: !selectedVersion || isTopContentLoading })))),
|
|
44
65
|
React.createElement("br", null),
|
|
45
66
|
React.createElement(ContentAccordion, { contentList: selectedContent, selectedVersion: selectedVersion })));
|
|
46
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/TopContentEditor/TopContentEditor.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"TopContentEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/TopContentEditor/TopContentEditor.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,gBAAgB,gBAsT/B"}
|
|
@@ -151,5 +151,5 @@ export function TopContentEditor() {
|
|
|
151
151
|
' ',
|
|
152
152
|
React.createElement(Button, { variant: "link", onClick: onCancelArrangement },
|
|
153
153
|
React.createElement(Trans, null, "Cancel")))))))))),
|
|
154
|
-
isMajorOrNamedVersion(selectedVersion) && (React.createElement(VersionPerformanceMetrics, { isModalOpen: isModalOpen, onHideModal: onHideModal,
|
|
154
|
+
isMajorOrNamedVersion(selectedVersion) && (React.createElement(VersionPerformanceMetrics, { isModalOpen: isModalOpen, onHideModal: onHideModal, selectedVersionProp: selectedVersion, selectedProduct: selectedProduct.name })))));
|
|
155
155
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"react-i18next": ">=10.11.0",
|
|
110
110
|
"react-router-dom": ">=5.1.2"
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "27979c9c86fcd819eb3cd3f3d4ef229df9ff58dc"
|
|
113
113
|
}
|