Merge "Corrects available actions for syspanel images table."
This commit is contained in:
commit
8a25850fdf
@ -14,5 +14,20 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from horizon.dashboards.nova.images_and_snapshots.images.tables import (
|
||||
ImagesTable, LaunchImage, EditImage, DeleteImage)
|
||||
ImagesTable, EditImage, DeleteImage)
|
||||
|
||||
|
||||
class AdminDeleteImage(DeleteImage):
|
||||
def allowed(self, request, image=None):
|
||||
return True
|
||||
|
||||
|
||||
class AdminImagesTable(ImagesTable):
|
||||
class Meta:
|
||||
name = "images"
|
||||
verbose_name = _("Images")
|
||||
table_actions = (AdminDeleteImage,)
|
||||
row_actions = (EditImage, AdminDeleteImage)
|
||||
|
@ -26,14 +26,14 @@ from horizon import api
|
||||
from horizon import exceptions
|
||||
from horizon import tables
|
||||
from horizon.dashboards.nova.images_and_snapshots.images import views
|
||||
from .tables import ImagesTable
|
||||
from .tables import AdminImagesTable
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class IndexView(tables.DataTableView):
|
||||
table_class = ImagesTable
|
||||
table_class = AdminImagesTable
|
||||
template_name = 'syspanel/images/index.html'
|
||||
|
||||
def get_data(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user