Skip to content

Commit

Permalink
removed the unicode prefix in netrworks table on graphs detail tab
Browse files Browse the repository at this point in the history
  • Loading branch information
adbharadwaj committed Apr 13, 2017
1 parent 965f1e9 commit 59cdf03
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions applications/graphs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def graph_page(request, graph_id):
return redirect(request.get_full_path() + '?user_layout=' + context["default_layout_id"])

context['graph_json_string'] = json.dumps(context['graph']['graph_json'])
context['data'] = {k: json.dumps(v, encoding='ascii') for k,v in context['graph']['graph_json']['data'].items()}
context['style_json_string'] = json.dumps(context['graph']['style_json'])
context['description'] = context['graph']['graph_json']['data']['description'] if 'data' in context[
'graph']['graph_json'] and 'description' in context['graph']['graph_json']['data'] else ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

def upgrade():
graphspace = GraphSpace('[email protected]', 'XXXX')
graphspace.set_api_host('localhost:8000')
# graphspace.set_api_host('localhost:8000')
response = graphspace.get_public_graphs(limit=70)
for graph in response['graphs']:
graph_json = graph['graph_json']
Expand Down
6 changes: 2 additions & 4 deletions templates/graph/graph_details_tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@
<th>Attribute</th>
<th>Value</th>
</tr>
{% if 'data' in graph.graph_json %}
{% for k,v in graph.graph_json.data.items %}

{% for k,v in data.items %}
{% if k != 'description' %}
<tr>
<td>{{ k|safe}}</td>
<td>{{ v|safe }}</td>
</tr>
{% endif %}
{% endfor %}
{% endif %}


</table>
</div>
Expand Down

0 comments on commit 59cdf03

Please sign in to comment.