start template

community
michael mead 7 years ago
parent c94cd8cef4
commit 9b25ed97b0

Binary file not shown.

Binary file not shown.

@ -17,7 +17,9 @@ dashboard = {
initChartist: function(){ initChartist: function(){
var getData = $.get('/1/app/usage/trend'); var getData = $.get('/1/app/usage/trend');
function loadDashboard(name){
console.log('loadDashboard...', name);
}
getData.done(function(results) { getData.done(function(results) {
var data = JSON.parse(results) var data = JSON.parse(results)
var node = data['apps@michaels-MBP']; var node = data['apps@michaels-MBP'];

@ -156,14 +156,18 @@
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{% for name in app_names %} {% for name in app_names %}
<div class="action" data-name="{{name}}" id="app_names"><i class="fa fa-angle-right"></i><a href='#'>{{name|safe}}</a> <div class="action" data-name="{{name}}" id="app_names"><i class="fa fa-angle-right"></i><a href='#'
<script type="text/javascript">onclick=function(){ onclick="loadDashboard({{ 'name|tojson' }});">{{name|safe}}</a>
console.log('name...', "{{ name }}") //this works, but returns same variable...... <script type="text/javascript">
// onclick=loadDashboard({{ name|tojson }})
var appName = $('#app_names').data("name"); // {
console.log('name...', appName ) // console.log('name...', "{{ name }}") //this works, but returns same variable......
//
}</script> // var appName = $('#app_names').data("name");
// console.log('name...', appName )
// }
</script>
</div> </div>

Loading…
Cancel
Save