// (C) Copyright 2020 Hewlett-Packard Enterprise Company, L.P.

define(['jquery', 'hp/lib/jquery.hpStatus', 'hp/lib/jquery.hpUtilizationMeter'],
function() { "use strict";

    var GraphicsSwitchView = (function() {
      
        /**
         * Constructor
         */
        function GraphicsSwitchView() {
          
            /**
             * @public
             */
            this.init = function() {
                $('.hp-status').hpStatus();
                $('.hp-usage').hpUtilizationMeter();
                $('.hp-switch .hp-usage').hpUtilizationMeter(21,0,100,75);
                $('#tour-uplink-1 .hp-usage').hpUtilizationMeter(65,0,100,90);
                $('#tour-uplink-2 .hp-usage').hpUtilizationMeter(20,0,100,60);
                $('#tour-uplink-5 .hp-usage').hpUtilizationMeter(85,0,100,75);
                $('#tour-uplink-6 .hp-usage').hpUtilizationMeter(20,0,100,60);
                $('#tour-uplink-7 .hp-usage').hpUtilizationMeter(10,0,100,90);
                $('#tour-uplink-8 .hp-usage').hpUtilizationMeter(10,0,100,90);
                $('.hp-switch-server').mouseover(function () {
                    var index = $(this).index();
                    $('.hp-up-port:nth-child(' + index + ')').addClass('hp-active');
                }).mouseout(function () {
                    $('.hp-up-port').removeClass('hp-active');
                });
            };
        }

        return new GraphicsSwitchView();
    }());
    
    return GraphicsSwitchView;
});
