Skip to content

Commit bb755f5

Browse files
Merge pull request #77 from NathanielBAdams/headers
remove unneeded console logs
2 parents 1eb79cb + 575c70a commit bb755f5

File tree

6 files changed

+38
-42
lines changed

6 files changed

+38
-42
lines changed

src/client/components/composer/NewRequest/GRPCBodyEntryForm.jsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ import GRPCBodyStream from "./GRPCBodyStream.jsx";
33

44
const GRPCBodyEntryForm = (props) => {
55
const [show, toggleShow] = useState(true);
6-
6+
77
// when application first loads
88
useEffect(() => {
99
if (props.newRequestStreams.streamsArr.length === 0) {
10-
const newStreamsArr = [{
11-
id: props.newRequestStreams.count,
12-
query: "",
13-
}];
10+
const newStreamsArr = [
11+
{
12+
id: props.newRequestStreams.count,
13+
query: "",
14+
},
15+
];
1416

1517
props.newRequestStreams.streamContent.push("");
1618
// update state in the store
@@ -79,16 +81,18 @@ const GRPCBodyEntryForm = (props) => {
7981
history={props.history}
8082
/>
8183
));
82-
83-
84-
//if client stream or bidirectional, the add stream btn will be rendered below the stream bodies
84+
85+
//if client stream or bidirectional, the add stream btn will be rendered below the stream bodies
8586
let addStreamBtn;
8687
if (
8788
props.selectedStreamingType === "CLIENT STREAM" ||
8889
props.selectedStreamingType === "BIDIRECTIONAL"
8990
) {
9091
addStreamBtn = (
91-
<button className="button is-small add-header-or-cookie-button" onClick={addStream}>
92+
<button
93+
className="button is-small add-header-or-cookie-button"
94+
onClick={addStream}
95+
>
9296
Add Stream
9397
</button>
9498
);
@@ -100,7 +104,7 @@ const GRPCBodyEntryForm = (props) => {
100104
- if client stream or bidirectional, the add stream btn will be rendered below the stream bodies
101105
*/
102106
return (
103-
<div className = "mt-1">
107+
<div className="mt-1">
104108
<div className="composer-section-title">Body</div>
105109
<section>{streamArr}</section>
106110
{addStreamBtn}

src/client/components/composer/NewRequest/GRPCProtoEntryForm.jsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ const GRPCProtoEntryForm = (props) => {
1010
const [show, toggleShow] = useState(true);
1111
const [protoError, showError] = useState(null);
1212
const [changesSaved, saveChanges] = useState(false);
13-
console.log("gRPC proto entry props new req streams --->", props.newRequestStreams)
14-
13+
// console.log("gRPC proto entry props new req streams --->", props.newRequestStreams)
1514

1615
// import proto file via electron file import dialog and have it displayed in proto textarea box
1716
const importProtos = () => {
@@ -96,8 +95,7 @@ const GRPCProtoEntryForm = (props) => {
9695
api.send("protoParserFunc-request", props.newRequestStreams.protoContent);
9796
}
9897
};
99-
100-
98+
10199
const saveChangesBtnText = changesSaved ? "Changes Saved" : "Save Changes";
102100
/*
103101
pseudocode for the return section
@@ -108,26 +106,27 @@ const GRPCProtoEntryForm = (props) => {
108106
*/
109107
return (
110108
<div className="mt-1">
111-
<div className='is-flex is-justify-content-space-between is-align-content-center'>
109+
<div className="is-flex is-justify-content-space-between is-align-content-center">
112110
<div className="composer-section-title">Proto</div>
113111
<div>
114-
<button
112+
<button
115113
className="button is-small add-header-or-cookie-button mr-1"
116-
onClick={importProtos}>
117-
Load Proto
114+
onClick={importProtos}
115+
>
116+
Load Proto
118117
</button>
119-
<button
118+
<button
120119
className="button is-small add-header-or-cookie-button"
121120
id="save-proto"
122121
onClick={submitUpdatedProto}
123-
>
122+
>
124123
{saveChangesBtnText}
125124
</button>
126125
</div>
127126
</div>
128-
127+
129128
<div className="is-danger subtitle">{protoError}</div>
130-
<TextCodeAreaEditable
129+
<TextCodeAreaEditable
131130
id="grpcProtoEntryTextArea"
132131
onChange={(editor, data, value) => updateProtoBody(value)}
133132
value={props.newRequestStreams.protoContent}

src/client/components/composer/NewRequest/HeaderEntryForm.jsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class HeaderEntryForm extends Component {
2525
lastHeader?.key !== "" &&
2626
lastHeader?.key.toLowerCase() !== "content-type"
2727
) {
28-
// console.log("adding header");
2928
this.addHeader();
3029
}
3130
this.checkContentTypeHeaderUpdate();
@@ -80,8 +79,6 @@ class HeaderEntryForm extends Component {
8079
// foundHeader.value !== contentType &&
8180
// this.contentHeaderNeeded()
8281
// ) {
83-
// console.log("here is why - updating content type");
84-
// console.log("foundHeader, contentType", foundHeader, contentType);
8582
// this.updateContentTypeHeader(contentType, foundHeader);
8683
// }
8784
}
@@ -112,13 +109,6 @@ class HeaderEntryForm extends Component {
112109
const filtered = this.props.newRequestHeaders.headersArr.filter(
113110
(header) => !header.key.toLowerCase().includes("content-type")
114111
);
115-
// console.log(filtered);
116-
// this.props.newRequestHeaders.headersArr.unshift({
117-
// id: Math.random() * 1000000,
118-
// active: true,
119-
// key: "Content-Type",
120-
// value: contentType,
121-
// });
122112

123113
this.props.setNewRequestHeaders({
124114
headersArr: filtered,
@@ -145,8 +135,6 @@ class HeaderEntryForm extends Component {
145135
}
146136

147137
onChangeUpdateHeader(id, field, value) {
148-
// console.log("all headers", this.props.newRequestHeaders.headersArr);
149-
150138
const headersDeepCopy = JSON.parse(
151139
JSON.stringify(this.props.newRequestHeaders.headersArr)
152140
);

src/client/components/containers/ResponsePaneContainer.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import ReqResCtrl from "../../controllers/reqResController";
1212
export const ResponsePaneContainer = () => {
1313
const dispatch = useDispatch();
1414
const activeTab = useSelector((store) => store.ui.responsePaneActiveTab);
15-
15+
1616
const setActiveTab = (tabName) =>
1717
dispatch(actions.setResponsePaneActiveTab(tabName));
1818

@@ -22,7 +22,7 @@ export const ResponsePaneContainer = () => {
2222
const { connection } = currentResponse;
2323

2424
// UNCOMMENT FOR DEBUGGING
25-
console.log("currentResponse on ResponsePaneContainer --> ", currentResponse);
25+
// console.log("currentResponse on ResponsePaneContainer --> ", currentResponse);
2626

2727
return (
2828
<div
@@ -84,9 +84,9 @@ export const ResponsePaneContainer = () => {
8484
</div>
8585
{/* RESPONSES CONTENT */}
8686
<div className="is-flex-grow-3 add-vertical-scroll is-flex is-flex-direction-column remove-horizontal-scroll">
87-
{activeTab === "events" &&
87+
{activeTab === "events" && (
8888
<EventsContainer currentResponse={currentResponse} />
89-
}
89+
)}
9090
{activeTab === "headers" && (
9191
<HeadersContainer currentResponse={currentResponse} />
9292
)}
@@ -97,7 +97,7 @@ export const ResponsePaneContainer = () => {
9797
{/* RENDER RE-SEND REQUEST BUTTON ONLY FOR NOT WEB SOCKETS / SUBSCRIPTIONS */}
9898
{currentResponse.id &&
9999
currentResponse.request?.method !== "WS" &&
100-
currentResponse.request?.method !== "SUBSCRIPTION" &&
100+
currentResponse.request?.method !== "SUBSCRIPTION" &&
101101
(connection === "closed" || connection === "error") && (
102102
<div className="is-3rem-footer mx-3">
103103
<button

src/client/components/display/BarGraph.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,12 @@ const BarGraph = (props) => {
134134
const { id, host } = currentResponse;
135135
setHost(host?.slice(7));
136136

137-
let url; let urls; let times; let BGs; let borders; let reqResObjs;
137+
let url;
138+
let urls;
139+
let times;
140+
let BGs;
141+
let borders;
142+
let reqResObjs;
138143
if (dataPoints[id]?.length) {
139144
const point = dataPoints[id][0];
140145
// // if grpc, just return the server IP
@@ -149,7 +154,7 @@ const BarGraph = (props) => {
149154
? `- ..${point.url.slice(point.url.length - 8, point.url.length)}`
150155
: ""
151156
}`;
152-
// console.log('final URL', url)
157+
153158
setChartURL(url);
154159

155160
//extract arrays from data point properties to be used in chart data/options that take separate arrays

src/client/reducers/business.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const businessReducer = (state = initialState, action) => {
148148

149149
case types.COLLECTION_TO_REQRES: {
150150
const reqResArray = JSON.parse(JSON.stringify(action.payload));
151-
console.log('IN REDUCER:', reqResArray);
151+
// console.log('IN REDUCER:', reqResArray);
152152
return {
153153
...state,
154154
reqResArray,

0 commit comments

Comments
 (0)