Use Horizon's plugin registration system

Magnum UI and their panels are currently registered via their `dashboard.py`
and `panel.py` files, but should use the enabled files.
This is standard in Horizon.

This patch changes registration method to enabled files.

For moving our dashboard to under the "project" dashbaord,
we need to change URLs. So, many files will be changed.

Since "/project/containers" is already used by Swift Container panel,
this patch uses "bays", "baymodels" and "bays/containers" for URLs.

Change-Id: Icedb984331bd46540f2e7d12bbefcc308aff214f
Closes-Bug: #1507679
This commit is contained in:
shu-mutou 2015-12-11 18:29:07 +09:00
parent d6a970b6e9
commit 7e5e888481
63 changed files with 216 additions and 174 deletions

View File

@ -1,4 +1,2 @@
include setup.py
recursive-include magnum_ui/bay/templates *
recursive-include magnum_ui/baymodel/templates *
recursive-include magnum_ui/static *
recursive-include magnum_ui/templates *

View File

@ -41,7 +41,12 @@ Install Magnum UI with all dependencies in your virtual environment::
And enable it in Horizon::
cp ../magnum-ui/enabled/_50_add_containers_dashboard.py openstack_dashboard/local/enabled
cp ../magnum-ui/enabled/_50_project_containers_panelgroup.py openstack_dashboard/local/enabled
cp ../magnum-ui/enabled/_51_project_containers_bays_panel.py openstack_dashboard/local/enabled
cp ../magnum-ui/enabled/_52_project_containers_baymodels_panel.py openstack_dashboard/local/enabled
cp ../magnum-ui/enabled/_53_project_containers_containers_panel.py openstack_dashboard/local/enabled
To run horizon with the newly enabled Magnum UI plugin run::

View File

@ -41,7 +41,10 @@ Install Magnum UI with all dependencies in your virtual environment::
And enable it in Horizon::
cp ../magnum-ui/enabled/_50_add_containers_dashboard.py openstack_dashboard/local/enabled
cp ../magnum-ui/enabled/_50_project_containers_panelgroup.py openstack_dashboard/local/enabled
cp ../magnum-ui/enabled/_51_project_containers_bays_panel.py openstack_dashboard/local/enabled
cp ../magnum-ui/enabled/_52_project_containers_baymodels_panel.py openstack_dashboard/local/enabled
cp ../magnum-ui/enabled/_53_project_containers_containers_panel.py openstack_dashboard/local/enabled
Release Notes
=============

View File

@ -11,8 +11,15 @@
# 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 _
# The slug of the panel group to be added to HORIZON_CONFIG. Required.
PANEL_GROUP = 'containers'
# The display name of the PANEL_GROUP. Required.
PANEL_GROUP_NAME = _('Containers')
# The slug of the dashboard the PANEL_GROUP associated with. Required.
PANEL_GROUP_DASHBOARD = 'project'
DASHBOARD = 'containers'
ADD_INSTALLED_APPS = ['magnum_ui']
ADD_ANGULAR_MODULES = [

View File

@ -0,0 +1,23 @@
# Copyright 2015 NEC Corporation, Inc.
#
# 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.
# The slug of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'bays'
# The slug of the panel group the PANEL is associated with.
PANEL_GROUP = 'containers'
# The slug of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'project'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'magnum_ui.content.bays.panel.Bays'

View File

@ -0,0 +1,23 @@
# Copyright 2015 NEC Corporation, Inc.
#
# 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.
# The slug of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'baymodels'
# The slug of the panel group the PANEL is associated with.
PANEL_GROUP = 'containers'
# The slug of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'project'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'magnum_ui.content.baymodels.panel.BayModels'

View File

@ -0,0 +1,23 @@
# Copyright 2015 NEC Corporation, Inc.
#
# 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.
# The slug of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'bays.containers'
# The slug of the panel group the PANEL is associated with.
PANEL_GROUP = 'containers'
# The slug of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'project'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'magnum_ui.content.bays.containers.panel.Containers'

View File

@ -1,30 +0,0 @@
# Copyright 2015 Cisco Systems, Inc.
#
# 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.core.urlresolvers import reverse
import horizon
from magnum_ui.containers.panel import Containers as containers_panel
from openstack_dashboard.test import helpers as test
class ContainerTests(test.TestCase):
def test_registration(self):
dashboard = horizon.get_dashboard('containers')
registered_panel = dashboard.get_panel('containers')
self.assertEqual(registered_panel.slug, containers_panel.slug)
def test_index(self):
index = reverse('horizon:containers:containers:index')
res = self.client.get(index)
self.assertTemplateUsed(res, 'containers/containers/index.html')

View File

@ -13,14 +13,9 @@
# under the License.
from django.utils.translation import ugettext_lazy as _
from magnum_ui import dashboard
import horizon
class BayModel(horizon.Panel):
class BayModels(horizon.Panel):
name = _("Bay Models")
slug = "baymodel"
dashboard.Containers.register(BayModel)
slug = "baymodels"

View File

@ -14,8 +14,7 @@
from django.conf.urls import patterns
from django.conf.urls import url
from magnum_ui.baymodel.views import IndexView
from magnum_ui.content.baymodels.views import IndexView
urlpatterns = patterns(

View File

@ -14,9 +14,7 @@
from horizon import views
from magnum_ui.api.rest import magnum # noqa
class IndexView(views.APIView):
# A very simple class-based view...
template_name = 'containers/baymodel/index.html'
template_name = 'baymodels/index.html'

View File

@ -14,12 +14,8 @@
from django.utils.translation import ugettext_lazy as _
import horizon
from magnum_ui import dashboard
class Containers(horizon.Panel):
name = _("Containers")
slug = "containers"
dashboard.Containers.register(Containers)
slug = "bays.containers"

View File

@ -0,0 +1,36 @@
# Copyright 2015 Cisco Systems, Inc.
#
# 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.core.urlresolvers import reverse
# import horizon
# from magnum_ui.containers.containers.panel import Containers
from openstack_dashboard.test import helpers as test
class ContainerTests(test.TestCase):
def test_me(self):
self.assertTrue(1 + 1 == 2)
# FIXME(shu-mutou): this tests seems not to work in new Horizon's plugin
# registration system
# def test_registration(self):
# dashboard = horizon.get_dashboard('project')
# registered_panel = dashboard.get_panel('containers.containers')
# self.assertEqual(registered_panel.slug, Containers.slug)
# def test_index(self):
# index = reverse('horizon:bays:containers:index')
# res = self.client.get(index)
# self.assertTemplateUsed(
# res, 'project/bays/containers/index.html')

View File

@ -14,12 +14,11 @@
from django.conf.urls import patterns
from django.conf.urls import url
from magnum_ui.containers.views import IndexView
from magnum_ui.content.bays.containers import views
urlpatterns = patterns(
'',
url(r'^[0-9a-f\-]{36}$', IndexView.as_view(), name='detail'),
url(r'^$', IndexView.as_view(), name='index'),
url(r'^[0-9a-f\-]{36}$', views.IndexView.as_view(), name='detail'),
url(r'^$', views.IndexView.as_view(), name='index'),
)

View File

@ -14,8 +14,6 @@
from horizon import views
from magnum_ui.api.rest import magnum # noqa
class IndexView(views.APIView):
template_name = 'containers/containers/index.html'
template_name = 'bays.containers/index.html'

View File

@ -13,14 +13,9 @@
# under the License.
from django.utils.translation import ugettext_lazy as _
from magnum_ui import dashboard
import horizon
class Bay(horizon.Panel):
class Bays(horizon.Panel):
name = _("Bays")
slug = "bay"
dashboard.Containers.register(Bay)
slug = "bays"

View File

@ -12,14 +12,16 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from magnum_ui.bay.views import IndexView
from magnum_ui.content.bays.containers import urls as containers_urls
from magnum_ui.content.bays.views import IndexView
urlpatterns = patterns(
'',
url(r'^containers/', include(containers_urls, namespace='containers')),
url(r'^[0-9a-f\-]{36}$', IndexView.as_view(), name='detail'),
url(r'^$', IndexView.as_view(), name='index'),
)

View File

@ -19,4 +19,4 @@ from magnum_ui.api.rest import magnum # noqa
class IndexView(views.APIView):
# A very simple class-based view...
template_name = 'containers/bay/index.html'
template_name = 'bays/index.html'

View File

@ -1,26 +0,0 @@
# Copyright 2015 Cisco Systems.
#
# 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 Containers(horizon.Dashboard):
name = _("Containers")
slug = "containers"
panels = ('bay', 'baymodel', 'containers')
default_panel = 'bay'
horizon.register(Containers)

View File

@ -19,7 +19,7 @@
/**
* @ngdoc overview
* @name horizon.dashboard.containers.baymodel
* @name horizon.dashboard.containers.baymodels
* @ngModule
*
* @description
@ -27,6 +27,5 @@
* panel
*/
angular
.module('horizon.dashboard.containers.baymodel', []);
.module('horizon.dashboard.containers.baymodels', []);
})();

View File

@ -16,9 +16,9 @@
(function() {
'use strict';
describe('horizon.dashboard.containers.baymodel', function() {
describe('horizon.dashboard.containers.baymodels', function() {
it('should exist', function() {
expect(angular.module('horizon.dashboard.containers.baymodel')).toBeDefined();
expect(angular.module('horizon.dashboard.containers.baymodels')).toBeDefined();
});
});

View File

@ -17,7 +17,7 @@
"use strict";
angular
.module('horizon.dashboard.containers')
.module('horizon.dashboard.containers.baymodels')
.controller('BayModelDetailController', BayModelDetailController);
BayModelDetailController.$inject = [

View File

@ -1,7 +1,7 @@
<div class="content" ng-controller="BayModelDetailController as ctrl">
<div class="page-header">
<ol class="breadcrumb">
<li><a href="./baymodel" translate>Bay Models</a></li>
<li><a ng-href="project/baymodels" translate>Bay Models</a></li>
<li class="active">{$ ctrl.baymodel.name $}</li>
</ol>
</div>
@ -44,7 +44,7 @@
<dl class="dl-horizontal">
<div class="{$ propertyClasses $}">
<dt translate>Image ID</dt>
<dd><a ng-href="../project/images/{$ ctrl.image_uuid $}/">{$ ctrl.baymodel.image_id $}</a></dd>
<dd><a href="project/images/{$ ctrl.image_uuid $}/" target="_self">{$ ctrl.baymodel.image_id $}</a></dd>
</div>
<div class="{$ propertyClasses $}">
<dt translate>Flavor ID</dt>
@ -60,7 +60,7 @@
</div>
<div class="{$ propertyClasses $}">
<dt translate>Keypair ID</dt>
<dd><a ng-href="../project/access_and_security/keypairs/{$ ctrl.baymodel.keypair_id $}/">{$ ctrl.baymodel.keypair_id $}</a></dd>
<dd><a href="project/access_and_security/keypairs/{$ ctrl.baymodel.keypair_id $}/" target="_self">{$ ctrl.baymodel.keypair_id $}</a></dd>
</div>
<div class="{$ propertyClasses $}">
<dt translate>SSH Authorized Key</dt>

View File

@ -19,22 +19,22 @@
/**
* @ngdoc overview
* @name containersBayModelTableController
* @name containersBayModelsTableController
* @ngController
*
* @description
* Controller for the containers bay model table
*/
angular
.module('horizon.dashboard.containers.baymodel')
.controller('containersBayModelTableController', containersBayModelTableController);
.module('horizon.dashboard.containers.baymodels')
.controller('containersBayModelsTableController', containersBayModelsTableController);
containersBayModelTableController.$inject = [
containersBayModelsTableController.$inject = [
'$scope',
'horizon.app.core.openstack-service-api.magnum'
];
function containersBayModelTableController($scope, magnum) {
function containersBayModelsTableController($scope, magnum) {
var ctrl = this;
ctrl.ibaymodels = [];
ctrl.baymodels = [];

View File

@ -1,4 +1,4 @@
<table ng-controller="containersBayModelTableController as table"
<table ng-controller="containersBayModelsTableController as table"
hz-table ng-cloak
st-table="table.ibaymodels"
st-safe-src="table.baymodels"
@ -119,7 +119,7 @@
<dl class=dl-horizontal>
<dt><translate>Name</translate></dt>
<dd><a ng-href="baymodel/{$ bm.id $}">{$ bm.name $}</a></dd>
<dd><a ng-href="project/baymodels/{$ bm.id $}">{$ bm.name $}</a></dd>
<dt><translate>ID</translate></dt>
<dd>{$ bm.id $}</dd>

View File

@ -19,7 +19,7 @@
/**
* @ngdoc overview
* @name horizon.dashboard.containers.bay
* @name horizon.dashboard.containers.bays
* @ngModule
*
* @description
@ -27,6 +27,5 @@
* panel
*/
angular
.module('horizon.dashboard.containers.bay', []);
.module('horizon.dashboard.containers.bays', []);
})();

View File

@ -16,9 +16,9 @@
(function() {
'use strict';
describe('horizon.dashboard.containers.bay', function() {
describe('horizon.dashboard.containers.bays', function() {
it('should exist', function() {
expect(angular.module('horizon.dashboard.containers.bay')).toBeDefined();
expect(angular.module('horizon.dashboard.containers.bays')).toBeDefined();
});
});

View File

@ -18,7 +18,7 @@
'use strict';
angular
.module('horizon.dashboard.containers.bay')
.module('horizon.dashboard.containers.bays')
.factory('bayModel', bayModel);
bayModel.$inject = [

View File

@ -18,8 +18,8 @@
'use strict';
angular
.module('horizon.dashboard.containers.bay')
.factory('horizon.dashboard.containers.bay.workflow', bayWorkflow);
.module('horizon.dashboard.containers.bays')
.factory('horizon.dashboard.containers.bays.workflow', bayWorkflow);
bayWorkflow.$inject = [
'horizon.dashboard.containers.basePath',
@ -33,20 +33,20 @@
steps: [
{
title: gettext('Info'),
templateUrl: basePath + 'bay/create/info/info.html',
helpUrl: basePath + 'bay/create/info/info.help.html',
templateUrl: basePath + 'bays/create/info/info.html',
helpUrl: basePath + 'bays/create/info/info.help.html',
formName: 'bayInfoForm'
},
{
title: gettext('Size'),
templateUrl: basePath + 'bay/create/size/size.html',
helpUrl: basePath + 'bay/create/size/size.help.html',
templateUrl: basePath + 'bays/create/size/size.html',
helpUrl: basePath + 'bays/create/size/size.help.html',
formName: 'baySizeForm'
},
{
title: gettext('Misc'),
templateUrl: basePath + 'bay/create/misc/misc.html',
helpUrl: basePath + 'bay/create/misc/misc.help.html',
templateUrl: basePath + 'bays/create/misc/misc.html',
helpUrl: basePath + 'bays/create/misc/misc.help.html',
formName: 'bayMiscForm'
}
],

View File

@ -26,7 +26,7 @@
* Controller for the containers bay info step in create workflow
*/
angular
.module('horizon.dashboard.containers.bay')
.module('horizon.dashboard.containers.bays')
.controller('createBayInfoController', createBayInfoController);
createBayInfoController.$inject = [

View File

@ -26,7 +26,7 @@
* Controller for the containers bay misc step in create workflow
*/
angular
.module('horizon.dashboard.containers.bay')
.module('horizon.dashboard.containers.bays')
.controller('createBayMiscController', createBayMiscController);
createBayMiscController.$inject = [

View File

@ -26,7 +26,7 @@
* Controller for the containers bay create modal
*/
angular
.module('horizon.dashboard.containers.bay')
.module('horizon.dashboard.containers.bays')
.controller('containersBayModalController', containersBayModalController);
containersBayModalController.$inject = [

View File

@ -26,7 +26,7 @@
* Controller for the containers bay size step in create workflow
*/
angular
.module('horizon.dashboard.containers.bay')
.module('horizon.dashboard.containers.bays')
.controller('createBaySizeController', createBaySizeController);
createBaySizeController.$inject = [

View File

@ -26,13 +26,13 @@
* Controller for the containers bay create modal
*/
angular
.module('horizon.dashboard.containers.bay')
.module('horizon.dashboard.containers.bays')
.controller('createBayWizardController', createBayWizardController);
createBayWizardController.$inject = [
'$scope',
'bayModel',
'horizon.dashboard.containers.bay.workflow'
'horizon.dashboard.containers.bays.workflow'
];
function createBayWizardController($scope, model, workflow) {

View File

@ -17,7 +17,7 @@
"use strict";
angular
.module('horizon.dashboard.containers')
.module('horizon.dashboard.containers.bays')
.controller('BayDetailController', BayDetailController);
BayDetailController.$inject = [

View File

@ -1,7 +1,7 @@
<div class="content" ng-controller="BayDetailController as ctrl">
<div class="page-header">
<ol class="breadcrumb">
<li><a href="./" translate>Bays</a></li>
<li><a ng-href="project/bays" translate>Bays</a></li>
<li class="active">{$ ctrl.bay.name $}</li>
</ol>
</div>
@ -14,7 +14,7 @@
<dl class="dl-horizontal">
<div class="{$ propertyClasses $}">
<dt translate>Name</dt>
<dd><a ng-href="baymodel/{$ ctrl.baymodel.uuid $}">{$ ctrl.baymodel.name $}</a></dd>
<dd><a ng-href="project/baymodels/{$ ctrl.baymodel.uuid $}">{$ ctrl.baymodel.name $}</a></dd>
</div>
<div class="{$ propertyClasses $}">
<dt translate>ID</dt>

View File

@ -19,22 +19,22 @@
/**
* @ngdoc overview
* @name containersBayTableController
* @name containersBaysTableController
* @ngController
*
* @description
* Controller for the containers bay table
*/
angular
.module('horizon.dashboard.containers.bay')
.controller('containersBayTableController', containersBayTableController);
.module('horizon.dashboard.containers.bays')
.controller('containersBaysTableController', containersBaysTableController);
containersBayTableController.$inject = [
containersBaysTableController.$inject = [
'$scope',
'horizon.app.core.openstack-service-api.magnum'
];
function containersBayTableController($scope, magnum) {
function containersBaysTableController($scope, magnum) {
var ctrl = this;
ctrl.ibays = [];
ctrl.bays = [];

View File

@ -1,4 +1,4 @@
<table ng-controller="containersBayTableController as table"
<table ng-controller="containersBaysTableController as table"
hz-table ng-cloak
st-table="table.ibays"
st-safe-src="table.bays"
@ -24,7 +24,7 @@
<button
class="btn btn-default btn-sm btn-launch ng-scope"
ng-controller="containersBayModalController as modal"
ng-click="modal.openBayCreateWizard({successUrl: '/containers/'})">
ng-click="modal.openBayCreateWizard({successUrl: '/project/bays/'})">
<span class="fa fa-plus" translate>Create Bay</span>
</button>
</action-list>
@ -133,7 +133,7 @@
<dl class=dl-horizontal>
<dt translate>Name</dt>
<dd><a ng-href="{$ b.id $}">{$ b.name $}</a></dd>
<dd><a ng-href="project/bays/{$ b.id $}">{$ b.name $}</a></dd>
<dt translate>ID</dt>
<dd>{$ b.id $}</dd>

View File

@ -26,47 +26,47 @@
*/
angular
.module('horizon.dashboard.containers', [
'horizon.dashboard.containers.bay',
'horizon.dashboard.containers.baymodel',
'horizon.dashboard.containers.bays',
'horizon.dashboard.containers.baymodels',
'horizon.dashboard.containers.containers',
'ngRoute'
])
.config(config);
.config(config)
config.$inject = ['$provide', '$windowProvider',
'$routeProvider', '$locationProvider'];
function config($provide, $windowProvider, $routeProvider, $locationProvider) {
/* FIXME (shu-mutou): remove settings for $locationProvider if following patch is merged.
* https://review.openstack.org/#/c/260741/
*/
$locationProvider
.html5Mode({
enabled: true
});
.html5Mode({
enabled: true
})
.hashPrefix('!');
var path = $windowProvider.$get().STATIC_URL + 'dashboard/containers/';
$provide.constant('horizon.dashboard.containers.basePath', path);
$routeProvider
.when('/containers', {
.when('/project/bays/containers', {
templateUrl: path + 'containers/table/table.html'
})
.when('/containers/:containerId', {
.when('/project/bays/containers/:containerId', {
templateUrl: path + 'containers/detail/detail.html'
})
.when('/baymodel', {
templateUrl: path + 'baymodel/table/table.html'
.when('/project/baymodels', {
templateUrl: path + 'baymodels/table/table.html'
})
.when('/baymodel/:baymodelId', {
templateUrl: path + 'baymodel/detail/detail.html'
.when('/project/baymodels/:baymodelId', {
templateUrl: path + 'baymodels/detail/detail.html'
})
.when('/', {
templateUrl: path + 'bay/table/table.html'
.when('/project/bays', {
templateUrl: path + 'bays/table/table.html'
})
.when('/:bayId', {
templateUrl: path + 'bay/detail/detail.html'
})
.otherwise({
redirectTo: '/'
.when('/project/bays/:bayId', {
templateUrl: path + 'bays/detail/detail.html'
});
}
})();

View File

@ -5,6 +5,6 @@
// Custom Style Variables
@import "/custom/styles";
@import "baymodel/baymodel";
@import "bay/bay";
@import "baymodels/baymodels";
@import "bays/bays";
@import "containers/containers";

View File

@ -17,7 +17,7 @@
"use strict";
angular
.module('horizon.dashboard.containers')
.module('horizon.dashboard.containers.containers')
.controller('ContainerDetailController', ContainerDetailController);
ContainerDetailController.$inject = [

View File

@ -1,7 +1,7 @@
<div class="content" ng-controller="ContainerDetailController as ctrl">
<div class="page-header">
<ol class="breadcrumb">
<li><a href="./containers" translate>Containers</a></li>
<li><a ng-href="project/bays/containers" translate>Containers</a></li>
<li class="active">{$ ctrl.container.name $}</li>
</ol>
</div>
@ -32,7 +32,7 @@
<dl class="dl-horizontal">
<div class="{$ propertyClasses $}">
<dt translate>Name</dt>
<dd><a ng-href="{$ ctrl.bay.uuid $}">{$ ctrl.bay.name $}</a></dd>
<dd><a ng-href="project/bays/{$ ctrl.bay.uuid $}">{$ ctrl.bay.name $}</a></dd>
</div>
<div class="{$ propertyClasses $}">
<dt translate>ID</dt>
@ -60,7 +60,7 @@
<dl class="dl-horizontal">
<div class="{$ propertyClasses $}">
<dt translate>Name</dt>
<dd><a ng-href="baymodel/{$ ctrl.baymodel.uuid $}">{$ ctrl.baymodel.name $}</a></dd>
<dd><a ng-href="project/baymodels/{$ ctrl.baymodel.uuid $}">{$ ctrl.baymodel.name $}</a></dd>
</div>
<div class="{$ propertyClasses $}">
<dt translate>ID</dt>

View File

@ -24,7 +24,7 @@
<button
class="btn btn-default btn-sm btn-launch ng-scope"
ng-controller="containersContainerModalController as modal"
ng-click="modal.openContainerCreateWizard({successUrl: '/containers/containers/'})">
ng-click="modal.openContainerCreateWizard({successUrl: '/project/bays/containers/'})">
<span class="fa fa-plus"> <translate>Create Container</translate></span>
</button>
</action-list>
@ -141,7 +141,7 @@
<dl class=dl-horizontal>
<dt><translate>Name</translate></dt>
<dd><a ng-href="containers/{$ c.id $}">{$ c.name $}</a></dd>
<dd><a ng-href="project/bays/containers/{$ c.id $}">{$ c.name $}</a></dd>
<dt><translate>UUID</translate></dt>
<dd>{$ c.id $}</dd>

View File

@ -10,7 +10,7 @@
{% endblock page_header %}
{% block ng_route_base %}
<base href="{{ WEBROOT }}containers/"></base>
<base href="{{ WEBROOT }}"></base>
{% endblock %}
{% block main %}

View File

@ -10,7 +10,7 @@
{% endblock page_header %}
{% block ng_route_base %}
<base href="{{ WEBROOT }}containers/"></base>
<base href="{{ WEBROOT }}"></base>
{% endblock %}
{% block main %}

View File

@ -10,7 +10,7 @@
{% endblock page_header %}
{% block ng_route_base %}
<base href="{{ WEBROOT }}containers/"></base>
<base href="{{ WEBROOT }}"></base>
{% endblock %}
{% block main %}