diff --git a/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml b/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml
index 39b1d735b7..8dd1ee8c6b 100644
--- a/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml
+++ b/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml
@@ -1,28 +1,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml.cs b/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml.cs
index d0a89e42f1..374e522540 100644
--- a/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml.cs
+++ b/Ginger/Ginger/Environments/AddEnvironmentWizardLib/AddNewEnvAppsPage.xaml.cs
@@ -17,6 +17,9 @@ limitations under the License.
#endregion
using amdocs.ginger.GingerCoreNET;
+using Amdocs.Ginger.Common;
+using Ginger.UserControls;
+using GingerCore;
using GingerCore.Environments;
using GingerCoreNET.SolutionRepositoryLib.RepositoryObjectsLib.PlatformsLib;
using GingerWPF.WizardLib;
@@ -36,6 +39,15 @@ public partial class AddNewEnvAppsPage : Page, IWizardPage
public AddNewEnvAppsPage()
{
InitializeComponent();
+ GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);
+ view.GridColsView = new ObservableList();
+ view.GridColsView.Add(new GridColView() { Field = nameof(EnvApplication.Active), Header = " " , StyleType = GridColView.eGridColStyleType.CheckBox });
+ view.GridColsView.Add(new GridColView() { Field = nameof(EnvApplication.Name), Header = GingerDicser.GetTermResValue(eTermResKey.TargetApplication), WidthWeight = 60});
+ view.GridColsView.Add(new GridColView() { Field = nameof(EnvApplication.ItemImageType), Header = " ", StyleType = GridColView.eGridColStyleType.ImageMaker, WidthWeight = 5, MaxWidth = 16 });
+ view.GridColsView.Add(new GridColView() { Field = nameof(EnvApplication.Platform),Header = "Platform Type" , WidthWeight = 40 });
+
+ SelectApplicationGrid.SetAllColumnsDefaultView(view);
+ SelectApplicationGrid.InitViewItems();
}
public void WizardEvent(WizardEventArgs WizardEventArgs)
@@ -47,19 +59,18 @@ public void WizardEvent(WizardEventArgs WizardEventArgs)
foreach (ApplicationPlatform appPlat in WorkSpace.Instance.Solution.ApplicationPlatforms)
{
- EnvApplication envApp = new EnvApplication() { Name = appPlat.AppName };
+ EnvApplication envApp = new EnvApplication() { Name = appPlat.AppName, Platform = appPlat.Platform, ParentGuid = appPlat.Guid, ItemImageType = appPlat.PlatformImage };
envApp.Active = true;
mWizard.apps.Add(envApp);
}
if (mWizard.apps.Count == 0)
{
- mWizard.apps.Add(new EnvApplication() { Name = "MyApplication" });
+ mWizard.apps.Add(new EnvApplication() { Name = "MyApplication", Platform = ePlatformType.NA });
}
- xAppsListBox.ItemsSource = mWizard.apps;
+ SelectApplicationGrid.DataSourceList = mWizard.apps;
break;
-
}
}
diff --git a/Ginger/GingerCoreCommon/EnvironmentLib/EnvApplication.cs b/Ginger/GingerCoreCommon/EnvironmentLib/EnvApplication.cs
index 3ef029ca0c..b1af21cef3 100644
--- a/Ginger/GingerCoreCommon/EnvironmentLib/EnvApplication.cs
+++ b/Ginger/GingerCoreCommon/EnvironmentLib/EnvApplication.cs
@@ -119,7 +119,11 @@ public override string ItemNameField
return nameof(this.Name);
}
}
-
+ public ePlatformType Platform
+ {
+ get;
+ set;
+ }
public void SetPlatFormImage(ObservableList ApplicationPlatforms)
{
ApplicationPlatform applicationPlatform = ApplicationPlatforms.FirstOrDefault((app)=>app.Guid.Equals(this.ParentGuid));
diff --git a/Ginger/GingerTest/EnvironemntsLib/EnvsTest.cs b/Ginger/GingerTest/EnvironemntsLib/EnvsTest.cs
index 612b81ea0e..9bd64cde8a 100644
--- a/Ginger/GingerTest/EnvironemntsLib/EnvsTest.cs
+++ b/Ginger/GingerTest/EnvironemntsLib/EnvsTest.cs
@@ -107,6 +107,7 @@ public void AddEnvUsingWizard()
// assert
Assert.AreEqual("bbb", bbbEnv.Name);
+ Assert.AreEqual(bbbEnv.Applications.Count, WorkSpace.Instance.Solution.ApplicationPlatforms.Count);
}