Adding queue list
This commit is contained in:
parent
3d21ae663f
commit
443af327dc
|
@ -1,13 +1,5 @@
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
# The name of the panel group to be added to HORIZON_CONFIG. Required.
|
||||
# Must match devplatforminstaller.utils.const.PANEL_GROUP
|
||||
PANEL_GROUP = 'queues'
|
||||
|
||||
# The display name of the PANEL_GROUP. Required.
|
||||
# Should match devplatforminstaller.utils.const.PANEL_GROUP_DASHBOARD
|
||||
PANEL_GROUP = 'queuesgroup'
|
||||
PANEL_GROUP_NAME = _('Message Queues')
|
||||
|
||||
# The name of the dashboard the PANEL_GROUP associated with. Required.
|
||||
# Must match devplatforminstaller.utils.const.PANEL_GROUP_DASHBOARD
|
||||
PANEL_GROUP_DASHBOARD = 'project'
|
|
@ -8,25 +8,10 @@
|
|||
# with Hewlett-Packard.
|
||||
###############################################################################
|
||||
|
||||
# The name of the panel to be added to HORIZON_CONFIG. Required.
|
||||
# Should match devplatforminstaller.utils.const.PANEL
|
||||
PANEL = 'queues'
|
||||
|
||||
# The name of the panel group the PANEL is associated with. Required.
|
||||
# Must match devplatforminstaller.utils.const.PANEL_GROUP
|
||||
PANEL_GROUP = 'queues'
|
||||
|
||||
# The name of the dashboard the PANEL associated with. Required.
|
||||
# Must match devplatforminstaller.utils.const.PANEL_GROUP_DASHBOARD
|
||||
PANEL_GROUP = 'queuesgroup'
|
||||
PANEL_DASHBOARD = 'project'
|
||||
|
||||
# Python panel class of the PANEL to be added.
|
||||
ADD_PANEL = 'cuedashboard.queues.panel.CuePanel'
|
||||
|
||||
# Whether or not the panel is disabled.
|
||||
# DISABLED = False
|
||||
|
||||
# Add the devplatforminstaller app into the list of applications to run.
|
||||
ADD_INSTALLED_APPS = [
|
||||
'cuedashboard',
|
||||
]
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
# Copyright 2013 Rackspace Hosting.
|
||||
# Copyright 2014 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
# Authors: Steve Leon <kokhang@gmail.com>
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# Copyright [2014] Hewlett-Packard Development Company, L.P.
|
||||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
|
||||
|
@ -37,5 +41,8 @@ def cueclient(request):
|
|||
return client.Client(session=session)
|
||||
|
||||
|
||||
def queue_list(request, marker=None):
|
||||
def clusters_list(request, marker=None):
|
||||
return cueclient(request).clusters.list()
|
||||
|
||||
def delete_cluster(request, marker=None):
|
||||
return cueclient(request).clusters.list()
|
|
@ -1,13 +0,0 @@
|
|||
from django.utils.translation import ugettext as _
|
||||
from cuedashboard.queues.panel import CuePanel
|
||||
import horizon
|
||||
|
||||
|
||||
class CueDashboard(horizon.Dashboard):
|
||||
name = _("Cue")
|
||||
slug = "cue"
|
||||
panel = (CuePanel,)
|
||||
default_panel = 'queues'
|
||||
|
||||
CueDashboard.register(CuePanel)
|
||||
horizon.register(CueDashboard)
|
|
@ -1,24 +1,27 @@
|
|||
# Copyright (c) 2014 Rackspace Hosting.
|
||||
# Copyright 2014 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Authors: Steve Leon <kokhang@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# Copyright [2014] Hewlett-Packard Development Company, L.P.
|
||||
# limitations under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
|
||||
class CuePanel(horizon.Panel):
|
||||
name = _("Queues")
|
||||
name = _("Clusters")
|
||||
slug = 'queues'
|
||||
permissions = ('openstack.services.queue',)
|
||||
permissions = ('openstack.services.message_queue',)
|
||||
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
# Copyright (c) 2014 Rackspace Hosting.
|
||||
# Copyright 2014 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Authors: Steve Leon <kokhang@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# Copyright [2014] Hewlett-Packard Development Company, L.P.
|
||||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from django.utils.translation import ugettext as _
|
||||
|
@ -21,9 +25,10 @@ from cuedashboard import api
|
|||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class CreateQueue(tables.LinkAction):
|
||||
name = "create"
|
||||
verbose_name = _("Create Queue")
|
||||
verbose_name = _("Create Cluster")
|
||||
url = "horizon:project:queues:create"
|
||||
classes = ("ajax-modal", "btn-create")
|
||||
|
||||
|
@ -71,4 +76,4 @@ class QueuesTable(tables.DataTable):
|
|||
name = "queues"
|
||||
verbose_name = _("Queues")
|
||||
table_actions = (CreateQueue, DeleteQueue,)
|
||||
#row_actions = (DeleteQueue,)
|
||||
row_actions = (DeleteQueue,)
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
# Copyright (c) 2014 Rackspace Hosting.
|
||||
# Copyright 2014 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Authors: Steve Leon <kokhang@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# Copyright [2014] Hewlett-Packard Development Company, L.P.
|
||||
# limitations under the License.
|
||||
|
||||
from django.conf.urls import patterns
|
||||
from django.conf.urls import url
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
# Copyright (c) 2014 Rackspace Hosting.
|
||||
# Copyright 2014 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Authors: Steve Leon <kokhang@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# Copyright [2014] Hewlett-Packard Development Company, L.P.
|
||||
# limitations under the License.
|
||||
|
||||
from cuedashboard import api
|
||||
from cuedashboard.queues.tables import QueuesTable
|
||||
|
@ -23,4 +26,4 @@ class IndexView(tables.DataTableView):
|
|||
template_name = 'queues/index.html'
|
||||
|
||||
def get_data(self):
|
||||
return api.queue_list(self.request)
|
||||
return api.clusters_list(self.request)
|
||||
|
|
Loading…
Reference in New Issue