syncthing: Minor styling fixes

This commit is contained in:
Sunil Mohan Adapa 2017-03-23 14:42:29 +05:30
parent 551bd7b92c
commit 277cd45342
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
3 changed files with 5 additions and 5 deletions

View File

@ -1 +1 @@
plinth.modules.syncthing
plinth.modules.syncthing

View File

@ -14,12 +14,11 @@
# 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/>.
#
"""
Plinth module to configure Syncthing.
"""
import subprocess
from django.utils.translation import ugettext_lazy as _
from plinth import actions
@ -88,13 +87,14 @@ def setup(helper, old_version=None):
def add_shortcut():
"""Helper method to add a shortcut to the frontpage."""
frontpage.add_shortcut(
'syncthing', title, url='/syncthing/', login_required=True)
def 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'))

View File

@ -27,7 +27,7 @@ urlpatterns = [
url(r'^apps/syncthing/$',
ServiceView.as_view(
service_id=syncthing.managed_services[0],
diagnostics_module_name="syncthing",
diagnostics_module_name='syncthing',
description=syncthing.description,
show_status_block=True),
name='index'),