webapp: Remove the "disable remote" feature from the UI.

It's confusing, easy to select by accident and get into a situation the
webapp offers no easy recovery from, and pausing syncing works just as well
in most situations.
This commit is contained in:
Joey Hess 2015-09-21 13:05:44 -04:00
parent d3af2bd64f
commit 3058e11520
5 changed files with 20 additions and 9 deletions

View file

@ -47,11 +47,6 @@ handleXMPPRemoval uuid nonxmpp = do
then deletionPage $ $(widgetFile "configurators/delete/xmpp")
else nonxmpp
getDisableRepositoryR :: UUID -> Handler Html
getDisableRepositoryR uuid = notCurrentRepo uuid $ handleXMPPRemoval uuid $ do
void $ liftAssistant $ disableRemote uuid
redirect DashboardR
getDeleteRepositoryR :: UUID -> Handler Html
getDeleteRepositoryR uuid = notCurrentRepo uuid $ handleXMPPRemoval uuid $ do
deletionPage $ do

View file

@ -87,7 +87,6 @@
/config/repository/reorder RepositoriesReorderR GET
/config/repository/syncnow/#UUID SyncNowRepositoryR GET
/config/repository/disable/#UUID DisableRepositoryR GET
/config/repository/delete/confirm/#UUID DeleteRepositoryR GET
/config/repository/delete/start/#UUID StartDeleteRepositoryR GET

1
debian/changelog vendored
View file

@ -3,6 +3,7 @@ git-annex (5.20150917) UNRELEASED; urgency=medium
* info: Don't allow use in a non-git-annex repository, since it
uses the git-annex branch and would create it if it were missing.
* assistant: When updating ~/.ssh/config, preserve any symlinks.
* webapp: Remove the "disable remote" feature from the UI.
-- Joey Hess <id@joeyh.name> Wed, 16 Sep 2015 12:23:33 -0400

View file

@ -0,0 +1,19 @@
[[!comment format=mdwn
username="joey"
subject="""comment 2"""
date="2015-09-21T16:55:47Z"
content="""
Disabling a remote is a weak form of deleting it; the remote repository is
left as-is, but the git remote is removed so git-annex won't sync with it,
and the webapp won't show it.
I don't know if it makes sense for the webapp to expose this possibility.
It seems that it certianly doesn't makes sense to do it without getting
confirmation, since to re-enable the repository, the user has to do some
probably unknown to them process to set it back up.
In your case, I think that re-doing the pairing process would get them back
to how they were.
On consideration, I am going to remove this feature from the webapp UI.
"""]]

View file

@ -60,9 +60,6 @@
<a href="@{SyncNowRepositoryR $ asUUID repoid}">
<span .glyphicon .glyphicon-refresh>
\ Sync now
<a href="@{DisableRepositoryR $ asUUID repoid}">
<span .glyphicon .glyphicon-minus>
\ Disable
<a href="@{DeleteRepositoryR $ asUUID repoid}">
<span .glyphicon .glyphicon-trash>
\ Delete