зеркало из https://github.com/microsoft/2LCS.git
Support for self-service instances
This commit is contained in:
Родитель
0fdeb59a5b
Коммит
8bda577f8e
|
@ -8,7 +8,7 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>LCS</RootNamespace>
|
||||
<AssemblyName>2LCS</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
|
@ -27,6 +27,7 @@
|
|||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
@ -64,13 +65,13 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CsvHelper, Version=12.0.0.0, Culture=neutral, PublicKeyToken=8c4959082be5c823, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CsvHelper.12.1.2\lib\net45\CsvHelper.dll</HintPath>
|
||||
<HintPath>..\packages\CsvHelper.12.2.1\lib\net47\CsvHelper.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack, Version=1.11.12.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HtmlAgilityPack.1.11.12\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||
<Reference Include="HtmlAgilityPack, Version=1.11.17.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HtmlAgilityPack.1.11.17\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
@ -78,7 +79,7 @@
|
|||
<HintPath>..\packages\System.Linq.Dynamic.1.0.7\lib\net40\System.Linq.Dynamic.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
|
@ -90,11 +91,15 @@
|
|||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Xceed.Words.NET, Version=1.3.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DocX.1.3.0\lib\net40\Xceed.Words.NET.dll</HintPath>
|
||||
<Reference Include="Xceed.Document.NET, Version=1.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DocX.1.5.0\lib\net40\Xceed.Document.NET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Words.NET, Version=1.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DocX.1.5.0\lib\net40\Xceed.Words.NET.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Enumerations.cs" />
|
||||
<Compile Include="ExtendedWebBrowser.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
@ -189,6 +194,7 @@
|
|||
<DependentUpon>Login.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HttpClientHelper.cs" />
|
||||
<Compile Include="NativeMethods.cs" />
|
||||
<Compile Include="RDPCredentials.cs" />
|
||||
<Compile Include="JsonObjects.cs" />
|
||||
<Compile Include="Forms\MainForm.cs">
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="LCS.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
<section name="LCS.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
|
||||
</startup>
|
||||
<userSettings>
|
||||
<LCS.Properties.Settings>
|
||||
<setting name="cookie" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="links" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="instances" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="projects" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="update" serializeAs="String">
|
||||
<value>True</value>
|
||||
|
@ -33,9 +33,9 @@
|
|||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
|
|
@ -0,0 +1,233 @@
|
|||
namespace LCS
|
||||
{
|
||||
public enum ProjectType
|
||||
{
|
||||
None = 0,
|
||||
Deprecated1 = 1,
|
||||
Deprecated2 = 2,
|
||||
Deprecated3 = 3,
|
||||
Deprecated4 = 4,
|
||||
Deprecated5 = 5,
|
||||
Learn = 6,
|
||||
Presales = 7,
|
||||
Implementation = 8,
|
||||
Partner = 9,
|
||||
OnPremImplementation = 10,
|
||||
ServiceFabricImplementation = 11
|
||||
}
|
||||
|
||||
public enum HotfixesType
|
||||
{
|
||||
Metadata = 8,
|
||||
PlatformBinary = 11,
|
||||
ApplicationBinary = 9,
|
||||
CriticalMetadata = 16
|
||||
}
|
||||
|
||||
public enum ProjectSystemRoleType
|
||||
{
|
||||
None = 0,
|
||||
ProjectOwner = 1,
|
||||
Contributor = 2,
|
||||
ReadOnly = 3,
|
||||
ProjectContributor = 5,
|
||||
OperationsAdmin = 6,
|
||||
EnvironmentAdmin = 7,
|
||||
InternalSreUser = 8,
|
||||
InternalSupportUser = 9,
|
||||
InternalDriUser = 10,
|
||||
InternalSreTier1User = 11
|
||||
}
|
||||
|
||||
public enum ProjectUserStatus
|
||||
{
|
||||
Pending = 0,
|
||||
Declined = 1,
|
||||
Accepted = 2
|
||||
}
|
||||
|
||||
public enum OrgUserRoleType
|
||||
{
|
||||
None = 0,
|
||||
SystemAdmin = 1,
|
||||
Admin = 2,
|
||||
Contributor = 3,
|
||||
Prospect = 4,
|
||||
DelegatedAdmin = 5,
|
||||
SupportAdmin = 6,
|
||||
OpsAdmin = 7,
|
||||
DriAdmin = 8,
|
||||
SreTier1Admin = 9
|
||||
}
|
||||
|
||||
public enum OrganizationType
|
||||
{
|
||||
None = 0,
|
||||
Partner = 1,
|
||||
Customer = 2,
|
||||
Prospect = 3,
|
||||
Employee = 4
|
||||
}
|
||||
|
||||
public enum DeploymentStatus
|
||||
{
|
||||
Undefined = 0,
|
||||
Succeeded = 1,
|
||||
Failed = 2,
|
||||
Canceled = 3,
|
||||
StateTransitionIncomplete = 4
|
||||
}
|
||||
|
||||
public enum DeploymentState
|
||||
{
|
||||
Undefined = 0,
|
||||
Active = 1,
|
||||
Paused = 2,
|
||||
Finished = 3,
|
||||
Starting = 4,
|
||||
Stopping = 5,
|
||||
Stopped = 6,
|
||||
Deleting = 7,
|
||||
Deallocating = 8,
|
||||
Deallocated = 9,
|
||||
Deleted = 10,
|
||||
Servicing = 11,
|
||||
Recovering = 12,
|
||||
SafeMode = 13,
|
||||
Restoring = 14,
|
||||
Swapping = 15,
|
||||
SwapRollingBack = 16,
|
||||
RotatingSecrets = 17,
|
||||
CommitingSwap = 18,
|
||||
Swapped = 19,
|
||||
ServicingRollback = 20,
|
||||
DatabaseRestoreRollback = 21,
|
||||
Migrating = 22,
|
||||
RestartingServices = 23,
|
||||
DatabaseNeedsUpgrade = 24,
|
||||
ValidatingDataUpgrade = 25,
|
||||
ExecutingSQLCommand = 26,
|
||||
ExecutingGenevaAction = 27,
|
||||
MigratingToSF = 28,
|
||||
MigratedToSF = 29,
|
||||
CDSConfiguring = 30,
|
||||
ScalingOut = 31,
|
||||
InfrastructureMaintenance = 32,
|
||||
PreparingForMigration = 33,
|
||||
PreppedForMigration = 34,
|
||||
ConfiguringFirewallRules = 35
|
||||
}
|
||||
|
||||
public enum DeploymentAction
|
||||
{
|
||||
Undefined = 0,
|
||||
Deploy = 1,
|
||||
Start = 2,
|
||||
Stop = 3,
|
||||
Update = 4,
|
||||
ScaleOut = 5,
|
||||
Configure = 6,
|
||||
Delete = 7,
|
||||
Restart = 8,
|
||||
Service = 9,
|
||||
PreService = 10,
|
||||
PostService = 11,
|
||||
MoveVMToMaintenancePool = 12,
|
||||
MoveVMToLivePool = 13,
|
||||
MarkStepComplete = 14,
|
||||
Rollback = 15,
|
||||
Abort = 16,
|
||||
Failover = 17,
|
||||
DeployDisasterRecovery = 18,
|
||||
RestoreDatabaseFromSourceToTargetServer = 19,
|
||||
Failback = 20,
|
||||
CleanupFailoverResources = 21,
|
||||
Resume = 22,
|
||||
SwapStaging = 23,
|
||||
SwapRollback = 24,
|
||||
SwapCommit = 25,
|
||||
ExecutePowershellScript = 26,
|
||||
RotateSecrets = 27,
|
||||
CreateJITAccount = 28,
|
||||
UpdateNetworkSecurityGroup = 29,
|
||||
ImportDatabase = 30,
|
||||
DataUpgrade = 31,
|
||||
RestartService = 32,
|
||||
ValidateDataUpgrade = 33,
|
||||
ExecuteSQLCommand = 34,
|
||||
Redeploy = 35,
|
||||
DataMovement = 36,
|
||||
ExecuteGenevaAction = 37,
|
||||
DataUpgradeRollback = 38
|
||||
}
|
||||
|
||||
public enum IssueStorage
|
||||
{
|
||||
None = 0,
|
||||
Legacy = 1,
|
||||
Tfs = 2
|
||||
}
|
||||
|
||||
public enum SaasEnvironmentType
|
||||
{
|
||||
none = 0,
|
||||
prod = 1,
|
||||
sandbox = 2,
|
||||
devtest = 3
|
||||
}
|
||||
|
||||
public enum RefinedEnvironmentType
|
||||
{
|
||||
Unknown = 0,
|
||||
Production = 1,
|
||||
Sandbox = 2,
|
||||
Demo = 3,
|
||||
DevTestDev = 4,
|
||||
DevTestBuild = 5,
|
||||
DevTestDevAndBuild = 6,
|
||||
OnPremSandbox = 7,
|
||||
OnPremProduction = 8,
|
||||
HighAvailability = 9
|
||||
}
|
||||
|
||||
public enum UpgradeEnvironmentStatus
|
||||
{
|
||||
None = 0,
|
||||
EnvironmentDeploymentStarted = 1,
|
||||
EnvironmentDeploymentSucceeded = 2,
|
||||
EnvironmentDeploymentFailed = 3,
|
||||
DeployablePackageInstallationStarted = 4,
|
||||
DeployablePackageInstallationSucceeded = 5,
|
||||
DeployablePackageInstallationFailed = 6,
|
||||
DeployablePackageRollbackStarted = 7,
|
||||
DeployablePackageRollbackSucceeded = 8,
|
||||
DeployablePackageRollbackFailed = 9,
|
||||
SwapInStarted = 10,
|
||||
SwapInSucceeded = 11,
|
||||
SwapInFailed = 12,
|
||||
DataUpgradeStarted = 13,
|
||||
DataUpgradeSucceeded = 14,
|
||||
DataUpgradeFailed = 15,
|
||||
DataUpgradeValidationStarted = 16,
|
||||
DataUpgradeValidationSucceeded = 17,
|
||||
DataUpgradeValidationFailed = 18,
|
||||
CustomerValidationStarted = 19,
|
||||
CustomerValidationSucceeded = 20,
|
||||
CustomerValidationFailed = 21,
|
||||
SwapOutStarted = 22,
|
||||
SwapOutSucceeded = 23,
|
||||
SwapOutFailed = 24,
|
||||
EnvironmentDeallocationStarted = 25,
|
||||
EnvironmentDeallocationSucceeded = 26,
|
||||
EnvironmentDeallocationFailed = 27,
|
||||
EnvironmentDeleteStarted = 28,
|
||||
EnvironmentDeleteSucceeded = 29,
|
||||
EnvironmentDeleteFailed = 30,
|
||||
PointInTimeRestoreStarted = 31,
|
||||
PointInTimeRestoreSucceeded = 32,
|
||||
PointInTimeRestoreFailed = 33,
|
||||
DataUpgradePackageRollbackStarted = 34,
|
||||
DataUpgradePackageRollbackSucceeded = 35,
|
||||
DataUpgradePackageRollbackFailed = 36
|
||||
}
|
||||
}
|
|
@ -31,22 +31,24 @@
|
|||
this.OkButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.projectsDataGridView = new System.Windows.Forms.DataGridView();
|
||||
this.refreshButton = new System.Windows.Forms.Button();
|
||||
this.Favorite = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ProjectName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Description = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.OrganizationName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.CreatedByUserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.refreshButton = new System.Windows.Forms.Button();
|
||||
this.ProjectTypeId = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)(this.projectsDataGridView)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// OkButton
|
||||
//
|
||||
this.OkButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.OkButton.Location = new System.Drawing.Point(398, 399);
|
||||
this.OkButton.Location = new System.Drawing.Point(486, 479);
|
||||
this.OkButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.OkButton.Name = "OkButton";
|
||||
this.OkButton.Size = new System.Drawing.Size(182, 33);
|
||||
this.OkButton.Size = new System.Drawing.Size(222, 40);
|
||||
this.OkButton.TabIndex = 1;
|
||||
this.OkButton.Text = "OK";
|
||||
this.OkButton.UseVisualStyleBackColor = true;
|
||||
|
@ -56,9 +58,10 @@
|
|||
//
|
||||
this.cancelButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(586, 399);
|
||||
this.cancelButton.Location = new System.Drawing.Point(716, 479);
|
||||
this.cancelButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(172, 33);
|
||||
this.cancelButton.Size = new System.Drawing.Size(210, 40);
|
||||
this.cancelButton.TabIndex = 2;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
|
@ -80,19 +83,33 @@
|
|||
this.ProjectName,
|
||||
this.Description,
|
||||
this.OrganizationName,
|
||||
this.CreatedByUserName});
|
||||
this.projectsDataGridView.Location = new System.Drawing.Point(12, 13);
|
||||
this.CreatedByUserName,
|
||||
this.ProjectTypeId});
|
||||
this.projectsDataGridView.Location = new System.Drawing.Point(15, 16);
|
||||
this.projectsDataGridView.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.projectsDataGridView.MultiSelect = false;
|
||||
this.projectsDataGridView.Name = "projectsDataGridView";
|
||||
this.projectsDataGridView.RowHeadersVisible = false;
|
||||
this.projectsDataGridView.RowHeadersWidth = 62;
|
||||
this.projectsDataGridView.RowTemplate.Height = 28;
|
||||
this.projectsDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.projectsDataGridView.Size = new System.Drawing.Size(1194, 380);
|
||||
this.projectsDataGridView.Size = new System.Drawing.Size(1459, 456);
|
||||
this.projectsDataGridView.TabIndex = 0;
|
||||
this.projectsDataGridView.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.ProjectsDataGridView_CellMouseDoubleClick);
|
||||
this.projectsDataGridView.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.ProjectsDataGridView_ColumnHeaderMouseClick);
|
||||
//
|
||||
// refreshButton
|
||||
//
|
||||
this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.refreshButton.Location = new System.Drawing.Point(16, 479);
|
||||
this.refreshButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.refreshButton.Name = "refreshButton";
|
||||
this.refreshButton.Size = new System.Drawing.Size(186, 40);
|
||||
this.refreshButton.TabIndex = 3;
|
||||
this.refreshButton.Text = "Refresh list";
|
||||
this.refreshButton.UseVisualStyleBackColor = true;
|
||||
this.refreshButton.Click += new System.EventHandler(this.RefreshButton_Click);
|
||||
//
|
||||
// Favorite
|
||||
//
|
||||
this.Favorite.DataPropertyName = "Favorite";
|
||||
|
@ -142,30 +159,27 @@
|
|||
this.CreatedByUserName.Name = "CreatedByUserName";
|
||||
this.CreatedByUserName.ReadOnly = true;
|
||||
//
|
||||
// refreshButton
|
||||
// ProjectTypeId
|
||||
//
|
||||
this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.refreshButton.Location = new System.Drawing.Point(13, 399);
|
||||
this.refreshButton.Name = "refreshButton";
|
||||
this.refreshButton.Size = new System.Drawing.Size(152, 33);
|
||||
this.refreshButton.TabIndex = 3;
|
||||
this.refreshButton.Text = "Refresh list";
|
||||
this.refreshButton.UseVisualStyleBackColor = true;
|
||||
this.refreshButton.Click += new System.EventHandler(this.RefreshButton_Click);
|
||||
this.ProjectTypeId.DataPropertyName = "ProjectTypeId";
|
||||
this.ProjectTypeId.HeaderText = "Project type";
|
||||
this.ProjectTypeId.MinimumWidth = 9;
|
||||
this.ProjectTypeId.Name = "ProjectTypeId";
|
||||
//
|
||||
// ChooseProject
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(1218, 444);
|
||||
this.ClientSize = new System.Drawing.Size(1489, 533);
|
||||
this.Controls.Add(this.refreshButton);
|
||||
this.Controls.Add(this.projectsDataGridView);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.OkButton);
|
||||
this.Icon = global::LCS.Properties.Resources.favicon_blue;
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(780, 400);
|
||||
this.MinimumSize = new System.Drawing.Size(948, 467);
|
||||
this.Name = "ChooseProject";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
|
@ -187,5 +201,6 @@
|
|||
private System.Windows.Forms.DataGridViewTextBoxColumn Description;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn OrganizationName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn CreatedByUserName;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ProjectTypeId;
|
||||
}
|
||||
}
|
|
@ -135,4 +135,7 @@
|
|||
<metadata name="CreatedByUserName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ProjectTypeId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -204,7 +204,7 @@
|
|||
this.cheDataGridView.Name = "cheDataGridView";
|
||||
this.cheDataGridView.ReadOnly = true;
|
||||
this.cheDataGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders;
|
||||
this.cheDataGridView.Size = new System.Drawing.Size(1791, 892);
|
||||
this.cheDataGridView.Size = new System.Drawing.Size(1791, 890);
|
||||
this.cheDataGridView.TabIndex = 0;
|
||||
this.cheDataGridView.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.CheDataGridView_CellMouseDoubleClick);
|
||||
this.cheDataGridView.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.CheDataGridView_ColumnHeaderMouseClick);
|
||||
|
@ -674,14 +674,14 @@
|
|||
this.mainMenuStrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.mainMenuStrip.Name = "mainMenuStrip";
|
||||
this.mainMenuStrip.Padding = new System.Windows.Forms.Padding(7, 3, 0, 3);
|
||||
this.mainMenuStrip.Size = new System.Drawing.Size(1807, 40);
|
||||
this.mainMenuStrip.Size = new System.Drawing.Size(1807, 42);
|
||||
this.mainMenuStrip.TabIndex = 0;
|
||||
this.mainMenuStrip.Text = "menuStrip1";
|
||||
//
|
||||
// loginToLcsMenuItem
|
||||
//
|
||||
this.loginToLcsMenuItem.Name = "loginToLcsMenuItem";
|
||||
this.loginToLcsMenuItem.Size = new System.Drawing.Size(146, 34);
|
||||
this.loginToLcsMenuItem.Size = new System.Drawing.Size(146, 36);
|
||||
this.loginToLcsMenuItem.Text = "&Login to LCS";
|
||||
this.loginToLcsMenuItem.Click += new System.EventHandler(this.LoginToLCSMenuItem_Click);
|
||||
//
|
||||
|
@ -689,7 +689,7 @@
|
|||
//
|
||||
this.changeProjectMenuItem.Enabled = false;
|
||||
this.changeProjectMenuItem.Name = "changeProjectMenuItem";
|
||||
this.changeProjectMenuItem.Size = new System.Drawing.Size(247, 34);
|
||||
this.changeProjectMenuItem.Size = new System.Drawing.Size(247, 36);
|
||||
this.changeProjectMenuItem.Text = "&Change project context";
|
||||
this.changeProjectMenuItem.Click += new System.EventHandler(this.ChangeProjectMenuItem_Click);
|
||||
//
|
||||
|
@ -697,14 +697,14 @@
|
|||
//
|
||||
this.refreshMenuItem.Enabled = false;
|
||||
this.refreshMenuItem.Name = "refreshMenuItem";
|
||||
this.refreshMenuItem.Size = new System.Drawing.Size(294, 34);
|
||||
this.refreshMenuItem.Size = new System.Drawing.Size(294, 36);
|
||||
this.refreshMenuItem.Text = "&Refresh instances for project";
|
||||
this.refreshMenuItem.Click += new System.EventHandler(this.RefreshMenuItem_Click);
|
||||
//
|
||||
// customLinksToolStripMenuItem
|
||||
//
|
||||
this.customLinksToolStripMenuItem.Name = "customLinksToolStripMenuItem";
|
||||
this.customLinksToolStripMenuItem.Size = new System.Drawing.Size(213, 34);
|
||||
this.customLinksToolStripMenuItem.Size = new System.Drawing.Size(213, 36);
|
||||
this.customLinksToolStripMenuItem.Text = "Define c&ustom links";
|
||||
this.customLinksToolStripMenuItem.Click += new System.EventHandler(this.CustomLinksToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -715,7 +715,7 @@
|
|||
this.exportListOfInstancesForAllProjectsToolStripMenuItem});
|
||||
this.exportToolStripMenuItem.Enabled = false;
|
||||
this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
|
||||
this.exportToolStripMenuItem.Size = new System.Drawing.Size(90, 34);
|
||||
this.exportToolStripMenuItem.Size = new System.Drawing.Size(90, 36);
|
||||
this.exportToolStripMenuItem.Text = "Export";
|
||||
//
|
||||
// exportProjectDataToolStripMenuItem1
|
||||
|
@ -736,21 +736,21 @@
|
|||
//
|
||||
this.logoutToolStripMenuItem.Enabled = false;
|
||||
this.logoutToolStripMenuItem.Name = "logoutToolStripMenuItem";
|
||||
this.logoutToolStripMenuItem.Size = new System.Drawing.Size(96, 34);
|
||||
this.logoutToolStripMenuItem.Size = new System.Drawing.Size(96, 36);
|
||||
this.logoutToolStripMenuItem.Text = "Logout";
|
||||
this.logoutToolStripMenuItem.Click += new System.EventHandler(this.LogoutToolStripMenuItem_Click);
|
||||
//
|
||||
// cookieToolStripMenuItem
|
||||
//
|
||||
this.cookieToolStripMenuItem.Name = "cookieToolStripMenuItem";
|
||||
this.cookieToolStripMenuItem.Size = new System.Drawing.Size(94, 34);
|
||||
this.cookieToolStripMenuItem.Size = new System.Drawing.Size(94, 36);
|
||||
this.cookieToolStripMenuItem.Text = "Cookie";
|
||||
this.cookieToolStripMenuItem.Click += new System.EventHandler(this.CookieToolStripMenuItem_Click);
|
||||
//
|
||||
// parametersToolStripMenuItem
|
||||
//
|
||||
this.parametersToolStripMenuItem.Name = "parametersToolStripMenuItem";
|
||||
this.parametersToolStripMenuItem.Size = new System.Drawing.Size(134, 34);
|
||||
this.parametersToolStripMenuItem.Size = new System.Drawing.Size(134, 36);
|
||||
this.parametersToolStripMenuItem.Text = "Parameters";
|
||||
this.parametersToolStripMenuItem.Click += new System.EventHandler(this.ParametersToolStripMenuItem_Click);
|
||||
//
|
||||
|
@ -759,11 +759,11 @@
|
|||
this.tabControl.Controls.Add(this.cheTabPage);
|
||||
this.tabControl.Controls.Add(this.saasTabPage);
|
||||
this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControl.Location = new System.Drawing.Point(0, 40);
|
||||
this.tabControl.Location = new System.Drawing.Point(0, 42);
|
||||
this.tabControl.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.tabControl.Name = "tabControl";
|
||||
this.tabControl.SelectedIndex = 0;
|
||||
this.tabControl.Size = new System.Drawing.Size(1807, 935);
|
||||
this.tabControl.Size = new System.Drawing.Size(1807, 933);
|
||||
this.tabControl.TabIndex = 1;
|
||||
//
|
||||
// cheTabPage
|
||||
|
@ -773,7 +773,7 @@
|
|||
this.cheTabPage.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.cheTabPage.Name = "cheTabPage";
|
||||
this.cheTabPage.Padding = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.cheTabPage.Size = new System.Drawing.Size(1799, 898);
|
||||
this.cheTabPage.Size = new System.Drawing.Size(1799, 896);
|
||||
this.cheTabPage.TabIndex = 0;
|
||||
this.cheTabPage.Text = "Cloud-hosted instances";
|
||||
this.cheTabPage.UseVisualStyleBackColor = true;
|
||||
|
@ -977,7 +977,7 @@
|
|||
this.saasLcsProjectLinksToolStripMenuItem,
|
||||
this.saasDeployPackageToolStripMenuItem});
|
||||
this.saasInstanceContextMenu.Name = "instanceContextMenuStrip";
|
||||
this.saasInstanceContextMenu.Size = new System.Drawing.Size(311, 364);
|
||||
this.saasInstanceContextMenu.Size = new System.Drawing.Size(311, 402);
|
||||
this.saasInstanceContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.InstanceContextMenu_Opening);
|
||||
//
|
||||
// saasLogonToApplicationToolStripMenuItem
|
||||
|
|
|
@ -14,6 +14,7 @@ using System.Text;
|
|||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Xceed.Document.NET;
|
||||
using Xceed.Words.NET;
|
||||
|
||||
namespace LCS.Forms
|
||||
|
@ -100,21 +101,21 @@ namespace LCS.Forms
|
|||
throw new ArgumentNullException("window");
|
||||
if (window.Handle == IntPtr.Zero)
|
||||
throw new InvalidOperationException("Window does not yet exist");
|
||||
if (!IsWindowVisible(window.Handle))
|
||||
if (!NativeMethods.IsWindowVisible(window.Handle))
|
||||
return false;
|
||||
|
||||
IntPtr hWnd = window.Handle;
|
||||
HashSet<IntPtr> visited = new HashSet<IntPtr> { hWnd };
|
||||
|
||||
RECT thisRect = new RECT();
|
||||
GetWindowRect(hWnd, out thisRect);
|
||||
NativeMethods.GetWindowRect(hWnd, out thisRect);
|
||||
|
||||
while ((hWnd = GetWindow(hWnd, GW_HWNDPREV)) != IntPtr.Zero && !visited.Contains(hWnd))
|
||||
while ((hWnd = NativeMethods.GetWindow(hWnd, GW_HWNDPREV)) != IntPtr.Zero && !visited.Contains(hWnd))
|
||||
{
|
||||
visited.Add(hWnd);
|
||||
RECT testRect, intersection;
|
||||
testRect = intersection = new RECT();
|
||||
if (IsWindowVisible(hWnd) && GetWindowRect(hWnd, out testRect) && IntersectRect(out intersection, ref thisRect, ref testRect))
|
||||
if (NativeMethods.IsWindowVisible(hWnd) && NativeMethods.GetWindowRect(hWnd, out testRect) && NativeMethods.IntersectRect(out intersection, ref thisRect, ref testRect))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -132,12 +133,12 @@ namespace LCS.Forms
|
|||
CookieContainer cookies = null;
|
||||
var datasize = 8192 * 16;
|
||||
var cookieData = new StringBuilder(datasize);
|
||||
if (!InternetGetCookieEx(_lcsUrl, null, cookieData, ref datasize, InternetCookieHttponly, IntPtr.Zero))
|
||||
if (!NativeMethods.InternetGetCookieEx(_lcsUrl, null, cookieData, ref datasize, InternetCookieHttponly, IntPtr.Zero))
|
||||
{
|
||||
if (datasize < 0)
|
||||
return null;
|
||||
cookieData = new StringBuilder(datasize);
|
||||
if (!InternetGetCookieEx(
|
||||
if (!NativeMethods.InternetGetCookieEx(
|
||||
_lcsUrl,
|
||||
null, cookieData,
|
||||
ref datasize,
|
||||
|
@ -157,24 +158,6 @@ namespace LCS.Forms
|
|||
return cookies;
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr GetWindow(IntPtr hWnd, int uCmd);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool GetWindowRect(IntPtr hWnd, [Out] out RECT lpRect);
|
||||
|
||||
[DllImport("wininet.dll", SetLastError = true)]
|
||||
private static extern bool InternetGetCookieEx(string url, string cookieName, StringBuilder cookieData, ref int size, Int32 dwFlags, IntPtr lpReserved);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool IntersectRect([Out] out RECT lprcDst, [In] ref RECT lprcSrc1, [In] ref RECT lprcSrc2);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool IsWindowVisible(IntPtr hWnd);
|
||||
|
||||
private void AssetLibraryToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start($"https://lcs.dynamics.com/V2/AssetLibrary/{_selectedProject.Id}");
|
||||
|
@ -209,10 +192,12 @@ namespace LCS.Forms
|
|||
refreshMenuItem.Enabled = true;
|
||||
exportToolStripMenuItem.Enabled = true;
|
||||
_httpClientHelper.ChangeLcsProjectId(_selectedProject.Id.ToString());
|
||||
_httpClientHelper.LcsProjectTypeId = _selectedProject.ProjectTypeId;
|
||||
_cookies = _httpClientHelper.CookieContainer;
|
||||
GetLcsProjectFromCookie();
|
||||
SetLcsProjectText();
|
||||
CreateProjectLinksMenuItems();
|
||||
EnableDisableMenuItems();
|
||||
RefreshChe(Properties.Settings.Default.autorefresh);
|
||||
RefreshSaas(Properties.Settings.Default.autorefresh);
|
||||
}
|
||||
|
@ -721,6 +706,7 @@ namespace LCS.Forms
|
|||
if (_project.RequestPending == true) continue;
|
||||
_selectedProject = _project;
|
||||
_httpClientHelper.ChangeLcsProjectId(_project.Id.ToString());
|
||||
_httpClientHelper.LcsProjectTypeId = _project.ProjectTypeId;
|
||||
SetLcsProjectText();
|
||||
RefreshChe();
|
||||
RefreshSaas();
|
||||
|
@ -800,6 +786,7 @@ namespace LCS.Forms
|
|||
}
|
||||
_selectedProject = previousProject;
|
||||
_httpClientHelper.ChangeLcsProjectId(_selectedProject.Id.ToString());
|
||||
_httpClientHelper.LcsProjectTypeId = _selectedProject.ProjectTypeId;
|
||||
SetLcsProjectText();
|
||||
RefreshChe(false);
|
||||
RefreshSaas(false);
|
||||
|
@ -977,7 +964,7 @@ namespace LCS.Forms
|
|||
|
||||
instanceHeader.InsertTableAfterSelf(instanceDetailsTable);
|
||||
|
||||
var instance = _httpClientHelper.GetSaasDeploymentDetail(saasInstance.EnvironmentId);
|
||||
var instance = _httpClientHelper.GetHostedDeploymentDetail(saasInstance.EnvironmentId);
|
||||
var rdpList = _httpClientHelper.GetRdpConnectionDetails(instance);
|
||||
if (rdpList.Count > 0)
|
||||
{
|
||||
|
@ -1305,6 +1292,7 @@ namespace LCS.Forms
|
|||
if (_selectedProject != null)
|
||||
{
|
||||
_httpClientHelper.ChangeLcsProjectId(_selectedProject.Id.ToString());
|
||||
_httpClientHelper.LcsProjectTypeId = _selectedProject.ProjectTypeId;
|
||||
}
|
||||
changeProjectMenuItem.Enabled = true;
|
||||
cheInstanceContextMenu.Enabled = true;
|
||||
|
@ -1379,6 +1367,7 @@ namespace LCS.Forms
|
|||
refreshMenuItem.Enabled = true;
|
||||
exportToolStripMenuItem.Enabled = true;
|
||||
_httpClientHelper.ChangeLcsProjectId(_selectedProject.Id.ToString());
|
||||
_httpClientHelper.LcsProjectTypeId = _selectedProject.ProjectTypeId;
|
||||
var projectInstance = Instances.FirstOrDefault(x => x.LcsProjectId.Equals(_selectedProject.Id));
|
||||
if (projectInstance != null)
|
||||
{
|
||||
|
@ -1395,6 +1384,16 @@ namespace LCS.Forms
|
|||
}
|
||||
CreateCustomLinksMenuItems();
|
||||
CreateProjectLinksMenuItems();
|
||||
EnableDisableMenuItems();
|
||||
}
|
||||
|
||||
private void EnableDisableMenuItems()
|
||||
{
|
||||
if (_selectedProject != null)
|
||||
{
|
||||
saasOpenRdpConnectionToolStripMenuItem.Visible = (_selectedProject.ProjectTypeId != ProjectType.ServiceFabricImplementation || _selectedProject.ProjectTypeId != ProjectType.OnPremImplementation);
|
||||
saasRdpAndPasswordsToolStripMenuItem.Visible = (_selectedProject.ProjectTypeId != ProjectType.ServiceFabricImplementation || _selectedProject.ProjectTypeId != ProjectType.OnPremImplementation);
|
||||
}
|
||||
}
|
||||
|
||||
private void NotifyIcon_MouseClick(object sender, MouseEventArgs e)
|
||||
|
@ -1559,7 +1558,7 @@ namespace LCS.Forms
|
|||
Cursor = Cursors.WaitCursor;
|
||||
if (reloadFromLcs)
|
||||
{
|
||||
_saasInstancesList = _httpClientHelper.GetSaasInstances();
|
||||
_saasInstancesList = _httpClientHelper.GetHostedInstances();
|
||||
|
||||
if (_saasInstancesList != null)
|
||||
{
|
||||
|
@ -1693,7 +1692,7 @@ namespace LCS.Forms
|
|||
|
||||
foreach (var saasInstance in _saasInstancesList)
|
||||
{
|
||||
var instance = _httpClientHelper.GetSaasDeploymentDetail(saasInstance.EnvironmentId);
|
||||
var instance = _httpClientHelper.GetHostedDeploymentDetail(saasInstance.EnvironmentId);
|
||||
sb.Append(
|
||||
$@"
|
||||
<group>
|
||||
|
@ -1766,7 +1765,7 @@ namespace LCS.Forms
|
|||
|
||||
foreach (var saasInstance in _saasInstancesList)
|
||||
{
|
||||
var instance = _httpClientHelper.GetSaasDeploymentDetail(saasInstance.EnvironmentId);
|
||||
var instance = _httpClientHelper.GetHostedDeploymentDetail(saasInstance.EnvironmentId);
|
||||
var rdpList = _httpClientHelper.GetRdpConnectionDetails(instance);
|
||||
foreach (var rdpEntry in rdpList)
|
||||
{
|
||||
|
@ -1997,15 +1996,6 @@ namespace LCS.Forms
|
|||
Process.Start($"https://diag.lcs.dynamics.com/Home/Index/{_selectedProject.Id}");
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private struct RECT
|
||||
{
|
||||
public int left;
|
||||
public int top;
|
||||
public int right;
|
||||
public int bottom;
|
||||
}
|
||||
|
||||
private void LogonToPointOfSaleToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Cursor = Cursors.WaitCursor;
|
||||
|
@ -2079,15 +2069,14 @@ namespace LCS.Forms
|
|||
Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public enum HotfixesType
|
||||
{
|
||||
Metadata = 8,
|
||||
PlatformBinary = 11,
|
||||
ApplicationBinary = 9,
|
||||
CriticalMetadata = 16
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct RECT
|
||||
{
|
||||
public int left;
|
||||
public int top;
|
||||
public int right;
|
||||
public int bottom;
|
||||
}
|
||||
}
|
||||
|
||||
public static class StringExtension
|
||||
|
|
|
@ -48,10 +48,11 @@ namespace LCS
|
|||
}
|
||||
|
||||
public CookieContainer CookieContainer { get; }
|
||||
public string LcsDiagUrl { private get; set; }
|
||||
public string LcsProjectId { private get; set; }
|
||||
public string LcsUpdateUrl { private get; set; }
|
||||
public string LcsUrl { private get; set; }
|
||||
public string LcsDiagUrl { get; set; }
|
||||
public string LcsProjectId { get; set; }
|
||||
public string LcsUpdateUrl { get; set; }
|
||||
public string LcsUrl { get; set; }
|
||||
public ProjectType LcsProjectTypeId { get; set; }
|
||||
|
||||
public void ChangeLcsProjectId(string value)
|
||||
{
|
||||
|
@ -550,9 +551,20 @@ namespace LCS
|
|||
: response.Data == null ? null : JsonConvert.DeserializeObject<ProjectData>(response.Data.ToString());
|
||||
}
|
||||
|
||||
internal CloudHostedInstance GetSaasDeploymentDetail(string environmentId)
|
||||
internal CloudHostedInstance GetHostedDeploymentDetail(string environmentId)
|
||||
{
|
||||
if(LcsProjectTypeId != ProjectType.ServiceFabricImplementation)
|
||||
{
|
||||
return GetHostedDeploymentDetail(_httpClient.GetAsync($"{LcsUrl}/SaaSDeployment/GetDeploymentDetail/{LcsProjectId}/?environmentId={environmentId}&_={DateTimeOffset.Now.ToUnixTimeSeconds()}").Result);
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetHostedDeploymentDetail(_httpClient.GetAsync($"{LcsUrl}/ServiceFabricDeployment/GetEnvironmentDetails/{LcsProjectId}/?environmentId={environmentId}&_={DateTimeOffset.Now.ToUnixTimeSeconds()}").Result);
|
||||
}
|
||||
}
|
||||
|
||||
private CloudHostedInstance GetHostedDeploymentDetail(HttpResponseMessage result)
|
||||
{
|
||||
var result = _httpClient.GetAsync($"{LcsUrl}/SaaSDeployment/GetDeploymentDetail/{LcsProjectId}/?environmentId={environmentId}&_={DateTimeOffset.Now.ToUnixTimeSeconds()}").Result;
|
||||
result.EnsureSuccessStatusCode();
|
||||
|
||||
var responseBody = result.Content.ReadAsStringAsync().Result;
|
||||
|
@ -562,9 +574,22 @@ namespace LCS
|
|||
: response.Data == null ? null : JsonConvert.DeserializeObject<CloudHostedInstance>(response.Data.ToString());
|
||||
}
|
||||
|
||||
internal List<CloudHostedInstance> GetSaasInstances()
|
||||
internal List<CloudHostedInstance> GetHostedInstances()
|
||||
{
|
||||
if (LcsProjectTypeId != ProjectType.ServiceFabricImplementation)
|
||||
{
|
||||
var saasInstances = GetHostedInstances(_httpClient.GetAsync($"{LcsUrl}/SaasDeployment/GetDeploymentSummary/{LcsProjectId}?_={DateTimeOffset.Now.ToUnixTimeSeconds()}").Result);
|
||||
return saasInstances.OrderBy(x => x.InstanceId).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
var selfServiceInstances = GetHostedInstances(_httpClient.GetAsync($"{LcsUrl}/ServiceFabricDeployment/GetDeploymentSummary/{LcsProjectId}?_={DateTimeOffset.Now.ToUnixTimeSeconds()}").Result);
|
||||
return selfServiceInstances.OrderBy(x => x.InstanceId).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
private List<CloudHostedInstance> GetHostedInstances(HttpResponseMessage result)
|
||||
{
|
||||
var result = _httpClient.GetAsync($"{LcsUrl}/SaasDeployment/GetDeploymentSummary/{LcsProjectId}?_={DateTimeOffset.Now.ToUnixTimeSeconds()}").Result;
|
||||
result.EnsureSuccessStatusCode();
|
||||
|
||||
var responseBody = result.Content.ReadAsStringAsync().Result;
|
||||
|
@ -585,7 +610,7 @@ namespace LCS
|
|||
foreach (var instance in item.DeploymentInstances)
|
||||
{
|
||||
if (!instance.IsDeployed) continue;
|
||||
var details = GetSaasDeploymentDetail(instance.EnvironmentId);
|
||||
var details = GetHostedDeploymentDetail(instance.EnvironmentId);
|
||||
if (details != null)
|
||||
{
|
||||
list.Add(details);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace LCS.JsonObjects
|
||||
{
|
||||
|
@ -72,7 +71,7 @@ namespace LCS.JsonObjects
|
|||
public string DeploymentAction { get; set; }
|
||||
public int DeploymentErrorCode { get; set; }
|
||||
public string DeploymentId { get; set; }
|
||||
public int DeploymentState { get; set; }
|
||||
public DeploymentState DeploymentState { get; set; }
|
||||
public string DeploymentStatus { get; set; }
|
||||
public string DevTestEnvironmentType { get; set; }
|
||||
public string DisasterRecoveryLocation { get; set; }
|
||||
|
@ -86,7 +85,7 @@ namespace LCS.JsonObjects
|
|||
public bool HasStagingEnvironment { get; set; }
|
||||
public string InstanceId { get; set; }
|
||||
public Instance[] Instances { get; set; }
|
||||
public int InternalDeploymentAction { get; set; }
|
||||
public DeploymentAction InternalDeploymentAction { get; set; }
|
||||
public int InternalDeploymentStatus { get; set; }
|
||||
public bool IsARMTopology { get; set; }
|
||||
public bool IsDiagnosticsEnabledEnvironment { get; set; }
|
||||
|
@ -107,7 +106,7 @@ namespace LCS.JsonObjects
|
|||
public bool IsUpgradeSelfServeInProgress { get; set; }
|
||||
public bool IsUpgradeTimeExpired { get; set; }
|
||||
public object JITExpireTimeRemaining { get; set; }
|
||||
public object[] JITOptions { get; set; }
|
||||
public JITOptions[] JITOptions { get; set; }
|
||||
public bool JITRequestAccessEnabledState { get; set; }
|
||||
public object JITRequestActivityId { get; set; }
|
||||
public bool JITRequestShowError { get; set; }
|
||||
|
@ -122,9 +121,9 @@ namespace LCS.JsonObjects
|
|||
public object RdsFarmAccessRdp { get; set; }
|
||||
public object RdsWebAccessCertificate { get; set; }
|
||||
public object RdsWebAccessLink { get; set; }
|
||||
public int RefinedEnvironmentType { get; set; }
|
||||
public RefinedEnvironmentType RefinedEnvironmentType { get; set; }
|
||||
public string ResourceGroupName { get; set; }
|
||||
public int SaasEnvironmentType { get; set; }
|
||||
public SaasEnvironmentType SaasEnvironmentType { get; set; }
|
||||
public object ServiceIds { get; set; }
|
||||
public bool ShowRetailComponents { get; set; }
|
||||
public bool ShowSslCertRotateWarning { get; set; }
|
||||
|
@ -145,7 +144,7 @@ namespace LCS.JsonObjects
|
|||
public string TopologyName { get; set; }
|
||||
public string TopologyType { get; set; }
|
||||
public string TopologyVersion { get; set; }
|
||||
public int UpgradeEnvironmentStatus { get; set; }
|
||||
public UpgradeEnvironmentStatus UpgradeEnvironmentStatus { get; set; }
|
||||
public int VirtualMachineCount { get; set; }
|
||||
public object Warnings { get; set; }
|
||||
}
|
||||
|
@ -280,7 +279,7 @@ namespace LCS.JsonObjects
|
|||
public string OrganizationName { get; set; }
|
||||
public int ProductId { get; set; }
|
||||
public int ProductVersionId { get; set; }
|
||||
public int ProjectTypeId { get; set; }
|
||||
public ProjectType ProjectTypeId { get; set; }
|
||||
public string RequestEmailInvited { get; set; }
|
||||
public bool RequestPending { get; set; }
|
||||
public bool RequestSentToAlternativeEmail { get; set; }
|
||||
|
@ -353,9 +352,9 @@ namespace LCS.JsonObjects
|
|||
public int MethodologyStatus { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string OrganizationName { get; set; }
|
||||
public int OrgType { get; set; }
|
||||
public OrganizationType OrgType { get; set; }
|
||||
public Product Product { get; set; }
|
||||
public int ProjectTypeId { get; set; }
|
||||
public ProjectType ProjectTypeId { get; set; }
|
||||
public bool RequestPending { get; set; }
|
||||
public ProjectSettings Settings { get; set; }
|
||||
}
|
||||
|
@ -378,7 +377,7 @@ namespace LCS.JsonObjects
|
|||
public class ProjectSettings
|
||||
{
|
||||
public bool IsOnPremTfsEnabled { get; set; }
|
||||
public int IssueStorageType { get; set; }
|
||||
public IssueStorage IssueStorageType { get; set; }
|
||||
public string SharepointSite { get; set; }
|
||||
public string TfsProjectId { get; set; }
|
||||
public string TfsProjectName { get; set; }
|
||||
|
@ -556,4 +555,10 @@ namespace LCS.JsonObjects
|
|||
public bool IsModified { get; set; }
|
||||
public int WorkflowInstanceId { get; set; }
|
||||
}
|
||||
|
||||
public class JITOptions
|
||||
{
|
||||
public string Label { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using LCS.Forms;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LCS
|
||||
{
|
||||
class NativeMethods
|
||||
{
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetWindow(IntPtr hWnd, int uCmd);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool GetWindowRect(IntPtr hWnd, [Out] out MainForm.RECT lpRect);
|
||||
|
||||
[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
public static extern bool InternetGetCookieEx(string url, string cookieName, StringBuilder cookieData, ref int size, Int32 dwFlags, IntPtr lpReserved);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool IntersectRect([Out] out MainForm.RECT lprcDst, [In] ref MainForm.RECT lprcSrc1, [In] ref MainForm.RECT lprcSrc2);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool IsWindowVisible(IntPtr hWnd);
|
||||
}
|
||||
}
|
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.25.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.25.0.0")]
|
||||
[assembly: AssemblyVersion("0.26.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.26.0.0")]
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace LCS.Properties {
|
|||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Este código fue generado por una herramienta.
|
||||
// Versión de runtime:4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
|
||||
// se vuelve a generar el código.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace LCS.Properties {
|
|||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CsvHelper" version="12.1.2" targetFramework="net461" />
|
||||
<package id="DocX" version="1.3.0" targetFramework="net461" />
|
||||
<package id="HtmlAgilityPack" version="1.11.12" targetFramework="net461" />
|
||||
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net461" />
|
||||
<package id="CsvHelper" version="12.2.1" targetFramework="net472" />
|
||||
<package id="DocX" version="1.5.0" targetFramework="net472" />
|
||||
<package id="HtmlAgilityPack" version="1.11.17" targetFramework="net472" />
|
||||
<package id="Microsoft.CSharp" version="4.6.0" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net472" />
|
||||
<package id="System.Linq.Dynamic" version="1.0.7" targetFramework="net461" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
|
||||
</packages>
|
Загрузка…
Ссылка в новой задаче