Migrate JS file from horizon

horizon.firewalls.js is FWaaS dashboard specific,
so it needs to be migrated from horizon to here.

To detect JavaScript files automatically, ADD_INSTALLED_APPS and
AUTO_DISCOVER_STATIC_FILES needs to be specified.
For more information on the horizon plugin settings, see
https://docs.openstack.org/developer/horizon/install/settings.html#pluggable-settings

Change-Id: I7aabc9b35da3d3827eef065c078bc6bd73001bf3
This commit is contained in:
Akihiro Motoki 2017-06-22 03:15:29 +00:00
parent 706f284b90
commit 461bca7f07
2 changed files with 36 additions and 0 deletions

View File

@ -1,3 +1,15 @@
# 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 = 'firewalls'
# The slug of the dashboard the PANEL associated with. Required.
@ -8,3 +20,6 @@ PANEL_GROUP = 'network'
# Python panel class of the PANEL to be added.
ADD_PANEL = ('neutron_fwaas_dashboard.dashboards.'
'project.firewalls.panel.Firewall')
ADD_INSTALLED_APPS = ['neutron_fwaas_dashboard']
AUTO_DISCOVER_STATIC_FILES = True

View File

@ -0,0 +1,21 @@
/**
* 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.
*/
horizon.firewalls = {
workflow_init: function() {
// Initialise the drag and drop rule list
horizon.lists.generate_html("rule");
horizon.lists.generate_html("router");
}
};