@rh-support/troubleshoot 0.2.134 → 0.2.135
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInformation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInformation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAa5D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,eAsD5C"}
|
|
@@ -2,16 +2,22 @@ import { encodeAngularBrackets, linkifyBZIDs, linkifyWithCaseIDs } from '@cee-en
|
|
|
2
2
|
import { MoreOrLess } from '@rh-support/components';
|
|
3
3
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
4
4
|
import { ability, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
5
|
+
import { isEqual } from 'lodash';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
import { Trans } from 'react-i18next';
|
|
7
8
|
import { useCaseSelector } from '../../../../context/CaseContext';
|
|
9
|
+
import { isClusterIdEnabledForProduct } from '../../../../utils/caseOpenshiftClusterIdUtils';
|
|
8
10
|
import EditDescription from '../../../EditDescription/EditDescription';
|
|
9
11
|
import { CaseHostname } from './CaseHostname';
|
|
10
12
|
import { CaseOpenshiftClusterId } from './CaseOpenshiftClusterId/CaseOpenshiftClusterId';
|
|
11
13
|
import ProductVersion from './ProductVersion';
|
|
12
14
|
export function CaseInformation(props) {
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
+
var _a;
|
|
16
|
+
const { product, description } = useCaseSelector((state) => ({
|
|
17
|
+
product: state.caseDetails.product,
|
|
18
|
+
description: state.caseDetails.description,
|
|
19
|
+
}), isEqual);
|
|
20
|
+
const { globalMetadataState: { navBarRef, allProducts }, } = useGlobalStateContext();
|
|
15
21
|
const linkifiedDescription = (text) => {
|
|
16
22
|
text = encodeAngularBrackets(text);
|
|
17
23
|
text = linkifyWithCaseIDs(text);
|
|
@@ -19,10 +25,11 @@ export function CaseInformation(props) {
|
|
|
19
25
|
return { __html: text };
|
|
20
26
|
};
|
|
21
27
|
const canEditDescription = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_DESCRIPTION);
|
|
28
|
+
const hasCluster = isClusterIdEnabledForProduct(product, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult);
|
|
22
29
|
return (React.createElement("section", { className: "card card-sm card-white" },
|
|
23
30
|
React.createElement("form", null,
|
|
24
31
|
React.createElement(ProductVersion, null),
|
|
25
|
-
React.createElement(CaseOpenshiftClusterId, null),
|
|
32
|
+
hasCluster && React.createElement(CaseOpenshiftClusterId, null),
|
|
26
33
|
React.createElement(CaseHostname, { inlineEditable: true }),
|
|
27
34
|
React.createElement("div", { className: "form-group" }, !canEditDescription ? (React.createElement(React.Fragment, null,
|
|
28
35
|
React.createElement("label", { htmlFor: "case-description" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.135",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"not ie <= 11",
|
|
144
144
|
"not op_mini all"
|
|
145
145
|
],
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "041d064511ec35854672181af3596ba968f3211a"
|
|
147
147
|
}
|