Esempio n. 1
0
        private void InitializeControls()
        {
            _loading = true;
            updownCPUCriticalPoint.Value          = GetSafeUpDownValue(_poolConfiguration.HostCpuThresholdCritical, updownCPUCriticalPoint);
            updownMemoryCriticalPoint.Value       = GetSafeUpDownValue(WlbPoolConfiguration.ConvertToMB(_poolConfiguration.HostMemoryThresholdCritical), updownMemoryCriticalPoint);
            updownDiskReadCriticalPoint.Value     = GetSafeUpDownValue(WlbPoolConfiguration.ConvertToMB(_poolConfiguration.HostDiskReadThresholdCritical), updownDiskReadCriticalPoint);
            updownDiskWriteCriticalPoint.Value    = GetSafeUpDownValue(WlbPoolConfiguration.ConvertToMB(_poolConfiguration.HostDiskWriteThresholdCritical), updownDiskWriteCriticalPoint);
            updownNetworkReadCriticalPoint.Value  = GetSafeUpDownValue(WlbPoolConfiguration.ConvertToMB(_poolConfiguration.HostNetworkReadThresholdCritical), updownNetworkReadCriticalPoint);
            updownNetworkWriteCriticalPoint.Value = GetSafeUpDownValue(WlbPoolConfiguration.ConvertToMB(_poolConfiguration.HostNetworkWriteThresholdCritical), updownNetworkWriteCriticalPoint);

            labelCPUUnits.Text          = string.Format(labelCPUUnits.Text, updownCPUCriticalPoint.Minimum, updownCPUCriticalPoint.Maximum);
            labelFreeMemoryUnits.Text   = string.Format(labelFreeMemoryUnits.Text, updownMemoryCriticalPoint.Minimum, updownMemoryCriticalPoint.Maximum);
            labelDiskReadUnits.Text     = string.Format(labelDiskReadUnits.Text, updownDiskReadCriticalPoint.Minimum, updownDiskReadCriticalPoint.Maximum);
            labelDiskWriteUnits.Text    = string.Format(labelDiskWriteUnits.Text, updownDiskWriteCriticalPoint.Minimum, updownDiskWriteCriticalPoint.Maximum);
            labelNetworkReadUnits.Text  = string.Format(labelNetworkReadUnits.Text, updownNetworkReadCriticalPoint.Minimum, updownNetworkReadCriticalPoint.Maximum);
            labelNetworkWriteUnits.Text = string.Format(labelNetworkWriteUnits.Text, updownNetworkWriteCriticalPoint.Minimum, updownNetworkWriteCriticalPoint.Maximum);

            // CA-194940:
            // Host disk read/write threshold and weight settings work since Dundee.
            // For previous XenServer, hide the host disk read/write settings.
            if (!Helpers.DundeeOrGreater(_connection))
            {
                updownDiskReadCriticalPoint.Visible  = false;
                updownDiskWriteCriticalPoint.Visible = false;
                labelDiskReadUnits.Visible           = false;
                labelDiskWriteUnits.Visible          = false;
                labelDiskRead.Visible   = false;
                label1DiskWrite.Visible = false;
            }
            _loading = false;;
        }
Esempio n. 2
0
        private void InitializeControls()
        {
            _loading = true;
            updownCPUCriticalPoint.Value          = GetSafeUpDownValue(_poolConfiguration.HostCpuThresholdCritical, updownCPUCriticalPoint);
            updownMemoryCriticalPoint.Value       = GetSafeUpDownValue(WlbPoolConfiguration.ConvertToMB(_poolConfiguration.HostMemoryThresholdCritical), updownMemoryCriticalPoint);
            updownDiskReadCriticalPoint.Value     = GetSafeUpDownValue(WlbPoolConfiguration.ConvertToMB(_poolConfiguration.HostDiskReadThresholdCritical), updownDiskReadCriticalPoint);
            updownDiskWriteCriticalPoint.Value    = GetSafeUpDownValue(WlbPoolConfiguration.ConvertToMB(_poolConfiguration.HostDiskWriteThresholdCritical), updownDiskWriteCriticalPoint);
            updownNetworkReadCriticalPoint.Value  = GetSafeUpDownValue(WlbPoolConfiguration.ConvertToMB(_poolConfiguration.HostNetworkReadThresholdCritical), updownNetworkReadCriticalPoint);
            updownNetworkWriteCriticalPoint.Value = GetSafeUpDownValue(WlbPoolConfiguration.ConvertToMB(_poolConfiguration.HostNetworkWriteThresholdCritical), updownNetworkWriteCriticalPoint);

            labelCPUUnits.Text          = string.Format(labelCPUUnits.Text, updownCPUCriticalPoint.Minimum, updownCPUCriticalPoint.Maximum);
            labelFreeMemoryUnits.Text   = string.Format(labelFreeMemoryUnits.Text, updownMemoryCriticalPoint.Minimum, updownMemoryCriticalPoint.Maximum);
            labelDiskReadUnits.Text     = string.Format(labelDiskReadUnits.Text, updownDiskReadCriticalPoint.Minimum, updownDiskReadCriticalPoint.Maximum);
            labelDiskWriteUnits.Text    = string.Format(labelDiskWriteUnits.Text, updownDiskWriteCriticalPoint.Minimum, updownDiskWriteCriticalPoint.Maximum);
            labelNetworkReadUnits.Text  = string.Format(labelNetworkReadUnits.Text, updownNetworkReadCriticalPoint.Minimum, updownNetworkReadCriticalPoint.Maximum);
            labelNetworkWriteUnits.Text = string.Format(labelNetworkWriteUnits.Text, updownNetworkWriteCriticalPoint.Minimum, updownNetworkWriteCriticalPoint.Maximum);

            //CA-134554 - Hide Disk Read/Write until the backend server side is ready
            updownDiskReadCriticalPoint.Visible  = false;
            updownDiskWriteCriticalPoint.Visible = false;
            labelDiskReadUnits.Visible           = false;
            labelDiskWriteUnits.Visible          = false;

            _loading = false;;
        }