/*jslint node: true */
/*jslint browser: true*/
/*jslint nomen: true*/
/*jslint es5: true */
/*global Class, MP_SITE_URL, angular*/
'use strict';

/*
 * Service for host trend reports
 *
 **/

dashboardApp.factory('hostCountService', function($http) {
    return {
        HOST_COUNT_API_URL:  MP_SITE_URL + '/advancedreports/hostCount',
        getHostCountStats: function (queryData) {
            var data = $.param(queryData);
            return $http({
                method: 'POST',
                headers : {
                    'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8',
                },
                url: this.HOST_COUNT_API_URL,
                data: data,
                cache: true
            });
        }
    }
});
