Files
manila-ui/manila_ui/dashboards/admin/share_networks/tables.py
Cameron Kolodjski d1428c5fc5 Create share network panel workflows
Implements: bp share-network-subnets
Co-Authored-By: Cameron Kolodjski <cdkolod@gmail.com>
Co-Authored-By: Shkoh Hamasoor <shkoh.hamasoor@ndsu.edu>
Co-Authored-By: melakualehegn <melakualehegn34@gmail.com>
Change-Id: I4c539b151cbbf69e4a2a3580906b2a8bd5f3a452
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2024-02-22 08:57:48 +00:00

42 lines
1.4 KiB
Python

# 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
#
# 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.
from django.utils.translation import gettext_lazy as _
from horizon import tables
import manila_ui.dashboards.project.share_networks.tables as sn_tables
class ShareNetworksTable(tables.DataTable):
name = tables.WrappingColumn(
"name", verbose_name=_("Name"),
link="horizon:admin:share_networks:share_network_detail")
project = tables.Column("project_name", verbose_name=_("Project"))
def get_object_display(self, share_network):
return share_network.name or str(share_network.id)
def get_object_id(self, share_network):
return str(share_network.id)
class Meta(object):
name = "share_networks"
verbose_name = _("Share Networks")
table_actions = (
tables.NameFilterAction,
sn_tables.Delete,
)
row_class = sn_tables.UpdateRow
row_actions = (
sn_tables.Delete,
)