@rh-support/troubleshoot 2.6.45 → 2.6.46
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,qBA8czC;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,
|
|
@@ -85,12 +79,13 @@ function OpenshiftDropdownV4(props) {
|
|
|
85
79
|
});
|
|
86
80
|
const onSelect = (event, selectedCluster) => __awaiter(this, void 0, void 0, function* () {
|
|
87
81
|
if (selectedCluster.type === 'checkbox') {
|
|
82
|
+
console.log('from ccc1');
|
|
88
83
|
setShowArchivedClusters(!showArchivedClusters);
|
|
89
84
|
props.onClusterClear();
|
|
90
85
|
setClustersRawResponse([]);
|
|
91
86
|
setInputVal('');
|
|
92
87
|
}
|
|
93
|
-
else {
|
|
88
|
+
else if (selectedCluster !== 'loader') {
|
|
94
89
|
props.onClusterIdStateUpdate(selectedCluster);
|
|
95
90
|
const displayName = selectedCluster.display_name || selectedCluster.toString();
|
|
96
91
|
setInputVal(displayName);
|
|
@@ -127,8 +122,7 @@ function OpenshiftDropdownV4(props) {
|
|
|
127
122
|
},
|
|
128
123
|
});
|
|
129
124
|
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" })),
|
|
125
|
+
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
126
|
React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider-e' }),
|
|
133
127
|
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
128
|
...(props.isV3
|
|
@@ -153,15 +147,15 @@ function OpenshiftDropdownV4(props) {
|
|
|
153
147
|
const clusterOptions = [];
|
|
154
148
|
domainNames.forEach((domain, index) => {
|
|
155
149
|
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 }));
|
|
150
|
+
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
151
|
clustersResponseGrouped[domain] &&
|
|
158
152
|
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) }));
|
|
153
|
+
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
154
|
});
|
|
161
155
|
clusterOptions.push(React.createElement(Divider, { component: "div", key: index + domain }));
|
|
162
156
|
});
|
|
163
157
|
if (!isFetchingClusters && clustersRawResponse.length < totalResultsNo) {
|
|
164
|
-
clusterOptions.push(React.createElement(SelectOption, {
|
|
158
|
+
clusterOptions.push(React.createElement(SelectOption, { isLoadButton: true, onClick: onViewMoreClick, value: "loader" }, "Display additional results"));
|
|
165
159
|
}
|
|
166
160
|
return [
|
|
167
161
|
...dropdownHeaderOptions,
|
|
@@ -336,5 +330,4 @@ function OpenshiftDropdownV4(props) {
|
|
|
336
330
|
React.createElement(SelectList, { id: "openshift-cluster-selector-listbox" }, clustersSelectOptions)),
|
|
337
331
|
React.createElement("div", { id: "clusterID-validate-helper", className: `form-instructions ${props.isClusterIdInvalid ? 'form-invalid' : ''}` }, props.clusterIdDropdownFormInstructions))));
|
|
338
332
|
}
|
|
339
|
-
OpenshiftDropdownV4.defaultProps = defaultProps;
|
|
340
333
|
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.46",
|
|
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": "2a9b47f2041c05672baeb1f4818eef81d7adeee2"
|
|
138
138
|
}
|