fix build w/o webapp
This commit is contained in:
parent
577370ea95
commit
c0eec83ee5
2 changed files with 7 additions and 6 deletions
|
@ -22,12 +22,13 @@ import qualified Data.Text as T
|
||||||
import qualified Control.Exception as E
|
import qualified Control.Exception as E
|
||||||
|
|
||||||
#ifdef WITH_WEBAPP
|
#ifdef WITH_WEBAPP
|
||||||
import Assistant.Monad
|
|
||||||
import Assistant.DaemonStatus
|
import Assistant.DaemonStatus
|
||||||
import Assistant.WebApp.Types
|
import Assistant.WebApp.Types
|
||||||
import Assistant.WebApp
|
import Assistant.WebApp (renderUrl)
|
||||||
import Yesod
|
import Yesod
|
||||||
#endif
|
#endif
|
||||||
|
import Assistant.Monad
|
||||||
|
import Assistant.Types.UrlRenderer
|
||||||
|
|
||||||
{- Makes a button for an alert that opens a Route.
|
{- Makes a button for an alert that opens a Route.
|
||||||
-
|
-
|
||||||
|
@ -181,10 +182,10 @@ showFscking urlrenderer remotename a = do
|
||||||
button <- mkAlertButton False (T.pack "Configure") urlrenderer ConfigFsckR
|
button <- mkAlertButton False (T.pack "Configure") urlrenderer ConfigFsckR
|
||||||
r <- alertDuring (fsckAlert button remotename) $
|
r <- alertDuring (fsckAlert button remotename) $
|
||||||
liftIO a
|
liftIO a
|
||||||
either (liftIO . E.throwIO) return r
|
|
||||||
#else
|
#else
|
||||||
a
|
r <- liftIO a
|
||||||
#endif
|
#endif
|
||||||
|
either (liftIO . E.throwIO) return r
|
||||||
|
|
||||||
brokenRepositoryAlert :: AlertButton -> Alert
|
brokenRepositoryAlert :: AlertButton -> Alert
|
||||||
brokenRepositoryAlert = errorAlert "Serious problems have been detected with your repository. This needs your immediate attention!"
|
brokenRepositoryAlert = errorAlert "Serious problems have been detected with your repository. This needs your immediate attention!"
|
||||||
|
|
|
@ -26,9 +26,9 @@ import Assistant.DaemonStatus
|
||||||
import Assistant.Types.UrlRenderer
|
import Assistant.Types.UrlRenderer
|
||||||
#ifdef WITH_WEBAPP
|
#ifdef WITH_WEBAPP
|
||||||
import Assistant.WebApp.Types
|
import Assistant.WebApp.Types
|
||||||
|
import qualified Data.Text as T
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
import qualified Data.Text as T
|
|
||||||
import Control.Concurrent.Async
|
import Control.Concurrent.Async
|
||||||
|
|
||||||
{- When the FsckResults require a repair, tries to do a non-destructive
|
{- When the FsckResults require a repair, tries to do a non-destructive
|
||||||
|
@ -45,8 +45,8 @@ repairWhenNecessary urlrenderer u mrmt fsckresults
|
||||||
button <- mkAlertButton True (T.pack "Click Here") urlrenderer $
|
button <- mkAlertButton True (T.pack "Click Here") urlrenderer $
|
||||||
RepairRepositoryR u
|
RepairRepositoryR u
|
||||||
void $ addAlert $ brokenRepositoryAlert button
|
void $ addAlert $ brokenRepositoryAlert button
|
||||||
return ok
|
|
||||||
#endif
|
#endif
|
||||||
|
return ok
|
||||||
| otherwise = return False
|
| otherwise = return False
|
||||||
|
|
||||||
runRepair :: UUID -> Maybe Remote -> Bool -> Assistant Bool
|
runRepair :: UUID -> Maybe Remote -> Bool -> Assistant Bool
|
||||||
|
|
Loading…
Reference in a new issue