public JobOutputWindow(String name, AutomationISEClient client) { InitializeComponent(); this.Title = name + " Test Job"; AdditionalInformation.Text = "Tip: not seeing Verbose output? Add the line \"$VerbosePreference='Continue'\" to your runbook."; runbookName = name; iseClient = client; Task t = checkTestJob(); }
//TODO: refactor this to a different class with some inheritance structure public JobOutputWindow(String name, JobCreateResponse response, AutomationISEClient client) { InitializeComponent(); StartJobButton.IsEnabled = false; StopJobButton.IsEnabled = false; this.Title = "Job: " + name; AdditionalInformation.Text = "This is a Global Runbook responsible for syncing your GitHub repo with your Automation Account. Neato!"; runbookName = name; jobCreateResponse = response; iseClient = client; Task t = checkJob(); }
public AutomationISEControl() { try { InitializeComponent(); iseClient = new AutomationISEClient(); fileTransferQueue = new BlockingCollection <RunbookTransferJob>(new ConcurrentQueue <RunbookTransferJob>(), 50); fileTransferWorkerProgress = new Progress <RunbookTransferProgress>(updateUiWithTransferProgress); fileTransferWorker = Task.Factory.StartNew(() => processJobsFromQueue(fileTransferWorkerProgress), TaskCreationOptions.LongRunning); /* Determine working directory */ String localWorkspace = Properties.Settings.Default["localWorkspace"].ToString(); if (localWorkspace == "") { String systemDrive = Environment.GetEnvironmentVariable("SystemDrive") + "\\"; localWorkspace = System.IO.Path.Combine(systemDrive, "AutomationWorkspace"); Properties.Settings.Default["localWorkspace"] = localWorkspace; Properties.Settings.Default.Save(); } iseClient.baseWorkspace = localWorkspace; /* Update UI */ workspaceTextBox.Text = iseClient.baseWorkspace; userNameTextBox.Text = Properties.Settings.Default["ADUserName"].ToString(); subscriptionComboBox.IsEnabled = false; accountsComboBox.IsEnabled = false; assetsComboBox.Items.Add(AutomationISE.Model.Constants.assetVariable); assetsComboBox.Items.Add(AutomationISE.Model.Constants.assetCredential); //assetsComboBox.Items.Add(AutomationISE.Model.Constants.assetCertificate); //assetsComboBox.Items.Add(AutomationISE.Model.Constants.assetConnection); setRunbookAndAssetNonSelectionButtonState(false); setAssetSelectionButtonState(false); setRunbookSelectionButtonState(false); // Generate self signed certificate for encrypting local assets in the current user store Cert:\CurrentUser\My\ var certObj = new AutomationSelfSignedCertificate(); String selfSignedThumbprint = certObj.CreateSelfSignedCertificate(); certificateTextBox.Text = selfSignedThumbprint; UpdateStatusBox(configurationStatusTextBox, "Certificate to use for encrypting local assets is " + selfSignedThumbprint); // Load feedback page to increase load time before users clicks on feedback tab surveyBrowserControl.Navigate(new Uri(Constants.feedbackURI)); startContinualGet(); } catch (Exception exception) { var detailsDialog = System.Windows.Forms.MessageBox.Show(exception.Message); } }
public JobOutputWindow(String name, AutomationISEClient client) { InitializeComponent(); this.Title = name + " Test Job"; AdditionalInformation.Text = "Tip: not seeing Verbose output? Add the line \"$VerbosePreference='Continue'\" to your runbook."; runbookName = name; iseClient = client; Task t = checkTestJob(true); refreshTimer = new System.Timers.Timer(); refreshTimer.Interval = 30000; refreshTimer.Elapsed += new ElapsedEventHandler(refresh); }
public DSCCompilationJobOutputWindow(String name, AutomationISEClient client, int refreshTimerValue) { InitializeComponent(); CompileConfigurationButton.IsEnabled = true; this.Title = name + " DSC Compilation Job"; configurationName = name; iseClient = client; Task t = checkCompilationJob(true); refreshTimer = new System.Timers.Timer(); refreshTimer.Interval = refreshTimerValue; refreshTimer.Elapsed += new ElapsedEventHandler(refresh); localRunbookFilePaths = Directory.GetFiles(iseClient.currWorkspace, "*.ps1"); }
public JobOutputWindow(String name, AutomationISEClient client, int refreshTimerValue) { InitializeComponent(); StartJobButton.IsEnabled = true; StopJobButton.IsEnabled = false; this.Title = name + " Test Job"; AdditionalInformation.Text = "Tip: not seeing Verbose output? Add the line \"$VerbosePreference='Continue'\" to your runbook."; runbookName = name; iseClient = client; jobParams.Time = DateTime.UtcNow.AddDays(-30).ToString("o"); Task t = checkTestJob(true); refreshTimer = new System.Timers.Timer(); refreshTimer.Interval = refreshTimerValue; refreshTimer.Elapsed += new ElapsedEventHandler(refresh); }
//TODO: refactor this to a different class with some inheritance structure public JobOutputWindow(String name, JobCreateResponse response, AutomationISEClient client) { InitializeComponent(); StartJobButton.IsEnabled = false; StopJobButton.IsEnabled = false; this.Title = "Job: " + name; AdditionalInformation.Text = "This is a Global Runbook responsible for syncing your GitHub repo with your Automation Account. Neato!"; runbookName = name; jobCreateResponse = response; iseClient = client; Task t = checkJob(); refreshTimer = new System.Timers.Timer(); refreshTimer.Interval = 30000; refreshTimer.Elapsed += new ElapsedEventHandler(refresh); }