mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
ttrss: Add basic configuration
This commit is contained in:
1 parent
15591b79ca
commit
47a54fadd1
3 files changed
+56
-2
No files matched your search
@@ -58,13 +58,15 @@ def init():
|
||||
|
||||
def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
helper.install(['tt-rss'])
|
||||
helper.install(['tt-rss', 'postgresql', 'dbconfig-pgsql', 'php5-pgsql'])
|
||||
helper.call('post', actions.superuser_run, 'ttrss', ['setup'])
|
||||
helper.call('post', service.notify_enabled, None, True)
|
||||
|
||||
|
||||
def get_status():
|
||||
"""Get the current settings."""
|
||||
return {'enabled': is_enabled()}
|
||||
return {'enabled': is_enabled(),
|
||||
'is_running': is_running()}
|
||||
|
||||
|
||||
def is_enabled():
|
||||
@@ -72,6 +74,11 @@ def is_enabled():
|
||||
return action_utils.webserver_is_enabled('50-tt-rss')
|
||||
|
||||
|
||||
def is_running():
|
||||
"""Return whether the service is running."""
|
||||
return action_utils.service_is_running('tt-rss')
|
||||
|
||||
|
||||
def enable(should_enable):
|
||||
"""Enable/disable the module."""
|
||||
sub_command = 'enable' if should_enable else 'disable'
|
||||
|
||||
@@ -23,6 +23,18 @@
|
||||
|
||||
{% block configuration %}
|
||||
|
||||
<h3>{% trans "Status" %}</h3>
|
||||
|
||||
<p class="running-status-parent">
|
||||
{% if status.is_running %}
|
||||
<span class="running-status active"></span>
|
||||
{% trans "Tiny Tiny RSS feed update service is running" %}
|
||||
{% else %}
|
||||
<span class="running-status inactive"></span>
|
||||
{% trans "Tiny Tiny RSS feed update service is not running" %}
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
{% include "diagnostics_button.html" with module="ttrss" %}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user