ndb icon indicating copy to clipboard operation
ndb copied to clipboard

Feat/network

Open khanghoang opened this issue 6 years ago • 28 comments

Add the network tab to ndb

Preview JSON response ndb 2019-07-13 12-54-15

Preview image ndb 2019-07-13 12-54-34

Log request body ndb 2019-07-13 12-54-49

khanghoang avatar Jul 06 '19 08:07 khanghoang

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

googlebot avatar Jul 06 '19 08:07 googlebot

It looks exciting. Thanks for doing this! Do you think that it is ready for review or are you going to polish it first?

alexkozy avatar Jul 08 '19 17:07 alexkozy

@ak239 thanks for checking. It's definitely not ready (yet) for being reviewed. I'm going to refactor the code.

But it's gonna be great if you can check to see whether you like the approach/feature in the meantime.

khanghoang avatar Jul 08 '19 21:07 khanghoang

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

googlebot avatar Jul 08 '19 21:07 googlebot

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

googlebot avatar Jul 13 '19 19:07 googlebot

@ak239 I think this PR is ready for review 🎉

khanghoang avatar Jul 13 '19 19:07 khanghoang

@josepharhar good catch. I will look into it.

khanghoang avatar Jul 13 '19 23:07 khanghoang

@josepharhar I fixed the issue. But the preview tabs doesn't seem to work with html response. Will double check it this evening.

ndb 2019-07-13 17-27-31

khanghoang avatar Jul 14 '19 00:07 khanghoang

@ak239 thanks for such detailed comments. I will address all of them.

khanghoang avatar Jul 14 '19 06:07 khanghoang

Thank you so much for your patience. I'm not familiar with the codebase much. But I think we're getting closer and closer to what we wanted.

khanghoang avatar Jul 15 '19 03:07 khanghoang

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

googlebot avatar Jul 23 '19 03:07 googlebot

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

googlebot avatar Jul 29 '19 03:07 googlebot

@ak239 I have been trying to debug it but couldn't figure it out myself. Sometimes, it works ndb 2019-07-28 20-10-44 The other times, it doesn't ndb 2019-07-28 20-08-39 It looks like the for some reason, my this._cacheRequests is an empty array even though I add the response to it each time. The reason I have to store the responses in the frontend code is that this callback function doesn't work if I have async/await (and I need await the responses from the httpMoneyPatching.js). Therefore, storing the responses in the frontend makes sense for me.

Besides that, I didn't fully understand some parts of the code. I think I suppose to use this method to send the response body for the preview tab. I tried but it didn't work, I debugged and the "sessions/callbacks" array is empty. But calling this works.

Also, I need to register a callback when the user clicks on the item in the requests list. I use this but I don't think it's the proper way.

Any suggestions?

khanghoang avatar Jul 29 '19 03:07 khanghoang

@ak239 did you have a chance to take a look at it?

khanghoang avatar Aug 11 '19 06:08 khanghoang

@ak239 I want to follow up on this PR. Let me know what else I can do.

khanghoang avatar Sep 16 '19 06:09 khanghoang

@ak239 ping you one last time.

khanghoang avatar Oct 01 '19 21:10 khanghoang

@ak239 I know you're super busy. Please let me know if you want me to make any code changes. FYI I use ndb almost every day and really appreciate your work on it.

khanghoang avatar Oct 31 '19 21:10 khanghoang

Good work guys, this will make all node devs life easier! Keep it up!

quantuminformation avatar Nov 01 '19 11:11 quantuminformation

What is the status on reviewing this and potentially getting it merged? I would really appreciate this feature being added to ndp. Thank!

cfrank avatar Nov 15 '19 00:11 cfrank

Love this PR - would be thrilled to see it merged!

jacob-israel-turner avatar Dec 23 '19 17:12 jacob-israel-turner

This Network tab is what i`ve been looking for years, thanks @khanghoang for this, hope this get merged soon.

0x7An avatar Feb 24 '20 22:02 0x7An

hey folks, you can try this feature today via a custom build by running npx ndb-plus <node_script>

khanghoang avatar Mar 06 '20 19:03 khanghoang

In the case of ndb main target is not a real target, it means that I need to add interceptor for this target and interceptor code should manually fetch all available targets and send a command to all of them and get responses from all of them.

@ak239 do you need assistance with the interceptor?

kumavis avatar Aug 11 '20 03:08 kumavis

Hey Guys, any update on this PR?

@khanghoang I am getting this error on ndb-plus, works fine on ndb (using yarn) image

superhit0 avatar Sep 08 '20 09:09 superhit0

@superhit0 it's because macOS has changed the permission type names :(

khanghoang avatar Sep 21 '20 05:09 khanghoang

@khanghoang probably yeah

superhit0 avatar Sep 21 '20 08:09 superhit0

Any update on this?

alnorris avatar Mar 25 '21 10:03 alnorris

我觉得这蛮重要的...为什么不更新呢

GrinZero avatar Mar 31 '22 17:03 GrinZero