Added Proof of concept Fork functionality #353
Open
jahandaniyal wants to merge 3 commits intoMurali-group:developfrom
jahandaniyal:f#336
Open
Added Proof of concept Fork functionality #353jahandaniyal wants to merge 3 commits intoMurali-group:developfrom jahandaniyal:f#336
jahandaniyal wants to merge 3 commits intoMurali-group:developfrom
jahandaniyal:f#336
Conversation
adbharadwaj
requested changes
Feb 16, 2018
Collaborator
adbharadwaj
left a comment
There was a problem hiding this comment.
Few more changes. Overall logic looks good.
| url(r'^graphs/(?P<graph_id>[^/]+)$', views.graph_page, name='graph'), | ||
| url(r'^graphs/(?P<email>[^/]+)/(?P<graph_name>[^/]+)$', views.graph_page_by_name, name='graph_by_name'), | ||
| url(r'^upload$', views.upload_graph_page, name='upload_graph'), | ||
| url(r'^fork_graph$', views.fork_graph, name='fork_graph'), |
Collaborator
There was a problem hiding this comment.
Cna you fix the indentation?
Collaborator
Author
There was a problem hiding this comment.
Surely, I will fix it.
| 'graph_json':JSON.stringify(graph_meta_data, null, 4), | ||
| 'style_json':JSON.stringify(cytoscapeGraph.getStyleJSON(graphPage.cyGraph), null, 4) | ||
| } | ||
| $.ajax({ |
Collaborator
There was a problem hiding this comment.
Instead of making an ajax call here. Can you add an API function at the top of the file (checkout Line 5)- just like - apis.graphs.get etc.
Collaborator
Author
There was a problem hiding this comment.
Thanks for the review. I will make the changes you have requested and send another pull request.
| </div> | ||
| {% elif uid != graph.owner_email %} | ||
| <div class="btn-group pull-right" style=": 1em !important; z-index: 20000"> | ||
| <button type="button" id='ForkGraph' class="btn btn-sm btn-default" |
Collaborator
There was a problem hiding this comment.
ID should be ForkGraphBtn
Collaborator
Author
There was a problem hiding this comment.
Ok. I will make the changes.
adbharadwaj
approved these changes
Feb 26, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch implements #336 - Allow users to fork/clone a graph.
The following scenarios are covered :
Observation - UI has no Fork Button or forked from message.
Observation - forked from parent_graph_owner's_email / Name of graph is displayed. The user can click on this link to go to the parent graph. Similar to what he have on Github.
Observation - A message is displayed stating that the user has already forked the graph.
Github on the other hand, redirects to the existing fork instead of showing any message.
I can implement similar behaviour for Graphspace if desired.
Observation - Same as case 1.
A general scenario would be that User A uploads a graph and shares it to public. User B can then fork the graph as described in the above cases.