Initial d3 graph commit. Add d3 to graph layout
This commit is contained in:
@@ -258,6 +258,19 @@
|
||||
{{pass}}
|
||||
{{pass}}
|
||||
|
||||
{{if request.function=='d3_graph_model':}}
|
||||
<h2>{{=T("Graph Model")}}</h2>
|
||||
<div id="vis"></div>
|
||||
<link rel="stylesheet" href="{{=URL('static','css/d3_graph.css')}}"/>
|
||||
<script>
|
||||
// Define the d3 input data
|
||||
{{from gluon.serializers import json }}
|
||||
var nodes = {{=XML(json(nodes))}};
|
||||
var links = {{=XML(json(links))}};
|
||||
d3_graph();
|
||||
</script>
|
||||
{{pass}}
|
||||
|
||||
{{if request.function == 'manage':}}
|
||||
<h2>{{=heading}}</h2>
|
||||
<ul class="nav nav-tabs">
|
||||
|
||||
@@ -105,7 +105,11 @@ def deletefile(arglist, vars={}):
|
||||
{{if os.access(os.path.join(request.folder,'..',app,'databases','sql.log'),os.R_OK):}}
|
||||
{{=button(URL('peek/%s/databases/sql.log'%app), 'sql.log')}}
|
||||
{{pass}}
|
||||
{{if os.access(os.path.join(request.folder,'..',app,'static','js','d3_graph.js'),os.R_OK):}}
|
||||
{{=button(URL(a=app, c='appadmin',f='d3_graph_model'), T('graph model'))}}
|
||||
{{else:}}
|
||||
{{=button(URL(a=app, c='appadmin',f='graph_model'), T('graph model'))}}
|
||||
{{pass}}
|
||||
</div>
|
||||
<ul class="unstyled act_edit">
|
||||
{{for m in models:}}
|
||||
|
||||
Reference in New Issue
Block a user