Skip to content
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

Added functionality for modifing graph metadata using UI #364

Closed
wants to merge 4 commits into from
Closed

Added functionality for modifing graph metadata using UI #364

wants to merge 4 commits into from

Conversation

bruce-wayne99
Copy link

Fixes #317

Implemented UI for modifying user meta-data which includes the following

  • User will be able to modify graph attributes by clicking on the "edit" button.
  • User will be able to modify description in "Graph Information" tab.
  • User will be able to modify tags, title, name in the edit panel which appears on clicking "edit" button.
  • Corresponding changes will also be reflected in the database.

Gif of the implementation

pull_request

@bruce-wayne99 bruce-wayne99 changed the title E#317 Added functionality for modifing graph metadata using UI Feb 20, 2018
@adbharadwaj
Copy link
Collaborator

@bruce-wayne99 Can you add documentation for the feature as well. You can find the markdown documentation here.

@tmmurali
Copy link
Member

@adbharadwaj it might help to provide @bruce-wayne99 more information on what you expect from these docs and where he should add them in the docs.

@bruce-wayne99
Copy link
Author

@adbharadwaj , @tmmurali Sir,
I have added documentation with gifs for this feature. Please review

Copy link
Collaborator

@adbharadwaj adbharadwaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to resolve few things before I can merge this in.

@@ -290,6 +290,9 @@ def add_tag(db_session, name):
db_session.add(tag)
return tag

@with_session
def remove_tags_by_graph_id(db_session, graph_id):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bruce-wayne99 Why was this method introduced?

@@ -229,6 +229,11 @@ def update_graph(request, graph_id, name=None, is_public=None, graph_json=None,
if name is not None:
G.set_name(name)

db.remove_tags_by_graph_id(request.db_session, graph_id=graph_id)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bruce-wayne99 Why was this method introduced?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editing tags involves adding new tags and removing old tags simultaneously,
For example:
Let a user removed a tag named x from the graph G and added a tag y to the graph. So, there is a need to delete a row from GraphToTag containing the graph_id equal to the graph id of G and tag_id equal to tag id of tag x and also addition of a row with graph_id equal to the graph id of G and tag_id equal to tag id of tag y.
Now both these operations can be carried out at once if we remove all the entries of graph G in GraphToTag table and after that adding the final list of tags the user wants to the graph.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adbharadwaj I have provided an explanation for the usage of db.remove_tags_by_graph_id. Please review.

@@ -430,6 +430,7 @@ var uploadGraphPage = {
var graphPage = {
cyGraph: undefined,
timeout: null,
tagsBar: null,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename it to tagsEditor

$('#new_description').val(description);

//fetching all the tags and populating them in the tag bar.
console.log(title, name, description);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove logs from final pull request.

@bruce-wayne99
Copy link
Author

@adbharadwaj I have provided explanation for a adding the function db.remove_tags_by_graph_id. Please review.

@jddanna
Copy link
Collaborator

jddanna commented May 9, 2021

Thanks for your contributions! I made a new Pull request #456 with a few minor changes to merge with master. It's easier this way to see the merges with updated code since the branch for this PR was deleted.

@jddanna jddanna closed this May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify graph metadata using UI
4 participants