@rh-support/troubleshoot 0.3.9 → 0.4.0

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.
@@ -34,7 +34,7 @@ function ManagedAccountsDropdown(props) {
34
34
  return (React.createElement(Dropdown, { className: `push-top ${props.className}`, id: props.id, placeholder: "Select a managed account", list: toOptions(managedAccountsOptions, {
35
35
  childrenKey: 'children',
36
36
  actionItemKey: 'actionItem',
37
- }), selectedItem: selectedItem, title: `Select a managed account`, onChange: props.onManagedAccountChange, disabled: props.disabled || managedAccountsWithPermission.length === 0 }));
37
+ }), selectedItem: selectedItem, title: `Select a managed account`, onChange: props.onManagedAccountChange, disabled: props.disabled || managedAccountsOptions.length === 0 }));
38
38
  }
39
39
  ManagedAccountsDropdown.defaultProps = defaultProps;
40
40
  export { ManagedAccountsDropdown };
@@ -1 +1 @@
1
- {"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAaA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,eAwFhD"}
1
+ {"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,eAiGhD"}
@@ -2,10 +2,11 @@ import { TextArea } from '@patternfly/react-core';
2
2
  import { InlineEdit } from '@rh-support/components';
3
3
  import isEmpty from 'lodash/isEmpty';
4
4
  import isEqual from 'lodash/isEqual';
5
- import React, { useState } from 'react';
5
+ import React, { useContext, useState } from 'react';
6
6
  import { Trans, useTranslation } from 'react-i18next';
7
7
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
8
- import { DESCRIPTION_LENGTH_LIMIT, LargeDescriptionErrorMessage } from '../../reducers/CaseConstNTypes';
8
+ import { RouteContext } from '../../context/RouteContext';
9
+ import { CASE_DEATILS_ISSUE_LIMIT, LargeDescriptionErrorMessage, MODIFIED_DESCRIPTION_LENGTH_LIMIT, } from '../../reducers/CaseConstNTypes';
9
10
  import { getUpdatedDescription } from '../../reducers/CaseHelpers';
10
11
  import { setCaseDetails } from '../../reducers/CaseReducer';
11
12
  export default function Description(props) {
@@ -29,13 +30,15 @@ export default function Description(props) {
29
30
  const onCaseDetailsChange = (caseDetails) => {
30
31
  setCaseDetails(caseDispatch, caseDetails);
31
32
  };
33
+ const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
32
34
  const onKTQ1IssueChange = (value, e) => {
33
35
  const ktQ1Local = isEmpty(value === null || value === void 0 ? void 0 : value.trim()) ? '' : value;
34
36
  const newDescription = getUpdatedDescription(ktQ1Local, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName);
35
37
  onCaseDetailsChange({ issue: ktQ1Local, description: newDescription });
36
38
  };
37
39
  const isKT1Required = true;
38
- const descriptionErrorMessage = t(LargeDescriptionErrorMessage, { limit: DESCRIPTION_LENGTH_LIMIT });
40
+ //changing limit to 31000 to account for extra chars added during description combination to backend. True limit is 32000
41
+ const descriptionErrorMessage = t(LargeDescriptionErrorMessage, { limit: MODIFIED_DESCRIPTION_LENGTH_LIMIT });
39
42
  const isDescriptionInvalid = (issue) => {
40
43
  return hasFocusedLostKT4 && isEmpty(issue);
41
44
  };
@@ -43,7 +46,9 @@ export default function Description(props) {
43
46
  React.createElement(Trans, null, "What are you experiencing? What are you expecting to happen?"),
44
47
  ' ',
45
48
  isKT1Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), labelProps: { htmlFor: 'open-case-ktQ1-issue' }, content: issue, allowInlineEdit: !!props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: isEmpty(issue), usePreformattedTag: true, saveOnBlur: true },
46
- React.createElement(TextArea, { id: "open-case-ktQ1-issue", name: "open-case-ktQ1-issue", className: `form-control${isDescriptionInvalid(issue) ? ' form-invalid' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > 20000 ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, isDisabled: isEmpty(issue) && hasLargeCaseDescription && !setIssueTextAreaFocused, onChange: onKTQ1IssueChange, onFocus: onKTQ1IssueFocusChange, onBlur: onKTQ1IssueFocusChange, "data-tracking-id": "open-case-ktQ1-issue" }),
47
- React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > 20000 ? 'Description cannot be more than 20000 characters' : ''}`),
49
+ React.createElement(TextArea, { id: "open-case-ktQ1-issue", name: "open-case-ktQ1-issue", className: `form-control${isDescriptionInvalid(issue) || (showValidationErrorAlert && isEmpty(issue)) ? ' form-invalid' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DEATILS_ISSUE_LIMIT ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, isDisabled: isEmpty(issue) && hasLargeCaseDescription && !setIssueTextAreaFocused, onChange: onKTQ1IssueChange, onFocus: onKTQ1IssueFocusChange, onBlur: onKTQ1IssueFocusChange, "data-tracking-id": "open-case-ktQ1-issue" }),
50
+ React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DEATILS_ISSUE_LIMIT
51
+ ? `Description cannot be more than ${CASE_DEATILS_ISSUE_LIMIT} characters`
52
+ : ''}`),
48
53
  React.createElement("p", { className: "form-instructions" }, `${hasLargeCaseDescription && isIssueTextAreaFocused ? descriptionErrorMessage : ''}`)));
49
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"KtQuestions.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/KtQuestions.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,eA+OjC;kBA/OQ,WAAW;;;AAiPpB,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"KtQuestions.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/KtQuestions.tsx"],"names":[],"mappings":"AAqBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,eAkQjC;kBAlQQ,WAAW;;;AAoQpB,eAAe,WAAW,CAAC"}
@@ -2,10 +2,11 @@ import { TextArea } from '@patternfly/react-core';
2
2
  import { InlineEdit } from '@rh-support/components';
3
3
  import isEmpty from 'lodash/isEmpty';
4
4
  import isEqual from 'lodash/isEqual';
5
- import React, { useEffect, useState } from 'react';
5
+ import React, { useContext, useEffect, useState } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
8
- import { DESCRIPTION_LENGTH_LIMIT, KtQuestionConstant, LargeDescriptionErrorMessage, } from '../../reducers/CaseConstNTypes';
8
+ import { RouteContext } from '../../context/RouteContext';
9
+ import { CASE_DEATILS_ENVIRONMENT_LIMIT, CASE_DEATILS_PERIODICITYOFISSUE_LIMIT, CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT, KtQuestionConstant, LargeDescriptionErrorMessage, MODIFIED_DESCRIPTION_LENGTH_LIMIT, } from '../../reducers/CaseConstNTypes';
9
10
  import { getUpdatedDescription } from '../../reducers/CaseHelpers';
10
11
  import { setCaseDetails } from '../../reducers/CaseReducer';
11
12
  const defaultProps = { inlineEditable: false, hideSaveCancel: false };
@@ -53,6 +54,7 @@ function KtQuestions(props) {
53
54
  const onCaseDetailsChange = (caseDetails) => {
54
55
  setCaseDetails(caseDispatch, caseDetails);
55
56
  };
57
+ const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
56
58
  // Troubleshoot Page Question 3
57
59
  const onKtQ2Change = (value, e) => {
58
60
  const ktQ2Local = isEmpty(value === null || value === void 0 ? void 0 : value.trim()) ? '' : value;
@@ -77,7 +79,8 @@ function KtQuestions(props) {
77
79
  const isKT2Required = false;
78
80
  const isKT3Required = false;
79
81
  const isKT4Required = true;
80
- const descriptionErrorMessage = t(LargeDescriptionErrorMessage, { limit: DESCRIPTION_LENGTH_LIMIT });
82
+ //changing limit to 31000 to account for extra chars added during description combination to backend
83
+ const descriptionErrorMessage = t(LargeDescriptionErrorMessage, { limit: MODIFIED_DESCRIPTION_LENGTH_LIMIT });
81
84
  const invalidateQT4 = (value) => {
82
85
  return isEmpty(value) && hasFocusedLostKT4;
83
86
  };
@@ -86,27 +89,35 @@ function KtQuestions(props) {
86
89
  t(KtQuestionConstant.timeFramesAndUrgency),
87
90
  ' ',
88
91
  isKT4Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(timeFramesAndUrgency), usePreformattedTag: true, saveOnBlur: true, content: timeFramesAndUrgency },
89
- React.createElement(TextArea, { className: `form-control${invalidateQT4(timeFramesAndUrgency) || isKTQ4InValid ? ' form-invalid' : ''}`, "aria-invalid": timeFramesAndUrgency && (timeFramesAndUrgency === null || timeFramesAndUrgency === void 0 ? void 0 : timeFramesAndUrgency.length) > 4000 ? 'true' : 'false', id: "ktQ4-timeFramesAndUrgency", value: timeFramesAndUrgency, isDisabled: isEmpty(timeFramesAndUrgency) && hasLargeCaseDescription && !isKTQ4TextAreaActive, onChange: onKtQ4Change, onFocus: onKTQ4FocusChange, onBlur: onKTQ4FocusChange, "aria-required": isKT4Required, "data-tracking-id": "open-case-ktQ4-timeFramesAndUrgency", placeholder: "E.g., users affected, financial impact, and whether it\u2019s a matter of legal, national, or medical urgency", isRequired: isKT4Required }),
90
- React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-4k-warning-ktQ4-environment" }, `${isKTQ4TextAreaActive && (timeFramesAndUrgency === null || timeFramesAndUrgency === void 0 ? void 0 : timeFramesAndUrgency.length) > 4000
91
- ? 'Description cannot be more than 4000 characters'
92
+ React.createElement(TextArea, { className: `form-control${invalidateQT4(timeFramesAndUrgency) ||
93
+ (showValidationErrorAlert && isEmpty(timeFramesAndUrgency)) ||
94
+ isKTQ4InValid
95
+ ? ' form-invalid'
96
+ : ''}`, "aria-invalid": timeFramesAndUrgency && (timeFramesAndUrgency === null || timeFramesAndUrgency === void 0 ? void 0 : timeFramesAndUrgency.length) > CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT
97
+ ? 'true'
98
+ : 'false', id: "ktQ4-timeFramesAndUrgency", value: timeFramesAndUrgency, isDisabled: isEmpty(timeFramesAndUrgency) && hasLargeCaseDescription && !isKTQ4TextAreaActive, onChange: onKtQ4Change, onFocus: onKTQ4FocusChange, onBlur: onKTQ4FocusChange, "aria-required": isKT4Required, "data-tracking-id": "open-case-ktQ4-timeFramesAndUrgency", placeholder: "E.g., users affected, financial impact, and whether it\u2019s a matter of legal, national, or medical urgency", isRequired: isKT4Required }),
99
+ React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-4k-warning-ktQ4-environment" }, `${isKTQ4TextAreaActive && (timeFramesAndUrgency === null || timeFramesAndUrgency === void 0 ? void 0 : timeFramesAndUrgency.length) > CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT
100
+ ? `Description cannot be more than ${CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT} characters`
92
101
  : ''}`),
93
102
  React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-warning-ktQ4-timeFramesAndUrgency" }, `${hasLargeCaseDescription && isKTQ4TextAreaActive ? descriptionErrorMessage : ''}`)),
94
103
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'ktQ2-environment' }, labelContent: React.createElement(React.Fragment, null,
95
104
  t(KtQuestionConstant.environment),
96
105
  ' ',
97
106
  isKT2Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(environment), usePreformattedTag: true, saveOnBlur: true, content: environment },
98
- React.createElement(TextArea, { className: `form-control`, id: "ktQ2-environment", value: environment, isDisabled: isEmpty(environment) && hasLargeCaseDescription && !isKTQ2TextAreaActive, onChange: onKtQ2Change, onFocus: onKTQ2FocusChange, onBlur: onKTQ2FocusChange, "aria-required": isKT2Required, isRequired: isKT2Required, "data-tracking-id": "open-case-ktQ2-environment", "aria-invalid": environment && (environment === null || environment === void 0 ? void 0 : environment.length) > 4000 ? 'true' : 'false' }),
99
- React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-4k-warning-ktQ2-environment" }, `${isKTQ2TextAreaActive && (environment === null || environment === void 0 ? void 0 : environment.length) > 4000
100
- ? 'Description cannot be more than 4000 characters'
107
+ React.createElement(TextArea, { className: `form-control`, id: "ktQ2-environment", value: environment, isDisabled: isEmpty(environment) && hasLargeCaseDescription && !isKTQ2TextAreaActive, onChange: onKtQ2Change, onFocus: onKTQ2FocusChange, onBlur: onKTQ2FocusChange, "aria-required": isKT2Required, isRequired: isKT2Required, "data-tracking-id": "open-case-ktQ2-environment", "aria-invalid": environment && (environment === null || environment === void 0 ? void 0 : environment.length) > CASE_DEATILS_ENVIRONMENT_LIMIT ? 'true' : 'false' }),
108
+ React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-4k-warning-ktQ2-environment" }, `${isKTQ2TextAreaActive && (environment === null || environment === void 0 ? void 0 : environment.length) > CASE_DEATILS_ENVIRONMENT_LIMIT
109
+ ? `Description cannot be more than ${CASE_DEATILS_ENVIRONMENT_LIMIT} characters`
101
110
  : ''}`),
102
111
  React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-warning-ktQ2-environment" }, `${hasLargeCaseDescription && isKTQ2TextAreaActive ? descriptionErrorMessage : ''}`)),
103
112
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'ktQ3-periodicityOfIssue' }, labelContent: React.createElement(React.Fragment, null,
104
113
  t(KtQuestionConstant.periodicityOfIssue),
105
114
  ' ',
106
115
  isKT3Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(periodicityOfIssue), usePreformattedTag: true, saveOnBlur: true, content: periodicityOfIssue },
107
- React.createElement(TextArea, { className: `form-control`, id: "ktQ3-periodicityOfIssue", value: periodicityOfIssue, isDisabled: isEmpty(periodicityOfIssue) && hasLargeCaseDescription && !isKTQ3TextAreaActive, onChange: onKtQ3Change, onFocus: onKTQ3FocusChange, onBlur: onKTQ3FocusChange, "aria-required": isKT3Required, isRequired: isKT3Required, "data-tracking-id": "open-case-ktQ3-periodicityOfIssue", "aria-invalid": periodicityOfIssue && (periodicityOfIssue === null || periodicityOfIssue === void 0 ? void 0 : periodicityOfIssue.length) > 4000 ? 'true' : 'false' }),
108
- React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-4k-warning-ktQ3-environment" }, `${isKTQ3TextAreaActive && (periodicityOfIssue === null || periodicityOfIssue === void 0 ? void 0 : periodicityOfIssue.length) > 4000
109
- ? 'Description cannot be more than 4000 characters'
116
+ React.createElement(TextArea, { className: `form-control`, id: "ktQ3-periodicityOfIssue", value: periodicityOfIssue, isDisabled: isEmpty(periodicityOfIssue) && hasLargeCaseDescription && !isKTQ3TextAreaActive, onChange: onKtQ3Change, onFocus: onKTQ3FocusChange, onBlur: onKTQ3FocusChange, "aria-required": isKT3Required, isRequired: isKT3Required, "data-tracking-id": "open-case-ktQ3-periodicityOfIssue", "aria-invalid": periodicityOfIssue && (periodicityOfIssue === null || periodicityOfIssue === void 0 ? void 0 : periodicityOfIssue.length) > CASE_DEATILS_PERIODICITYOFISSUE_LIMIT
117
+ ? 'true'
118
+ : 'false' }),
119
+ React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-4k-warning-ktQ3-environment" }, `${isKTQ3TextAreaActive && (periodicityOfIssue === null || periodicityOfIssue === void 0 ? void 0 : periodicityOfIssue.length) > CASE_DEATILS_PERIODICITYOFISSUE_LIMIT
120
+ ? `Description cannot be more than ${CASE_DEATILS_PERIODICITYOFISSUE_LIMIT} characters`
110
121
  : ''}`),
111
122
  React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-warning-ktQ3-periodicityOfIssue" }, `${hasLargeCaseDescription && isKTQ3TextAreaActive ? descriptionErrorMessage : ''}`))));
112
123
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Issue.d.ts","sourceRoot":"","sources":["../../../../src/components/Issue/Issue.tsx"],"names":[],"mappings":"AAeA,MAAM,CAAC,OAAO,UAAU,KAAK,gBA0F5B"}
1
+ {"version":3,"file":"Issue.d.ts","sourceRoot":"","sources":["../../../../src/components/Issue/Issue.tsx"],"names":[],"mappings":"AAmBA,MAAM,CAAC,OAAO,UAAU,KAAK,gBA4F5B"}
@@ -6,7 +6,7 @@ import isEqual from 'lodash/isEqual';
6
6
  import React, { useState } from 'react';
7
7
  import { Trans, useTranslation } from 'react-i18next';
8
8
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
9
- import { DESCRIPTION_LENGTH_LIMIT } from '../../reducers/CaseConstNTypes';
9
+ import { CASE_DEATILS_ISSUE_LIMIT, DESCRIPTION_LENGTH_LIMIT, MODIFIED_DESCRIPTION_LENGTH_LIMIT, } from '../../reducers/CaseConstNTypes';
10
10
  import { getUpdatedDescription } from '../../reducers/CaseHelpers';
11
11
  import { setCaseDetails } from '../../reducers/CaseReducer';
12
12
  import OpenCaseIssue from '../CaseInformation/OpenCaseIssue';
@@ -34,7 +34,7 @@ export default function Issue() {
34
34
  onCaseDetailsChange({ issue: ktQ1Local, description });
35
35
  };
36
36
  const maxLengtMessage = t('Case description cannot be more than {{limit}} characters', {
37
- limit: DESCRIPTION_LENGTH_LIMIT,
37
+ limit: MODIFIED_DESCRIPTION_LENGTH_LIMIT,
38
38
  });
39
39
  const handleFormSubmit = (e) => e.preventDefault();
40
40
  return (React.createElement(React.Fragment, null,
@@ -43,8 +43,10 @@ export default function Issue() {
43
43
  React.createElement(MoreOrLess, { maxHeight: 600, appStickyHeaderRef: navBarRef },
44
44
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'issue-section-ktQ1-issue' }, labelContent: React.createElement(React.Fragment, null,
45
45
  React.createElement(Trans, null, "What are you experiencing? What are you expecting to happen?")), allowInlineEdit: true, hideSaveCancel: true, initialIsEditing: isEmpty(issue), usePreformattedTag: true, content: issue },
46
- React.createElement(TextArea, { id: "issue-section-ktQ1-issue", name: "issue-section-ktQ1-issue", className: `form-control${hasLargeDescription ? ' form-invalid' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > 20000 ? 'true' : 'false', value: issue, onChange: onKTQ1IssueChange, "data-tracking-id": "open-case-describe-ktQ1-issue", "aria-describedby": "describeIssueDesc", placeholder: t('Elaborate more on your issue') }),
47
- React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > 20000 ? 'Description cannot be more than 20000 characters' : ''}`))),
46
+ React.createElement(TextArea, { id: "issue-section-ktQ1-issue", name: "issue-section-ktQ1-issue", className: `form-control${hasLargeDescription ? ' form-invalid' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DEATILS_ISSUE_LIMIT ? 'true' : 'false', value: issue, onChange: onKTQ1IssueChange, "data-tracking-id": "open-case-describe-ktQ1-issue", "aria-describedby": "describeIssueDesc", placeholder: t('Elaborate more on your issue') }),
47
+ React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > CASE_DEATILS_ISSUE_LIMIT
48
+ ? `Description cannot be more than ${CASE_DEATILS_ISSUE_LIMIT} characters`
49
+ : ''}`))),
48
50
  ((_a = getUpdatedDescription(issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName)) === null || _a === void 0 ? void 0 : _a.length) > DESCRIPTION_LENGTH_LIMIT && (React.createElement("div", { className: "pull-top" },
49
51
  React.createElement("p", { className: "form-instructions form-invalid" }, maxLengtMessage))))));
50
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ClusterRecommendationItems.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationItems.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAe5F,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,eA8FvD"}
1
+ {"version":3,"file":"ClusterRecommendationItems.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/ClusterRecommendationItems.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAe5F,UAAU,MAAM;IACZ,sBAAsB,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,eAiGvD"}
@@ -33,7 +33,7 @@ export function ClusterRecommendationItems(props) {
33
33
  React.createElement("h3", null, rule.description)),
34
34
  React.createElement("pfe-accordion-panel", null,
35
35
  React.createElement("p", null,
36
- React.createElement(Label, { icon: riskLabels[rule.total_risk].icon, color: riskLabels[rule.total_risk].color },
36
+ React.createElement(Label, { icon: riskLabels[rule.total_risk].icon, className: riskLabels[rule.total_risk].className },
37
37
  React.createElement(Trans, null, riskLabels[rule.total_risk].label))),
38
38
  React.createElement("p", null, rule.details || ''),
39
39
  rule.reason && (React.createElement(React.Fragment, null,
@@ -54,22 +54,22 @@ export declare const riskLabels: {
54
54
  1: {
55
55
  icon: JSX.Element;
56
56
  label: string;
57
- color: string;
57
+ className: string;
58
58
  };
59
59
  2: {
60
60
  icon: JSX.Element;
61
61
  label: string;
62
- color: string;
62
+ className: string;
63
63
  };
64
64
  3: {
65
65
  icon: JSX.Element;
66
66
  label: string;
67
- color: string;
67
+ className: string;
68
68
  };
69
69
  4: {
70
70
  icon: JSX.Element;
71
71
  label: string;
72
- color: string;
72
+ className: string;
73
73
  };
74
74
  };
75
75
  //# sourceMappingURL=Constants.d.ts.map
@@ -56,8 +56,8 @@ export const recsViewedFromNoAttachmentModalEvent = 'PCM-Next > No-Attachment-mo
56
56
  export const markdownInlineFileSelectEvent = 'PCM-Next > Markdown-toolbar-file-select';
57
57
  export const markdownFilePasteEvent = 'PCM-Next > Markdown-toolbar-file-paste';
58
58
  export const riskLabels = {
59
- 1: { icon: React.createElement(AngleDoubleDownIcon, null), label: 'Low', color: 'blue' },
60
- 2: { icon: React.createElement(EqualsIcon, null), label: 'Moderate', color: 'gold' },
61
- 3: { icon: React.createElement(AngleDoubleUpIcon, null), label: 'Important', color: 'orange' },
62
- 4: { icon: React.createElement(CriticalRiskIcon, null), label: 'Critical', color: 'red' },
59
+ 1: { icon: React.createElement(AngleDoubleDownIcon, null), label: 'Low', className: 'pf-m-blue' },
60
+ 2: { icon: React.createElement(EqualsIcon, null), label: 'Moderate', className: 'pf-m-gold' },
61
+ 3: { icon: React.createElement(AngleDoubleUpIcon, null), label: 'Important', className: 'pf-m-orange' },
62
+ 4: { icon: React.createElement(CriticalRiskIcon, null), label: 'Critical', className: 'pf-m-red' },
63
63
  };
@@ -10,6 +10,7 @@ import { Dispatch } from 'react';
10
10
  export declare const SUMMARY_LENGTH_LIMIT = 255;
11
11
  export declare const ESCALATION_SUBJECT_LENGTH_LIMIT = 255;
12
12
  export declare const DESCRIPTION_LENGTH_LIMIT = 32000;
13
+ export declare const MODIFIED_DESCRIPTION_LENGTH_LIMIT = 31000;
13
14
  export declare const HOSTNAME_LENGTH_LIMIT = 255;
14
15
  export declare const CONTACT_INFO_24X7_LIMIT = 32768;
15
16
  export declare const CLUSTER_ID_LIMIT = 255;
@@ -23,6 +24,10 @@ export declare const SESSION_ENVIRONMENT_LIMIT = 32768;
23
24
  export declare const SESSION_REFERRER_URL_LIMIT = 1024;
24
25
  export declare const SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT = 255;
25
26
  export declare const SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT = 255;
27
+ export declare const CASE_DEATILS_ISSUE_LIMIT = 20000;
28
+ export declare const CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT = 4000;
29
+ export declare const CASE_DEATILS_ENVIRONMENT_LIMIT = 3000;
30
+ export declare const CASE_DEATILS_PERIODICITYOFISSUE_LIMIT = 4000;
26
31
  export declare const summaryMaxLengthErrorMessage = "Case summary cannot be more than {{limit}} characters.";
27
32
  export declare enum KtQuestionConstant {
28
33
  issue = "What problem/issue/behavior are you having trouble with? What do you expect to see?",
@@ -1 +1 @@
1
- {"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EA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,oBAAY,eAAe,GAAG,OAAO,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AACpF,oBAAY,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,qCAAqC,+CAA+C,CAAC;AAClG,eAAO,MAAM,yCAAyC,+CAA+C,CAAC"}
@@ -2,6 +2,7 @@ import { getApiResourceObject } from '@rh-support/utils';
2
2
  export const SUMMARY_LENGTH_LIMIT = 255;
3
3
  export const ESCALATION_SUBJECT_LENGTH_LIMIT = 255;
4
4
  export const DESCRIPTION_LENGTH_LIMIT = 32000;
5
+ export const MODIFIED_DESCRIPTION_LENGTH_LIMIT = 31000;
5
6
  export const HOSTNAME_LENGTH_LIMIT = 255;
6
7
  export const CONTACT_INFO_24X7_LIMIT = 32768;
7
8
  export const CLUSTER_ID_LIMIT = 255;
@@ -15,6 +16,12 @@ export const SESSION_ENVIRONMENT_LIMIT = 32768;
15
16
  export const SESSION_REFERRER_URL_LIMIT = 1024;
16
17
  export const SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT = 255;
17
18
  export const SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT = 255;
19
+ //Case detail limits for each individual KT Question in order as they appear on troubleshoot/opencase
20
+ //We are totaling 31k here to allow for the backend to accept response when combined with question copy.
21
+ export const CASE_DEATILS_ISSUE_LIMIT = 20000; // 1st Q
22
+ export const CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT = 4000; //2nd Q
23
+ export const CASE_DEATILS_ENVIRONMENT_LIMIT = 3000; //3rd Q
24
+ export const CASE_DEATILS_PERIODICITYOFISSUE_LIMIT = 4000; //4th Q
18
25
  export const summaryMaxLengthErrorMessage = 'Case summary cannot be more than {{limit}} characters.';
19
26
  // Constants
20
27
  export var KtQuestionConstant;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,O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,kBACb,MAAM,KACvB,MAuBF,CAAC;AAIF,eAAO,MAAM,oBAAoB,UACtB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,KAC9B,MAQF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,MAKzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CA8B5B,CAAC;AAIF,eAAO,MAAM,gBAAgB,cAAe,UAAU,wBAAwB,QAAQ,eAAe,CAAC,KAAG,OA2BxG,CAAC;AAEF,eAAO,MAAM,0BAA0B,cACxB,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAiBF,CAAC;AAIF,eAAO,MAAM,6BAA6B,cAC3B,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAuBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACf,UAAU,gBACP,YAAY,iBACZ,OAAO,KACtB,QAAQ,YAAY,CAiEtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAsB,YAAY,EAAE,KAAG,YAAY,EAEvF,CAAC;AACF,eAAO,MAAM,yBAAyB,qBAAsB,YAAY,EAAE,KAAG,OAE5E,CAAC;AAEF,eAAO,MAAM,yBAAyB,gBACrB,YAAY,6BACE,MAAM,mBAChB,MAAM,KACxB,QAAQ,YAAY,CA6BtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eAyCF,CAAC"}
@@ -7,7 +7,7 @@ import some from 'lodash/some';
7
7
  import unionBy from 'lodash/unionBy';
8
8
  import uniqBy from 'lodash/uniqBy';
9
9
  import { getIsClusterIdInvalid, isClusterIdEnabledForProduct } from '../utils/caseOpenshiftClusterIdUtils';
10
- import { ALTERNATE_CASE_ID_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, ITRForSLASeverity, KtQuestionConstant, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
10
+ import { ALTERNATE_CASE_ID_LIMIT, CASE_DEATILS_ENVIRONMENT_LIMIT, CASE_DEATILS_ISSUE_LIMIT, CASE_DEATILS_PERIODICITYOFISSUE_LIMIT, CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, ITRForSLASeverity, KtQuestionConstant, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
11
11
  export const getCaseRecommendations = (docs, oldDocs) => {
12
12
  const recs = [];
13
13
  docs.forEach((doc, i) => {
@@ -167,6 +167,7 @@ export const isCaseManagementStateValid = (caseState, loggedInUserJwtToken) => {
167
167
  // Add a !isEmpty to to make any KTQuestion Mandatory in isCaseInformationSectionValid
168
168
  export const isCaseInformationSectionValid = (caseState, loggedInUserJwtToken) => {
169
169
  const case_details = caseState.caseDetails;
170
+ //checks to ensure the ktquestion section is valid
170
171
  return (isEmpty(case_details.caseNumber) &&
171
172
  !caseState.hasLargeCaseDescription &&
172
173
  !isEmpty(case_details.product) &&
@@ -176,7 +177,11 @@ export const isCaseInformationSectionValid = (caseState, loggedInUserJwtToken) =
176
177
  !isEmpty(case_details.description) &&
177
178
  case_details.description.length <= DESCRIPTION_LENGTH_LIMIT &&
178
179
  !isEmpty(case_details.timeFramesAndUrgency) &&
180
+ case_details.timeFramesAndUrgency.length <= CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT &&
179
181
  !isEmpty(case_details.issue) &&
182
+ case_details.issue.length <= CASE_DEATILS_ISSUE_LIMIT &&
183
+ case_details.environment.length <= CASE_DEATILS_ENVIRONMENT_LIMIT &&
184
+ case_details.periodicityOfIssue.length <= CASE_DEATILS_PERIODICITYOFISSUE_LIMIT &&
180
185
  !isEmpty(case_details.accountNumberRef) &&
181
186
  !isEmpty(case_details.contactSSOName) &&
182
187
  canManageCase(loggedInUserJwtToken));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "0.3.9",
3
+ "version": "0.4.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -73,11 +73,11 @@
73
73
  "@patternfly/react-core": "4.202.16",
74
74
  "@progress/kendo-drawing": "^1.6.0",
75
75
  "@progress/kendo-react-pdf": "^3.12.0",
76
- "@rh-support/components": "1.1.84",
77
- "@rh-support/react-context": "0.3.7",
76
+ "@rh-support/components": "1.1.83",
77
+ "@rh-support/react-context": "0.3.4",
78
78
  "@rh-support/types": "0.2.0",
79
- "@rh-support/user-permissions": "0.2.68",
80
- "@rh-support/utils": "0.2.50",
79
+ "@rh-support/user-permissions": "0.2.67",
80
+ "@rh-support/utils": "0.2.49",
81
81
  "@types/react-redux": "^7.1.12",
82
82
  "@types/redux": "^3.6.0",
83
83
  "@webcomponents/webcomponentsjs": "^2.2.10",
@@ -142,5 +142,5 @@
142
142
  "not ie <= 11",
143
143
  "not op_mini all"
144
144
  ],
145
- "gitHead": "2a7f8b7b1c07a45c3b2b564a3eb3a32ca0855677"
145
+ "gitHead": "a8d923cd016218bdddc33eb00705340cb6f63d57"
146
146
  }