@@ -12,12 +12,6 @@ import gluon.contenttype
|
|||||||
import gluon.fileutils
|
import gluon.fileutils
|
||||||
from gluon._compat import iteritems
|
from gluon._compat import iteritems
|
||||||
|
|
||||||
# d3_graph_model added but leaving pygraphviz code as is for initial tests.
|
|
||||||
try:
|
|
||||||
import pygraphviz as pgv
|
|
||||||
except ImportError:
|
|
||||||
pgv = None
|
|
||||||
|
|
||||||
is_gae = request.env.web2py_runtime_gae or False
|
is_gae = request.env.web2py_runtime_gae or False
|
||||||
|
|
||||||
# ## critical --- make a copy of the environment
|
# ## critical --- make a copy of the environment
|
||||||
@@ -566,60 +560,6 @@ def table_template(table):
|
|||||||
_cellborder=0, _cellspacing=0)
|
_cellborder=0, _cellspacing=0)
|
||||||
).xml()
|
).xml()
|
||||||
|
|
||||||
|
|
||||||
# d3_graph_model added but leaving pygraphviz code as is for initial tests.
|
|
||||||
# The Graph Model button in admin app views/default/design.html has been redirected
|
|
||||||
# to the d3_graph_model function.
|
|
||||||
def bg_graph_model():
|
|
||||||
graph = pgv.AGraph(layout='dot', directed=True, strict=False, rankdir='LR')
|
|
||||||
|
|
||||||
subgraphs = dict()
|
|
||||||
for tablename in db.tables:
|
|
||||||
if hasattr(db[tablename],'_meta_graphmodel'):
|
|
||||||
meta_graphmodel = db[tablename]._meta_graphmodel
|
|
||||||
else:
|
|
||||||
meta_graphmodel = dict(group=request.application, color='#ECECEC')
|
|
||||||
|
|
||||||
group = meta_graphmodel['group'].replace(' ', '')
|
|
||||||
if group not in subgraphs:
|
|
||||||
subgraphs[group] = dict(meta=meta_graphmodel, tables=[])
|
|
||||||
subgraphs[group]['tables'].append(tablename)
|
|
||||||
|
|
||||||
graph.add_node(tablename, name=tablename, shape='plaintext',
|
|
||||||
label=table_template(tablename))
|
|
||||||
|
|
||||||
for n, key in enumerate(subgraphs.iterkeys()):
|
|
||||||
graph.subgraph(nbunch=subgraphs[key]['tables'],
|
|
||||||
name='cluster%d' % n,
|
|
||||||
style='filled',
|
|
||||||
color=subgraphs[key]['meta']['color'],
|
|
||||||
label=subgraphs[key]['meta']['group'])
|
|
||||||
|
|
||||||
for tablename in db.tables:
|
|
||||||
for field in db[tablename]:
|
|
||||||
f_type = field.type
|
|
||||||
if isinstance(f_type,str) and (
|
|
||||||
f_type.startswith('reference') or
|
|
||||||
f_type.startswith('list:reference')):
|
|
||||||
referenced_table = f_type.split()[1].split('.')[0]
|
|
||||||
n1 = graph.get_node(tablename)
|
|
||||||
n2 = graph.get_node(referenced_table)
|
|
||||||
graph.add_edge(n1, n2, color="#4C4C4C", label='')
|
|
||||||
|
|
||||||
graph.layout()
|
|
||||||
if not request.args:
|
|
||||||
response.headers['Content-Type'] = 'image/png'
|
|
||||||
return graph.draw(format='png', prog='dot')
|
|
||||||
else:
|
|
||||||
response.headers['Content-Disposition']='attachment;filename=graph.%s'%request.args(0)
|
|
||||||
if request.args(0) == 'dot':
|
|
||||||
return graph.string()
|
|
||||||
else:
|
|
||||||
return graph.draw(format=request.args(0), prog='dot')
|
|
||||||
|
|
||||||
def graph_model():
|
|
||||||
return dict(databases=databases, pgv=pgv)
|
|
||||||
|
|
||||||
def manage():
|
def manage():
|
||||||
tables = manager_action['tables']
|
tables = manager_action['tables']
|
||||||
if isinstance(tables[0], str):
|
if isinstance(tables[0], str):
|
||||||
@@ -752,4 +692,4 @@ def d3_graph_model():
|
|||||||
# d3 v4 allows individual modules to be specified. The complete d3 library is included below.
|
# d3 v4 allows individual modules to be specified. The complete d3 library is included below.
|
||||||
response.files.append(URL('static','js/d3.min.js'))
|
response.files.append(URL('static','js/d3.min.js'))
|
||||||
response.files.append(URL('static','js/d3_graph.js'))
|
response.files.append(URL('static','js/d3_graph.js'))
|
||||||
return dict(nodes=nodes, links=links)
|
return dict(databases=databases, nodes=nodes, links=links)
|
||||||
@@ -233,43 +233,22 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
{{if request.function=='graph_model':}}
|
|
||||||
<h2>{{=T("Graph Model")}}</h2>
|
|
||||||
{{if not pgv:}}
|
|
||||||
{{=T('pygraphviz library not found')}}
|
|
||||||
{{elif not databases:}}
|
|
||||||
{{=T("No databases in this application")}}
|
|
||||||
{{else:}}
|
|
||||||
<div class="btn-group">
|
|
||||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
|
||||||
<i class="icon-download"></i> {{=T('Save model as...')}}
|
|
||||||
<span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['png'])}}">png</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['svg'])}}">svg</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['pdf'])}}">pdf</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['ps'])}}">ps</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['dot'])}}">dot</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{=IMG(_src=URL('appadmin', 'bg_graph_model'))}}
|
|
||||||
{{pass}}
|
|
||||||
{{pass}}
|
|
||||||
|
|
||||||
{{if request.function=='d3_graph_model':}}
|
{{if request.function=='d3_graph_model':}}
|
||||||
<h2>{{=T("Graph Model")}}</h2>
|
<h2>{{=T("Graph Model")}}</h2>
|
||||||
<div id="vis"></div>
|
{{if not databases:}}
|
||||||
<link rel="stylesheet" href="{{=URL('static','css/d3_graph.css')}}"/>
|
{{=T("No databases in this application")}}
|
||||||
<script>
|
{{else:}}
|
||||||
// Define the d3 input data
|
<div id="vis"></div>
|
||||||
{{from gluon.serializers import json }}
|
<link rel="stylesheet" href="{{=URL('static','css/d3_graph.css')}}"/>
|
||||||
var nodes = {{=XML(json(nodes))}};
|
<script>
|
||||||
var links = {{=XML(json(links))}};
|
// Define the d3 input data
|
||||||
d3_graph();
|
{{from gluon.serializers import json }}
|
||||||
</script>
|
var nodes = {{=XML(json(nodes))}};
|
||||||
{{pass}}
|
var links = {{=XML(json(links))}};
|
||||||
|
d3_graph();
|
||||||
|
</script>
|
||||||
|
{{pass}}
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
{{if request.function == 'manage':}}
|
{{if request.function == 'manage':}}
|
||||||
<h2>{{=heading}}</h2>
|
<h2>{{=heading}}</h2>
|
||||||
|
|||||||
@@ -105,10 +105,8 @@ def deletefile(arglist, vars={}):
|
|||||||
{{if os.access(os.path.join(request.folder,'..',app,'databases','sql.log'),os.R_OK):}}
|
{{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')}}
|
{{=button(URL('peek/%s/databases/sql.log'%app), 'sql.log')}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{if os.access(os.path.join(request.folder,'..',app,'static','js','d3_graph.js'),os.R_OK):}}
|
{{if os.access(os.path.join(request.folder,'..','admin','static','js','d3_graph.js'),os.R_OK):}}
|
||||||
{{=button(URL(a=app, c='appadmin',f='d3_graph_model'), T('graph model'))}}
|
{{=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}}
|
{{pass}}
|
||||||
</div>
|
</div>
|
||||||
<ul class="unstyled act_edit">
|
<ul class="unstyled act_edit">
|
||||||
|
|||||||
@@ -12,12 +12,6 @@ import gluon.contenttype
|
|||||||
import gluon.fileutils
|
import gluon.fileutils
|
||||||
from gluon._compat import iteritems
|
from gluon._compat import iteritems
|
||||||
|
|
||||||
# d3_graph_model added but leaving pygraphviz code as is for initial tests.
|
|
||||||
try:
|
|
||||||
import pygraphviz as pgv
|
|
||||||
except ImportError:
|
|
||||||
pgv = None
|
|
||||||
|
|
||||||
is_gae = request.env.web2py_runtime_gae or False
|
is_gae = request.env.web2py_runtime_gae or False
|
||||||
|
|
||||||
# ## critical --- make a copy of the environment
|
# ## critical --- make a copy of the environment
|
||||||
@@ -566,60 +560,6 @@ def table_template(table):
|
|||||||
_cellborder=0, _cellspacing=0)
|
_cellborder=0, _cellspacing=0)
|
||||||
).xml()
|
).xml()
|
||||||
|
|
||||||
|
|
||||||
# d3_graph_model added but leaving pygraphviz code as is for initial tests.
|
|
||||||
# The Graph Model button in admin app views/default/design.html has been redirected
|
|
||||||
# to the d3_graph_model function.
|
|
||||||
def bg_graph_model():
|
|
||||||
graph = pgv.AGraph(layout='dot', directed=True, strict=False, rankdir='LR')
|
|
||||||
|
|
||||||
subgraphs = dict()
|
|
||||||
for tablename in db.tables:
|
|
||||||
if hasattr(db[tablename],'_meta_graphmodel'):
|
|
||||||
meta_graphmodel = db[tablename]._meta_graphmodel
|
|
||||||
else:
|
|
||||||
meta_graphmodel = dict(group=request.application, color='#ECECEC')
|
|
||||||
|
|
||||||
group = meta_graphmodel['group'].replace(' ', '')
|
|
||||||
if group not in subgraphs:
|
|
||||||
subgraphs[group] = dict(meta=meta_graphmodel, tables=[])
|
|
||||||
subgraphs[group]['tables'].append(tablename)
|
|
||||||
|
|
||||||
graph.add_node(tablename, name=tablename, shape='plaintext',
|
|
||||||
label=table_template(tablename))
|
|
||||||
|
|
||||||
for n, key in enumerate(subgraphs.iterkeys()):
|
|
||||||
graph.subgraph(nbunch=subgraphs[key]['tables'],
|
|
||||||
name='cluster%d' % n,
|
|
||||||
style='filled',
|
|
||||||
color=subgraphs[key]['meta']['color'],
|
|
||||||
label=subgraphs[key]['meta']['group'])
|
|
||||||
|
|
||||||
for tablename in db.tables:
|
|
||||||
for field in db[tablename]:
|
|
||||||
f_type = field.type
|
|
||||||
if isinstance(f_type,str) and (
|
|
||||||
f_type.startswith('reference') or
|
|
||||||
f_type.startswith('list:reference')):
|
|
||||||
referenced_table = f_type.split()[1].split('.')[0]
|
|
||||||
n1 = graph.get_node(tablename)
|
|
||||||
n2 = graph.get_node(referenced_table)
|
|
||||||
graph.add_edge(n1, n2, color="#4C4C4C", label='')
|
|
||||||
|
|
||||||
graph.layout()
|
|
||||||
if not request.args:
|
|
||||||
response.headers['Content-Type'] = 'image/png'
|
|
||||||
return graph.draw(format='png', prog='dot')
|
|
||||||
else:
|
|
||||||
response.headers['Content-Disposition']='attachment;filename=graph.%s'%request.args(0)
|
|
||||||
if request.args(0) == 'dot':
|
|
||||||
return graph.string()
|
|
||||||
else:
|
|
||||||
return graph.draw(format=request.args(0), prog='dot')
|
|
||||||
|
|
||||||
def graph_model():
|
|
||||||
return dict(databases=databases, pgv=pgv)
|
|
||||||
|
|
||||||
def manage():
|
def manage():
|
||||||
tables = manager_action['tables']
|
tables = manager_action['tables']
|
||||||
if isinstance(tables[0], str):
|
if isinstance(tables[0], str):
|
||||||
@@ -750,6 +690,6 @@ def d3_graph_model():
|
|||||||
nodes.append(dict(name=tablename, type="table", fields = fields))
|
nodes.append(dict(name=tablename, type="table", fields = fields))
|
||||||
|
|
||||||
# d3 v4 allows individual modules to be specified. The complete d3 library is included below.
|
# d3 v4 allows individual modules to be specified. The complete d3 library is included below.
|
||||||
response.files.append(URL('static','js/d3.min.js'))
|
response.files.append(URL('admin','static','js/d3.min.js'))
|
||||||
response.files.append(URL('static','js/d3_graph.js'))
|
response.files.append(URL('admin','static','js/d3_graph.js'))
|
||||||
return dict(nodes=nodes, links=links)
|
return dict(databases=databases, nodes=nodes, links=links)
|
||||||
|
|||||||
@@ -233,43 +233,22 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
{{if request.function=='graph_model':}}
|
|
||||||
<h2>{{=T("Graph Model")}}</h2>
|
|
||||||
{{if not pgv:}}
|
|
||||||
{{=T('pygraphviz library not found')}}
|
|
||||||
{{elif not databases:}}
|
|
||||||
{{=T("No databases in this application")}}
|
|
||||||
{{else:}}
|
|
||||||
<div class="btn-group">
|
|
||||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
|
||||||
<i class="icon-download"></i> {{=T('Save model as...')}}
|
|
||||||
<span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['png'])}}">png</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['svg'])}}">svg</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['pdf'])}}">pdf</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['ps'])}}">ps</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['dot'])}}">dot</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{=IMG(_src=URL('appadmin', 'bg_graph_model'))}}
|
|
||||||
{{pass}}
|
|
||||||
{{pass}}
|
|
||||||
|
|
||||||
{{if request.function=='d3_graph_model':}}
|
{{if request.function=='d3_graph_model':}}
|
||||||
<h2>{{=T("Graph Model")}}</h2>
|
<h2>{{=T("Graph Model")}}</h2>
|
||||||
<div id="vis"></div>
|
{{if not databases:}}
|
||||||
<link rel="stylesheet" href="{{=URL('static','css/d3_graph.css')}}"/>
|
{{=T("No databases in this application")}}
|
||||||
<script>
|
{{else:}}
|
||||||
// Define the d3 input data
|
<div id="vis"></div>
|
||||||
{{from gluon.serializers import json }}
|
<link rel="stylesheet" href="{{=URL('static','css/d3_graph.css')}}"/>
|
||||||
var nodes = {{=XML(json(nodes))}};
|
<script>
|
||||||
var links = {{=XML(json(links))}};
|
// Define the d3 input data
|
||||||
d3_graph();
|
{{from gluon.serializers import json }}
|
||||||
</script>
|
var nodes = {{=XML(json(nodes))}};
|
||||||
{{pass}}
|
var links = {{=XML(json(links))}};
|
||||||
|
d3_graph();
|
||||||
|
</script>
|
||||||
|
{{pass}}
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
{{if request.function == 'manage':}}
|
{{if request.function == 'manage':}}
|
||||||
<h2>{{=heading}}</h2>
|
<h2>{{=heading}}</h2>
|
||||||
|
|||||||
@@ -12,12 +12,6 @@ import gluon.contenttype
|
|||||||
import gluon.fileutils
|
import gluon.fileutils
|
||||||
from gluon._compat import iteritems
|
from gluon._compat import iteritems
|
||||||
|
|
||||||
# d3_graph_model added but leaving pygraphviz code as is for initial tests.
|
|
||||||
try:
|
|
||||||
import pygraphviz as pgv
|
|
||||||
except ImportError:
|
|
||||||
pgv = None
|
|
||||||
|
|
||||||
is_gae = request.env.web2py_runtime_gae or False
|
is_gae = request.env.web2py_runtime_gae or False
|
||||||
|
|
||||||
# ## critical --- make a copy of the environment
|
# ## critical --- make a copy of the environment
|
||||||
@@ -566,60 +560,6 @@ def table_template(table):
|
|||||||
_cellborder=0, _cellspacing=0)
|
_cellborder=0, _cellspacing=0)
|
||||||
).xml()
|
).xml()
|
||||||
|
|
||||||
|
|
||||||
# d3_graph_model added but leaving pygraphviz code as is for initial tests.
|
|
||||||
# The Graph Model button in admin app views/default/design.html has been redirected
|
|
||||||
# to the d3_graph_model function.
|
|
||||||
def bg_graph_model():
|
|
||||||
graph = pgv.AGraph(layout='dot', directed=True, strict=False, rankdir='LR')
|
|
||||||
|
|
||||||
subgraphs = dict()
|
|
||||||
for tablename in db.tables:
|
|
||||||
if hasattr(db[tablename],'_meta_graphmodel'):
|
|
||||||
meta_graphmodel = db[tablename]._meta_graphmodel
|
|
||||||
else:
|
|
||||||
meta_graphmodel = dict(group=request.application, color='#ECECEC')
|
|
||||||
|
|
||||||
group = meta_graphmodel['group'].replace(' ', '')
|
|
||||||
if group not in subgraphs:
|
|
||||||
subgraphs[group] = dict(meta=meta_graphmodel, tables=[])
|
|
||||||
subgraphs[group]['tables'].append(tablename)
|
|
||||||
|
|
||||||
graph.add_node(tablename, name=tablename, shape='plaintext',
|
|
||||||
label=table_template(tablename))
|
|
||||||
|
|
||||||
for n, key in enumerate(subgraphs.iterkeys()):
|
|
||||||
graph.subgraph(nbunch=subgraphs[key]['tables'],
|
|
||||||
name='cluster%d' % n,
|
|
||||||
style='filled',
|
|
||||||
color=subgraphs[key]['meta']['color'],
|
|
||||||
label=subgraphs[key]['meta']['group'])
|
|
||||||
|
|
||||||
for tablename in db.tables:
|
|
||||||
for field in db[tablename]:
|
|
||||||
f_type = field.type
|
|
||||||
if isinstance(f_type,str) and (
|
|
||||||
f_type.startswith('reference') or
|
|
||||||
f_type.startswith('list:reference')):
|
|
||||||
referenced_table = f_type.split()[1].split('.')[0]
|
|
||||||
n1 = graph.get_node(tablename)
|
|
||||||
n2 = graph.get_node(referenced_table)
|
|
||||||
graph.add_edge(n1, n2, color="#4C4C4C", label='')
|
|
||||||
|
|
||||||
graph.layout()
|
|
||||||
if not request.args:
|
|
||||||
response.headers['Content-Type'] = 'image/png'
|
|
||||||
return graph.draw(format='png', prog='dot')
|
|
||||||
else:
|
|
||||||
response.headers['Content-Disposition']='attachment;filename=graph.%s'%request.args(0)
|
|
||||||
if request.args(0) == 'dot':
|
|
||||||
return graph.string()
|
|
||||||
else:
|
|
||||||
return graph.draw(format=request.args(0), prog='dot')
|
|
||||||
|
|
||||||
def graph_model():
|
|
||||||
return dict(databases=databases, pgv=pgv)
|
|
||||||
|
|
||||||
def manage():
|
def manage():
|
||||||
tables = manager_action['tables']
|
tables = manager_action['tables']
|
||||||
if isinstance(tables[0], str):
|
if isinstance(tables[0], str):
|
||||||
@@ -750,6 +690,6 @@ def d3_graph_model():
|
|||||||
nodes.append(dict(name=tablename, type="table", fields = fields))
|
nodes.append(dict(name=tablename, type="table", fields = fields))
|
||||||
|
|
||||||
# d3 v4 allows individual modules to be specified. The complete d3 library is included below.
|
# d3 v4 allows individual modules to be specified. The complete d3 library is included below.
|
||||||
response.files.append(URL('static','js/d3.min.js'))
|
response.files.append(URL('admin','static','js/d3.min.js'))
|
||||||
response.files.append(URL('static','js/d3_graph.js'))
|
response.files.append(URL('admin','static','js/d3_graph.js'))
|
||||||
return dict(nodes=nodes, links=links)
|
return dict(databases=databases, nodes=nodes, links=links)
|
||||||
|
|||||||
@@ -233,43 +233,22 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
{{if request.function=='graph_model':}}
|
|
||||||
<h2>{{=T("Graph Model")}}</h2>
|
|
||||||
{{if not pgv:}}
|
|
||||||
{{=T('pygraphviz library not found')}}
|
|
||||||
{{elif not databases:}}
|
|
||||||
{{=T("No databases in this application")}}
|
|
||||||
{{else:}}
|
|
||||||
<div class="btn-group">
|
|
||||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
|
||||||
<i class="icon-download"></i> {{=T('Save model as...')}}
|
|
||||||
<span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['png'])}}">png</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['svg'])}}">svg</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['pdf'])}}">pdf</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['ps'])}}">ps</a></li>
|
|
||||||
<li><a href="{{=URL('appadmin', 'bg_graph_model', args=['dot'])}}">dot</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{=IMG(_src=URL('appadmin', 'bg_graph_model'))}}
|
|
||||||
{{pass}}
|
|
||||||
{{pass}}
|
|
||||||
|
|
||||||
{{if request.function=='d3_graph_model':}}
|
{{if request.function=='d3_graph_model':}}
|
||||||
<h2>{{=T("Graph Model")}}</h2>
|
<h2>{{=T("Graph Model")}}</h2>
|
||||||
<div id="vis"></div>
|
{{if not databases:}}
|
||||||
<link rel="stylesheet" href="{{=URL('static','css/d3_graph.css')}}"/>
|
{{=T("No databases in this application")}}
|
||||||
<script>
|
{{else:}}
|
||||||
// Define the d3 input data
|
<div id="vis"></div>
|
||||||
{{from gluon.serializers import json }}
|
<link rel="stylesheet" href="{{=URL('static','css/d3_graph.css')}}"/>
|
||||||
var nodes = {{=XML(json(nodes))}};
|
<script>
|
||||||
var links = {{=XML(json(links))}};
|
// Define the d3 input data
|
||||||
d3_graph();
|
{{from gluon.serializers import json }}
|
||||||
</script>
|
var nodes = {{=XML(json(nodes))}};
|
||||||
{{pass}}
|
var links = {{=XML(json(links))}};
|
||||||
|
d3_graph();
|
||||||
|
</script>
|
||||||
|
{{pass}}
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
{{if request.function == 'manage':}}
|
{{if request.function == 'manage':}}
|
||||||
<h2>{{=heading}}</h2>
|
<h2>{{=heading}}</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user