diff options
| author | Roy <Roy.mail.net@gmail.com> | 2022-11-02 04:49:10 +0200 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2022-11-02 04:49:10 +0200 |
| commit | 992208add11db73cb1ffb48c5ccedb0c883aafd0 (patch) | |
| tree | e8b753bca8f341c105b8b1cb7761e2282a13881e /Software/Visual_Studio/FSE | |
| parent | 5ab455fb09c659e92ad4de41ec7472e2b8e48499 (diff) | |
| download | Tango-992208add11db73cb1ffb48c5ccedb0c883aafd0.tar.gz Tango-992208add11db73cb1ffb48c5ccedb0c883aafd0.zip | |
PPC multi version support completed on PPC,FSE,MS,DB.
Diffstat (limited to 'Software/Visual_Studio/FSE')
7 files changed, 20 insertions, 9 deletions
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Themes/Generic.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Themes/Generic.xaml index abed2be24..8ce8e5f3c 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Themes/Generic.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Insights/Themes/Generic.xaml @@ -513,7 +513,7 @@ </Style> </TextBlock.Style> <Run>Application Version:</Run> - <Run Text="{Binding Update.ApplicationVersion,Mode=OneWay}"></Run> + <Run Text="{Binding Update.VersionAndTag,Mode=OneWay}"></Run> <LineBreak/> <Run>Firmware Version:</Run> <Run Text="{Binding Update.FirmwareVersion,Mode=OneWay}"></Run> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/UpdatesView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/UpdatesView.xaml index cea119637..c8e3a2a0b 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/UpdatesView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/UpdatesView.xaml @@ -62,7 +62,7 @@ </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> <DataGridTextColumn Header="STARTED" Binding="{Binding StartDate,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="120" /> - <DataGridTextColumn Header="APPLICATION" Binding="{Binding ApplicationVersion}" Width="Auto" /> + <DataGridTextColumn Header="APPLICATION" Binding="{Binding VersionAndTag}" Width="Auto" /> <DataGridTextColumn Header="FIRMWARE" Binding="{Binding FirmwareVersion}" Width="Auto" /> <DataGridTextColumn Header="ENDED" Binding="{Binding EndDate,TargetNullValue='Never',FallbackValue='Never',Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="Auto" /> <DataGridTextColumn Header="STATUS" Binding="{Binding UpdateStatus,Converter={StaticResource EnumToDescriptionConverter}}" Width="Auto" /> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/ViewModels/ApplicationUpgradeViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/ViewModels/ApplicationUpgradeViewVM.cs index fbcd87d5e..5b539e2d7 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/ViewModels/ApplicationUpgradeViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/ViewModels/ApplicationUpgradeViewVM.cs @@ -76,6 +76,17 @@ namespace Tango.FSE.Upgrade.ViewModels { IsFree = false; + if (MachineProvider.IsPPCAvailable) + { + var machine = await Services.MachinesService.GetMachine(MachineProvider.Machine.SerialNumber); + if (machine.VersionTag != SelectedVersion.Tag) + { + IsFree = true; + await NotificationProvider.ShowError($"The selected machine cannot be updated to version '{SelectedVersion.VersionAndTag}'.\nPlease modify the machine version tag first."); + return; + } + } + var temporaryTupFile = TemporaryManager.CreateImaginaryFile(".tup"); Handler = await RemoteUpgradeManager.CreateTupFile(SelectedVersion, SelectedMachine.SerialNumber, temporaryTupFile); diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/ApplicationUpgradeView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/ApplicationUpgradeView.xaml index 3a1ab183d..4da59bb98 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/ApplicationUpgradeView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/ApplicationUpgradeView.xaml @@ -56,7 +56,7 @@ <StackPanel> <TextBlock> <Run Foreground="{StaticResource FSE_GrayBrush}">Application:</Run> - <Run>v</Run><Run Text="{Binding Version}"></Run> + <Run>v</Run><Run Text="{Binding VersionAndTag,Mode=OneWay}"></Run> </TextBlock> <TextBlock Margin="0 5 0 0"> <Run Foreground="{StaticResource FSE_GrayBrush}">Firmware:</Run> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/MachineConfigurationService.cs b/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/MachineConfigurationService.cs index 3ed02b0ac..3b33719d0 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/MachineConfigurationService.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/MachineConfigurationService.cs @@ -70,8 +70,8 @@ namespace Tango.FSE.BL.Services composition.HardwareVersions = db.HardwareVersions.OrderByDescending(x => x.Version).ToList(); //Tags - composition.Tags = db.TangoVersions.Select(x => x.Tag).Distinct().ToList(); - composition.Tags.Insert(0, null); + composition.Tags = db.TangoVersions.Select(x => x.Tag).Where(x => x != null).Distinct().ToList(); + composition.Tags.Insert(0, String.Empty); //Counters var jobRuns = db.JobRuns.Where(x => x.MachineGuid == machineGuid).Select(x => new { x.StartDate, x.EndDate, x.EndPosition }).ToList(); diff --git a/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/TangoVersionsService.cs b/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/TangoVersionsService.cs index 091fa24d5..32c7b5b04 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/TangoVersionsService.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/TangoVersionsService.cs @@ -173,7 +173,7 @@ namespace Tango.FSE.BL.Services private String CreateCachedTangoVersionFileName(TangoVersion version) { - return $"$/TangoVersions/application_package_v{version.Version}.tup"; + return $"$/TangoVersions/application_package_v{version.VersionAndTag}.tup"; } private String CreateCachedFirmwareVersionFileName(TangoVersion version) diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteUpgrade/DefaultRemoteUpgradeManager.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteUpgrade/DefaultRemoteUpgradeManager.cs index fb2faf9a6..f822c933b 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteUpgrade/DefaultRemoteUpgradeManager.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/RemoteUpgrade/DefaultRemoteUpgradeManager.cs @@ -182,7 +182,7 @@ namespace Tango.FSE.UI.RemoteUpgrade } } - handler.UpdateProgress($"Downloading Tango version '{tangoVersion.Version}'..."); + handler.UpdateProgress($"Downloading Tango version '{tangoVersion.VersionAndTag}'..."); LogManager.Log("Connecting to machine service..."); @@ -193,7 +193,7 @@ namespace Tango.FSE.UI.RemoteUpgrade var remoteDataSource = response.DataSource; - LogManager.Log($"Checking for a cached tup file for version '{tangoVersion.Version}'..."); + LogManager.Log($"Checking for a cached tup file for version '{tangoVersion.VersionAndTag}'..."); bool hasCachedFile = false; @@ -218,7 +218,7 @@ namespace Tango.FSE.UI.RemoteUpgrade { downloader.Progress += (x, e) => { - handler.UpdateProgress($"Downloading Tango version '{response.Version}'...", false, e.Current, e.Total); + handler.UpdateProgress($"Downloading Tango version '{tangoVersion.VersionAndTag}'...", false, e.Current, e.Total); }; downloader.ResolveMode().GetAwaiter().GetResult(); |
