chore(avs): remove dangerous test button
This commit is contained in:
parent
172181f1c6
commit
b3a87c440c
@ -40,7 +40,7 @@ single = uncurry Map.singleton
|
|||||||
|
|
||||||
|
|
||||||
-- Button only needed in AVS TEST; further buttons see below
|
-- 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)
|
deriving (Enum, Eq, Ord, Bounded, Read, Show, Generic)
|
||||||
instance Universe ButtonAvsTest
|
instance Universe ButtonAvsTest
|
||||||
instance Finite ButtonAvsTest
|
instance Finite ButtonAvsTest
|
||||||
@ -49,9 +49,9 @@ nullaryPathPiece ''ButtonAvsTest camelToPathPiece
|
|||||||
|
|
||||||
instance Button UniWorX ButtonAvsTest where
|
instance Button UniWorX ButtonAvsTest where
|
||||||
btnLabel BtnCheckLicences = "Check all licences" -- could be msg
|
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 BtnCheckLicences = [BCIsButton, BCPrimary]
|
||||||
btnClasses BtnSynchLicences = [BCIsButton, BCDanger]
|
-- btnClasses BtnSynchLicences = [BCIsButton, BCDanger]
|
||||||
-- END Button
|
-- END Button
|
||||||
|
|
||||||
|
|
||||||
@ -242,16 +242,16 @@ postAdminAvsR = do
|
|||||||
(Left e) -> do
|
(Left e) -> do
|
||||||
let msg = tshow (e :: SomeException)
|
let msg = tshow (e :: SomeException)
|
||||||
return $ Just [whamlet|<h2>Licence check error:</h2> #{msg}|]
|
return $ Just [whamlet|<h2>Licence check error:</h2> #{msg}|]
|
||||||
(Just BtnSynchLicences) -> do
|
-- (Just BtnSynchLicences) -> do
|
||||||
res <- try synchAvsLicences
|
-- res <- try synchAvsLicences
|
||||||
case res of
|
-- case res of
|
||||||
(Right True) ->
|
-- (Right True) ->
|
||||||
return $ Just [whamlet|<h2>Success:</h2> Licences sychronized.|]
|
-- return $ Just [whamlet|<h2>Success:</h2> Licences sychronized.|]
|
||||||
(Right False) ->
|
-- (Right False) ->
|
||||||
return $ Just [whamlet|<h2>Error:</h2> Licences could not be synchronized, see error log.|]
|
-- return $ Just [whamlet|<h2>Error:</h2> Licences could not be synchronized, see error log.|]
|
||||||
(Left e) -> do
|
-- (Left e) -> do
|
||||||
let msg = tshow (e :: SomeException)
|
-- let msg = tshow (e :: SomeException)
|
||||||
return $ Just [whamlet|<h2>Licence synchronisation error:</h2> #{msg}|]
|
-- return $ Just [whamlet|<h2>Licence synchronisation error:</h2> #{msg}|]
|
||||||
|
|
||||||
actionUrl <- fromMaybe AdminAvsR <$> getCurrentRoute
|
actionUrl <- fromMaybe AdminAvsR <$> getCurrentRoute
|
||||||
siteLayoutMsg MsgMenuAvs $ do
|
siteLayoutMsg MsgMenuAvs $ do
|
||||||
|
|||||||
Reference in New Issue
Block a user