+ The page will only appear once some files #
+ have been uploaded, and the Internet Archive has processed them.
+|]
+ where
+ bucket = fromMaybe "" $ M.lookup "bucket" c
+#ifdef WITH_S3
+ url = S3.iaItemUrl bucket
+#else
+ url = ""
+#endif
diff --git a/Assistant/WebApp/RepoList.hs b/Assistant/WebApp/RepoList.hs
index 6b35fdf98a..f7d10468b8 100644
--- a/Assistant/WebApp/RepoList.hs
+++ b/Assistant/WebApp/RepoList.hs
@@ -163,19 +163,17 @@ repoList reposelector
selectedremote (Just (iscloud, _))
| onlyCloud reposelector = iscloud
| otherwise = True
- findinfo m u = case M.lookup u m of
- Nothing -> Nothing
- Just c -> case M.lookup "type" c of
- Just "rsync" -> val True EnableRsyncR
- Just "directory" -> val False EnableDirectoryR
+ findinfo m u = case M.lookup "type" =<< M.lookup u m of
+ Just "rsync" -> val True EnableRsyncR
+ Just "directory" -> val False EnableDirectoryR
#ifdef WITH_S3
- Just "S3" -> val True EnableS3R
+ Just "S3" -> val True EnableS3R
#endif
- Just "glacier" -> val True EnableGlacierR
+ Just "glacier" -> val True EnableGlacierR
#ifdef WITH_WEBDAV
- Just "webdav" -> val True EnableWebDAVR
+ Just "webdav" -> val True EnableWebDAVR
#endif
- _ -> Nothing
+ _ -> Nothing
where
val iscloud r = Just (iscloud, (u, DisabledRepoActions $ r u))
list l = liftAnnex $ do
diff --git a/Remote/S3.hs b/Remote/S3.hs
index 7df1c2df38..5db5b705da 100644
--- a/Remote/S3.hs
+++ b/Remote/S3.hs
@@ -5,7 +5,7 @@
- Licensed under the GNU GPL version 3 or higher.
-}
-module Remote.S3 (remote, iaHost, isIAHost) where
+module Remote.S3 (remote, iaHost, isIA, isIAHost, iaItemUrl) where
import Network.AWS.AWSConnection
import Network.AWS.S3Object
@@ -283,3 +283,6 @@ isIA c = maybe False isIAHost (M.lookup "host" c)
isIAHost :: HostName -> Bool
isIAHost h = ".archive.org" `isSuffixOf` map toLower h
+
+iaItemUrl :: String -> String
+iaItemUrl bucket = "http://archive.org/details/" ++ bucket
diff --git a/debian/changelog b/debian/changelog
index 31c53be58d..c61579885e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -35,6 +35,8 @@ git-annex (4.20130418) UNRELEASED; urgency=low
* webapp: Can now set up Internet Archive repositories.
* S3: Dropping content from the Internet Archive doesn't work, but
their API indicates it does. Always refuse to drop from there.
+ * webapp: Display some additional information about a repository on its edit
+ page.
-- Joey Hess
In a hurry? Feel free to skip this step! You can always come back #
and configure this repository later.
+
+ ^{repoInfo}
+ Repository information
+