1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

removed 'users' from the dashboard stats, and fixed the sizing/resizing issue with the dashboard stats. Also included a hard max of 10 rows for the jobs widget, which is temporary for tomorrow's demo

This commit is contained in:
Jared Tabor 2014-07-02 17:51:57 -04:00
parent f64ae5afdb
commit edfa9836a5
5 changed files with 48 additions and 47 deletions

View File

@ -19,53 +19,53 @@ angular.module('DashboardCountsWidget', ['RestServices', 'Utilities'])
dashboard = params.dashboard,
html, element;
html = "<div id=\"count-container\" class=\"count-container\">\n";
html += "<table>\n";
html += "<tr>\n";
html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/home/hosts>" + dashboard.hosts.total+"</a></td>\n";
html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/home/hosts>"+dashboard.hosts.failed+"</a></td>\n";
html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/inventories>"+dashboard.inventories.total+"</a></td>\n";
html += "<td class=\" h2 text-center\" id=\"sync-failure\" style=\"border:none\"><a href=/#/inventories/?inventory_sources_with_failures>"+dashboard.inventories.inventory_failed+"</a></td>\n";
html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/projects>"+dashboard.projects.total+"</a></td>\n";
html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/projects>"+dashboard.projects.failed+"</a></td>\n";
html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/users>"+dashboard.users.total+"</a></td>\n";
html += "</tr>\n";
// html = "<div id=\"count-container\" class=\"count-container row\">\n";
// html += "<table col-xs-12>\n";
// html += "<tr>\n";
// html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/home/hosts>" + dashboard.hosts.total+"</a></td>\n";
// html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/home/hosts>"+dashboard.hosts.failed+"</a></td>\n";
// html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/inventories>"+dashboard.inventories.total+"</a></td>\n";
// html += "<td class=\" h2 text-center\" id=\"sync-failure\" style=\"border:none\"><a href=/#/inventories/?inventory_sources_with_failures>"+dashboard.inventories.inventory_failed+"</a></td>\n";
// html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/projects>"+dashboard.projects.total+"</a></td>\n";
// html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/projects>"+dashboard.projects.failed+"</a></td>\n";
// html += "<td class=\" h2 text-center\" style=\"border:none\"><a href=/#/users>"+dashboard.users.total+"</a></td>\n";
// html += "</tr>\n";
html += "<tr>\n";
html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Hosts</td>\n";
html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Failed Hosts</td>\n";
html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Inventories</td>\n";
html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Inventory Sync Failures</td>\n";
html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Projects</td>\n";
html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Project Sync Failures</td>\n";
html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Users</td>\n";
html += "</tr>\n";
html += "</table>\n";
// html += "<tr>\n";
// html += "<td class=\" h6 text-center\" style=\"border:none\">Hosts</td>\n";
// html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Failed Hosts</td>\n";
// html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Inventories</td>\n";
// html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Inventory Sync Failures</td>\n";
// html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Projects</td>\n";
// html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Project Sync Failures</td>\n";
// html += "<td class=\" h6 col-lg-1 text-center\" style=\"border:none\">Users</td>\n";
// html += "</tr>\n";
// html += "</table>\n";
// html += "</div>\n";
html = "<div class=\"container\" >\n";
html = "<div id=\"count-container\" class=\"count-container row\">\n";
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/home/hosts>" + dashboard.hosts.total+"</a><br><h6>Hosts</h6></div>\n";
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/home/hosts>"+dashboard.hosts.failed+"</a><br><h6>Failed Hosts</h6></div>\n";
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/inventories>"+dashboard.inventories.total+"</a><br><h6>Inventories</h6></div>\n";
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/inventories/?inventory_sources_with_failures>"+dashboard.inventories.inventory_failed+"</a><br><h6>Inventory Sync Failure</h6></div>\n";
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/projects>"+dashboard.projects.total+"</a><br><h6>Projects</h6></div>\n";
html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/projects>"+dashboard.projects.failed+"</a><br><h6>Project Sync Failure</h6></div>\n";
// html += "<div class=\"h2 col-xs-4 col-sm-2 text-center\"><a href=/#/users>"+dashboard.users.total+"</a></div>\n";
html += "</div>\n";
// html = "<div class=\"container\" >\n";
// html = "<div class=\"row\"> \n";
// html += "<div class=\"h2 col-xs-1 text-center\"><a href=/#/home/hosts>" + dashboard.hosts.total+"</a></div>\n";
// html += "<div class=\"h2 col-xs-1 text-center\"><a href=/#/home/hosts>"+dashboard.hosts.failed+"</a></div>\n";
// html += "<div class=\"h2 col-xs-1 text-center\"><a href=/#/inventories>"+dashboard.inventories.total+"</a></div>\n";
// html += "<div class=\"h2 col-xs-1 text-center\" id=\"sync-failure\"><a href=/#/inventories/?inventory_sources_with_failures>"+dashboard.inventories.inventory_failed+"</a></div>\n";
// html += "<div class=\"h2 col-xs-1 text-center\"><a href=/#/projects>"+dashboard.projects.total+"</a></div>\n";
// html += "<div class=\"h2 col-xs-1 text-center\"><a href=/#/projects>"+dashboard.projects.failed+"</a></div>\n";
// html += "<div class=\"h2 col-xs-1 text-center\"><a href=/#/users>"+dashboard.users.total+"</a></div>\n";
// html += "</div>\n";
// html = "<div class=\"row\"> \n";
// html += "<div class=\"h6 col-xs-1 text-center\">Hosts</div>\n";
// html += "<div class=\"h6 col-xs-1 text-center\">Failed Hosts</div>\n";
// html += "<div class=\"h6 col-xs-1 text-center\">Inventories</div>\n";
// html += "<div class=\"h6 col-xs-1 text-center\">Inventory Sync Failures</div>\n";
// html += "<div class=\"h6 col-xs-1 text-center\">Projects</div>\n";
// html += "<div class=\"h6 col-xs-1 text-center\">Project Sync Failures</div>\n";
// html += "<div class=\"h6 col-xs-1 text-center\">Users</div>\n";
// html += "</div>\n";
// html += "<div class=\"row\"> \n";
// html += "<div class=\"h6 col-xs-4 col-sm-2 text-center\">Hosts</div>\n";
// html += "<div class=\"h6 col-xs-4 col-sm-2 text-center\">Failed Hosts</div>\n";
// html += "<div class=\"h6 col-xs-4 col-sm-2 text-center\">Inventories</div>\n";
// html += "<div class=\"h6 col-xs-4 col-sm-2 text-center\">Inventory Sync Failures</div>\n";
// html += "<div class=\"h6 col-xs-4 col-sm-2 text-center\">Projects</div>\n";
// html += "<div class=\"h6 col-xs-4 col-sm-2 text-center\">Project Sync Failures</div>\n";
// // html += "<div class=\"h6 col-xs-4 col-sm-2 text-center\">Users</div>\n";
// html += "</div>\n";
html += "</div>\n";
// html = "<div id=\"count-container\" class=\"row\">\n";

View File

@ -19,7 +19,7 @@ angular.module('DashboardJobsWidget', ['RestServices', 'Utilities'])
listCount = 0,
jobs_scope = scope.$new(true),
scheduled_scope = scope.$new(true),
max_rows,
max_rows=10,
html, e;
html = '';

View File

@ -16,7 +16,7 @@ angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities'])
var scope = params.scope,
target = params.target,
//dashboard = params.dashboard,
dashboard = params.dashboard,
html, element;
@ -69,7 +69,7 @@ angular.module('JobStatusGraphWidget', ['RestServices', 'Utilities'])
function makeJobStatusGraph(){
d3.json("static/js/jobstatusdata.json",function(error,data) {
// d3.json(dashboard.graphs, function(error,data) {
data.map(function(series) {
series.values = series.values.map(function(d) { return {x: d[0], y: d[1] }; });
return series;

View File

@ -43,7 +43,8 @@
.count-container{
border: 1px solid @grey;
border-radius: 4px;
padding: 5px;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 15px;
}
.carousel-control.left, .carousel-control.right {

View File

@ -9,7 +9,7 @@
-->
<div class="row">
<div id="container1" class="col-sm-12"></div>
<div id="container1" class="col-sm-12 col-xs-12"></div>
</div>
<div class="row">
<div id="container2" class="left-side col-sm-6 col-xs-12"></div>