Skip to content

Commit d5b5911

Browse files
Cpde Clean-up
1 parent 2e5342c commit d5b5911

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

apps/st2-history/history-popup.component.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,16 @@ export default class HistoryPopup extends React.Component {
6262
}
6363

6464
handleSubmit(e) {
65-
// whenever user changes any parameter, it is stored into payload. So we get changed data into payload.
66-
// We have copy of original data without any parameter change in payloadCopy object on line no 49.
67-
// Here we are first identifying key name of secret parameter, payloadKey is key variable name for payload object and payloadCopyKey variable name for payloadCopy object.
68-
// once we get both key, we are checking value of that key in both object.
69-
// So if user change secret parameter data, it will get in payload.
70-
// When user does not change secret parameter, in payload secret parameter value is **** and in payloadCopyKey object it is always **** because we are getting changed value in payload object only.
71-
// If data in both key same , then there is no any change and if data is not same in both key i.e payloadKey and payloadCopyKey, data is changed and we will send changed data to API.
65+
// 1. Whenever user changes any parameter,it is stored into payload.So we get changed data into payload.
66+
// 2. We have copy of original data without any parameter change in payloadCopy object on line no 49.
67+
// 3. Here we are first identifying key name of secret parameter, payloadKey is key variable name for
68+
// payload object and payloadCopyKey is variable name for payloadCopy object.
69+
// 4. Once we get both key, we are checking value of that key in both object.
70+
// 5. So if user change secret parameter data, it will get in payload.
71+
// 6. When user does not change secret parameter,in payload secret parameter value is *** and in
72+
// payloadCopyKey object it is always *** because we are getting changed value in payload object only.
73+
// 7. If data in both key same, then there is no any change and if data is not same in both key
74+
// i.e payloadKey and payloadCopyKey, data is changed and we will send changed data to API.
7275
e.preventDefault();
7376
const hasValue = Object.values(this.state.payload).includes('********');
7477
let payLoadKey;

0 commit comments

Comments
 (0)