fix build w/o s3
This commit is contained in:
parent
440d6e331f
commit
8a7e059f54
2 changed files with 6 additions and 0 deletions
|
@ -156,6 +156,7 @@ postAddGlacierR = glacierConfigurator $ do
|
||||||
setStandardGroup (Remote.uuid r) SmallArchiveGroup
|
setStandardGroup (Remote.uuid r) SmallArchiveGroup
|
||||||
|
|
||||||
getEnableS3R :: UUID -> Handler RepHtml
|
getEnableS3R :: UUID -> Handler RepHtml
|
||||||
|
#ifdef WITH_S3
|
||||||
getEnableS3R uuid = do
|
getEnableS3R uuid = do
|
||||||
m <- liftAnnex readRemoteLog
|
m <- liftAnnex readRemoteLog
|
||||||
let host = fromMaybe "" $ M.lookup "host" $
|
let host = fromMaybe "" $ M.lookup "host" $
|
||||||
|
@ -163,6 +164,9 @@ getEnableS3R uuid = do
|
||||||
if S3.isIAHost host
|
if S3.isIAHost host
|
||||||
then redirect $ EnableIAR uuid
|
then redirect $ EnableIAR uuid
|
||||||
else postEnableS3R uuid
|
else postEnableS3R uuid
|
||||||
|
#else
|
||||||
|
getEnableS3R = postEnableS3R
|
||||||
|
#endif
|
||||||
|
|
||||||
postEnableS3R :: UUID -> Handler RepHtml
|
postEnableS3R :: UUID -> Handler RepHtml
|
||||||
#ifdef WITH_S3
|
#ifdef WITH_S3
|
||||||
|
|
|
@ -152,6 +152,7 @@ postEnableIAR = iaConfigurator . enableIARemote
|
||||||
postEnableIAR _ = error "S3 not supported by this build"
|
postEnableIAR _ = error "S3 not supported by this build"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WITH_S3
|
||||||
enableIARemote :: UUID -> Widget
|
enableIARemote :: UUID -> Widget
|
||||||
enableIARemote uuid = do
|
enableIARemote uuid = do
|
||||||
((result, form), enctype) <- lift $
|
((result, form), enctype) <- lift $
|
||||||
|
@ -166,6 +167,7 @@ enableIARemote uuid = do
|
||||||
description <- liftAnnex $
|
description <- liftAnnex $
|
||||||
T.pack <$> Remote.prettyUUID uuid
|
T.pack <$> Remote.prettyUUID uuid
|
||||||
$(widgetFile "configurators/enableia")
|
$(widgetFile "configurators/enableia")
|
||||||
|
#endif
|
||||||
|
|
||||||
{- Convert a description into a bucket item name, which will also be
|
{- Convert a description into a bucket item name, which will also be
|
||||||
- used as the repository name, and the preferreddir.
|
- used as the repository name, and the preferreddir.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue