From 72d06cb2e0bf10416d928a81b1b5b6b80b78848f Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Thu, 7 May 2015 17:55:25 +0200 Subject: [PATCH] MT#7247 panel: dynamic projects Remove static list of projects from panel. TODO: be able to add projects from ajax Change-Id: I5f807764dd941d8d917436859dadba57ff885e6a --- panel/models.py | 93 ------------------------------------------------- panel/views.py | 2 +- 2 files changed, 1 insertion(+), 94 deletions(-) delete mode 100644 panel/models.py diff --git a/panel/models.py b/panel/models.py deleted file mode 100644 index 32a907d..0000000 --- a/panel/models.py +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (C) 2015 The Sipwise Team - http://sipwise.com - -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. - -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . - -from django.conf import settings - -if settings.DEBUG: - PROJECTS = ("fake",) -else: - PROJECTS = ( - "acc-cdi", - "asterisk", - "asterisk-sounds", - "backup-tools", - "bootenv", - "captagent", - "cdr-exporter", - "cfg-schema", - "check-tools", - "cleanup-tools", - "cloudpbx-devices", - "collectd-mod-redis", - "comx", - "comx-sip", - "comx-xmpp", - "data-hal", - "db-schema", - "diva-drivers", - "documentation", - "heartbeat", - "hylafaxplus", - "iaxmodem", - "installer", - "kamailio", - "kamailio-config-tests", - "keyring", - "kibana", - "klish", - "libswrate", - "libtcap", - "license-client", - "lua-ngcp-kamailio", - "mediaproxy-ng", - "mediaproxy-redis", - "mediator", - "megacli", - "metapackages", - "monitoring-tools", - "netscript", - "ngcp-klish-config", - "ngcp-panel", - "ngcp-prompts", - "ngcp-schema", - "ngcp-status", - "ngcp-support", - "ngcpcfg", - "ngcpcfg-api", - "ngcpcfg-ha", - "ngrep-sip", - "ossbss", - "prosody", - "pushd", - "rate-o-mat", - "reminder", - "rtpengine", - "rtpengine-redis", - "sems", - "sems-ha", - "sems-pbx", - "sems-prompts", - "sipsak", - "sipwise-base", - "snmp-agent", - "system-tests", - "system-tools", - "templates", - "upgrade", - "vmnotify", - "voisniff-ng", - "www_admin", - "www_csc" - ) diff --git a/panel/views.py b/panel/views.py index a454cd4..40b4d54 100644 --- a/panel/views.py +++ b/panel/views.py @@ -24,7 +24,7 @@ def index(request): def release(request, release): - context = {'projects': models.PROJECTS, 'release': release} + context = {'projects': jbi.objects.release_projects(release), 'release': release} return render(request, 'panel/release.html', context)