webapp: New preferences page allows enabling/disabling debug logging at runtime, as well as configuring numcopies and diskreserve.
This commit is contained in:
parent
d7ad02f893
commit
08bdea7e52
13 changed files with 174 additions and 58 deletions
|
@ -154,7 +154,7 @@ getNewRepositoryR = page "Add another repository" (Just Configuration) $ do
|
|||
liftIO $ makeRepo path False
|
||||
u <- liftIO $ initRepo True path Nothing
|
||||
lift $ runAnnex () $ setStandardGroup u ClientGroup
|
||||
liftIO $ addAutoStart path
|
||||
liftIO $ addAutoStartFile path
|
||||
liftIO $ startAssistant path
|
||||
askcombine u path
|
||||
_ -> $(widgetFile "configurators/newrepository")
|
||||
|
@ -274,7 +274,7 @@ startFullAssistant path = do
|
|||
u <- initRepo True path Nothing
|
||||
inDir path $
|
||||
setStandardGroup u ClientGroup
|
||||
addAutoStart path
|
||||
addAutoStartFile path
|
||||
changeWorkingDirectory path
|
||||
fromJust $ postFirstRun webapp
|
||||
redirect $ T.pack url
|
||||
|
@ -323,13 +323,6 @@ initRepo primary_assistant_repo dir desc = inDir dir $ do
|
|||
[Param "config", Param "gc.auto", Param "0"]
|
||||
getUUID
|
||||
|
||||
{- Adds a directory to the autostart file. -}
|
||||
addAutoStart :: FilePath -> IO ()
|
||||
addAutoStart path = do
|
||||
autostart <- autoStartFile
|
||||
createDirectoryIfMissing True (parentDir autostart)
|
||||
appendFile autostart $ path ++ "\n"
|
||||
|
||||
{- Checks if the user can write to a directory.
|
||||
-
|
||||
- The directory may be in the process of being created; if so
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue