@rh-support/troubleshoot 2.6.45 → 2.6.47
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.
|
@@ -13,8 +13,5 @@ interface IProps extends IDClassNameProps {
|
|
|
13
13
|
openshiftDisplayName?: string;
|
|
14
14
|
}
|
|
15
15
|
declare function OpenshiftDropdownV4(props: IProps): React.JSX.Element;
|
|
16
|
-
declare namespace OpenshiftDropdownV4 {
|
|
17
|
-
var defaultProps: {};
|
|
18
|
-
}
|
|
19
16
|
export { OpenshiftDropdownV4 };
|
|
20
17
|
//# sourceMappingURL=OpenshiftDropdownV4.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAgB5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA2D,MAAM,OAAO,CAAC;AAOhF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAgBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAmdzC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { cloud } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button,
|
|
11
|
+
import { Button, Divider, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
|
|
12
12
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
13
13
|
import { useLRUCache, useSelectKeyboardNavigator } from '@rh-support/components';
|
|
14
14
|
import debounce from 'lodash/debounce';
|
|
@@ -19,12 +19,6 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
19
19
|
import { getDisplayNameForCluster } from '../../utils/caseOpenshiftClusterIdUtils';
|
|
20
20
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
21
21
|
import CaseOpenShiftPopover from '../CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover';
|
|
22
|
-
const defaultProps = {
|
|
23
|
-
className: '',
|
|
24
|
-
id: '',
|
|
25
|
-
isDisabled: false,
|
|
26
|
-
openshiftDisplayName: '',
|
|
27
|
-
};
|
|
28
22
|
const createState = (external_cluster_id, display_name, openshift_version) => {
|
|
29
23
|
return {
|
|
30
24
|
display_name,
|
|
@@ -90,7 +84,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
90
84
|
setClustersRawResponse([]);
|
|
91
85
|
setInputVal('');
|
|
92
86
|
}
|
|
93
|
-
else {
|
|
87
|
+
else if (selectedCluster !== 'loader') {
|
|
94
88
|
props.onClusterIdStateUpdate(selectedCluster);
|
|
95
89
|
const displayName = selectedCluster.display_name || selectedCluster.toString();
|
|
96
90
|
setInputVal(displayName);
|
|
@@ -127,8 +121,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
127
121
|
},
|
|
128
122
|
});
|
|
129
123
|
const dropdownHeaderOptions = useMemo(() => [
|
|
130
|
-
React.createElement(SelectOption, { key: 'show-hide-archived-clusters
|
|
131
|
-
React.createElement(Checkbox, { label: t('Show archived clusters'), key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", "data-tracking-id": "show-hide-archived-clusters", isChecked: showArchivedClusters || false, className: "archived-clusters-checkbox" })),
|
|
124
|
+
React.createElement(SelectOption, { hasCheckbox: true, key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", className: "archived-clusters-checkbox", "data-tracking-id": "show-hide-archived-clusters", value: { type: 'checkbox' }, isSelected: showArchivedClusters }, t('Show archived clusters')),
|
|
132
125
|
React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider-e' }),
|
|
133
126
|
React.createElement(SelectOption, { key: 'dont-have-id', value: createState('dont-have-id', t("I don't have my Cluster ID")), "data-tracking-id": "dont-have-cluster-id", isFocused: focusedItemIndex === 1 }, "I don't have my Cluster ID"),
|
|
134
127
|
...(props.isV3
|
|
@@ -153,15 +146,19 @@ function OpenshiftDropdownV4(props) {
|
|
|
153
146
|
const clusterOptions = [];
|
|
154
147
|
domainNames.forEach((domain, index) => {
|
|
155
148
|
domain !== '' &&
|
|
156
|
-
clusterOptions.push(React.createElement(SelectOption, { isDisabled: true, className: "pf-v6-u-font-weight-bold pf-v6-u-color-400", value: createState(domain, domain), key: domain + index }));
|
|
149
|
+
clusterOptions.push(React.createElement(SelectOption, { isDisabled: true, className: "pf-v6-u-font-weight-bold pf-v6-u-color-400", value: createState(domain, domain), key: domain + index }, domain));
|
|
157
150
|
clustersResponseGrouped[domain] &&
|
|
158
151
|
clustersResponseGrouped[domain].forEach((cluster, i) => {
|
|
159
|
-
clusterOptions.push(React.createElement(SelectOption, { key: cluster.external_cluster_id, value: createState(cluster.external_cluster_id, getDisplayNameForCluster(cluster) || cluster.external_cluster_id, cluster.openshift_version) }));
|
|
152
|
+
clusterOptions.push(React.createElement(SelectOption, { key: cluster.external_cluster_id, value: createState(cluster.external_cluster_id, getDisplayNameForCluster(cluster) || cluster.external_cluster_id, cluster.openshift_version) }, getDisplayNameForCluster(cluster) || cluster.external_cluster_id));
|
|
160
153
|
});
|
|
161
154
|
clusterOptions.push(React.createElement(Divider, { component: "div", key: index + domain }));
|
|
162
155
|
});
|
|
163
|
-
if (
|
|
164
|
-
clusterOptions.push(React.createElement(SelectOption, {
|
|
156
|
+
if (isFetchingClusters) {
|
|
157
|
+
clusterOptions.push(React.createElement(SelectOption, { isLoading: true, disabled: true },
|
|
158
|
+
React.createElement(Spinner, { size: "lg" })));
|
|
159
|
+
}
|
|
160
|
+
else if (!isFetchingClusters && clustersRawResponse.length < totalResultsNo) {
|
|
161
|
+
clusterOptions.push(React.createElement(SelectOption, { isLoadButton: true, onClick: onViewMoreClick, value: "loader" }, "Display additional results"));
|
|
165
162
|
}
|
|
166
163
|
return [
|
|
167
164
|
...dropdownHeaderOptions,
|
|
@@ -336,5 +333,4 @@ function OpenshiftDropdownV4(props) {
|
|
|
336
333
|
React.createElement(SelectList, { id: "openshift-cluster-selector-listbox" }, clustersSelectOptions)),
|
|
337
334
|
React.createElement("div", { id: "clusterID-validate-helper", className: `form-instructions ${props.isClusterIdInvalid ? 'form-invalid' : ''}` }, props.clusterIdDropdownFormInstructions))));
|
|
338
335
|
}
|
|
339
|
-
OpenshiftDropdownV4.defaultProps = defaultProps;
|
|
340
336
|
export { OpenshiftDropdownV4 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.47",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -134,5 +134,5 @@
|
|
|
134
134
|
"defaults and supports es6-module",
|
|
135
135
|
"maintained node versions"
|
|
136
136
|
],
|
|
137
|
-
"gitHead": "
|
|
137
|
+
"gitHead": "e8af649590e0bd7cc13b28458426d90f634e0b09"
|
|
138
138
|
}
|