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(){
var getData = $.get('/1/app/usage/trend');
function loadDashboard(name){
console.log('loadDashboard...', name);
}
getData.done(function(results) {
var data = JSON.parse(results)
var node = data['apps@michaels-MBP'];

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

Loading…
Cancel
Save