protected override void ExecuteCore(SelectedItemCollection selection)
        {
            if (Helpers.FeatureForbidden(selection[0].XenObject, Host.RestrictWLB))
            {
                // Show upsell dialog
                using (var dlg = new UpsellDialog(HiddenFeatures.LinkLabelHidden ? Messages.UPSELL_BLURB_WLB : Messages.UPSELL_BLURB_WLB + Messages.UPSELL_BLURB_WLB_MORE,
                                                  InvisibleMessages.UPSELL_LEARNMOREURL_WLB))
                    dlg.ShowDialog(Parent);
                return;
            }

            try
            {
                WorkloadReports WlbReportWin = new WorkloadReports(_reportFile, _run)
                {
                    Pool  = selection[0].PoolAncestor,
                    Hosts = selection[0].Connection.Cache.Hosts
                };

                MainWindowCommandInterface.ShowPerConnectionWizard(selection[0].Connection, WlbReportWin);
            }
            catch (Failure exn)
            {
                log.Error(exn, exn);
            }
        }
Пример #2
0
        protected override void ExecuteCore(SelectedItemCollection selection)
        {
            if (Helpers.FeatureForbidden(selection[0].XenObject, Host.RestrictWLB))
            {
                // Show upsell dialog
                UpsellDialog dlg = new UpsellDialog(Messages.UPSELL_BLURB_WLB, InvisibleMessages.UPSELL_LEARNMOREURL_WLB);
                dlg.ShowDialog(Parent);
                return;
            }

            try
            {
                WorkloadReports WlbReportWin = new WorkloadReports(_reportFile, _run)
                    {
                        Pool = selection[0].PoolAncestor,
                        Hosts = selection[0].Connection.Cache.Hosts
                    };

                MainWindowCommandInterface.ShowPerConnectionWizard(selection[0].Connection, WlbReportWin);
            }
            catch (Failure exn)
            {
                log.Error(exn, exn);
            }
        }