-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature added #12, clickable links on output #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Please review my suggestions and resolve conflicts. Then we can merge.
@@ -305,8 +367,13 @@ class HydraConsole extends React.Component { | |||
} | |||
axios.post(this.agentEndpoint + '/send-command', getBody) | |||
.then( (response) => { | |||
let outputText = "" | |||
if(response.data.length === 0) | |||
outputText = String(JSON.stringify(response.data, this.jsonStringifyReplacer, 8)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If response.data.length is 0, why would you stringify an empty string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @xadahiya , actually it was because I was rendering the jsx incase its length was >0 so I stringify in case of empty response but thanks for correcting I will make changes accordingly
resourcesIDs: resourcesIDs | ||
}) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add proper comments/docstrings to explain what each function does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if you can do this for all the functions not just for the functions you wrote. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing to do, my plan was to add them to every function once it was reviewed! Thank you
arr.push(<div className={classes.outputEntryDiv}></div>) | ||
arr.push(<span className={classes.outputConsoleKey}>{key} :</span>) | ||
if(key == "@id") | ||
arr.push(<span className={classes.outputConsoleLink} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should consider adding {} to improve readability and futureproofing (in case we want to add something else)
@xadahiya thanks for reviewing my work ! Will update with changes soon |
@xadahiya so I have added generic methos to support any kind of json response, and added the method to all the request response as asked, kindly review it, a proof of attachment from my side has been added, all the elements are jsx instead of string like earlier : |
…hod to /send-command route
What does this PR fixes/adds
Working proof is added here
