show direct/indirect mode
This commit is contained in:
parent
cfe354eccd
commit
cf129c2545
1 changed files with 6 additions and 0 deletions
|
@ -69,6 +69,7 @@ fast_stats :: [Stat]
|
|||
fast_stats =
|
||||
[ supported_backends
|
||||
, supported_remote_types
|
||||
, repository_mode
|
||||
, remote_list Trusted
|
||||
, remote_list SemiTrusted
|
||||
, remote_list UnTrusted
|
||||
|
@ -127,6 +128,11 @@ supported_remote_types :: Stat
|
|||
supported_remote_types = stat "supported remote types" $ json unwords $
|
||||
return $ map R.typename Remote.remoteTypes
|
||||
|
||||
repository_mode :: Stat
|
||||
repository_mode = stat "repository mode" $ json id $ lift $
|
||||
ifM isDirect
|
||||
( return "direct", return "indirect" )
|
||||
|
||||
remote_list :: TrustLevel -> Stat
|
||||
remote_list level = stat n $ nojson $ lift $ do
|
||||
us <- M.keys <$> (M.union <$> uuidMap <*> remoteMap Remote.name)
|
||||
|
|
Loading…
Reference in a new issue