mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
syncthing: Minor styling fixes
This commit is contained in:
parent
551bd7b92c
commit
277cd45342
@ -1 +1 @@
|
|||||||
plinth.modules.syncthing
|
plinth.modules.syncthing
|
||||||
|
|||||||
@ -14,12 +14,11 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Plinth module to configure Syncthing.
|
Plinth module to configure Syncthing.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from plinth import actions
|
from plinth import actions
|
||||||
@ -88,13 +87,14 @@ def setup(helper, old_version=None):
|
|||||||
|
|
||||||
|
|
||||||
def add_shortcut():
|
def add_shortcut():
|
||||||
|
"""Helper method to add a shortcut to the frontpage."""
|
||||||
frontpage.add_shortcut(
|
frontpage.add_shortcut(
|
||||||
'syncthing', title, url='/syncthing/', login_required=True)
|
'syncthing', title, url='/syncthing/', login_required=True)
|
||||||
|
|
||||||
|
|
||||||
def is_enabled():
|
def is_enabled():
|
||||||
"""Return whether the module is enabled."""
|
"""Return whether the module is enabled."""
|
||||||
return (action_utils.service_is_running('syncthing@syncthing.service') and
|
return (action_utils.service_is_enabled('syncthing@syncthing') and
|
||||||
action_utils.webserver_is_enabled('syncthing-plinth'))
|
action_utils.webserver_is_enabled('syncthing-plinth'))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ urlpatterns = [
|
|||||||
url(r'^apps/syncthing/$',
|
url(r'^apps/syncthing/$',
|
||||||
ServiceView.as_view(
|
ServiceView.as_view(
|
||||||
service_id=syncthing.managed_services[0],
|
service_id=syncthing.managed_services[0],
|
||||||
diagnostics_module_name="syncthing",
|
diagnostics_module_name='syncthing',
|
||||||
description=syncthing.description,
|
description=syncthing.description,
|
||||||
show_status_block=True),
|
show_status_block=True),
|
||||||
name='index'),
|
name='index'),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user