diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-05-09 00:38:58 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-05-09 00:38:58 +0300 |
| commit | 9e89125330379ae6bc5041f387626bf8df87a5ef (patch) | |
| tree | b8f0a2491f0050e1feb7680a2919d89176159b90 | |
| parent | fc966018497a0b7586bd3594e3936d2de6cc6b4a (diff) | |
| download | Tango-9e89125330379ae6bc5041f387626bf8df87a5ef.tar.gz Tango-9e89125330379ae6bc5041f387626bf8df87a5ef.zip | |
Users & Roles suspend.
Fixed issue with USERS_ROLES on provisioning script.
Buttons design improvements.
22 files changed, 100 insertions, 38 deletions
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/RemoteDesktopView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/RemoteDesktopView.xaml index 247753801..b3a34c3b9 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/RemoteDesktopView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/RemoteDesktopView.xaml @@ -149,8 +149,8 @@ </Grid> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Height="50"> - <controls:TextIconButton Icon="Stop" Padding="0 12" Width="200" Command="{Binding StopCommand}" IsEnabled="{Binding RemoteDesktopProvider.InSession}" Grid.Column="1" Style="{StaticResource FSE_TextIconButton_Dark}">STOP</controls:TextIconButton> - <controls:TextIconButton Icon="Play" Padding="0 12" Width="200" Command="{Binding StartCommand}" IsEnabled="{Binding RemoteDesktopProvider.CanStartSession}" Grid.Column="2" Margin="10 0 0 0" Height="Auto">START</controls:TextIconButton> + <controls:TextIconButton material:ButtonAssist.CornerRadius="25" Icon="Stop" Padding="0 12" Width="200" Command="{Binding StopCommand}" IsEnabled="{Binding RemoteDesktopProvider.InSession}" Grid.Column="1" Style="{StaticResource FSE_TextIconButton_Dark}">STOP</controls:TextIconButton> + <controls:TextIconButton material:ButtonAssist.CornerRadius="25" Icon="Play" Padding="0 12" Width="200" Command="{Binding StartCommand}" IsEnabled="{Binding RemoteDesktopProvider.CanStartSession}" Grid.Column="2" Margin="10 0 0 0" Height="Auto">START</controls:TextIconButton> </StackPanel> </Grid> <Grid> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestDesignerView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestDesignerView.xaml index 9fc2d5b1f..29251ca31 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestDesignerView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestDesignerView.xaml @@ -219,7 +219,7 @@ <DockPanel> <Grid DockPanel.Dock="Bottom"> <StackPanel VerticalAlignment="Top" Margin="10"> - <Button Margin="0 10 0 0" Height="50" Width="Auto" Foreground="{StaticResource FSE_GreenBrush}" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Command="{Binding PublishProjectCommand}"> + <Button material:ButtonAssist.CornerRadius="25" Margin="0 10 0 0" Height="50" Width="Auto" Foreground="{StaticResource FSE_GreenBrush}" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Command="{Binding PublishProjectCommand}"> <DockPanel> <material:PackIcon Kind="Publish" Height="20" Width="20" /> <TextBlock Margin="20 0 0 0" VerticalAlignment="Center" >PUBLISH</TextBlock> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerCatalogView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerCatalogView.xaml index 2af7253ae..f2671a169 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerCatalogView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerCatalogView.xaml @@ -58,7 +58,7 @@ <Polygon Fill="{StaticResource FSE_PrimaryBackgroundLighterBrush}" Points="0,0 150,0 0,170"></Polygon> <DockPanel> <Border CornerRadius="0 0 5 5" Padding="8" BorderThickness="0 1 0 0" BorderBrush="{StaticResource FSE_BorderBrush}" DockPanel.Dock="Bottom" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" > - <Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RunProjectCommand}" CommandParameter="{Binding}" Height="30" Width="140" HorizontalContentAlignment="Stretch" HorizontalAlignment="Right" Style="{StaticResource FSE_RaisedButton_Dark_Hover}"> + <Button material:ButtonAssist.CornerRadius="14" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RunProjectCommand}" CommandParameter="{Binding}" Height="30" Width="140" HorizontalContentAlignment="Stretch" HorizontalAlignment="Right" Style="{StaticResource FSE_RaisedButton_Dark_Hover}"> <DockPanel> <material:PackIcon Kind="Play" Height="24" Width="24" Foreground="{StaticResource FSE_GreenBrush}" /> <TextBlock Margin="20 2 0 0" VerticalAlignment="Center">RUN</TextBlock> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerExecutionView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerExecutionView.xaml index baee19f14..92f23e4b5 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerExecutionView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Views/TestRunnerExecutionView.xaml @@ -58,13 +58,13 @@ <StackPanel HorizontalAlignment="Left" Width="1050" Margin="0 20 0 0"> <DockPanel> <Grid Margin="20 0 0 0" DockPanel.Dock="Right" > - <Button Command="{Binding StartProjectCommand}" Visibility="{Binding ProjectRunner.IsRunning,Converter={StaticResource BooleanToVisibilityInverseConverter}}" IsEnabled="{Binding ProjectRunner.CanRun}" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Width="200" Height="50"> + <Button material:ButtonAssist.CornerRadius="25" Command="{Binding StartProjectCommand}" Visibility="{Binding ProjectRunner.IsRunning,Converter={StaticResource BooleanToVisibilityInverseConverter}}" IsEnabled="{Binding ProjectRunner.CanRun}" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Width="200" Height="50"> <DockPanel> <material:PackIcon Kind="Play" Foreground="{StaticResource FSE_GreenBrush}" Width="24" Height="24" /> <TextBlock Margin="10 0 0 0" VerticalAlignment="Center">START</TextBlock> </DockPanel> </Button> - <Button Command="{Binding StopProjectCommand}" Visibility="{Binding ProjectRunner.IsRunning,Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Width="200" Height="50"> + <Button material:ButtonAssist.CornerRadius="25" Command="{Binding StopProjectCommand}" Visibility="{Binding ProjectRunner.IsRunning,Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Width="200" Height="50"> <DockPanel> <material:PackIcon Kind="Stop" Foreground="{StaticResource FSE_RedBrush}" Width="24" Height="24" /> <TextBlock Margin="10 0 0 0" VerticalAlignment="Center">STOP</TextBlock> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Images/machine-update_gray.png b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Images/machine-update_gray.png Binary files differnew file mode 100644 index 000000000..6e9bba9b3 --- /dev/null +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Images/machine-update_gray.png diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Tango.FSE.Upgrade.csproj b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Tango.FSE.Upgrade.csproj index afc7344f5..3c145d540 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Tango.FSE.Upgrade.csproj +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Tango.FSE.Upgrade.csproj @@ -238,6 +238,9 @@ <Resource Include="Images\flash_drive.png" /> <Resource Include="Images\upgrade_remotely.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\machine-update_gray.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\..\..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/ApplicationUpgradeGeneratedView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/ApplicationUpgradeGeneratedView.xaml index 19816ae0e..3c775f3f3 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/ApplicationUpgradeGeneratedView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/ApplicationUpgradeGeneratedView.xaml @@ -63,13 +63,13 @@ <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="1000"> <DockPanel> <Grid DockPanel.Dock="Right" > - <Button Visibility="{Binding ElementName=chkUpgradeNow,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding StartUpgradeCommand}" HorizontalAlignment="Right" Width="250" Height="50" Style="{StaticResource FSE_RaisedButton_Dark_Hover}"> + <Button material:ButtonAssist.CornerRadius="25" Visibility="{Binding ElementName=chkUpgradeNow,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding StartUpgradeCommand}" HorizontalAlignment="Right" Width="250" Height="50"> <StackPanel Orientation="Horizontal"> <material:PackIcon Width="32" Height="28" Kind="ClockFast" /> <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_LargeFontSize}">UPGRADE NOW</TextBlock> </StackPanel> </Button> - <Button Command="{Binding SaveTupFileCommand}" Visibility="{Binding ElementName=chkSaveToDisk,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="250" Height="50" Style="{StaticResource FSE_RaisedButton_Dark_Hover}"> + <Button material:ButtonAssist.CornerRadius="25" Command="{Binding SaveTupFileCommand}" Visibility="{Binding ElementName=chkSaveToDisk,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="250" Height="50"> <StackPanel Orientation="Horizontal"> <material:PackIcon Width="32" Height="28" Kind="ContentSaveEdit" /> <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_LargeFontSize}">SAVE PACKAGE</TextBlock> @@ -78,7 +78,7 @@ </Grid> <StackPanel VerticalAlignment="Bottom" Margin="0 0 40 0"> - <TextBlock Text="{Binding Handler.Progress.Message}" Style="{StaticResource FSE_HandlerStatusTextBlock}"></TextBlock> + <TextBlock Text="{Binding Handler.Progress.Message}" ToolTip="{Binding Handler.Progress.Message}" TextTrimming="CharacterEllipsis" Style="{StaticResource FSE_HandlerStatusTextBlock}"></TextBlock> <ProgressBar Margin="0 5 0 0" Minimum="0" Maximum="{Binding Handler.Progress.Maximum}" Value="{Binding Handler.Progress.Value}" IsIndeterminate="{Binding Handler.Progress.IsIndeterminate}"></ProgressBar> </StackPanel> </DockPanel> 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 652bce48f..046259d75 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 @@ -76,15 +76,15 @@ <StackPanel HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="1000"> <DockPanel> - <Button Command="{Binding GeneratePackageCommand}" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="250" Height="50" Style="{StaticResource FSE_RaisedButton_Dark_Hover}"> + <Button material:ButtonAssist.CornerRadius="25" Command="{Binding GeneratePackageCommand}" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="250" Height="50"> <StackPanel Orientation="Horizontal"> - <material:PackIcon Width="32" Height="28" Kind="ClockFast" /> + <material:PackIcon Width="32" Height="28" Kind="PackageDown" /> <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_LargeFontSize}">GENERATE PACKAGE</TextBlock> </StackPanel> </Button> <StackPanel VerticalAlignment="Bottom" Margin="0 0 40 0"> - <TextBlock Text="{Binding Handler.Progress.Message}" Style="{StaticResource FSE_HandlerStatusTextBlock}"></TextBlock> + <TextBlock Text="{Binding Handler.Progress.Message}" ToolTip="{Binding Handler.Progress.Message}" TextTrimming="CharacterEllipsis" Style="{StaticResource FSE_HandlerStatusTextBlock}"></TextBlock> <ProgressBar Margin="0 5 0 0" Minimum="0" Maximum="{Binding Handler.Progress.Maximum}" Value="{Binding Handler.Progress.Value}" IsIndeterminate="{Binding Handler.Progress.IsIndeterminate}"></ProgressBar> </StackPanel> </DockPanel> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/FirmwareUpgradeGeneratedView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/FirmwareUpgradeGeneratedView.xaml index 6ee70f44c..a8739b347 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/FirmwareUpgradeGeneratedView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/FirmwareUpgradeGeneratedView.xaml @@ -43,7 +43,7 @@ <DockPanel Margin="0 0 0 0"> <controls:IconButton ToolTip="Browse for .tfp file location" Margin="5 0 0 0" DockPanel.Dock="Right" Icon="FolderOpenOutline" Width="38" Height="38" Command="{Binding SelectTfpFileLocationCommand}" /> - <TextBox FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_PrimaryAccentBrush}" IsReadOnly="True" Text="{Binding TfpFileLocationToSave}" FlowDirection="RightToLeft" VerticalContentAlignment="Bottom"></TextBox> + <TextBox FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_PrimaryAccentBrush}" IsReadOnly="True" Text="{Binding TfpFileLocationToSave}" VerticalContentAlignment="Bottom"></TextBox> </DockPanel> </StackPanel> </StackPanel> @@ -52,13 +52,13 @@ <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="1000"> <DockPanel> <Grid DockPanel.Dock="Right" > - <Button Visibility="{Binding ElementName=chkUpgradeNow,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding StartUpgradeCommand}" HorizontalAlignment="Right" Width="250" Height="50" Style="{StaticResource FSE_RaisedButton_Dark_Hover}"> + <Button material:ButtonAssist.CornerRadius="25" Visibility="{Binding ElementName=chkUpgradeNow,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding StartUpgradeCommand}" HorizontalAlignment="Right" Width="250" Height="50"> <StackPanel Orientation="Horizontal"> <material:PackIcon Width="32" Height="28" Kind="ClockFast" /> <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_LargeFontSize}">UPGRADE NOW</TextBlock> </StackPanel> </Button> - <Button Command="{Binding SaveTfpFileCommand}" Visibility="{Binding ElementName=chkSaveToDisk,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="250" Height="50" Style="{StaticResource FSE_RaisedButton_Dark_Hover}"> + <Button material:ButtonAssist.CornerRadius="25" Command="{Binding SaveTfpFileCommand}" Visibility="{Binding ElementName=chkSaveToDisk,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="250" Height="50"> <StackPanel Orientation="Horizontal"> <material:PackIcon Width="32" Height="28" Kind="ContentSaveEdit" /> <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_LargeFontSize}">SAVE PACKAGE</TextBlock> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/FirmwareUpgradeView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/FirmwareUpgradeView.xaml index 7da85e751..d105c5617 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/FirmwareUpgradeView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/FirmwareUpgradeView.xaml @@ -81,14 +81,14 @@ <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="1000"> <DockPanel> <Grid DockPanel.Dock="Right" HorizontalAlignment="Right" > - <Button Visibility="{Binding ElementName=chkDownload,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding GeneratePackageCommand}" Width="250" Height="50" Style="{StaticResource FSE_RaisedButton_Dark_Hover}"> + <Button material:ButtonAssist.CornerRadius="25" Visibility="{Binding ElementName=chkDownload,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding GeneratePackageCommand}" Width="250" Height="50"> <StackPanel Orientation="Horizontal"> - <material:PackIcon Width="32" Height="28" Kind="ClockFast" /> + <material:PackIcon Width="32" Height="28" Kind="PackageDown" /> <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource FSE_LargeFontSize}" Text="GENERATE PACKAGE"/> </StackPanel> </Button> - <Button Visibility="{Binding ElementName=chkExisting,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding ContinueCommand}" Width="250" Height="50" Style="{StaticResource FSE_RaisedButton_Dark_Hover}"> + <Button material:ButtonAssist.CornerRadius="25" Visibility="{Binding ElementName=chkExisting,Path=IsChecked,Converter={StaticResource BooleanToVisibilityConverter}}" Command="{Binding ContinueCommand}" Width="250" Height="50"> <StackPanel Orientation="Horizontal"> <TextBlock VerticalAlignment="Center" FontSize="{StaticResource FSE_LargeFontSize}">CONTINUE</TextBlock> <material:PackIcon Margin="10 -5 0 0" Width="32" Height="28" Kind="ArrowRight" /> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/MainView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/MainView.xaml index 57363eed8..26a3560c2 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/MainView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/MainView.xaml @@ -22,7 +22,7 @@ </UserControl.Resources> <Grid> - <Image Source="../Images/machine-update2.png" HorizontalAlignment="Right" VerticalAlignment="Top" Stretch="Uniform" Width="800" Margin="80" Opacity="0.6" Visibility="{Binding ResolutionService.IsHighResolution,Converter={StaticResource BooleanToVisibilityConverter}}"></Image> + <Image Source="../Images/machine-update_gray.png" HorizontalAlignment="Right" VerticalAlignment="Top" Stretch="Uniform" Width="800" Margin="80" Opacity="0.1" Visibility="{Binding ResolutionService.IsHighResolution,Converter={StaticResource BooleanToVisibilityConverter}}"></Image> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="0.5*" /> @@ -48,7 +48,7 @@ </Grid.Style> <DockPanel> <DockPanel DockPanel.Dock="Top"> - <Image Source="../Images/remote_upgrade_large.png" Stretch="Uniform" Width="90" RenderOptions.BitmapScalingMode="Fant" /> + <Image Source="../Images/remote_upgrade_large.png" Stretch="Uniform" VerticalAlignment="Top" Width="60" RenderOptions.BitmapScalingMode="Fant" /> <StackPanel Margin="20 0 0 0"> <TextBlock FontSize="{StaticResource FSE_ModuleHeaderFontSize}" Foreground="{StaticResource FSE_PrimaryAccentBrush}">Remote Upgrade Wizard</TextBlock> <TextBlock Margin="0 10 0 0" Foreground="{StaticResource FSE_GrayBrush}"> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/WelcomeView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/WelcomeView.xaml index e82173419..83fa278ee 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/WelcomeView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Upgrade/Views/WelcomeView.xaml @@ -44,7 +44,7 @@ </StackPanel> <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="1000"> - <Button Command="{Binding StartUpgradeCommand}" DockPanel.Dock="Right" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="200" Height="50" Style="{StaticResource FSE_RaisedButton_Dark_Hover}"> + <Button material:ButtonAssist.CornerRadius="25" Command="{Binding StartUpgradeCommand}" DockPanel.Dock="Right" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="250" Height="50"> <StackPanel Orientation="Horizontal"> <TextBlock VerticalAlignment="Center" FontSize="{StaticResource FSE_LargeFontSize}">CONTINUE</TextBlock> <material:PackIcon Margin="10 -5 0 0" Width="32" Height="28" Kind="ArrowRight" /> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Images/users_and_roles.png b/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Images/users_and_roles.png Binary files differindex f45a4b41a..298dfbda2 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Images/users_and_roles.png +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Images/users_and_roles.png diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/ViewModels/OrganizationUsersViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/ViewModels/OrganizationUsersViewVM.cs index 38d43df06..ff3978dff 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/ViewModels/OrganizationUsersViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/ViewModels/OrganizationUsersViewVM.cs @@ -69,6 +69,13 @@ namespace Tango.FSE.UsersAndRoles.ViewModels set { _filter = value; RaisePropertyChangedAuto(); OnFilterChanged(); } } + private bool _showDeleted; + public bool ShowDeleted + { + get { return _showDeleted; } + set { _showDeleted = value; RaisePropertyChangedAuto(); UsersView?.Refresh(); } + } + /// <summary> /// Navigates to the user details view with the specified user. /// </summary> @@ -91,7 +98,7 @@ namespace Tango.FSE.UsersAndRoles.ViewModels { Users = new ObservableCollection<User>(); EditUserCommand = new RelayCommand<User>(EditUser); - RemoveUserCommand = new RelayCommand<User>(RemoveUser); + RemoveUserCommand = new RelayCommand<User>(SuspendUser); AddUserCommand = new RelayCommand(AddUser, () => IsFree); } @@ -103,9 +110,32 @@ namespace Tango.FSE.UsersAndRoles.ViewModels }); } - private void RemoveUser(User user) + private async void SuspendUser(User user) { - NotificationProvider.ShowInfo($"Remove user {user.Contact.FullName}"); + if (await NotificationProvider.ShowWarningQuestion($"Are you sure you want to suspend '{user.Contact.FullName}' ?")) + { + try + { + IsFree = false; + + using (NotificationProvider.PushTaskItem("Suspending account...")) + { + var updatedUser = await Services.OrganizationsService.SuspendUser(user); + Users.Replace(user, updatedUser); + } + + await NotificationProvider.ShowSuccess("The selected user is now suspended and can be reactivated."); + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error suspending user '{user.Email}'."); + await NotificationProvider.ShowError($"Error suspending the selected user\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } + } } private void EditUser(User user) @@ -156,9 +186,9 @@ namespace Tango.FSE.UsersAndRoles.ViewModels var user = obj as User; String filter = Filter ?? String.Empty; - if (user != null && filter.IsNotNullOrEmpty()) + if (user != null) { - return user.Contact.FullName.ToLower().Contains(filter.ToLower()) || user.Email.ToLower().Contains(filter.ToLower()); + return (!filter.IsNotNullOrEmpty() || user.Contact.FullName.ToLower().Contains(filter.ToLower()) || user.Email.ToLower().Contains(filter.ToLower())) && (!user.Deleted || ShowDeleted); } return true; diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/ViewModels/UserDetailsViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/ViewModels/UserDetailsViewVM.cs index 517395cc3..304ee15c5 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/ViewModels/UserDetailsViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/ViewModels/UserDetailsViewVM.cs @@ -162,10 +162,12 @@ namespace Tango.FSE.UsersAndRoles.ViewModels private void InitRolesCollection(User user, List<Role> roles, bool isNew = false) { + bool user_is_current_user_and_fse_admin_and_not_twine_admin = user.Guid == CurrentUser.Guid && user.HasRole(Roles.FSEAdministrator) && !user.HasRole(Roles.FSETwineAdministrator); + var collection = new RolesCollection(); collection.Add(new RoleModel(roles.SingleOrDefault(x => x.RoleEnum == Roles.FSETechnician)) { IsSelected = isNew }); collection.Add(new RoleModel(roles.SingleOrDefault(x => x.RoleEnum == Roles.FSEAdvancedTechnician), Roles.FSETechnician)); - collection.Add(new RoleModel(roles.SingleOrDefault(x => x.RoleEnum == Roles.FSEAdministrator), Roles.FSETechnician, Roles.FSEAdvancedTechnician)); + collection.Add(new RoleModel(roles.SingleOrDefault(x => x.RoleEnum == Roles.FSEAdministrator), Roles.FSETechnician, Roles.FSEAdvancedTechnician) { IsEnabled = !user_is_current_user_and_fse_admin_and_not_twine_admin }); if (CurrentUser.HasRole(Roles.FSETwineAdministrator)) { diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Views/OrganizationSelectionView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Views/OrganizationSelectionView.xaml index cc74f154b..c57ea0ba5 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Views/OrganizationSelectionView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Views/OrganizationSelectionView.xaml @@ -13,9 +13,8 @@ <Grid> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> - <TextBlock TextWrapping="Wrap" TextAlignment="Center" LineHeight="25"> - <Run>Welcome to the users and roles manager.</Run> - <LineBreak/> + <TextBlock HorizontalAlignment="Center" FontSize="{StaticResource FSE_ModuleHeaderFontSize}">Users & Roles</TextBlock> + <TextBlock TextWrapping="Wrap" Margin="0 20 0 0" TextAlignment="Center" LineHeight="25"> <Run>As an organization administrator you will be able to manage/create organization users and assigned them appropriate roles.</Run> </TextBlock> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Views/OrganizationUsersView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Views/OrganizationUsersView.xaml index 3d26f50ca..547243944 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Views/OrganizationUsersView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.UsersAndRoles/Views/OrganizationUsersView.xaml @@ -31,6 +31,7 @@ <material:PackIcon Kind="Search" Foreground="{StaticResource FSE_PrimaryAccentBrush}" VerticalAlignment="Center" Width="24" Height="24" Margin="0 0 5 0" /> <TextBox material:HintAssist.Hint="Search" Text="{Binding Filter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,Delay=500}" Background="{StaticResource FSE_PrimaryBackgroundBrush}" Width="300" Style="{StaticResource FSE_Rounded_Corners_TextBox}" Height="33"></TextBox> </DockPanel> + <controls:ToggleIconButton IsChecked="{Binding ShowDeleted}" Width="24" Height="24" Cursor="Hand" UncheckedForeground="{StaticResource FSE_GrayBrush}" CheckedForeground="{StaticResource FSE_RedBrush}" ToolTip="Show suspended accounts" Margin="0 0 20 0" UncheckedIcon="EyeOutline" CheckedIcon="EyeCheckOutline"></controls:ToggleIconButton> <controls:TextIconButton material:ButtonAssist.CornerRadius="15" Command="{Binding AddUserCommand}" Icon="Add" Width="150">ADD USER</controls:TextIconButton> </StackPanel> </Grid> @@ -51,18 +52,18 @@ </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> - <DataGridTemplateColumn Header="NAME" SortMemberPath="Contact.FullName"> + <DataGridTemplateColumn Header="NAME" SortMemberPath="Contact.FullName" Width="120"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> - <TextBlock VerticalAlignment="Center" Text="{Binding Contact.FullName}"></TextBlock> + <TextBlock VerticalAlignment="Center" TextTrimming="CharacterEllipsis" Text="{Binding Contact.FullName}"></TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> - <DataGridTemplateColumn Header="EMAIL" SortMemberPath="Email"> + <DataGridTemplateColumn Header="EMAIL" SortMemberPath="Email" Width="210"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> - <TextBlock VerticalAlignment="Center" Text="{Binding Email}"></TextBlock> + <TextBlock VerticalAlignment="Center" Text="{Binding Email}" TextTrimming="CharacterEllipsis"></TextBlock> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> @@ -86,7 +87,7 @@ </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> - <TextBlock Margin="0 0 5 0" VerticalAlignment="Center"> + <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}" Margin="0 0 5 0" VerticalAlignment="Center"> <Run Text="{Binding Description}"></Run>, </TextBlock> </DataTemplate> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/OrganizationsService.cs b/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/OrganizationsService.cs index 5fd010bf1..57b448d2e 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/OrganizationsService.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.BL/Services/OrganizationsService.cs @@ -176,6 +176,33 @@ namespace Tango.FSE.BL.Services }); } + public Task<User> SuspendUser(User user) + { + return Task.Factory.StartNew<User>(() => + { + Authentication.ThrowIfNoPermission(Permissions.FSE_ManageOrganizationUsersAndRoles); + ConnectivityProvider.ThrowIfNoInternet(); + + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + try + { + user.LastUpdated = DateTime.UtcNow; + user.Deleted = true; + db.Users.Attach(user, EntityState.Modified); + db.UsersRoles.DetachRange(user.UsersRoles.ToList()); + db.SaveChanges(); + return GetUserDetails(user.Guid).Result; + } + catch (Exception ex) + { + user.Deleted = false; + throw ex; + } + } + }); + } + public String GenerateRandomPassword() { String pass = String.Empty; diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml index beab53889..5f5adfe59 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LayoutView.xaml @@ -275,7 +275,7 @@ </Grid> </Grid> <Grid> - <Button Margin="0 15 80 15" IsEnabled="{Binding MachineProvider.IsBusy,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" Command="{Binding ToggleConnectionPaneCommand}" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" VerticalAlignment="Center"> + <Button Margin="0 15 80 15" material:ButtonAssist.CornerRadius="15" IsEnabled="{Binding MachineProvider.IsBusy,Mode=OneWay,Converter={StaticResource BooleanInverseConverter}}" Command="{Binding ToggleConnectionPaneCommand}" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" VerticalAlignment="Center"> <StackPanel Orientation="Horizontal"> <Grid> <Image Source="{StaticResource FSE_Machine_Small}" RenderOptions.BitmapScalingMode="Fant"></Image> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoadingView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoadingView.xaml index e7536ae42..d860bf6de 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoadingView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoadingView.xaml @@ -32,7 +32,7 @@ <Image Source="{StaticResource FSE_Twine_Logo}" HorizontalAlignment="Left" VerticalAlignment="Top" RenderOptions.BitmapScalingMode="Fant" Stretch="Uniform" Margin="20" Width="300"></Image> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 -100 0 0"> <ProgressBar Width="200" Height="200" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="{Binding IsLoading}" Style="{StaticResource MaterialDesignCircularProgressBar}" Value="0" /> - <TextBlock FontSize="20" Margin="0 30 0 0">Loading, please wait...</TextBlock> + <TextBlock FontSize="20" Margin="0 30 0 0">loading, please wait...</TextBlock> </StackPanel> </Grid> </UserControl> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoginView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoginView.xaml index 515c93ef5..983e9916b 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoginView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoginView.xaml @@ -63,7 +63,7 @@ <ComboBox Margin="0 20 0 0" material:HintAssist.Hint="Environment" material:HintAssist.IsFloating="True" ItemsSource="{Binding Services.GatewayService.Environments}" SelectedItem="{Binding SelectedEnvironment}" DisplayMemberPath="Description"></ComboBox> - <CheckBox Margin="0 10 0 0" IsChecked="{Binding RememberMe}">Remember my password</CheckBox> + <CheckBox Margin="0 10 0 0" IsChecked="{Binding RememberMe}">remember my password</CheckBox> <Button IsDefault="True" Margin="0 40 0 0" Height="50" material:ButtonAssist.CornerRadius="24" Command="{Binding LoginCommand}">LOGIN</Button> </StackPanel> diff --git a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml Binary files differindex b8c949c2a..8f60372b0 100644 --- a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml +++ b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml |
