/********************************************* * Copyright (c) 2014 AnsibleWorks, Inc. * * ObjectCount.js * * Dashboard widget showing object counts and license availability. * */ 'use strict'; angular.module('ObjectCountWidget', ['RestServices', 'Utilities']) .factory('ObjectCount', ['$rootScope', '$compile', 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', function ($rootScope, $compile) { return function (params) { var scope = params.scope, target = params.target, dashboard = params.dashboard, keys = ['organizations', 'users', 'teams', 'credentials', 'projects', 'inventories', 'groups', 'hosts', 'job_templates', 'jobs' ], i, html, element; html = "
| \n"; html += " | Total | \n"; html += "
|---|---|
| " + label.replace(/\_/g, ' ') + " | \n"; html += ""; html += "" + count + ""; html += " |