diff --git a/mayan/apps/scheduler/__init__.py b/mayan/apps/scheduler/__init__.py index 742fb3c9a5..02810ce623 100644 --- a/mayan/apps/scheduler/__init__.py +++ b/mayan/apps/scheduler/__init__.py @@ -3,9 +3,6 @@ from __future__ import absolute_import import atexit import logging -from project_tools.api import register_tool - -from .links import job_list from .runtime import scheduler import logging @@ -18,4 +15,3 @@ def schedule_shutdown_on_exit(): atexit.register(schedule_shutdown_on_exit) -register_tool(job_list) diff --git a/mayan/apps/scheduler/links.py b/mayan/apps/scheduler/links.py deleted file mode 100644 index a92431eb1a..0000000000 --- a/mayan/apps/scheduler/links.py +++ /dev/null @@ -1,7 +0,0 @@ -from __future__ import absolute_import - -from django.utils.translation import ugettext_lazy as _ - -from .permissions import PERMISSION_VIEW_JOB_LIST - -job_list = {'text': _(u'interval job list'), 'view': 'scheduler:job_list', 'icon': 'time.png', 'permissions': [PERMISSION_VIEW_JOB_LIST]} diff --git a/mayan/apps/scheduler/permissions.py b/mayan/apps/scheduler/permissions.py deleted file mode 100644 index 203f675ff4..0000000000 --- a/mayan/apps/scheduler/permissions.py +++ /dev/null @@ -1,8 +0,0 @@ -from __future__ import absolute_import - -from django.utils.translation import ugettext_lazy as _ - -from permissions.models import PermissionNamespace, Permission - -namespace = PermissionNamespace('scheduler', _(u'Scheduler')) -PERMISSION_VIEW_JOB_LIST = Permission.objects.register(namespace, 'jobs_list', _(u'View the interval job list')) diff --git a/mayan/apps/scheduler/urls.py b/mayan/apps/scheduler/urls.py deleted file mode 100644 index 71c377f4d0..0000000000 --- a/mayan/apps/scheduler/urls.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.conf.urls import patterns, url - -urlpatterns = patterns('scheduler.views', - url(r'^list/$', 'job_list', (), 'job_list'), -) diff --git a/mayan/apps/scheduler/views.py b/mayan/apps/scheduler/views.py deleted file mode 100644 index 1e2ed3a50f..0000000000 --- a/mayan/apps/scheduler/views.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import absolute_import - -from django.shortcuts import render_to_response -from django.template import RequestContext -from django.utils.translation import ugettext_lazy as _ - -from common.utils import encapsulate -from permissions.models import Permission - -from .api import get_job_list -from .permissions import PERMISSION_VIEW_JOB_LIST - - -def job_list(request): - Permission.objects.check_permissions(request.user, [PERMISSION_VIEW_JOB_LIST]) - - context = { - 'object_list': get_job_list(), - 'title': _(u'interval jobs'), - 'extra_columns': [ - { - 'name': _(u'label'), - 'attribute': encapsulate(lambda job: job['title']) - }, - { - 'name': _(u'start date time'), - 'attribute': encapsulate(lambda job: job['job'].trigger.start_date) - }, - { - 'name': _(u'interval'), - 'attribute': encapsulate(lambda job: job['job'].trigger.interval) - }, - ], - 'hide_object': True, - } - - return render_to_response('main/generic_list.html', context, - context_instance=RequestContext(request)) diff --git a/mayan/urls.py b/mayan/urls.py index 1c3da3ab47..2f1390bca5 100644 --- a/mayan/urls.py +++ b/mayan/urls.py @@ -34,7 +34,6 @@ urlpatterns = patterns('', (r'^documents/signatures/', include('document_signatures.urls', namespace='signatures')), (r'^checkouts/', include('checkouts.urls', namespace='checkout')), (r'^installation/', include('installation.urls', namespace='installation')), - (r'^scheduler/', include('scheduler.urls', namespace='scheduler')), (r'^bootstrap/', include('bootstrap.urls', namespace='bootstrap')), (r'^registration/', include('registration.urls', namespace='registration')), (r'^statistics/', include('statistics.urls', namespace='statistics')),