11968c840c
This patch provides the ability for the registered detail views for any resource type to be generically presented. This patch does the following: * Adds a directive that displays a set of views (i.e. details sub-views) * Adds a Generic Detail display for routed pages * Adds the concept of a Descriptor which contains a resource type name and an identifier. The identifier can be something as simple as a string, but may also be an object (if the resource type needs more than one value to look up its data, e.g. Pool Members) * Adds the ability for a resource type to have knowledge about how one of its items may be loaded, so any detail page can fetch the information given a basic context * Adds a generic Angular page (since they all just route to ng-views). We will see this used in subsequent patches as well. * Sets up a Django route to a non-navigational panel for the Details Change-Id: Ie116b52ba196f9240fdc6bbc4a12d37beb9b9fcf Partially-Implements: blueprint angular-registry
26 lines
817 B
Python
26 lines
817 B
Python
# (c) Copyright 2015 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
|
|
#
|
|
# 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 ugettext_lazy as _
|
|
|
|
import horizon
|
|
|
|
|
|
class NGDetails(horizon.Panel):
|
|
name = _("Details")
|
|
slug = 'ngdetails'
|
|
|
|
def nav(self, context):
|
|
return False
|