From b3a87c440c2e094fc5f960692a3e7f126519d295 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Fri, 20 Jan 2023 10:43:58 +0100 Subject: [PATCH] chore(avs): remove dangerous test button --- src/Handler/Admin/Avs.hs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Handler/Admin/Avs.hs b/src/Handler/Admin/Avs.hs index c5ec10082..32baec476 100644 --- a/src/Handler/Admin/Avs.hs +++ b/src/Handler/Admin/Avs.hs @@ -40,7 +40,7 @@ single = uncurry Map.singleton -- Button only needed in AVS TEST; further buttons see below -data ButtonAvsTest = BtnCheckLicences | BtnSynchLicences +data ButtonAvsTest = BtnCheckLicences -- | BtnSynchLicences deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic) instance Universe ButtonAvsTest instance Finite ButtonAvsTest @@ -49,9 +49,9 @@ nullaryPathPiece ''ButtonAvsTest camelToPathPiece instance Button UniWorX ButtonAvsTest where btnLabel BtnCheckLicences = "Check all licences" -- could be msg - btnLabel BtnSynchLicences = "Synchronize all licences" -- could be msg + -- btnLabel BtnSynchLicences = "Synchronize all licences" -- could be msg btnClasses BtnCheckLicences = [BCIsButton, BCPrimary] - btnClasses BtnSynchLicences = [BCIsButton, BCDanger] + -- btnClasses BtnSynchLicences = [BCIsButton, BCDanger] -- END Button @@ -242,16 +242,16 @@ postAdminAvsR = do (Left e) -> do let msg = tshow (e :: SomeException) return $ Just [whamlet|

Licence check error:

#{msg}|] - (Just BtnSynchLicences) -> do - res <- try synchAvsLicences - case res of - (Right True) -> - return $ Just [whamlet|

Success:

Licences sychronized.|] - (Right False) -> - return $ Just [whamlet|

Error:

Licences could not be synchronized, see error log.|] - (Left e) -> do - let msg = tshow (e :: SomeException) - return $ Just [whamlet|

Licence synchronisation error:

#{msg}|] + -- (Just BtnSynchLicences) -> do + -- res <- try synchAvsLicences + -- case res of + -- (Right True) -> + -- return $ Just [whamlet|

Success:

Licences sychronized.|] + -- (Right False) -> + -- return $ Just [whamlet|

Error:

Licences could not be synchronized, see error log.|] + -- (Left e) -> do + -- let msg = tshow (e :: SomeException) + -- return $ Just [whamlet|

Licence synchronisation error:

#{msg}|] actionUrl <- fromMaybe AdminAvsR <$> getCurrentRoute siteLayoutMsg MsgMenuAvs $ do