designate-dashboard-10.0.0/0000775000175000017500000000000013656747325015524 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/doc/0000775000175000017500000000000013656747325016271 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/doc/requirements.txt0000664000175000017500000000012313656747241021546 0ustar zuulzuul00000000000000openstackdocstheme>=1.30.0 # Apache-2.0 sphinxcontrib-svg2pdfconverter>=0.1.0 # BSDdesignate-dashboard-10.0.0/doc/source/0000775000175000017500000000000013656747325017571 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/doc/source/conf.py0000775000175000017500000000573413656747241021101 0ustar zuulzuul00000000000000# -*- coding: utf-8 -*- # 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 reqdashboardred 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. import os import sys sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ---------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', 'openstackdocstheme', 'sphinxcontrib.rsvgconverter', ] # openstackdocstheme options repository_name = 'openstack/designate-dashboard' bug_project = 'designate-dashboard' bug_tag = '' html_last_updated_fmt = '%Y-%m-%d %H:%M' html_theme = 'openstackdocs' # autodoc generation is a bit aggressive and a ndashboardsance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable # The suffix of source filenames. source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General information about the project. project = u'designate_dashboard' copyright = u'2013, OpenStack Foundation' # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). add_module_names = True # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. # html_theme_path = ["."] # html_theme = '_theme' # html_static_path = ['static'] # Output file base name for HTML help bdashboardlder. htmlhelp_basename = '%sdoc' % project # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ ('index', 'doc-designate-dashboard.tex', u'Designate Dashboard Documentation', u'OpenStack Foundation', 'manual', True), ] latex_domain_indices = False latex_elements = { # Additional stuff for the LaTeX preamble. # openany: Skip blank pages in generated PDFs 'extraclassoptions': 'openany,oneside', 'makeindex': '', 'printindex': '', 'preamble': r'\setcounter{tocdepth}{3}', } # Example configuration for intersphinx: refer to the Python standard library. #intersphinx_mapping = {'http://docs.python.org/': None} designate-dashboard-10.0.0/doc/source/readme.rst0000664000175000017500000000003513656747241021553 0ustar zuulzuul00000000000000.. include:: ../../README.rstdesignate-dashboard-10.0.0/doc/source/install/0000775000175000017500000000000013656747325021237 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/doc/source/install/index.rst0000664000175000017500000000034113656747241023073 0ustar zuulzuul00000000000000============ Installation ============ At the command line:: $ pip install designate_dashboard Or, if you have virtualenvwrapper installed:: $ mkvirtualenv designate_dashboard $ pip install designate_dashboarddesignate-dashboard-10.0.0/doc/source/user/0000775000175000017500000000000013656747325020547 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/doc/source/user/index.rst0000664000175000017500000000013713656747241022406 0ustar zuulzuul00000000000000======== Usage ======== To use designate_dashboard in a project:: import designate_dashboarddesignate-dashboard-10.0.0/doc/source/index.rst0000664000175000017500000000102113656747241021421 0ustar zuulzuul00000000000000.. designate_ui documentation master file, created by sphinx-quickstart on Tue Jul 9 22:26:36 2013. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. ================================================ Welcome to designatedashboard's documentation! ================================================ .. toctree:: :maxdepth: 2 readme install/index user/index contributor/index .. rubric:: Indices and tables * :ref:`genindex` * :ref:`search` designate-dashboard-10.0.0/doc/source/contributor/0000775000175000017500000000000013656747325022143 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/doc/source/contributor/index.rst0000664000175000017500000000011713656747241024000 0ustar zuulzuul00000000000000============ Contributing ============ .. include:: ../../../CONTRIBUTING.rst designate-dashboard-10.0.0/requirements.txt0000664000175000017500000000056413656747241021012 0ustar zuulzuul00000000000000# The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. oslo.log>=3.36.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0 Babel!=2.4.0,>=2.3.4 # BSD python-designateclient>=2.7.0 # Apache-2.0 horizon>=17.1.0 # Apache-2.0 designate-dashboard-10.0.0/babel-django.cfg0000664000175000017500000000005713656747241020511 0ustar zuulzuul00000000000000[python: **.py] [django: **/templates/**.html] designate-dashboard-10.0.0/setup.cfg0000664000175000017500000000223313656747325017345 0ustar zuulzuul00000000000000[metadata] name = designate-dashboard summary = Designate Horizon UI bits description-file = README.rst author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/developer/designate-dashboard/ classifier = Environment :: OpenStack Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 [files] packages = designatedashboard [build_sphinx] source-dir = doc/source build-dir = doc/build all_files = 1 warning-is-error = 1 [upload_sphinx] upload-dir = doc/build/html [compile_catalog] directory = designatedashboard/locale domain = django [update_catalog] domain = django output_dir = designatedashboard/locale input_file = designatedashboard/locale/django.pot [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel-django.cfg output_file = designatedashboard/locale/django.pot [egg_info] tag_build = tag_date = 0 designate-dashboard-10.0.0/designatedashboard/0000775000175000017500000000000013656747325021337 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/__init__.py0000664000175000017500000000124313656747241023445 0ustar zuulzuul00000000000000# -*- coding: utf-8 -*- # 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. import pbr.version __version__ = pbr.version.VersionInfo( 'designate-dashboard').version_string() designate-dashboard-10.0.0/designatedashboard/dashboards/0000775000175000017500000000000013656747325023451 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/dashboards/__init__.py0000664000175000017500000000000013656747241025545 0ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/dashboards/project/0000775000175000017500000000000013656747325025117 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/dashboards/project/__init__.py0000664000175000017500000000000013656747241027213 0ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/dashboards/project/ngdns/0000775000175000017500000000000013656747325026230 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/dashboards/project/ngdns/__init__.py0000664000175000017500000000006013656747241030332 0ustar zuulzuul00000000000000from designatedashboard.api import rest # noqa designate-dashboard-10.0.0/designatedashboard/dashboards/project/ngdns/reverse_dns/0000775000175000017500000000000013656747325030547 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/dashboards/project/ngdns/reverse_dns/__init__.py0000664000175000017500000000000013656747241032643 0ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/dashboards/project/ngdns/reverse_dns/panel.py0000664000175000017500000000163013656747241032215 0ustar zuulzuul00000000000000# (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 from openstack_dashboard.dashboards.project import dashboard class ReverseDns(horizon.Panel): name = _("Reverse DNS") slug = 'reverse_dns' permissions = ('openstack.services.dns',) dashboard.Project.register(ReverseDns) designate-dashboard-10.0.0/designatedashboard/dashboards/project/ngdns/reverse_dns/urls.py0000664000175000017500000000152713656747241032110 0ustar zuulzuul00000000000000# (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.conf.urls import url from django.utils.translation import ugettext_lazy as _ from horizon.browsers import views title = _("Reverse DNS") urlpatterns = [ url('', views.AngularIndexView.as_view(title=title), name='index'), ] designate-dashboard-10.0.0/designatedashboard/dashboards/project/ngdns/zones/0000775000175000017500000000000013656747325027366 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/dashboards/project/ngdns/zones/__init__.py0000664000175000017500000000000013656747241031462 0ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/dashboards/project/ngdns/zones/panel.py0000664000175000017500000000160513656747241031036 0ustar zuulzuul00000000000000# (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 from openstack_dashboard.dashboards.project import dashboard class Zones(horizon.Panel): name = _("Zones") slug = 'dnszones' permissions = ('openstack.services.dns',) dashboard.Project.register(Zones) designate-dashboard-10.0.0/designatedashboard/dashboards/project/ngdns/zones/urls.py0000664000175000017500000000152013656747241030720 0ustar zuulzuul00000000000000# (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.conf.urls import url from django.utils.translation import ugettext_lazy as _ from horizon.browsers import views title = _("Zones") urlpatterns = [ url('', views.AngularIndexView.as_view(title=title), name='index') ] designate-dashboard-10.0.0/designatedashboard/tests/0000775000175000017500000000000013656747325022501 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/tests/__init__.py0000664000175000017500000000000013656747241024575 0ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/tests/.secret_key_store0000664000175000017500000000010013656747241026037 0ustar zuulzuul000000000000005NMb6ZfXYBLClFGFYf6VkbiJ9TRNyU3w8NQHPG8LXJltU8EZFeB7I632vQ8MF5m6designate-dashboard-10.0.0/designatedashboard/tests/settings.py0000664000175000017500000000253513656747241024715 0ustar zuulzuul00000000000000# 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. # Default to Horizons test settings to avoid any missing keys import openstack_dashboard.enabled # noqa: F811 from openstack_dashboard.test.settings import * # noqa: F403,H303 from openstack_dashboard.utils import settings import designatedashboard.enabled # pop these keys to avoid log warnings about deprecation # update_dashboards will populate them anyway HORIZON_CONFIG.pop('dashboards', None) HORIZON_CONFIG.pop('default_dashboard', None) # Update the dashboards with designatedashboard enabled files # and current INSTALLED_APPS settings.update_dashboards( [ openstack_dashboard.enabled, designatedashboard.enabled, ], HORIZON_CONFIG, INSTALLED_APPS ) # Remove duplicated apps INSTALLED_APPS = list(set(INSTALLED_APPS)) designate-dashboard-10.0.0/designatedashboard/tests/base.py0000664000175000017500000000361013656747241023762 0ustar zuulzuul00000000000000# -*- coding: utf-8 -*- # Copyright 2010-2011 OpenStack Foundation # Copyright (c) 2013 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. import os import fixtures import testtools _TRUE_VALUES = ('True', 'true', '1', 'yes') class TestCase(testtools.TestCase): """Test case base class for all unit tests.""" def setUp(self): """Run before each test method to initialize test environment.""" super(TestCase, self).setUp() test_timeout = os.environ.get('OS_TEST_TIMEOUT', 0) try: test_timeout = int(test_timeout) except ValueError: # If timeout value is invalid do not set a timeout. test_timeout = 0 if test_timeout > 0: self.useFixture(fixtures.Timeout(test_timeout, gentle=True)) self.useFixture(fixtures.NestedTempfile()) self.useFixture(fixtures.TempHomeDir()) if os.environ.get('OS_STDOUT_CAPTURE') in _TRUE_VALUES: stdout = self.useFixture(fixtures.StringStream('stdout')).stream self.useFixture(fixtures.MonkeyPatch('sys.stdout', stdout)) if os.environ.get('OS_STDERR_CAPTURE') in _TRUE_VALUES: stderr = self.useFixture(fixtures.StringStream('stderr')).stream self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr)) self.log_fixture = self.useFixture(fixtures.FakeLogger()) designate-dashboard-10.0.0/designatedashboard/static/0000775000175000017500000000000013656747325022626 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/0000775000175000017500000000000013656747325026441 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/0000775000175000017500000000000013656747325030453 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000775000175000017500000000000013656747325034006 5ustar zuulzuul00000000000000././@LongLink0000000000000000000000000000015500000000000011216 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/details/designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000775000175000017500000000000013656747325034006 5ustar zuulzuul00000000000000././@LongLink0000000000000000000000000000017000000000000011213 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/details/drawer.htmldesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000000040213656747241034001 0ustar zuulzuul00000000000000 ././@LongLink0000000000000000000000000000017200000000000011215 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/details/overview.htmldesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000000333413656747241034010 0ustar zuulzuul00000000000000

Details


Attributes


Modification Times


Associations


././@LongLink0000000000000000000000000000020300000000000011210 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/details/overview.controller.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000000304613656747241034010 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function() { "use strict"; angular .module('designatedashboard.resources.os-designate-zone') .controller('designatedashboard.resources.os-designate-zone.detailController', controller); controller.$inject = [ 'designatedashboard.resources.os-designate-zone.resourceType', 'horizon.framework.conf.resource-type-registry.service', '$scope' ]; function controller( resourceTypeCode, registry, $scope ) { var ctrl = this; ctrl.item; ctrl.resourceType = registry.getResourceType(resourceTypeCode); $scope.context.loadPromise.then(onGetResponse); function onGetResponse(response) { ctrl.item = response.data; var attr = ''; var keys = Object.keys(response.data.attributes); for (var i = keys.length - 1; i >= 0; i--) { attr += keys[i] + ':' + response.data.attributes[keys[i]] + ', '; } ctrl.item.attributes = attr; } } })(); ././@LongLink0000000000000000000000000000017600000000000011221 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/details/details.module.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000000340013656747241034002 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function() { 'use strict'; /** * @ngdoc overview * @ngname designatedashboard.resources.os-designate-zone.details * * @description * Provides details features for zones. */ angular.module('designatedashboard.resources.os-designate-zone.details', ['horizon.framework.conf', 'horizon.app.core']) .run(run); run.$inject = [ 'designatedashboard.resources.os-designate-zone.resourceType', 'designatedashboard.resources.os-designate-zone.api', 'designatedashboard.resources.os-designate-zone.basePath', 'horizon.framework.conf.resource-type-registry.service' ]; function run( zoneResourceType, zoneApi, basePath, registry ) { var resourceType = registry.getResourceType(zoneResourceType); resourceType .setLoadFunction(loadFunction) .setSummaryTemplateUrl(basePath + 'details/drawer.html'); resourceType.detailsViews .prepend({ id: 'zoneDetailsOverview', name: gettext('Overview'), template: basePath + 'details/overview.html', }, 0); function loadFunction(identifier) { return zoneApi.get(identifier); } } })(); ././@LongLink0000000000000000000000000000015500000000000011216 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000775000175000017500000000000013656747325034006 5ustar zuulzuul00000000000000././@LongLink0000000000000000000000000000020400000000000011211 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/common-forms.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000001251413656747241034010 0ustar zuulzuul00000000000000/** * * (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-zone.actions') .factory('designatedashboard.resources.os-designate-zone.actions.common-forms', service); service.$inject = [ ]; /** * Service to return a schema form config for action forms. Especially useful for forms * like create and update that differ only in the readonly state of certain form fields. * * @returns {object} A schema form config */ function service() { var service = { getCreateFormConfig: getCreateFormConfig, getUpdateFormConfig: getUpdateFormConfig }; return service; ///////////////// /** * Returns the create zone form config * @returns {{schema, form, model}|*} */ function getCreateFormConfig() { return getCreateUpdateFormConfig(false); } /** * Return the update zone form config * @returns {{schema, form, model}|*} */ function getUpdateFormConfig() { return getCreateUpdateFormConfig(true); } /** * Return the create/update zone form. The two forms are identical except for * during update, some fields are read-only. * * @param readonly - sets readonly value on form fields that change between update and create * @returns {object} a schema form config, including default model */ function getCreateUpdateFormConfig(readonly) { return { "schema": { "type": "object", "properties": { "name": { "type": "string", "pattern": /^.+\.$/ }, "description": { "type": "string" }, "email": { "type": "string", "format": "email", "pattern": /^[^@]+@[^@]+$/ }, "type": { "type": "string", "enum": [ "PRIMARY", "SECONDARY" ] }, "ttl": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, "masters": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string" } } }, "minItems": 1, "uniqueItems": true } } }, "form": [ { "key": "name", "readonly": readonly, "title": gettext("Name"), "description": gettext("Zone name ending in '.'"), "validationMessage": gettext("Zone must end with '.'"), "placeholder": "example.com.", "type": "text", "required": true }, { "key": "description", "type": "textarea", "title": gettext("Description"), "description": gettext("Details about the zone.") }, { "key": "email", "title": gettext("Email Address"), "description": gettext("Email address to contact the zone owner."), "validationMessage": gettext("Email address must contain a single '@' character"), "type": "text", "condition": "model.type == 'PRIMARY'", "required": true }, { "key": "ttl", "title": gettext("TTL"), "description": gettext("Time To Live in seconds."), "type": "number", "condition": "model.type == 'PRIMARY'", "required": true }, { "key": "type", "readonly": readonly, "title": gettext("Type"), "description": gettext("Select the type of zone"), "type": "select", "titleMap": [ { "value": "PRIMARY", "name": gettext("Primary") }, { "value": "SECONDARY", "name": gettext("Secondary") } ] }, { "key": "masters", "readonly": readonly, "title": gettext("Masters"), "type": "array", "description": gettext("DNS master(s) for the Secondary zone."), "condition": "model.type == 'SECONDARY'", "add": gettext("Add Master"), "items": [ { "key": "masters[].address", "title": gettext("IP Address") } ] } ], "model": { "type": "PRIMARY", "ttl": 3600 } }; } } })(); ././@LongLink0000000000000000000000000000017000000000000011213 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/create.htmldesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000000003013656747241033776 0ustar zuulzuul00000000000000

CREATE TEMPLATE

././@LongLink0000000000000000000000000000020300000000000011210 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/actions.module.spec.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000000272713656747241034015 0ustar zuulzuul00000000000000/** * * 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. */ (function() { 'use strict'; describe('zone actions module', function() { var registry; beforeEach(module('designatedashboard')); beforeEach(inject(function($injector) { registry = $injector.get('horizon.framework.conf.resource-type-registry.service'); })); it('registers Create Zone as a global action', function() { var actions = registry.getResourceType('OS::Designate::Zone').globalActions; expect(actionHasId(actions, 'create')).toBe(true); }); it('registers Update Zone as a item action', function() { var actions = registry.getResourceType('OS::Designate::Zone').itemActions; expect(actionHasId(actions, 'update')).toBe(true); }); function actionHasId(list, value) { return list.filter(matchesId).length === 1; function matchesId(action) { if (action.id === value) { return true; } } } }); })();././@LongLink0000000000000000000000000000017600000000000011221 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/update.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000001063513656747241034012 0ustar zuulzuul00000000000000/** * * (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-zone.actions') .factory('designatedashboard.resources.os-designate-zone.actions.update', action); action.$inject = [ '$q', 'designatedashboard.resources.os-designate-zone.actions.common-forms', 'designatedashboard.resources.os-designate-zone.api', 'designatedashboard.resources.os-designate-zone.resourceType', 'designatedashboard.resources.util', 'horizon.app.core.openstack-service-api.policy', 'horizon.app.core.openstack-service-api.serviceCatalog', 'horizon.framework.widgets.form.ModalFormService', 'horizon.framework.widgets.toast.service', 'horizon.framework.widgets.modal-wait-spinner.service' ]; /** * @ngDoc factory * @name designatedashboard.resources.os-designate-zone.actions.update * * @Description * Brings up the Update Zone modal. */ function action($q, forms, api, resourceTypeName, util, policy, serviceCatalog, schemaFormModalService, toast, waitSpinner) { var updateZonePolicy, dnsServiceEnabled; var title = gettext("Update Zone"); var message = { success: gettext('Zone %s was successfully updated.') }; var service = { initAction: initAction, allowed: allowed, perform: perform }; return service; ///////////////// function initAction() { updateZonePolicy = policy.ifAllowed({rules: [['dns', 'update_zone']]}); dnsServiceEnabled = serviceCatalog.ifTypeEnabled('dns'); } function allowed(zone) { // only supports row action (exactly 1 zone) if (zone) { return $q.all([ updateZonePolicy, util.notDeleted(zone), util.notPending(zone) ]); } else { return false; } } function perform(item) { var formConfig = forms.getUpdateFormConfig(); formConfig.title = title; formConfig.model = util.getModel(formConfig.form, item); // Append the id so it can be used on submit formConfig.model.id = item.id; // schema form doesn't appear to support populating the masters array directly // Map the masters objects to address objects if (item.hasOwnProperty("masters")) { var masters = item.masters.map(function (item) { return { "address": item } }) formConfig.masters = masters; } return schemaFormModalService.open(formConfig).then(onSubmit, onCancel); } function onSubmit(context) { var zoneModel = angular.copy(context.model); // schema form doesn't appear to support populating the masters array directly // Map the masters objects to simple array of addresses if (context.model.hasOwnProperty("masters")) { var masters = context.model.masters.map(function (item) { return item.address; }) zoneModel.masters = masters; } waitSpinner.showModalSpinner(gettext('Updating Zone')); return api.update(zoneModel.id, zoneModel).then(onSuccess, onFailure); } function onCancel() { waitSpinner.hideModalSpinner(); } function onSuccess(response) { waitSpinner.hideModalSpinner(); var zone = response.data; toast.add('success', interpolate(message.success, [zone.name])); // To make the result of this action generically useful, reformat the return // from the deleteModal into a standard form return { created: [], updated: [{type: resourceTypeName, id: zone.id}], deleted: [], failed: [] }; } function onFailure() { waitSpinner.hideModalSpinner(); } } })(); ././@LongLink0000000000000000000000000000017600000000000011221 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/create.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000000730313656747241034010 0ustar zuulzuul00000000000000/** * * (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-zone.actions') .factory('designatedashboard.resources.os-designate-zone.actions.create', action); action.$inject = [ '$q', 'designatedashboard.resources.os-designate-zone.actions.common-forms', 'designatedashboard.resources.os-designate-zone.api', 'designatedashboard.resources.os-designate-zone.resourceType', 'horizon.app.core.openstack-service-api.policy', 'horizon.app.core.openstack-service-api.serviceCatalog', 'horizon.framework.widgets.form.ModalFormService', 'horizon.framework.widgets.toast.service', 'horizon.framework.widgets.modal-wait-spinner.service' ]; /** * @ngDoc factory * @name designatedashboard.resources.os-designate-zone.actions.create * * @Description * Brings up the Create Zone modal. */ function action($q, forms, api, resourceTypeName, policy, serviceCatalog, schemaFormModalService, toast, waitSpinner) { var createZonePolicy, dnsServiceEnabled; var title = gettext("Create Zone"); var message = { success: gettext('Zone %s was successfully created.') }; var service = { initAction: initAction, allowed: allowed, perform: perform }; return service; ///////////////// function initAction() { createZonePolicy = policy.ifAllowed({rules: [['dns', 'create_zone']]}); dnsServiceEnabled = serviceCatalog.ifTypeEnabled('dns'); } function allowed() { return $q.all([ createZonePolicy, dnsServiceEnabled ]); } function perform() { var formConfig = forms.getCreateFormConfig(); formConfig.title = title; return schemaFormModalService.open(formConfig).then(onSubmit, onCancel); } function onSubmit(context) { var zoneModel = angular.copy(context.model); // schema form doesn't appear to support populating the masters array directly // Map the masters objects to simple array of addresses if (context.model.hasOwnProperty("masters")) { var masters = context.model.masters.map(function (item) { return item.address; }); zoneModel.masters = masters; } waitSpinner.showModalSpinner(gettext('Creating Zone')); return api.create(zoneModel).then(onSuccess, onFailure); } function onCancel() { waitSpinner.hideModalSpinner(); } function onSuccess(response) { waitSpinner.hideModalSpinner(); var zone = response.data; toast.add('success', interpolate(message.success, [zone.name])); // To make the result of this action generically useful, reformat the return // from the deleteModal into a standard form return { created: [{type: resourceTypeName, id: zone.id}], updated: [], deleted: [], failed: [] }; } function onFailure() { waitSpinner.hideModalSpinner(); } } })(); ././@LongLink0000000000000000000000000000017600000000000011221 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/delete.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000001153113656747241034006 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function() { 'use strict'; angular .module('designatedashboard.resources.os-designate-zone.actions') .factory('designatedashboard.resources.os-designate-zone.actions.delete', action); action.$inject = [ '$q', 'designatedashboard.resources.os-designate-zone.api', 'designatedashboard.resources.util', 'horizon.app.core.openstack-service-api.policy', 'horizon.framework.util.actions.action-result.service', 'horizon.framework.util.i18n.gettext', 'horizon.framework.util.q.extensions', 'horizon.framework.widgets.modal.deleteModalService', 'horizon.framework.widgets.toast.service', 'designatedashboard.resources.os-designate-zone.resourceType' ]; /* * @ngdoc factory * @name designatedashboard.resources.os-designate-zone.actions.delete * * @Description * Brings up the delete zone confirmation modal dialog. * On submit, delete given zone. * On cancel, do nothing. */ function action( $q, zoneApi, util, policy, actionResultService, gettext, $qExtensions, deleteModal, toast, resourceType ) { var context, deleteZonePromise; var notAllowedMessage = gettext("You are not allowed to delete zones: %s"); var service = { initAction: initAction, allowed: allowed, perform: perform }; return service; ////////////// function initAction() { context = { }; deleteZonePromise = policy.ifAllowed({rules: [['dns', 'delete_zone']]}); } function perform(items, scope) { var zones = angular.isArray(items) ? items : [items]; context.labels = labelize(zones.length); context.deleteEntity = deleteZone; return $qExtensions .allSettled(zones.map(checkPermission)) .then( afterCheck.bind(this, scope) ); } function allowed(zone) { // only row actions pass in zone // otherwise, assume it is a batch action if (zone) { return $q.all([ deleteZonePromise, util.notDeleted(zone), util.notPending(zone) ]); } else { return policy.ifAllowed({ rules: [['dns', 'delete_zone']] }); } } function checkPermission(zone) { return {promise: allowed(zone), context: zone}; } function afterCheck(scope, result) { var outcome = $q.reject(); // Reject the promise by default if (result.fail.length > 0) { toast.add('error', getMessage(notAllowedMessage, result.fail)); outcome = $q.reject(result.fail); } if (result.pass.length > 0) { outcome = deleteModal.open(scope, result.pass.map(getEntity), context).then(createResult); } return outcome; } function createResult(deleteModalResult) { // To make the result of this action generically useful, reformat the return // from the deleteModal into a standard form var actionResult = actionResultService.getActionResult(); deleteModalResult.pass.forEach(function markDeleted(item) { actionResult.deleted(resourceType, getEntity(item).id); }); deleteModalResult.fail.forEach(function markFailed(item) { actionResult.failed(resourceType, getEntity(item).id); }); return actionResult.result; } function labelize(count) { return { title: ngettext( 'Confirm Delete Zone', 'Confirm Delete Zones', count), message: ngettext( 'You have selected "%s". Deleted zone is not recoverable.', 'You have selected "%s". Deleted zones are not recoverable.', count), submit: ngettext( 'Delete Zone', 'Delete Zones', count), success: ngettext( 'Deleted Zone: %s.', 'Deleted Zones: %s.', count), error: ngettext( 'Unable to delete Zone: %s.', 'Unable to delete Zones: %s.', count) }; } function deleteZone(zone) { return zoneApi.deleteZone(zone, true); } function getMessage(message, entities) { return interpolate(message, [entities.map(getName).join(", ")]); } function getName(result) { return getEntity(result).name; } function getEntity(result) { return result.context; } } })(); ././@LongLink0000000000000000000000000000017600000000000011221 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/actions.module.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000000407213656747241034010 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function () { 'use strict'; /** * @ngdoc overview * @ngname designatedashboard.resources.os-designate-zone.actions * * @description * Provides all of the actions for DNS Zones. */ angular.module('designatedashboard.resources.os-designate-zone.actions', [ 'horizon.framework.conf', 'horizon.app.core' ]) .run(run); run.$inject = [ 'horizon.framework.conf.resource-type-registry.service', 'designatedashboard.resources.os-designate-zone.resourceType', 'designatedashboard.resources.os-designate-zone.actions.create', 'designatedashboard.resources.os-designate-zone.actions.delete', 'designatedashboard.resources.os-designate-zone.actions.update' ]; function run(registry, resourceTypeString, createAction, deleteAction, updateAction) { var resourceType = registry.getResourceType(resourceTypeString); resourceType .globalActions .append({ id: 'create', service: createAction, template: { text: gettext('Create Zone') } }); resourceType .itemActions .append({ id: 'update', service: updateAction, template: { text: gettext('Update') } }) .append({ id: 'delete', service: deleteAction, template: { text: gettext('Delete'), type: 'delete' } }); } })(); ././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/api.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000001034013656747241034003 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-zone') .factory('designatedashboard.resources.os-designate-zone.api', apiService); apiService.$inject = [ 'designatedashboard.apiPassthroughUrl', 'horizon.framework.util.http.service', 'horizon.framework.widgets.toast.service' ]; /** * @ngdoc service * @param {Object} httpService * @param {Object} toastService * @name apiService * @description Provides direct access to Designate Zone APIs. * @returns {Object} The service */ function apiService(apiPassthroughUrl, httpService, toastService) { var service = { get: get, list: list, deleteZone: deleteZone, create: create, update: update }; return service; /////////////// /** * @name list * @description * Get a list of zones. * * The listing result is an object with property "items." Each item is * a zone. * * @param {Object} params * Query parameters. Optional. * * @returns {Object} The result of the API call */ /* function list(params) { var config = params ? {'params': params} : {}; return httpService.get('/api/designate/zones/', config) .error(function () { toastService.add('error', gettext('Unable to retrieve the zone.')); }); }*/ function list(params) { var config = params ? {'params': params} : {}; return httpService.get(apiPassthroughUrl + 'v2/zones/', config) .error(function () { toastService.add('error', gettext('Unable to retrieve the zone.')); }); } /** * @name get * @description * Get a single zone by ID. * * @param {string} id * Specifies the id of the zone to request. * * @returns {Object} The result of the API call */ function get(id) { return httpService.get(apiPassthroughUrl + 'v2/zones/' + id + '/') .error(function () { toastService.add('error', gettext('Unable to retrieve the zone.')); }); } /** * @name deleteZone * @description * Delete a single zone by ID * @param id * @returns {*} */ function deleteZone(id) { return httpService.delete(apiPassthroughUrl + 'v2/zones/' + id + '/') .error(function () { toastService.add('error', gettext('Unable to delete the zone.')); }); } /** * @name create * @description * Create a zone * * @param {Object} data * Specifies the zone information to create * * @returns {Object} The created zone object */ function create(data) { return httpService.post(apiPassthroughUrl + 'v2/zones/', data) .error(function() { toastService.add('error', gettext('Unable to create the zone.')); }) } /** * @name create * @description * Update a zone * * @param {Object} id - zone id * @param {Object} data to pass directly to zone update API * Specifies the zone information to update * * @returns {Object} The updated zone object */ function update(id, data) { // The update API will not accept extra data. Restrict the input to only the allowed // fields var apiData = { email: data.email, ttl: data.ttl, description: data.description }; return httpService.patch(apiPassthroughUrl + 'v2/zones/' + id + '/', apiData ) .error(function() { toastService.add('error', gettext('Unable to update the zone.')); }) } } }()); ././@LongLink0000000000000000000000000000020000000000000011205 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/os-designate-zone.module.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-zone/0000664000175000017500000001314413656747241034010 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function () { 'use strict'; /** * @ngdoc overview * @ngname designatedashboard.resources.os-designate-zone * * @description * Provides all of the services and widgets required * to support and display DNS (designate) zone related content. */ angular .module('designatedashboard.resources.os-designate-zone', [ 'ngRoute', 'designatedashboard.resources.os-designate-zone.actions', 'designatedashboard.resources.os-designate-zone.details' ]) .constant( 'designatedashboard.resources.os-designate-zone.resourceType', 'OS::Designate::Zone') .config(config) .run(run); config.$inject = ['$provide', '$windowProvider']; function config($provide, $windowProvider) { var path = $windowProvider.$get().STATIC_URL + 'designatedashboard/resources/os-designate-zone/'; $provide.constant('designatedashboard.resources.os-designate-zone.basePath', path); } run.$inject = [ 'horizon.app.core.detailRoute', 'horizon.framework.conf.resource-type-registry.service', 'designatedashboard.resources.os-designate-zone.api', 'designatedashboard.resources.os-designate-zone.resourceType', 'designatedashboard.resources.util' ]; function run(detailRoute, registry, zoneApi, resourceTypeString, util) { var resourceType = registry.getResourceType(resourceTypeString); resourceType .setNames(gettext('DNS Zone'), gettext('DNS Zones')) .setListFunction(listZones) .setProperty('action', { label: gettext('Action'), filters: ['lowercase', 'noName'], values: util.actionMap() }) .setProperty('attributes', { label: gettext('Attributes') }) .setProperty('created_at', { label: gettext('Created At'), filters: ['noValue'] }) .setProperty('description', { label: gettext('Description'), filters: ['noName'] }) .setProperty('email', { label: gettext('Email'), filters: ['noName'] }) .setProperty('id', { label: gettext('ID') }) .setProperty('masters', { label: gettext('Masters'), filters: ['noValue'] }) .setProperty('name', { label: gettext('Name'), filters: ['noName'] }) .setProperty('pool_id', { label: gettext('Pool ID') }) .setProperty('project_id', { label: gettext('Project ID') }) .setProperty('serial', { label: gettext('Serial'), filters: ['noValue'] }) .setProperty('status', { label: gettext('Status'), filters: ['lowercase', 'noName'], values: util.statusMap() }) .setProperty('transferred_at', { label: gettext('Transferred At'), filters: ['noValue'] }) .setProperty('ttl', { label: gettext('Time To Live'), filters: ['noValue'] }) .setProperty('type', { label: gettext('Type'), filters: ['lowercase', 'noName'], values: typeMap() }) .setProperty('updated_at', { label: gettext('Updated At'), filters: ['noValue'] }) .setProperty('version', { label: gettext('Version'), filters: ['noValue'] }); resourceType .tableColumns .append({ id: 'name', priority: 1, sortDefault: true, template: '{$ item.name $}' }) .append({ id: 'type', filters: ['lowercase'], values: typeMap(), priority: 2 }) .append({ id: 'status', filters: ['lowercase'], values: util.statusMap(), priority: 2 }); resourceType .filterFacets .append({ label: gettext('Name'), name: 'name', isServer: false, singleton: true, persistent: false }) .append({ label: gettext('Type'), name: 'type', isServer: false, singleton: true, persistent: false, options: [ {label: gettext('Primary'), key: 'primary'}, {label: gettext('Secondary'), key: 'secondary'} ] }) .append({ label: gettext('Status'), name: 'status', isServer: false, singleton: true, persistent: false, options: [ {label: gettext('Active'), key: 'active'}, {label: gettext('Pending'), key: 'pending'} ] }); function typeMap() { return { 'primary': gettext('Primary'), 'secondary': gettext('Secondary') } } function listZones() { return zoneApi.list().then(function onList(response) { // listFunctions are expected to return data in "items" response.data.items = response.data.zones; util.addTimestampIds(response.data.items, 'id', 'updated_at'); return response; }); } } })(); ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/resources.module.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/resources.module.j0000664000175000017500000000231313656747241034120 0ustar zuulzuul00000000000000/* * (c) Copyright 2016 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. */ (function () { 'use strict'; /** * @ngdoc overview * @name designatedashboard.resources * @description * * # designatedashboard.resources * * This module hosts registered resource types. This module file may * contain individual registrations, or may have sub-modules that * more fully contain registrations. */ angular .module('designatedashboard.resources', [ 'designatedashboard.resources.os-designate-recordset', 'designatedashboard.resources.os-designate-zone', 'designatedashboard.resources.os-designate-floatingip' ]); })(); ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000775000175000017500000000000013656747325034061 5ustar zuulzuul00000000000000././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/details/designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000775000175000017500000000000013656747325034061 5ustar zuulzuul00000000000000././@LongLink0000000000000000000000000000017600000000000011221 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/details/drawer.htmldesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000664000175000017500000000034613656747241034063 0ustar zuulzuul00000000000000 ././@LongLink0000000000000000000000000000020000000000000011205 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/details/overview.htmldesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000664000175000017500000000063613656747241034065 0ustar zuulzuul00000000000000
././@LongLink0000000000000000000000000000021100000000000011207 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/details/overview.controller.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000664000175000017500000000252213656747241034061 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function() { "use strict"; angular .module('designatedashboard.resources.os-designate-floatingip.details') .controller('designatedashboard.resources.os-designate-floatingip.details.overviewController', controller); controller.$inject = [ 'designatedashboard.resources.os-designate-floatingip.resourceType', 'horizon.framework.conf.resource-type-registry.service', '$scope' ]; function controller( resourceTypeCode, registry, $scope ) { var ctrl = this; ctrl.item; ctrl.resourceType = registry.getResourceType(resourceTypeCode); $scope.context.loadPromise.then(onGetResponse); function onGetResponse(response) { ctrl.item = response.data; } } })(); ././@LongLink0000000000000000000000000000020400000000000011211 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/details/details.module.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000664000175000017500000000364313656747241034066 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function() { 'use strict'; /** * @ngdoc overview * @ngname designatedashboard.resources.os-designate-floatingip.details * * @description * Provides details features for floating IPs. */ angular.module('designatedashboard.resources.os-designate-floatingip.details', ['horizon.framework.conf', 'horizon.app.core']) .run(run); run.$inject = [ 'designatedashboard.resources.os-designate-floatingip.resourceType', 'designatedashboard.resources.os-designate-floatingip.api', 'designatedashboard.resources.os-designate-floatingip.basePath', 'horizon.framework.conf.resource-type-registry.service' ]; function run( resourceTypeName, api, basePath, registry ) { var resourceType = registry.getResourceType(resourceTypeName); resourceType .setLoadFunction(loadFunction) .setSummaryTemplateUrl(basePath + 'details/drawer.html') .setItemNameFunction(itemNameFunction); resourceType.detailsViews .prepend({ id: 'floatingIpDetailsOverview', name: gettext('Overview'), template: basePath + 'details/overview.html' }, 0); function loadFunction(identifier) { return api.get(identifier); } function itemNameFunction(floatingIp) { return floatingIp.address; } } })(); ././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/actions/designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000775000175000017500000000000013656747325034061 5ustar zuulzuul00000000000000././@LongLink0000000000000000000000000000020300000000000011210 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/actions/unset.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000664000175000017500000000764413656747241034073 0ustar zuulzuul00000000000000/** * * (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-floatingip.actions') .factory('designatedashboard.resources.os-designate-floatingip.actions.unset', action); action.$inject = [ '$q', 'designatedashboard.resources.os-designate-floatingip.api', 'designatedashboard.resources.os-designate-floatingip.resourceType', 'designatedashboard.resources.util', 'horizon.app.core.openstack-service-api.serviceCatalog', 'horizon.framework.util.q.extensions', 'horizon.framework.widgets.form.ModalFormService', 'horizon.framework.widgets.toast.service', 'horizon.framework.widgets.modal-wait-spinner.service' ]; /** * @ngDoc factory * @name designatedashboard.resources.os-designate-floatingip.actions.unset * * @Description * Brings up the Unset Floating IP modal. */ function action($q, api, resourceTypeName, util, serviceCatalog, $qExtensions, schemaFormModalService, toast, waitSpinner) { var dnsServiceEnabled; var title = null; // Set on perform var currentFloatingIpId; // Used to remember the ID we are modifying since it isn't returned by the unset API call // Unset it just a simple case of "set", but with ptrdname of 'null' var formConfig = { "schema": { "type": "object", "properties": { } }, "form": [ ], "model": { } }; var message = { success: gettext('Domain name PTR successfully unset.') }; var service = { initAction: initAction, allowed: allowed, perform: perform }; return service; ///////////////// function initAction() { dnsServiceEnabled = serviceCatalog.ifTypeEnabled('dns'); } function allowed(item) { return $q.all([ // TODO (tyr) designate currently has no floating ip policy rules dnsServiceEnabled, domainNameSet(item), util.notPending(item) ]); } function domainNameSet(item) { return $qExtensions.booleanAsPromise( angular.isString(item.ptrdname) ); } function perform(item) { title = gettext("Unset Domain Name PTR for ") + item.address; // Store the zone ID so it can be used on submit formConfig.model.floatingIpId = item.id; formConfig.title = title; return schemaFormModalService.open(formConfig).then(onSubmit, onCancel); } function onSubmit(context) { waitSpinner.showModalSpinner(title); currentFloatingIpId = context.model.floatingIpId; return api.unset(currentFloatingIpId).then(onSuccess, onFailure); } function onCancel() { waitSpinner.hideModalSpinner(); } function onSuccess(response) { waitSpinner.hideModalSpinner(); toast.add('success', message.success); // To make the result of this action generically useful, reformat the return // from the deleteModal into a standard form return { created: [], updated: [{type: resourceTypeName, id: currentFloatingIpId}], deleted: [], failed: [] }; } function onFailure() { waitSpinner.hideModalSpinner(); } } })(); ././@LongLink0000000000000000000000000000020100000000000011206 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/actions/set.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000664000175000017500000001146313656747241034065 0ustar zuulzuul00000000000000/** * * (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-floatingip.actions') .factory('designatedashboard.resources.os-designate-floatingip.actions.set', action); action.$inject = [ '$q', 'designatedashboard.resources.os-designate-floatingip.api', 'designatedashboard.resources.os-designate-floatingip.resourceType', 'designatedashboard.resources.util', 'horizon.app.core.openstack-service-api.serviceCatalog', 'horizon.framework.widgets.form.ModalFormService', 'horizon.framework.widgets.toast.service', 'horizon.framework.widgets.modal-wait-spinner.service' ]; /** * @ngDoc factory * @name designatedashboard.resources.os-designate-floatingip.actions.set * * @Description * Brings up the Set Floating IP modal. */ function action($q, api, resourceTypeName, util, serviceCatalog, schemaFormModalService, toast, waitSpinner) { var dnsServiceEnabled; var title = null; // Set once perform is called var formConfig = { "schema": { "type": "object", "properties": { "ptrdname": { "type": "string", "pattern": /^.+\.$/ }, "description": { "type": "string" }, "ttl": { "type": "integer", "minimum": 0, "maximum": 2147483647 }, } }, "form": [ { "key": "ptrdname", "title": gettext("Domain Name"), "description": gettext("Domain name ending in '.'"), "validationMessage": gettext("Domain must end with '.'"), "placeholder": "smtp.example.com.", "type": "text", "required": true }, { "key": "description", "type": "textarea", "title": gettext("Description"), "description": gettext("Details about the PTR record.") }, { "key": "ttl", "title": gettext("TTL"), "description": gettext("Time To Live in seconds."), "type": "number" } ] }; var message = { success: gettext('Domain name PTR %s was successfully set.') }; var service = { initAction: initAction, allowed: allowed, perform: perform }; return service; ///////////////// function initAction() { dnsServiceEnabled = serviceCatalog.ifTypeEnabled('dns'); } function allowed(item) { return $q.all([ // TODO (tyr) designate currently has no floating ips policy rules dnsServiceEnabled, util.notPending(item) ]); } function perform(item) { // Initialize the per-item title for use now and during submit title = gettext("Set Domain Name PTR for ") + item.address; formConfig.title = title; // Get a form model based on the current item formConfig.model = util.getModel(formConfig.form, item); // Initialize default data formConfig.model.ttl = formConfig.model.ttl || 3600; // Remember the ID for use during submit formConfig.model.floatingIpId = item.id; return schemaFormModalService.open(formConfig).then(onSubmit, onCancel); } function onSubmit(context) { var model = angular.copy(context.model); var floatingIpId = formConfig.model.floatingIpId; waitSpinner.showModalSpinner(title); return api.set(floatingIpId, model).then(onSuccess, onFailure); } function onCancel() { waitSpinner.hideModalSpinner(); } function onSuccess(response) { waitSpinner.hideModalSpinner(); var floatingIp = response.data; toast.add('success', interpolate(message.success, [floatingIp.ptrdname])); // To make the result of this action generically useful, reformat the return // from the deleteModal into a standard form return { created: [], updated: [{type: resourceTypeName, id: floatingIp.id}], deleted: [], failed: [] }; } function onFailure() { waitSpinner.hideModalSpinner(); } } })(); ././@LongLink0000000000000000000000000000020400000000000011211 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/actions/actions.module.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000664000175000017500000000341613656747241034064 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function() { 'use strict'; /** * @ngdoc overview * @ngname designatedashboard.resources.os-designate-floatingip.actions * * @description * Provides all of the actions for DNS Floating IPs. */ angular.module('designatedashboard.resources.os-designate-floatingip.actions', [ 'horizon.framework.conf', 'horizon.app.core' ]) .run(run); run.$inject = [ 'horizon.framework.conf.resource-type-registry.service', 'designatedashboard.resources.os-designate-floatingip.resourceType', 'designatedashboard.resources.os-designate-floatingip.actions.set', 'designatedashboard.resources.os-designate-floatingip.actions.unset' ]; function run( registry, resourceTypeString, setAction, unsetAction) { var resourceType = registry.getResourceType(resourceTypeString); resourceType .itemActions .append({ id: 'setFloatingIp', service: setAction, template: { text: gettext('Set') } }) .append({ id: 'unsetFloatingIp', service: unsetAction, template: { text: gettext('Unset') } }); } })(); ././@LongLink0000000000000000000000000000021400000000000011212 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/os-designate-floatingip.module.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000664000175000017500000001057713656747241034072 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function() { 'use strict'; /** * @ngdoc overview * @ngname designatedashboard.resources.os-designate-floatingip * * @description * Provides all of the services and widgets required * to support and display DNS (designate) floating ip related content. */ angular .module('designatedashboard.resources.os-designate-floatingip', [ 'ngRoute', 'designatedashboard.resources.os-designate-floatingip.actions', 'designatedashboard.resources.os-designate-floatingip.details' ]) .constant( 'designatedashboard.resources.os-designate-floatingip.resourceType', 'OS::Designate::FloatingIp') .config(config) .run(run); config.$inject = [ '$provide', '$windowProvider' ]; function config($provide, $windowProvider) { var path = $windowProvider.$get().STATIC_URL + 'designatedashboard/resources/os-designate-floatingip/'; $provide.constant('designatedashboard.resources.os-designate-floatingip.basePath', path); } run.$inject = [ 'horizon.app.core.detailRoute', 'horizon.framework.conf.resource-type-registry.service', 'designatedashboard.resources.os-designate-floatingip.api', 'designatedashboard.resources.os-designate-floatingip.resourceType', 'designatedashboard.resources.util' ]; function run( detailRoute, registry, api, resourceTypeString, util) { var resourceType = registry.getResourceType(resourceTypeString); resourceType .setNames(gettext('Floating IP'), gettext('Floating IPs')) .setListFunction(listFloatingIps) .setProperty('id', { label: gettext('ID') }) .setProperty('ptrdname', { label: gettext('PTR Domain Name'), filters: ['noName'] }) .setProperty('description', { label: gettext('Description'), filters: ['noName'] }) .setProperty('ttl', { label: gettext('Time To Live'), filters: ['noValue'] }) .setProperty('address', { label: gettext('Address'), filters: ['noName'] }) .setProperty('status', { label: gettext('Status'), filters: ['lowercase', 'noName'], values: util.statusMap() }) .setProperty('action', { label: gettext('Action'), filters: ['lowercase', 'noName'], values: util.actionMap() }); resourceType .tableColumns .append({ id: 'address', priority: 1, sortDefault: true, template: '{$ item.address $}' }) .append({ id: 'ptrdname', filters: ['noValue'], priority: 1, }) .append({ id: 'status', filters: ['lowercase'], values: util.statusMap(), priority: 2 }); resourceType .filterFacets .append({ label: gettext('Address'), name: 'address', isServer: false, singleton: true, persistent: false }) .append({ label: gettext('PTR Domain Name'), name: 'ptrdname', isServer: false, singleton: true, persistent: false }) .append({ label: gettext('Status'), name: 'status', isServer: false, singleton: true, persistent: false, options: [ {label: gettext('Active'), key: 'active'}, {label: gettext('Pending'), key: 'pending'} ] }); function listFloatingIps() { return api.list().then(function onList(response) { // listFunctions are expected to return data in "items" response.data.items = response.data.floatingips; util.addTimestampIds(response.data.items); return response; }); } } })(); ././@LongLink0000000000000000000000000000017100000000000011214 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-floatingip/api.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-float0000664000175000017500000000705413656747241034066 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-floatingip') .factory('designatedashboard.resources.os-designate-floatingip.api', apiService); apiService.$inject = [ 'designatedashboard.apiPassthroughUrl', 'horizon.framework.util.http.service', 'horizon.framework.widgets.toast.service' ]; /** * @ngdoc service * @param {Object} httpService * @param {Object} toastService * @name apiService * @description Provides direct access to Designate Floating IP APIs. * @returns {Object} The service */ function apiService(apiPassthroughUrl, httpService, toastService) { var service = { list: list, get: get, set: set, unset: unset }; return service; /////////////// /** * @name list * @description * Get a list of DNS floating ips. * * The listing result is an object with property "items." Each item is * a floating IP PTR record. * * @param {Object} params * Query parameters. Optional. * * @returns {Object} The result of the API call */ function list(params) { var config = params ? {'params': params} : {}; return httpService.get(apiPassthroughUrl + 'v2/reverse/floatingips', config) .error(function () { toastService.add('error', gettext('Unable to retrieve the floating ip PTRs.')); }); } function get(id, params) { var config = params ? {'params': params} : {}; return httpService.get(apiPassthroughUrl + 'v2/reverse/floatingips/' + id, config) .error(function () { toastService.add('error', gettext('Unable to get the floating ip PTR ' + id)); }); } /** * @name set * @description * Set a floating ip PTR record * * @param {string} floatingIpID - ID of PTR record to unset * @param {Object} data * Specifies the PTR information to set * * @returns {Object} The updated DNS floating IP object */ function set(floatingIpID, data) { // The update API will not accept extra data. Restrict the input to only the allowed // fields var apiData = { ptrdname: data.ptrdname, description: data.description, ttl: data.ttl }; return httpService.patch(apiPassthroughUrl + 'v2/reverse/floatingips/' + floatingIpID, apiData) .error(function () { toastService.add('error', gettext('Unable to set the floating IP PTR record.')); }) } /** * @name unset * @description * Unset a floating ip PTR record * * @param {string} floatingIpID - ID of PTR record to unset * * @returns {Object} The updated DNS floating IP object */ function unset(floatingIpID) { // Unset is just a special case of 'set' return set(floatingIpID, { ptrdname: null, description: null, ttl: null }) } } }()); designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/util.service.js0000664000175000017500000000636713656747241033436 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources') .factory('designatedashboard.resources.util', utilService); utilService.$inject = [ 'horizon.framework.util.q.extensions', ]; function utilService($qExtensions) { var service = { notDeleted: notDeleted, notPending: notPending, getModel: getModel, actionMap: actionMap, statusMap: statusMap, addTimestampIds: addTimestampIds }; return service; /////////////// function notDeleted(resource) { return $qExtensions.booleanAsPromise(resource.status !== 'DELETED'); } function notPending(resource) { return $qExtensions.booleanAsPromise(resource.status !== 'PENDING'); } /** * Build a model object based on the given item, using only the fields present in the form config 'key's. * Only 'truthy' values are copied. * * @param form - an array of objects describing the form. Must have a 'key' attribute. * @param item - the data to copy into the model */ function getModel(form, item) { var result = {}; var value; form.forEach(function iterateForm(formItem) { value = item[formItem.key]; if (value) { result[formItem.key] = item[formItem.key]; } }); return result; } function actionMap() { return { 'none': gettext('None'), 'create': gettext('Create') } } function statusMap() { return { 'active': gettext('Active'), 'pending': gettext('Pending') } } /** * hz-resource-table tracks by 'id' which doesn't change when an individual item is updated. * Create a synthetic '_timestampId' using the item id plus the specified timestamp field. * When this field is used as a track-by in hz-resource-table, items in the table to update * after row actions. * * If a timestamp field is not specified, the current time is used. * * @param items {object} - The items to add a _timestampId. * @param idField {string} - (Optional) A field on the item to use as the id. Defaults to 'id' * @param timestampField {string} - (Optional) A field on item to use as a timestamp. Defaults * to current time. */ function addTimestampIds(items, idField, timestampField) { var _idField = idField || 'id'; var timestamp = Date.now(); items.map(function annotateFloatingIp(item) { if ( angular.isDefined(timestampField) ) { timestamp = item[timestampField]; } item._timestampId = item[_idField] + timestamp; }); } } }()); ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000775000175000017500000000000013656747325034066 5ustar zuulzuul00000000000000././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000775000175000017500000000000013656747325034066 5ustar zuulzuul00000000000000././@LongLink0000000000000000000000000000017500000000000011220 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/drawer.htmldesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000000037113656747241034066 0ustar zuulzuul00000000000000 ././@LongLink0000000000000000000000000000017700000000000011222 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/overview.htmldesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000000257313656747241034074 0ustar zuulzuul00000000000000

Details


Associations


Modification Times


././@LongLink0000000000000000000000000000020600000000000011213 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/zone-recordsets.htmldesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000000044713656747241034072 0ustar zuulzuul00000000000000
././@LongLink0000000000000000000000000000021000000000000011206 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/overview.controller.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000000250213656747241034064 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function() { "use strict"; angular .module('designatedashboard.resources.os-designate-recordset') .controller('designatedashboard.resources.os-designate-recordset.detailController', controller); controller.$inject = [ 'designatedashboard.resources.os-designate-recordset.resourceType', 'horizon.framework.conf.resource-type-registry.service', '$scope' ]; function controller( resourceTypeCode, registry, $scope ) { var ctrl = this; ctrl.item = {}; ctrl.resourceType = registry.getResourceType(resourceTypeCode); $scope.context.loadPromise.then(onGetResponse); function onGetResponse(response) { ctrl.item = response.data; } } })(); ././@LongLink0000000000000000000000000000020300000000000011210 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/details.module.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000000625613656747241034076 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function() { 'use strict'; /** * @ngdoc overview * @ngname designatedashboard.resources.os-designate-recordset.details * * @description * Provides details features for record sets. */ angular.module('designatedashboard.resources.os-designate-recordset.details', ['horizon.framework.conf', 'horizon.app.core']) .run(run); run.$inject = [ 'designatedashboard.resources.os-designate-recordset.resourceType', 'designatedashboard.resources.os-designate-recordset.api', 'designatedashboard.resources.os-designate-recordset.basePath', 'horizon.framework.conf.resource-type-registry.service', ]; function run( recordSetResourceType, recordSetApi, basePath, registry ) { var resourceType = registry.getResourceType(recordSetResourceType); resourceType .setLoadFunction(loadFunction) .setPathGenerator(pathGenerator) .setPathParser(pathParser) .setSummaryTemplateUrl(basePath + 'details/drawer.html'); /** * * @param identifier * The object returned by the pathParser containing the zone ID and record set ID to load */ function loadFunction(identifier) { return recordSetApi.get(identifier.zoneId, identifier.recordSetId); } /** * Because a record set is contained by a zone, we implement a custom * pathGenerator to encode the zone ID and record set ID for the generic * details panel. * * @param item * A record set * * @returns {string} In format "/" */ function pathGenerator(item) { return item.zone_id + '/' + item.id; } /** * Given a path, extract the zone and record set ids * * @param path * created by pathGenerator * * @returns {{zoneId: *, recordSetId: *}} * The identifier to pass to the load function needed to uniquely identify * a record set. */ function pathParser(path) { var split = path.split('/'); return { zoneId: split[0], recordSetId: split[1] } } resourceType.detailsViews .prepend({ id: 'recordsetDetailsOverview', name: gettext('Overview'), template: basePath + 'details/overview.html', }, 0); // Append a record set view to the zones resource view var zoneResourceType = registry.getResourceType("OS::Designate::Zone"); zoneResourceType.detailsViews .append({ id: 'zoneRecordSets', name: gettext('Record Sets'), template: basePath + 'details/zone-recordsets.html', }); } })(); ././@LongLink0000000000000000000000000000021700000000000011215 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/zone-recordsets.controller.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000000224713656747241034072 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function() { "use strict"; angular .module('designatedashboard.resources.os-designate-recordset') .controller('designatedashboard.resources.os-designate-recordset.zoneRecordSetsController', controller); controller.$inject = [ '$scope', 'designatedashboard.resources.os-designate-recordset.resourceType' ]; function controller( $scope, resourceTypeName ) { var ctrl = this; ctrl.item = {}; ctrl.resourceTypeName = resourceTypeName; ctrl.extraListParams = { zoneId: $scope.context.identifier }; } })(); ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000775000175000017500000000000013656747325034066 5ustar zuulzuul00000000000000././@LongLink0000000000000000000000000000021100000000000011207 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/common-forms.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000001141613656747241034070 0ustar zuulzuul00000000000000/** * * (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-recordset.actions') .factory('designatedashboard.resources.os-designate-recordset.actions.common-forms', service); service.$inject = [ 'designatedashboard.resources.os-designate-recordset.editableTypes', 'designatedashboard.resources.os-designate-recordset.typeMap' ]; /** * Service to return a schema form config for action forms. Especially useful for forms * like create and update that differ only in the readonly state of certain form fields. * * @returns {object} A schema form config */ function service(editableTypes, typeMap) { var service = { getCreateFormConfig: getCreateFormConfig, getUpdateFormConfig: getUpdateFormConfig }; return service; ///////////////// /** * Returns the create form config * @returns {{schema, form, model}|*} */ function getCreateFormConfig() { return getCreateUpdateFormConfig(false); } /** * Return the update form config * @returns {{schema, form, model}|*} */ function getUpdateFormConfig() { return getCreateUpdateFormConfig(true); } /** * Return the create/update form. The two forms are identical except for * during update, some fields are read-only. * * @param readonly - sets readonly value on form fields that change between update and create * @returns {object} a schema form config, including default model */ function getCreateUpdateFormConfig(readonly) { return { "schema": { "type": "object", "properties": { "name": { "type": "string", "pattern": /^.+\.$/ }, "description": { "type": "string" }, "type": { "type": "string", "enum": editableTypes }, "ttl": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, "records": { "type": "array", "items": { "type": "object", "properties": { "record": { "type": "string" } } }, "minItems": 1, "uniqueItems": true } } }, "form": [ { "key": "type", "readonly": readonly, "title": gettext("Type"), "description": gettext("Select the type of record set"), "type": "select", "titleMap": editableTypes.map(function toTitleMap(type) { return { "value": type, "name": typeMap[type] } }), "required": true }, { "key": "name", "readonly": readonly, "type": "text", "title": gettext("Name"), "description": gettext("DNS name for the record set, ending in '.'"), "validationMessage": gettext("DNS name must end with '.'"), "placeholder": "www.example.com.", "required": true }, { "key": "description", "type": "textarea", "title": gettext("Description"), "description": gettext("Details about the zone.") }, { "key": "ttl", "title": gettext("TTL"), "description": gettext("Time To Live in seconds."), "type": "number", "required": true }, { "key": "records", "title": gettext("Records"), "type": "array", "description": gettext("Records for the record set."), "add": gettext("Add Record"), "items": [ { "key": "records[].record", "title": gettext("Record") } ], "required": true } ], "model": { "type": "A", "ttl": 3600 } }; } } })(); ././@LongLink0000000000000000000000000000020300000000000011210 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/update.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000001202313656747241034063 0ustar zuulzuul00000000000000/** * * (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-recordset.actions') .factory('designatedashboard.resources.os-designate-recordset.actions.update', action); action.$inject = [ '$q', 'designatedashboard.resources.util', 'designatedashboard.resources.os-designate-recordset.actions.common-forms', 'designatedashboard.resources.os-designate-recordset.api', 'designatedashboard.resources.os-designate-recordset.editableTypes', 'designatedashboard.resources.os-designate-recordset.resourceType', 'horizon.app.core.openstack-service-api.policy', 'horizon.app.core.openstack-service-api.serviceCatalog', 'horizon.framework.util.q.extensions', 'horizon.framework.widgets.form.ModalFormService', 'horizon.framework.widgets.toast.service', 'horizon.framework.widgets.modal-wait-spinner.service' ]; /** * @ngDoc factory * @name designatedashboard.resources.os-designate-recordset.actions.update * * @Description * Brings up the Update modal. */ function action($q, util, forms, api, editableTypes, resourceTypeName, policy, serviceCatalog, $qExtensions, schemaFormModalService, toast, waitSpinner) { var updateRecordSetPolicy, dnsServiceEnabled; var title = gettext("Update Record Set"); var message = { success: gettext('Record Set %s was successfully updated.') }; var service = { initAction: initAction, allowed: allowed, perform: perform }; return service; ///////////////// function initAction() { updateRecordSetPolicy = policy.ifAllowed({rules: [['dns', 'update_recordset']]}); dnsServiceEnabled = serviceCatalog.ifTypeEnabled('dns'); } function allowed(recordset) { // only supports row action (exactly 1 recordset) if (recordset) { return $q.all([ updateRecordSetPolicy, util.notDeleted(recordset), util.notPending(recordset), editableRecordType(recordset) ]); } else { return false; } } function editableRecordType(recordset) { return $qExtensions.booleanAsPromise( !(recordset.type == 'NS' && recordset.name == recordset.zone_name) && // not apex NS editableTypes.indexOf(recordset.type) > -1 ); } function perform(item) { var formConfig = forms.getUpdateFormConfig(); formConfig.title = title; formConfig.model = util.getModel(formConfig.form, item); // Append the id and zoneId so it can be used on submit formConfig.model.id = item.id; formConfig.model.zoneId = item.zone_id; // schema form doesn't appear to support populating the records array directly // Map the records objects to record objects if (item.hasOwnProperty("records")) { var records = item.records.map(function (item) { return {"record": item} }); formConfig.model.records = records; } return schemaFormModalService.open(formConfig).then(onSubmit, onCancel); } function onSubmit(context) { var model = angular.copy(context.model); // schema form doesn't appear to support populating the records array directly // Map the records objects to simple array of records if (context.model.hasOwnProperty("records")) { var records = context.model.records.map(function (item) { return item.record; }); model.records = records; } waitSpinner.showModalSpinner(gettext('Updating Record Set')); return api.update(model.zoneId, model.id, model).then(onSuccess, onFailure); } function onCancel() { waitSpinner.hideModalSpinner(); } function onSuccess(response) { waitSpinner.hideModalSpinner(); var recordset = response.data; toast.add('success', interpolate(message.success, [recordset.name])); // To make the result of this action generically useful, reformat the return // from the deleteModal into a standard form return { created: [], updated: [{type: resourceTypeName, id: recordset.id}], deleted: [], failed: [] }; } function onFailure() { waitSpinner.hideModalSpinner(); } } })(); ././@LongLink0000000000000000000000000000020300000000000011210 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/create.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000000766513656747241034103 0ustar zuulzuul00000000000000/** * * (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-recordset.actions') .factory('designatedashboard.resources.os-designate-recordset.actions.create', action); action.$inject = [ '$q', 'designatedashboard.resources.os-designate-recordset.actions.common-forms', 'designatedashboard.resources.os-designate-recordset.api', 'designatedashboard.resources.os-designate-recordset.resourceType', 'horizon.app.core.openstack-service-api.policy', 'horizon.app.core.openstack-service-api.serviceCatalog', 'horizon.framework.conf.resource-type-registry.service', 'horizon.framework.widgets.form.ModalFormService', 'horizon.framework.widgets.toast.service', 'horizon.framework.widgets.modal-wait-spinner.service' ]; /** * @ngDoc factory * @name designatedashboard.resources.os-designate-recordset.actions.create * * @Description * Brings up the Create Record Set modal. */ function action($q, forms, api, resourceTypeName, policy, serviceCatalog, registry, schemaFormModalService, toast, waitSpinner) { var createRecordSetPolicy, dnsServiceEnabled; var title = gettext("Create Record Set"); var message = { success: gettext('Record Set %s was successfully created.') }; var service = { initAction: initAction, allowed: allowed, perform: perform }; return service; ///////////////// function initAction() { createRecordSetPolicy = policy.ifAllowed({rules: [['dns', 'create_recordset']]}); dnsServiceEnabled = serviceCatalog.ifTypeEnabled('dns'); } function allowed(item) { return $q.all([ createRecordSetPolicy, dnsServiceEnabled ]); } function perform(item) { var formConfig = forms.getCreateFormConfig(); // Store the zone ID so it can be used on submit formConfig.model.zoneId = item.id; formConfig.title = title; return schemaFormModalService.open(formConfig).then(onSubmit, onCancel); } function onSubmit(context) { var model = angular.copy(context.model); var zoneId = model.zoneId; delete model.zoneId; // schema form doesn't appear to support populating arrays directly // Map the records objects to simple array of records var records = context.model.records.map(function (item) { return item.record; }); model.records = records; waitSpinner.showModalSpinner(gettext('Creating Record Set')); return api.create(zoneId, model).then(onSuccess, onFailure); } function onCancel() { waitSpinner.hideModalSpinner(); } function onSuccess(response) { waitSpinner.hideModalSpinner(); var zone = response.data; toast.add('success', interpolate(message.success, [zone.name])); // To make the result of this action generically useful, reformat the return // from the deleteModal into a standard form return { created: [{type: resourceTypeName, id: zone.id}], updated: [], deleted: [], failed: [] }; } function onFailure() { waitSpinner.hideModalSpinner(); } } })(); ././@LongLink0000000000000000000000000000020300000000000011210 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/delete.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000001324613656747241034073 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use self 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. */ (function() { 'use strict'; angular .module('designatedashboard.resources.os-designate-recordset.actions') .factory('designatedashboard.resources.os-designate-recordset.actions.delete', action); action.$inject = [ '$q', 'designatedashboard.resources.os-designate-recordset.api', 'designatedashboard.resources.os-designate-recordset.editableTypes', 'designatedashboard.resources.os-designate-recordset.resourceType', 'horizon.app.core.openstack-service-api.policy', 'horizon.framework.util.actions.action-result.service', 'horizon.framework.util.i18n.gettext', 'horizon.framework.util.q.extensions', 'horizon.framework.widgets.modal.deleteModalService', 'horizon.framework.widgets.toast.service' ]; /* * @ngdoc factory * @name designatedashboard.resources.os-designate-recordset.actions.delete * * @Description * Brings up the delete recordset confirmation modal dialog. * On submit, delete given recordset. * On cancel, do nothing. */ function action( $q, recordsetApi, editableTypes, resourceType, policy, actionResultService, gettext, $qExtensions, deleteModal, toast ) { var context, deletePromise; var notAllowedMessage = gettext("You are not allowed to delete record sets: %s"); var allowedRecordsets = []; var service = { initAction: initAction, allowed: allowed, perform: perform }; return service; ////////////// function initAction() { context = { }; deletePromise = policy.ifAllowed({rules: [['dns', 'delete_recordset']]}); } function perform(items, scope) { var recordsets = angular.isArray(items) ? items : [items]; context.labels = labelize(recordsets.length); context.deleteEntity = deleteRecordSet; return $qExtensions .allSettled(recordsets.map(checkPermission)) .then(afterCheck.bind(this, scope)); } function allowed(recordset) { // only row actions pass in recordset // otherwise, assume it is a batch action if (recordset) { return $q.all([ deletePromise, editableRecordType(recordset) ]); } else { return policy.ifAllowed({ rules: [['dns', 'delete_recordset']] }); } } function checkPermission(recordset) { return {promise: allowed(recordset), context: recordset}; } function afterCheck(scope, result) { var outcome = $q.reject(); // Reject the promise by default if (result.fail.length > 0) { toast.add('error', getMessage(notAllowedMessage, result.fail)); outcome = $q.reject(result.fail); } if (result.pass.length > 0) { // Remember the record sets we are allowed to delete so that on delete modal submit // we can map the recordset ID back to the full recordset. Then we can fetch the // corresponding zone ID allowedRecordsets = result.pass.map(getEntity) outcome = deleteModal.open(scope, allowedRecordsets, context).then(createResult); } return outcome; } function createResult(deleteModalResult) { // To make the result of this action generically useful, reformat the return // from the deleteModal into a standard form var actionResult = actionResultService.getActionResult(); deleteModalResult.pass.forEach(function markDeleted(item) { actionResult.deleted(resourceType, getEntity(item).id); }); deleteModalResult.fail.forEach(function markFailed(item) { actionResult.failed(resourceType, getEntity(item).id); }); return actionResult.result; } function labelize(count) { return { title: ngettext( 'Confirm Delete Record Set', 'Confirm Delete Record Sets', count), message: ngettext( 'You have selected "%s". Deleted record set is not recoverable.', 'You have selected "%s". Deleted record sets are not recoverable.', count), submit: ngettext( 'Delete Record Set', 'Delete Record Sets', count), success: ngettext( 'Deleted Record Set: %s.', 'Deleted Record Sets: %s.', count), error: ngettext( 'Unable to delete Record Set: %s.', 'Unable to delete Record Sets: %s.', count) }; } function editableRecordType(recordset) { return $qExtensions.booleanAsPromise( !(recordset.type == 'NS' && recordset.name == recordset.zone_name) && // not apex NS editableTypes.indexOf(recordset.type) > -1 ); } function deleteRecordSet(recordSetId) { var recordSet = allowedRecordsets.find(function(element) { return element.id === recordSetId; }) return recordsetApi.deleteRecordSet(recordSet.zone_id, recordSet.id); } function getMessage(message, entities) { return interpolate(message, [entities.map(getName).join(", ")]); } function getName(result) { return getEntity(result).name; } function getEntity(result) { return result.context; } } })(); ././@LongLink0000000000000000000000000000020300000000000011210 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/actions.module.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000000440213656747241034065 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function () { 'use strict'; /** * @ngdoc overview * @ngname designatedashboard.resources.os-designate-recordset.actions * * @description * Provides all of the actions for DNS Recordsets. */ angular.module('designatedashboard.resources.os-designate-recordset.actions', [ 'horizon.framework.conf', 'horizon.app.core' ]) .run(run); run.$inject = [ 'horizon.framework.conf.resource-type-registry.service', 'designatedashboard.resources.os-designate-recordset.resourceType', 'designatedashboard.resources.os-designate-recordset.actions.create', 'designatedashboard.resources.os-designate-recordset.actions.delete', 'designatedashboard.resources.os-designate-recordset.actions.update' ]; function run(registry, resourceTypeString, createAction, deleteAction, updateAction) { var resourceType = registry.getResourceType(resourceTypeString); resourceType .itemActions .append({ id: 'updateRecordset', service: updateAction, template: { text: gettext('Update') } }) .append({ id: 'deleteRecordset', service: deleteAction, template: { text: gettext('Delete'), type: 'delete' } }); // Append a record set view to the zones actions var zoneResourceType = registry.getResourceType("OS::Designate::Zone"); zoneResourceType .itemActions .append({ id: 'createRecordset', service: createAction, template: { text: gettext('Create Record Set') } }); } })(); ././@LongLink0000000000000000000000000000017000000000000011213 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/api.service.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000001050213656747241034063 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function () { 'use strict'; angular .module('designatedashboard.resources.os-designate-recordset') .factory('designatedashboard.resources.os-designate-recordset.api', apiService); apiService.$inject = [ '$q', 'designatedashboard.apiPassthroughUrl', 'horizon.framework.util.http.service', 'horizon.framework.widgets.toast.service' ]; /** * @ngdoc service * @param {Object} httpService * @param {Object} toastService * @name apiService * @description Provides direct access to Designate Record Set APIs. * @returns {Object} The service */ function apiService($q, apiPassthroughUrl, httpService, toastService) { var service = { get: get, list: list, deleteRecordSet: deleteRecordSet, create: create, update: update }; return service; /////////////// /** * @name list * @description * Get a list of record sets. * * The listing result is an object with property "items." Each item is * a record set. * * @param {Object} params * Query parameters. Optional. * * @returns {Object} The result of the API call */ function list(zoneId, params) { return httpService.get(apiPassthroughUrl + 'v2/zones/' + zoneId + '/recordsets/', params) .error(function () { toastService.add('error', gettext('Unable to retrieve the record sets.')); }); } /** * @name get * @description * Get a single record set by ID. * * @param {string} zoneId * Specifies the id of the zone containing the record set to request. * * @param {string} recordSetId * Specifies the id of the record set to request. * * @returns {Object} The result of the API call */ function get(zoneId, recordSetId) { // Unfortunately routed-details-view is not happy when load fails, which is // common when then delete action removes a record set. Mask this failure by // always returning a successful promise instead of terminating the $http promise // in the .error handler. return httpService.get(apiPassthroughUrl + 'v2/zones/' + zoneId + '/recordsets/' + recordSetId + '/') .then(undefined, function onError() { toastService.add('error', gettext('Unable to retrieve the record set.')); return $q.when({}); }); } /** * @name delete * @description * Delete a single record set by ID * @param {string} zoneId * The id of the zone containing the recordset * * @param {string} recordSetId * The id of the recordset within the zone * * @returns {*} */ function deleteRecordSet(zoneId, recordSetId) { return httpService.delete(apiPassthroughUrl + 'v2/zones/' + zoneId + '/recordsets/' + recordSetId + '/') .error(function () { toastService.add('error', gettext('Unable to delete the record set.')); }); } function create(zoneId, data) { return httpService.post(apiPassthroughUrl + 'v2/zones/' + zoneId + '/recordsets/', data) .error(function () { toastService.add('error', gettext('Unable to create the record set.')); }); } function update(zoneId, recordSetId, data) { // The update API will not accept extra data. Restrict the input to only the allowed // fields var apiData = { ttl: data.ttl, description: data.description, records: data.records }; return httpService.put(apiPassthroughUrl + 'v2/zones/' + zoneId + '/recordsets/' + recordSetId, apiData) .error(function () { toastService.add('error', gettext('Unable to update the record set.')); }); } } }()); ././@LongLink0000000000000000000000000000021200000000000011210 Lustar 00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recordset/os-designate-recordset.module.jsdesignate-dashboard-10.0.0/designatedashboard/static/designatedashboard/resources/os-designate-recor0000664000175000017500000001601213656747241034065 0ustar zuulzuul00000000000000/** * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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. */ (function () { 'use strict'; /** * @ngdoc overview * @ngname designatedashboard.resources.os-designate-recordset * * @description * Provides all of the services and widgets required * to support and display DNS (designate) record set related content. */ angular .module('designatedashboard.resources.os-designate-recordset', [ 'ngRoute', 'designatedashboard.resources.os-designate-recordset.actions', 'designatedashboard.resources.os-designate-recordset.details' ]) .constant( 'designatedashboard.resources.os-designate-recordset.resourceType', 'OS::Designate::RecordSet') .constant( 'designatedashboard.resources.os-designate-recordset.typeMap', { 'A': gettext('A - Address record'), 'AAAA': gettext('AAAA - IPv6 address record'), 'CNAME': gettext('CNAME - Canonical name record'), 'MX': gettext('MX - Mail exchange record'), 'PTR': gettext('PTR - Pointer record'), 'SPF': gettext('SPF - Sender Policy Framework'), 'SRV': gettext('SRV - Service locator'), 'SSHFP': gettext('SSHFP - SSH Public Key Fingerprint'), 'TXT': gettext('TXT - Text record'), 'SOA': gettext('SOA - Start of authority record'), 'NS': gettext('NS - Name server'), 'CAA': gettext('CAA - Certificate Authority Authorization record'), }) .constant( 'designatedashboard.resources.os-designate-recordset.editableTypes', [ "A", "AAAA", "CNAME", "MX", "NS", "PTR", "SPF", "SRV", "SSHFP", "TXT", "CAA", ]) .config(config) .run(run); config.$inject = ['$provide', '$windowProvider']; function config($provide, $windowProvider) { var path = $windowProvider.$get().STATIC_URL + 'designatedashboard/resources/os-designate-recordset/'; $provide.constant('designatedashboard.resources.os-designate-recordset.basePath', path); } run.$inject = [ 'horizon.app.core.detailRoute', 'horizon.framework.conf.resource-type-registry.service', 'designatedashboard.resources.os-designate-recordset.api', 'designatedashboard.resources.os-designate-recordset.resourceType', 'designatedashboard.resources.os-designate-recordset.typeMap', 'designatedashboard.resources.util' ]; function run(detailRoute, registry, recordSetApi, resourceTypeString, typeMap, util) { var resourceType = registry.getResourceType(resourceTypeString); resourceType .setNames(gettext('DNS Record Set'), gettext('DNS Record Sets')) .setListFunction(list) .setProperty('id', { label: gettext('ID') }) .setProperty('zone_id', { label: gettext('Zone ID'), filters: ['noValue'] }) .setProperty('zone_name', { label: gettext('Zone Name'), filters: ['noName'] }) .setProperty('project_id', { label: gettext('Project ID'), filters: ['noValue'] }) .setProperty('name', { label: gettext('Name'), filters: ['noName'] }) .setProperty('description', { label: gettext('Description'), filters: ['noName'] }) .setProperty('type', { label: gettext('Type'), filters: ['uppercase'], values: typeMap }) .setProperty('ttl', { label: gettext('Time To Live'), filters: ['noValue'] }) .setProperty('records', { label: gettext('Records'), filters: ['noValue'] }) .setProperty('notes', { label: gettext('Notes'), filters: ['noName'] }) .setProperty('status', { label: gettext('Status'), filters: ['lowercase', 'noName'], values: util.statusMap() }) .setProperty('action', { label: gettext('Action'), filters: ['lowercase', 'noName'], values: util.actionMap() }) .setProperty('version', { label: gettext('Version'), filters: ['noValue'] }) .setProperty('created_at', { label: gettext('Created At'), filters: ['noValue'] }) .setProperty('updated_at', { label: gettext('Updated At'), filters: ['noValue'] }); resourceType .tableColumns .append({ id: 'name', priority: 1, sortDefault: true, filters: ['noName'], // For link format, see pathGenerator in details.module.js template: '{$ item.name $}' }) .append({ id: 'type', priority: 2, filters: ['uppercase'], values: typeMap }) .append({ id: 'records', priority: 2, filters: ['noValue'] }) .append({ id: 'status', filters: ['lowercase'], values: util.statusMap(), priority: 2 }); resourceType .filterFacets .append({ label: gettext('Type'), name: 'type', isServer: false, singleton: true, persistent: false, options: Object.keys(typeMap).map(function toOptionLabel(key) { return { label: typeMap[key], key: key } }) }) .append({ label: gettext('Name'), name: 'name', isServer: false, singleton: true, persistent: false }) .append({ label: gettext('Status'), name: 'status', isServer: false, singleton: true, persistent: false, options: [ {label: gettext('Active'), key: 'active'}, {label: gettext('Pending'), key: 'pending'} ] }); /** * list all recordsets within a zone. Requires "zoneId" in the params. All other * params will be passed unmodified as URL params to the API. * * @param params * zoneId (required) list recordsets within the zone * * @returns {*|Object} */ function list(params) { return recordSetApi.list(params.zoneId, params).then(function onList(response) { // listFunctions are expected to return data in "items" response.data.items = response.data.recordsets; util.addTimestampIds(response.data.items); return response; }); } } })(); designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/reverse_dns.html0000664000175000017500000000033613656747241031645 0ustar zuulzuul00000000000000 designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/zones.html0000664000175000017500000000032213656747241030457 0ustar zuulzuul00000000000000 designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/designatedashboard.scss0000664000175000017500000000000013656747241033134 0ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/static/designatedashboard/designatedashboard.module.js0000664000175000017500000000411613656747241034075 0ustar zuulzuul00000000000000/** * (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. */ (function() { 'use strict'; /** * @ngdoc overview * @ngname designatedashboard * * @description * Provides the services and widgets required * to support and display the project search panel. */ angular .module('designatedashboard', [ 'ngRoute', 'designatedashboard.resources' ]) .constant( 'designatedashboard.apiPassthroughUrl', '/api/dns/') .config(config) .run(run); config.$inject = [ '$provide', '$routeProvider', '$windowProvider' ]; /** * @name designatedashboard.basePath * @description Base path for the project dashboard * * @param {function} $provide ng provide service * * @param {function} $routeProvider ng route service * * @param {function} $windowProvider NG window provider * * @returns {undefined} */ function config($provide, $routeProvider, $windowProvider) { var path = $windowProvider.$get().STATIC_URL + 'designatedashboard/'; $provide.constant('designatedashboard.basePath', path); $routeProvider .when('/project/dnszones/', { templateUrl: path + 'zones.html' }) .when('/project/reverse_dns/', { templateUrl: path + 'reverse_dns.html' }); } run.$inject = [ 'horizon.framework.conf.resource-type-registry.service', 'designatedashboard.basePath' ]; function run(registry, basePath) { //registry.setDefaultSummaryTemplateUrl(basePath + 'table/default-drawer.html'); } })(); designate-dashboard-10.0.0/designatedashboard/enabled/0000775000175000017500000000000013656747325022731 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/enabled/__init__.py0000664000175000017500000000000013656747241025025 0ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/enabled/_1721_dns_zones_panel.py0000664000175000017500000000254213656747241027275 0ustar zuulzuul00000000000000# Copyright 2013 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 designatedashboard import exceptions # The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'dnszones' # The name of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'project' # The name of the panel group the PANEL is associated with. PANEL_GROUP = 'dns' ADD_EXCEPTIONS = { 'recoverable': exceptions.RECOVERABLE, 'not_found': exceptions.NOT_FOUND, 'unauthorized': exceptions.UNAUTHORIZED, } ADD_INSTALLED_APPS = ['designatedashboard'] # Python panel class of the PANEL to be added. ADD_PANEL = ( 'designatedashboard.dashboards.project.ngdns.zones.panel.Zones') ADD_ANGULAR_MODULES = ['designatedashboard'] ADD_SCSS_FILES = ['designatedashboard/designatedashboard.scss'] AUTO_DISCOVER_STATIC_FILES = True designate-dashboard-10.0.0/designatedashboard/enabled/_1722_dns_reversedns_panel.py0000664000175000017500000000250313656747241030315 0ustar zuulzuul00000000000000# Copyright 2013 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 designatedashboard import exceptions # The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'reverse_dns' # The name of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'project' # The name of the panel group the PANEL is associated with. PANEL_GROUP = 'dns' ADD_EXCEPTIONS = { 'recoverable': exceptions.RECOVERABLE, 'not_found': exceptions.NOT_FOUND, 'unauthorized': exceptions.UNAUTHORIZED, } # Python panel class of the PANEL to be added. ADD_PANEL = ( 'designatedashboard.dashboards.project.ngdns.reverse_dns.panel.ReverseDns') ADD_ANGULAR_MODULES = ['designatedashboard'] ADD_SCSS_FILES = ['designatedashboard/designatedashboard.scss'] AUTO_DISCOVER_STATIC_FILES = True designate-dashboard-10.0.0/designatedashboard/enabled/_1710_project_dns_panel_group.py0000664000175000017500000000155513656747241031022 0ustar zuulzuul00000000000000# Copyright 2013 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. # The name of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'dns' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = 'DNS' # The name of the dashboard the PANEL_GROUP associated with. Required. PANEL_GROUP_DASHBOARD = 'project' designate-dashboard-10.0.0/designatedashboard/api/0000775000175000017500000000000013656747325022110 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/api/__init__.py0000664000175000017500000000000013656747241024204 0ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/api/rest/0000775000175000017500000000000013656747325023065 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/api/rest/__init__.py0000664000175000017500000000127613656747241025201 0ustar zuulzuul00000000000000# (c) Copyright Hewlett Packard Enterprise Development LP # # 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. """REST API for Horizon dashboard Javascript code. """ from . import passthrough # noqa designate-dashboard-10.0.0/designatedashboard/api/rest/passthrough.py0000664000175000017500000000765713656747241026022 0ustar zuulzuul00000000000000# Copyright 2016, Hewlett Packard Enterprise Development, LP # # 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. """API for the passthrough service. """ from django.conf import settings from django.views import generic import functools import requests from requests.exceptions import HTTPError from horizon import exceptions from openstack_dashboard.api import base from openstack_dashboard.api.rest import urls from openstack_dashboard.api.rest import utils as rest_utils from oslo_log import log as logging LOG = logging.getLogger(__name__) def _passthrough_request(request_method, url, request, data=None, params=None): """Makes a request to the appropriate service API with an optional payload. Should set any necessary auth headers and SSL parameters. """ # Set verify if a CACERT is set and SSL_NO_VERIFY isn't True verify = getattr(settings, 'OPENSTACK_SSL_CACERT', None) if getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False): verify = False service_url = _get_service_url(request, 'dns') request_url = '{}{}'.format( service_url, url if service_url.endswith('/') else ('/' + url) ) response = request_method( request_url, headers={'X-Auth-Token': request.user.token.id}, json=data, verify=verify, params=params ) try: response.raise_for_status() except HTTPError as e: LOG.debug(e.response.content) for error in rest_utils.http_errors: if (e.response.status_code == getattr(error, 'status_code', 0) and exceptions.HorizonException in error.__bases__): raise error raise return response # Create some convenience partial functions passthrough_get = functools.partial(_passthrough_request, requests.get) passthrough_post = functools.partial(_passthrough_request, requests.post) passthrough_put = functools.partial(_passthrough_request, requests.put) passthrough_patch = functools.partial(_passthrough_request, requests.patch) passthrough_delete = functools.partial(_passthrough_request, requests.delete) def _get_service_url(request, service): """Get service's URL from keystone; allow an override in settings""" service_url = getattr(settings, service.upper() + '_URL', None) try: service_url = base.url_for(request, service) except exceptions.ServiceCatalogException: pass # Currently the keystone endpoint is http://host:port/ # without the version. return service_url @urls.register class Passthrough(generic.View): """Pass-through API for executing service requests. Horizon only adds auth and CORS proxying. """ url_regex = r'dns/(?P.+)$' @rest_utils.ajax() def get(self, request, path): return passthrough_get(path, request).json() @rest_utils.ajax() def post(self, request, path): data = dict(request.DATA) if request.DATA else {} return passthrough_post(path, request, data).json() @rest_utils.ajax() def put(self, request, path): data = dict(request.DATA) if request.DATA else {} return passthrough_put(path, request, data).json() @rest_utils.ajax() def patch(self, request, path): data = dict(request.DATA) if request.DATA else {} return passthrough_patch(path, request, data).json() @rest_utils.ajax() def delete(self, request, path): return passthrough_delete(path, request).json() designate-dashboard-10.0.0/designatedashboard/exceptions.py0000664000175000017500000000173613656747241024076 0ustar zuulzuul00000000000000# Copyright (c) 2014 Rackspace Hosting. # # 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 designateclient import exceptions as designateclient from openstack_dashboard import exceptions NOT_FOUND = exceptions.NOT_FOUND + ( designateclient.ResourceNotFound, designateclient.NotFound, ) RECOVERABLE = exceptions.RECOVERABLE + ( designateclient.BadRequest, designateclient.Conflict, ) UNAUTHORIZED = exceptions.UNAUTHORIZED + ( designateclient.Forbidden, ) designate-dashboard-10.0.0/designatedashboard/locale/0000775000175000017500000000000013656747325022576 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/tr_TR/0000775000175000017500000000000013656747325023630 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/tr_TR/LC_MESSAGES/0000775000175000017500000000000013656747325025415 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/tr_TR/LC_MESSAGES/django.po0000664000175000017500000000162413656747241027217 0ustar zuulzuul00000000000000# Translations template for designate-dashboard. # Copyright (C) 2015 ORGANIZATION # This file is distributed under the same license as the designate-dashboard # project. # # Translators: # Alper Çiftçi , 2015 # iÅŸbaran akçayır , 2017. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2017-05-22 08:57+0000\n" "Last-Translator: Copied by Zanata \n" "Language: tr_TR\n" "Plural-Forms: nplurals=1; plural=0;\n" "Generated-By: Babel 2.0\n" "X-Generator: Zanata 4.3.3\n" "Language-Team: Turkish (Turkey)\n" msgid "Reverse DNS" msgstr "Ters DNS" msgid "Zones" msgstr "Bölgeler" designate-dashboard-10.0.0/designatedashboard/locale/fr/0000775000175000017500000000000013656747325023205 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/fr/LC_MESSAGES/0000775000175000017500000000000013656747325024772 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/fr/LC_MESSAGES/django.po0000664000175000017500000000157713656747241026603 0ustar zuulzuul00000000000000# Translations template for designate-dashboard. # Copyright (C) 2015 ORGANIZATION # This file is distributed under the same license as the designate-dashboard # project. # # Translators: # Lucas Mascaro , 2015 # Gérald LONLAS , 2016. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2016-10-27 03:42+0000\n" "Last-Translator: Gérald LONLAS \n" "Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "Generated-By: Babel 2.0\n" "X-Generator: Zanata 4.3.3\n" "Language-Team: French\n" msgid "Reverse DNS" msgstr "Reverse DNS" msgid "Zones" msgstr "Zones" designate-dashboard-10.0.0/designatedashboard/locale/ne/0000775000175000017500000000000013656747325023200 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/ne/LC_MESSAGES/0000775000175000017500000000000013656747325024765 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/ne/LC_MESSAGES/django.po0000664000175000017500000000116613656747241026570 0ustar zuulzuul00000000000000# Surit Aryal , 2019. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2019-06-07 05:03+0000\n" "Last-Translator: Surit Aryal \n" "Language-Team: Nepali\n" "Language: ne\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" msgid "Reverse DNS" msgstr "Reverse DNS" msgid "Zones" msgstr "Zones" designate-dashboard-10.0.0/designatedashboard/locale/zh_CN/0000775000175000017500000000000013656747325023577 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/zh_CN/LC_MESSAGES/0000775000175000017500000000000013656747325025364 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/zh_CN/LC_MESSAGES/django.po0000664000175000017500000000116513656747241027166 0ustar zuulzuul00000000000000# zzxwill , 2016. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2016-09-27 06:48+0000\n" "Last-Translator: zzxwill \n" "Language-Team: Chinese (China)\n" "Language: zh_CN\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=1; plural=0\n" msgid "Reverse DNS" msgstr "åå‘è§£æžåŸŸå" msgid "Zones" msgstr "区域" designate-dashboard-10.0.0/designatedashboard/locale/ru/0000775000175000017500000000000013656747325023224 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/ru/LC_MESSAGES/0000775000175000017500000000000013656747325025011 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/ru/LC_MESSAGES/django.po0000664000175000017500000000203313656747241026606 0ustar zuulzuul00000000000000# Translations template for designate-dashboard. # Copyright (C) 2015 ORGANIZATION # This file is distributed under the same license as the designate-dashboard # project. # # Translators: # Denis Gubanov , 2015 # Ivan Startsev , 2016. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2016-10-05 02:21+0000\n" "Last-Translator: Ivan Startsev \n" "Language: ru\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" "%100>=11 && n%100<=14)? 2 : 3);\n" "Generated-By: Babel 2.0\n" "X-Generator: Zanata 4.3.3\n" "Language-Team: Russian\n" msgid "Reverse DNS" msgstr "Обратный DNS" msgid "Zones" msgstr "Зоны" designate-dashboard-10.0.0/designatedashboard/locale/es/0000775000175000017500000000000013656747325023205 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/es/LC_MESSAGES/0000775000175000017500000000000013656747325024772 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/es/LC_MESSAGES/django.po0000664000175000017500000000121713656747241026572 0ustar zuulzuul00000000000000# Alberto Molina Coballes , 2017. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2017-02-22 06:47+0000\n" "Last-Translator: Alberto Molina Coballes \n" "Language-Team: Spanish\n" "Language: es\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" msgid "Reverse DNS" msgstr "DNS inverso" msgid "Zones" msgstr "Zonas" designate-dashboard-10.0.0/designatedashboard/locale/ja/0000775000175000017500000000000013656747325023170 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/ja/LC_MESSAGES/0000775000175000017500000000000013656747325024755 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/ja/LC_MESSAGES/django.po0000664000175000017500000000126513656747241026560 0ustar zuulzuul00000000000000# Yoshiki Eguchi , 2016. #zanata # Akihiro Motoki , 2018. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2018-02-08 08:47+0000\n" "Last-Translator: Akihiro Motoki \n" "Language-Team: Japanese\n" "Language: ja\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=1; plural=0\n" msgid "Reverse DNS" msgstr "リãƒãƒ¼ã‚¹ DNS" msgid "Zones" msgstr "ゾーン" designate-dashboard-10.0.0/designatedashboard/locale/en_GB/0000775000175000017500000000000013656747325023550 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/en_GB/LC_MESSAGES/0000775000175000017500000000000013656747325025335 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/en_GB/LC_MESSAGES/django.po0000664000175000017500000000122113656747241027130 0ustar zuulzuul00000000000000# Andreas Jaeger , 2016. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2016-10-23 09:03+0000\n" "Last-Translator: Andreas Jaeger \n" "Language-Team: English (United Kingdom)\n" "Language: en_GB\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" msgid "Reverse DNS" msgstr "Reverse DNS" msgid "Zones" msgstr "Zones" designate-dashboard-10.0.0/designatedashboard/locale/pt_BR/0000775000175000017500000000000013656747325023604 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/pt_BR/LC_MESSAGES/0000775000175000017500000000000013656747325025371 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/pt_BR/LC_MESSAGES/django.po0000664000175000017500000000117213656747241027171 0ustar zuulzuul00000000000000# Marcio , 2017. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2017-03-15 07:16+0000\n" "Last-Translator: Marcio \n" "Language-Team: Portuguese (Brazil)\n" "Language: pt_BR\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" msgid "Reverse DNS" msgstr "DNS Reverso" msgid "Zones" msgstr "Zonas" designate-dashboard-10.0.0/designatedashboard/locale/ko_KR/0000775000175000017500000000000013656747325023603 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/ko_KR/LC_MESSAGES/0000775000175000017500000000000013656747325025370 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/ko_KR/LC_MESSAGES/django.po0000664000175000017500000000120013656747241027160 0ustar zuulzuul00000000000000# Sungjin Kang , 2017. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2017-12-19 03:03+0000\n" "Last-Translator: Ian Y. Choi \n" "Language-Team: Korean (South Korea)\n" "Language: ko_KR\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=1; plural=0\n" msgid "Reverse DNS" msgstr "Reverse DNS" msgid "Zones" msgstr "ì¡´" designate-dashboard-10.0.0/designatedashboard/locale/de/0000775000175000017500000000000013656747325023166 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/de/LC_MESSAGES/0000775000175000017500000000000013656747325024753 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/de/LC_MESSAGES/django.po0000664000175000017500000000123613656747241026554 0ustar zuulzuul00000000000000# Frank Kloeker , 2016. #zanata # Frank Kloeker , 2018. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2018-07-29 10:32+0000\n" "Last-Translator: Frank Kloeker \n" "Language-Team: German\n" "Language: de\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" msgid "Reverse DNS" msgstr "Reverse DNS" msgid "Zones" msgstr "Zonen" designate-dashboard-10.0.0/designatedashboard/locale/id/0000775000175000017500000000000013656747325023172 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/id/LC_MESSAGES/0000775000175000017500000000000013656747325024757 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/id/LC_MESSAGES/django.po0000664000175000017500000000117713656747241026564 0ustar zuulzuul00000000000000# suhartono , 2016. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2016-10-13 01:36+0000\n" "Last-Translator: suhartono \n" "Language-Team: Indonesian\n" "Language: id\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=1; plural=0\n" msgid "Reverse DNS" msgstr "Reverse DNS " msgid "Zones" msgstr "Zones (zona)" designate-dashboard-10.0.0/designatedashboard/locale/cs/0000775000175000017500000000000013656747325023203 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/cs/LC_MESSAGES/0000775000175000017500000000000013656747325024770 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designatedashboard/locale/cs/LC_MESSAGES/django.po0000664000175000017500000000124213656747241026566 0ustar zuulzuul00000000000000# ZbynÄ›k Schwarz , 2017. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard VERSION\n" "Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n" "POT-Creation-Date: 2019-09-23 21:56+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2017-11-17 05:49+0000\n" "Last-Translator: ZbynÄ›k Schwarz \n" "Language-Team: Czech\n" "Language: cs\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n" msgid "Reverse DNS" msgstr "Reverzní DNS" msgid "Zones" msgstr "Zóny" designate-dashboard-10.0.0/tox.ini0000664000175000017500000000417713656747241017045 0ustar zuulzuul00000000000000[tox] minversion = 1.6 envlist = py37,pep8 skipsdist = True [testenv] basepython = python3 usedevelop = True setenv = VIRTUAL_ENV={envdir} NOSE_WITH_OPENSTACK=1 NOSE_OPENSTACK_COLOR=1 NOSE_OPENSTACK_RED=0.05 NOSE_OPENSTACK_YELLOW=0.025 NOSE_OPENSTACK_SHOW_ELAPSED=1 PYTHONDONTWRITEBYTECODE=1 DJANGO_SETTINGS_MODULE=designatedashboard.settings whitelist_externals = find deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete {toxinidir}/manage.py test designatedashboard --settings=designatedashboard.tests.settings passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8] commands = flake8 [testenv:venv] commands = {posargs} [testenv:cover] commands = coverage erase coverage run {toxinidir}/manage.py test designatedashboard --settings=designatedashboard.tests.settings {posargs} coverage xml --include 'designatedashboard/*' -o cover/coverage.xml coverage html --include 'designatedashboard/*' -d cover [testenv:docs] deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html [testenv:pdf-docs] deps = -r{toxinidir}/doc/requirements.txt envdir = {toxworkdir}/docs whitelist_externals = make commands = sphinx-build -W -b latex doc/source doc/build/pdf make -C doc/build/pdf [flake8] # E123, E125 skipped as they are invalid PEP-8. # F405 TEMPLATES may be undefined, or defined from star imports. # (because it is not easy to avoid this in openstack_dashboard.test.settings) show-source = True ignore = E123,E125,F405 builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,releasenotes,node_modules [testenv:releasenotes] commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:lower-constraints] deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt designate-dashboard-10.0.0/ChangeLog0000664000175000017500000002476113656747325017310 0ustar zuulzuul00000000000000CHANGES ======= 10.0.0 ------ * Imported Translations from Zanata * Imported Translations from Zanata * Imported Translations from Zanata * Fix pyScss version in lower-constraints.txt * Add CAA record type support * Drop Django 1.11 support * translation: drop babel extractor definitions * Imported Translations from Zanata * Imported Translations from Zanata * [ussuri][goal] Drop python 2.7 support and testing * Generate PDF documentation * Switch to official Ussuri jobs * Use Horizon project template for django jobs * Fix list zones updated at same time * Imported Translations from Zanata * Update master for stable/train 9.0.0 ----- * Imported Translations from Zanata * Update the constraints url * Cleanup release notes * Fix releasenotes index page * Swith nodejs10 jobs to voting * Add release-note-job to designate-dashboard * Removed deprecated v1 api dashboard * Sync Sphinx requirement * Add Python 3 Train unit tests * Fix broken tests * Imported Translations from Zanata * Imported Translations from Zanata * Changes for url transition to OpenDev * OpenDev Migration Patch * Dropping the py35 testing * Drop nodejs4 job * Update master for stable/stein * Add nodejs10 jobs on bionic 8.0.0 ----- * Switch to horizon-nodejs4-jobs-nonvoting template * Imported Translations from Zanata * Imported Translations from Zanata * Update hacking version to latest * add python 3.7 unit test job * Imported Translations from Zanata * Imported Translations from Zanata * Set lower-requirements to use stable horizon * Imported Translations from Zanata * Change openstack-dev to openstack-discuss * update wiki http links to https * Enable py36 testing * Increment versioning with pbr instruction * Allow creation of NS records in zones * Use templates for lower-constraints, cover * Fix coverage * Imported Translations from Zanata * Imported Translations from Zanata * switch documentation job to new PTI * import zuul job settings from project-config * Drop nose dependencies * Imported Translations from Zanata * Update reno for stable/rocky 7.0.0 ----- * Imported Translations from Zanata * Replaces ng-views with the horizon streamlined version * Updates to new Horizon action API 7.0.0.0b3 --------- * Drop mox - no longer needed * Add test 'node\_modules' in tox.ini for flake8 exclude * Imported Translations from Zanata * Imported Translations from Zanata * Drop python-cinderclient usage * Add python3 django 1.11 job instead of django 2.0 job * fix tox python3 overrides * Cleanup unnecessary entries in test-requirements.txt 7.0.0.0b2 --------- * Drop mox3 from test-requirements.txt * Require the (soon-to-be) Rocky version of Horizon * Django 2.0 support * Remove "-y" option for package install command * Fix horizon install for tox * Use Horizon UT framework * Fix lower-constraints.txt 7.0.0.0b1 --------- * Sender Policy Framework record is SPF in short * Updated from global requirements * add lower-constraints job * Install horizon directly from pypi * Updated from global requirements * Imported Translations from Zanata * Updated from global requirements * Updated from global requirements * Imported Translations from Zanata * Updated from global requirements * Imported Translations from Zanata * Imported Translations from Zanata * Imported Translations from Zanata * Fixing v1 Dashboard * Imported Translations from Zanata * Imported Translations from Zanata * Update reno for stable/queens * Remove commented code + unneeded mox 6.0.0.0rc1 ---------- * Zuul: Remove project name 6.0.0.0b3 --------- * Updated from global requirements * Updated from global requirements * Use 'trimmed' for blocktrans in multi-line strings * Imported Translations from Zanata * Optimize the link address 6.0.0.0b2 --------- * Use jobs from designate repo * Updated from global requirements * Imported Translations from Zanata * Remove setting of version/release from releasenotes * Updated from global requirements * Drop django\_openstack\_auth from requirements.txt 6.0.0.0b1 --------- * Imported Translations from Zanata * Imported Translations from Zanata * Updated from global requirements * Updated from global requirements * Fix viewing detail resources * Updated from global requirements * Imported Translations from Zanata * AngularJS unittest with Jasmine and Karma * Imported Translations from Zanata * Updated from global requirements * Updated from global requirements * Imported Translations from Zanata * Update reno for stable/pike 5.0.0 ----- * Updated from global requirements 5.0.0.0b3 --------- * Updated from global requirements * switch from oslosphinx to openstackdocstheme * rearrange content using the new standard layout * Updated from global requirements * Stop using deprecated 'message' attribute in Exception * Imported Translations from Zanata * Updated from global requirements * Imported Translations from Zanata * Updated from global requirements * Imported Translations from Zanata * use base.html instead of adminui/base.html for not working * Fixing a potential unbound local error 5.0.0.0b1 --------- * Updated from global requirements * [Fix gate]Update test requirement * Updated from global requirements * Imported Translations from Zanata * Imported Translations from Zanata * Update reno for stable/ocata * Remove link to modindex 4.0.0.0rc1 ---------- * Actually show attribute on zone info page 4.0.0.0b3 --------- * Ensure slash character for URL of dns service Solves a pep8 warning too * Updated from global requirements * Remove support for py33 and update to py35 * Enable release notes translation * Switch to oslo\_log * Imported Translations from Zanata * H803 hacking have been deprecated 4.0.0.0b2 --------- * Imported Translations from Zanata * Updated from global requirements * Added release notes for Designate-dashboard * Show team and repo badges on README * Updated from global requirements * Imported Translations from Zanata * Updated from global requirements * Imported Translations from Zanata * Imported Translations from Zanata * Updated from global requirements * Updated from global requirements * Remove vim header 3.0.0.0rc1 ---------- * API v2 Dashboard * Add Upper constraints to dashboard * Allow SRV/MX records to have priority 0 * Remove token logging * Update home-page info in the configuration file * Imported Translations from Zanata 3.0.0.0b3 --------- * Updated from global requirements * Follow-up Ibddffc5f: Also allow PTR records pointing to the domain itself * Updated from global requirements * SSHFP validation: Allow algorithm 4 - ED25519 * Remove discover from test-requirements * Updated from global requirements 3.0.0.0b2 --------- * Updated from global requirements * Add option for records pointing to domain * Updated from global requirements * Imported Translations from Zanata * Updated from global requirements * Updated from global requirements * Imported Translations from Zanata * Imported Translations from Zanata * Imported Translations from Zanata * Imported Translations from Zanata * Updated from global requirements 3.0.0.0b1 --------- * Updated from global requirements * Updated from global requirements * Updated from global requirements * Imported Translations from Zanata * Imported Translations from Zanata * Updated from global requirements * Fix package name in init.py * Imported Translations from Zanata * Updated from global requirements 2.0.0 ----- * Imported Translations from Zanata * Fix unit tests under Django 1.9 * Add ADD\_INSTALLED\_APPS to 'enabled' file * Extract strings from django templates * Imported Translations from Zanata * Fix unit tests under Django 1.9 * Extract strings from django templates * Add ADD\_INSTALLED\_APPS to 'enabled' file * Imported Translations from Zanata * Update .gitreview for stable/mitaka 2.0.0.0rc1 ---------- * Imported Translations from Zanata * Modernize README.rst * Updated from global requirements 2.0.0.0b3 --------- * Updated from global requirements * Imported Translations from Zanata * Update numbering of enable panels * Imported Translations from Zanata * Update translation setup * Updated from global requirements * Imported Translations from Zanata * Updated from global requirements 2.0.0.0b2 --------- * Updated from global requirements * Put py34 first in the env order of tox * Empty hidden "Create Record" form fields * Updated from global requirements * Drop MANIFEST.in as it is not needed explicitely by PBR * Pass environment variables of proxy to tox * Remove version from setup.cfg 2.0.0.0b1 --------- * Remove py26 support * Clearing out .pyc file before a tox run * Updated from global requirements * Check for get\_quota policy before calling the API * Imported Translations from Zanata * Updated from global requirements * Imported Translations from Zanata * Updated from global requirements 1.0.0 ----- * Imported Translations from Zanata * Imported Translations from Zanata * Open Mitaka development 1.0.0.0rc1 ---------- * Updated from global requirements * Imported Translations from Zanata * Updated from global requirements * Imported Translations from Zanata * Updated from global requirements * Imported Translations from Transifex * Updated from global requirements * Updated from global requirements * Added test cases for domain's SPF record * Added test cases for domain's PTR record * Added test cases for domain's SSHFP record * Updated from global requirements * Replaces minimum ttl value from 0 to 1 * Imported Translations from Transifex * Imported Translations from Transifex 1.0.0.0b2 --------- * Set correct name and version in setup.cfg * Imported Translations from Transifex * Updated from global requirements * Record creation / update screen simplification * Updated from global requirements * Improving record create update buttons * Adding record-editor fip dropdown * Updated from global requirements * Update from global-requirements * Conform to Consistent Testing Interface * Setup for translation * Add .gitreview file * Fix pep8 failures * Correcting missing import for dashboard messaging * Add domain record detail screen * Update Dashboard requirements * updating tox pep8 issues * Add quota check for domain create * Improve UX of create and update record screen * Minor fixes: pep8 and redundant code * Include README.rst in dashboard sdist * Correct designate-dashboard domain detail screen * Add policy support to designatedashboard * forgot missing \_\_init\_\_.py file * improving designatedashboard packaging * Validate SSHFP records * Fix exception handling * Remove bulk actions from records page * Pass SSL CA Cert to client * Pass ssl no verify to client * Added designate-dashboard code to contrib/designate-dashboard designate-dashboard-10.0.0/HACKING.rst0000664000175000017500000000023613656747241017320 0ustar zuulzuul00000000000000designatedashboard Style Commandments ===================================== Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/ designate-dashboard-10.0.0/releasenotes/0000775000175000017500000000000013656747325020215 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/releasenotes/notes/0000775000175000017500000000000013656747325021345 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/releasenotes/notes/drop-py-2-7-ae8cade4a0ee1da8.yaml0000664000175000017500000000034413656747241026711 0ustar zuulzuul00000000000000--- upgrade: - | Python 2.7 support has been dropped. Last release of designate-dashboard to support python 2.7 is OpenStack Train. The minimum version of Python now supported by designate-dashboard is Python 3.6. designate-dashboard-10.0.0/releasenotes/notes/removed-v1-dashboard-56d4697d57baef09.yaml0000664000175000017500000000010413656747241030370 0ustar zuulzuul00000000000000--- upgrade: - | Removed the long deprecated v1 API dashboard.designate-dashboard-10.0.0/releasenotes/source/0000775000175000017500000000000013656747325021515 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/releasenotes/source/train.rst0000664000175000017500000000017613656747241023365 0ustar zuulzuul00000000000000========================== Train Series Release Notes ========================== .. release-notes:: :branch: stable/train designate-dashboard-10.0.0/releasenotes/source/conf.py0000664000175000017500000002066613656747241023023 0ustar zuulzuul00000000000000# -*- coding: utf-8 -*- # # Designate dashboard Release Notes documentation build configuration file. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'openstackdocstheme', 'reno.sphinxext', ] # openstackdocstheme options repository_name = 'openstack/designate-dashboard' bug_project = 'designate-dashboard' bug_tag = '' html_last_updated_fmt = '%Y-%m-%d %H:%M' html_theme = 'openstackdocs' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'Designate dashboard Release Notes' copyright = u'2019, Designate dashboard developers' # Release notes are version independent # The short X.Y version. version = '' # The full version, including alpha/beta/rc tags. release = '' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [] # The reST default role (used for this markup: `text`) to use for all # documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. # keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. # html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. # html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_domain_indices = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. # tml_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # tml_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # tml_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # tml_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). # tml_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'DesignatedashboardReleaseNotestdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'PythonDesignatedashboard.tex', u'Designate dashboard Release Notes Documentation', u'Designate dashboard developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # atex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # atex_use_parts = False # If true, show page references after internal links. # atex_show_pagerefs = False # If true, show URL addresses after external links. # atex_show_urls = False # Documents to append as an appendix to all manuals. # atex_appendices = [] # If false, no module index is generated. # atex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'designatedashboard', u'Designate dashboard Release Notes Documentation', [u'Designate dashboard developers'], 1) ] # If true, show URL addresses after external links. # an_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'Designate dashboard', u'Designate dashboard Release Notes Documentation', u'Designate dashboard developers', 'Designate dashboard', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. # exinfo_appendices = [] # If false, no module index is generated. # exinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. # exinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. # exinfo_no_detailmenu = False # -- Options for Internationalization output ------------------------------ locale_dirs = ['locale/'] designate-dashboard-10.0.0/releasenotes/source/unreleased.rst0000664000175000017500000000015313656747241024372 0ustar zuulzuul00000000000000============================ Current Series Release Notes ============================ .. release-notes:: designate-dashboard-10.0.0/releasenotes/source/index.rst0000664000175000017500000000050713656747241023355 0ustar zuulzuul00000000000000=========================================================== Welcome to Designate dashboard Release Notes documentation! =========================================================== Contents ======== .. toctree:: :maxdepth: 2 unreleased train Indices and tables ================== * :ref:`genindex` * :ref:`search` designate-dashboard-10.0.0/releasenotes/source/locale/0000775000175000017500000000000013656747325022754 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/releasenotes/source/locale/en_GB/0000775000175000017500000000000013656747325023726 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/releasenotes/source/locale/en_GB/LC_MESSAGES/0000775000175000017500000000000013656747325025513 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po0000664000175000017500000000332713656747241030546 0ustar zuulzuul00000000000000# Andi Chandler , 2017. #zanata # Andi Chandler , 2019. #zanata # Andi Chandler , 2020. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-04-16 08:31+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2020-04-18 07:15+0000\n" "Last-Translator: Andi Chandler \n" "Language-Team: English (United Kingdom)\n" "Language: en_GB\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" msgid "9.0.0" msgstr "9.0.0" msgid "9.0.0-15" msgstr "9.0.0-15" msgid ":ref:`genindex`" msgstr ":ref:`genindex`" msgid ":ref:`search`" msgstr ":ref:`search`" msgid "Contents" msgstr "Contents" msgid "Current Series Release Notes" msgstr "Current Series Release Notes" msgid "Indices and tables" msgstr "Indices and tables" msgid "" "Python 2.7 support has been dropped. Last release of designate-dashboard to " "support python 2.7 is OpenStack Train. The minimum version of Python now " "supported by designate-dashboard is Python 3.6." msgstr "" "Python 2.7 support has been dropped. Last release of Designate-dashboard to " "support Python 2.7 is OpenStack Train. The minimum version of Python now " "supported by Designate-dashboard is Python 3.6." msgid "Removed the long deprecated v1 API dashboard." msgstr "Removed the long deprecated v1 API dashboard." msgid "Train Series Release Notes" msgstr "Train Series Release Notes" msgid "Upgrade Notes" msgstr "Upgrade Notes" msgid "Welcome to Designate dashboard Release Notes documentation!" msgstr "Welcome to Designate dashboard Release Notes documentation!" designate-dashboard-10.0.0/releasenotes/source/locale/de/0000775000175000017500000000000013656747325023344 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/releasenotes/source/locale/de/LC_MESSAGES/0000775000175000017500000000000013656747325025131 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/releasenotes/source/locale/de/LC_MESSAGES/releasenotes.po0000664000175000017500000000227313656747241030163 0ustar zuulzuul00000000000000# Frank Kloeker , 2017. #zanata # Andreas Jaeger , 2019. #zanata msgid "" msgstr "" "Project-Id-Version: designate-dashboard\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-12-05 10:22+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2019-09-28 07:42+0000\n" "Last-Translator: Andreas Jaeger \n" "Language-Team: German\n" "Language: de\n" "X-Generator: Zanata 4.3.3\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" msgid ":ref:`genindex`" msgstr ":ref:`genindex`" msgid ":ref:`search`" msgstr ":ref:`search`" msgid "Contents" msgstr "Inhalt" msgid "Current Series Release Notes" msgstr "Aktuelle Serie Releasenotes" msgid "Indices and tables" msgstr "Indizes und Tabellen" msgid "Removed the long deprecated v1 API dashboard." msgstr "Das lange abgekündigte v1 API Dashboard wurde entfernt." msgid "Train Series Release Notes" msgstr "Train Serie Releasenotes" msgid "Upgrade Notes" msgstr "Aktualisierungsnotizen" msgid "Welcome to Designate dashboard Release Notes documentation!" msgstr "Willkommen bei den Releasenotes für das Designate Dashboard" designate-dashboard-10.0.0/manage.py0000775000175000017500000000156413656747241017334 0ustar zuulzuul00000000000000#!/usr/bin/env python3 # Copyright 2014 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. import os import sys if __name__ == "__main__": os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "designatedashboard.settings") from django.core.management import execute_from_command_line # noqa execute_from_command_line(sys.argv) designate-dashboard-10.0.0/openstack-common.conf0000664000175000017500000000022113656747241021640 0ustar zuulzuul00000000000000[DEFAULT] # The list of modules to copy from oslo-incubator.git # The base module to hold the copy of openstack.common base=designatedashboard designate-dashboard-10.0.0/PKG-INFO0000664000175000017500000000732613656747325016631 0ustar zuulzuul00000000000000Metadata-Version: 1.1 Name: designate-dashboard Version: 10.0.0 Summary: Designate Horizon UI bits Home-page: https://docs.openstack.org/developer/designate-dashboard/ Author: OpenStack Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Description: ======================== Team and repository tags ======================== .. image:: https://governance.openstack.org/tc/badges/designate-dashboard.svg :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on =================== designate dashboard =================== Designate Horizon UI bits * Free software: Apache license Features -------- * TODO Howto ----- 1. Package the designatedashboard by running:: python setup.py sdist This will create a python egg in the dist folder, which can be used to install on the horizon machine or within horizon's python virtual environment. -- or -- Install directly from source by running "python setup.py --install" Note: On some systems python may throw an error like 'Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository' this seems to be a result of mismatched pbr versioning. A hacking workaround for development purposes is replacing the pbr call with a hard-coded version (e.g. '1.0.1') in designatedashboard/__init__.py. 2. Copy panel plugin files into your Horizon config. These files can be found in designatedashboard/enabled and should be copied to /usr/share/openstack-dashboard/openstack_dashboard/local/enabled or the equivalent directory for your openstack-dashboard install. 3. Make sure your keystone catalog contains endpoints for service type 'dns'. If no such endpoints are found, the designatedashboard panels will not render. 4. (Optional) Copy the designate policy file into horizon's policy files folder, and add this config:: 'dns': 'designate_policy.json', 5. (Optional) Within your horizon settings file(s) (either the local settings or the other settings.py), add the line below. This will make it so the record create/update screen uses a drop down of your floating ip addresses instead of a free form text field:: DESIGNATE = { 'records_use_fips': True } Test ---- * How to run JS tests: * Install npm and nodejs=4.8.4 $ ``sudo apt-get install npm`` $ ``curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -`` $ ``sudo apt-get install nodejs`` 1. ``npm install`` (to create virtual environment and install all dependencies in package.json) 2. ``npm run lint`` for eslint 3. ``npm run test`` for JS unit tests Platform: UNKNOWN Classifier: Environment :: OpenStack Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 designate-dashboard-10.0.0/test-requirements.txt0000664000175000017500000000106113656747241021760 0ustar zuulzuul00000000000000# The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. hacking>=1.1.0,<1.2.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 mock>=2.0.0 # BSD oslo.config>=5.2.0 # Apache-2.0 pylint==1.4.5 # GPLv2 testrepository>=0.0.18 # Apache-2.0/BSD testtools>=2.2.0 # MIT unittest2>=1.1.0 # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD openstackdocstheme>=1.18.1 # Apache-2.0 reno>=2.5.0 # Apache-2.0 designate-dashboard-10.0.0/lower-constraints.txt0000664000175000017500000000541613656747241021765 0ustar zuulzuul00000000000000alabaster==0.7.10 appdirs==1.4.3 asn1crypto==0.24.0 astroid==1.3.8 Babel==2.3.4 certifi==2018.1.18 cffi==1.11.5 chardet==3.0.4 cliff==2.11.0 cmd2==0.8.1 colorama==0.3.9 contextlib2==0.5.5 coverage==4.0 cryptography==2.1.4 debtcollector==1.19.0 decorator==4.2.1 deprecation==2.0 django-appconf==1.0.2 django-babel==0.6.2 django-compressor==2.0 django-pyscss==2.0.2 Django==2.2 docutils==0.14 dogpile.cache==0.6.5 dulwich==0.19.0 extras==1.0.0 fasteners==0.14.1 fixtures==3.0.0 flake8==2.5.5 futurist==1.6.0 hacking==0.12.0 horizon==17.1.0 idna==2.6 imagesize==1.0.0 iso8601==0.1.12 Jinja2==2.10 jmespath==0.9.3 jsonpatch==1.21 jsonpointer==2.0 jsonschema==2.6.0 keystoneauth1==3.4.0 linecache2==1.0.0 logilab-common==1.4.1 MarkupSafe==1.0 mccabe==0.2.1 mock==2.0.0 monotonic==1.4 msgpack==0.5.6 munch==2.2.0 netaddr==0.7.19 netifaces==0.10.6 openstackdocstheme==1.18.1 openstacksdk==0.12.0 os-client-config==1.29.0 os-service-types==1.2.0 osc-lib==1.10.0 oslo.concurrency==3.26.0 oslo.config==5.2.0 oslo.context==2.20.0 oslo.i18n==3.20.0 oslo.log==3.36.0 oslo.policy==1.34.0 oslo.serialization==2.25.0 oslo.utils==3.36.0 osprofiler==2.3.0 packaging==17.1 pbr==2.0.0 pep8==1.5.7 Pint==0.8.1 prettytable==0.7.2 pycparser==2.18 pyflakes==0.8.1 Pygments==2.2.0 pyinotify==0.9.6 pylint==1.4.5 pymongo==3.6.1 pyOpenSSL==17.5.0 pyparsing==2.2.0 pyperclip==1.6.0 pyScss==1.3.7 python-dateutil==2.7.0 python-designateclient==2.7.0 python-glanceclient==2.9.1 python-keystoneclient==3.22.0 python-mimeparse==1.6.0 python-neutronclient==6.7.0 python-novaclient==10.1.0 python-subunit==1.2.0 python-swiftclient==3.5.0 pytz==2018.3 PyYAML==3.12 rcssmin==1.0.6 reno==2.5.0 requests==2.18.4 requestsexceptions==1.4.0 rfc3986==1.1.0 rjsmin==1.0.12 semantic-version==2.6.0 simplejson==3.13.2 six==1.11.0 snowballstemmer==1.2.1 Sphinx==1.6.2 sphinxcontrib-websupport==1.0.1 stevedore==1.28.0 termcolor==1.1.0 testrepository==0.0.18 testtools==2.2.0 traceback2==1.4.0 unittest2==1.1.0 urllib3==1.22 warlock==1.3.0 WebOb==1.7.4 wrapt==1.10.11 XStatic-Angular-Bootstrap==2.2.0.0 XStatic-Angular-FileUpload==12.0.4.0 XStatic-Angular-Gettext==2.3.8.0 XStatic-Angular-lrdragndrop==1.0.2.2 XStatic-Angular-Schema-Form==0.8.13.0 XStatic-Angular==1.5.8.0 XStatic-Bootstrap-Datepicker==1.3.1.0 XStatic-Bootstrap-SCSS==3.3.7.1 XStatic-bootswatch==3.3.7.0 XStatic-D3==3.5.17.0 XStatic-Font-Awesome==4.7.0.0 XStatic-Hogan==2.0.0.2 XStatic-Jasmine==2.4.1.1 XStatic-JQuery-Migrate==1.2.1.1 XStatic-jquery-ui==1.12.0.1 XStatic-JQuery.quicksearch==2.0.3.1 XStatic-JQuery.TableSorter==2.14.5.1 XStatic-jQuery==1.10.2.1 XStatic-JSEncrypt==2.3.1.1 XStatic-mdi==1.4.57.0 XStatic-objectpath==1.2.1.0 XStatic-Rickshaw==1.5.0.0 XStatic-roboto-fontface==0.5.0.0 XStatic-smart-table==1.4.13.2 XStatic-Spin==1.2.5.2 XStatic-term.js==0.0.7.0 XStatic-tv4==1.2.7.0 XStatic==1.0.1 designate-dashboard-10.0.0/AUTHORS0000664000175000017500000000452413656747325016601 0ustar zuulzuul00000000000000Aggelos Kolaitis Akihiro Motoki Akihiro Motoki Alex Monk Andreas Jaeger Andreas Jaeger Anusree Cao Xuan Hoang Charles Short Chris Johnson Chuck Short Corey Bryant Dmitry Galkin Doug Hellmann Endre Karlson Enrique Garcia Erik Olof Gunnar Andersson Federico Ceratto Flavio Percoco Ghanshyam Mann Graham Hayes Graham Hayes Graham Hayes Ingo Fischer Ivan Kolodyazhny James E. Blair Janonymous Jens Harbott Jingjing Ren Kiall Mac Innes Kiall Mac Innes LeopardMa MasayaAoyama Matt Borland Monty Taylor Nguyen Hai OpenStack Release Bot Praveen Yalagandula Qian Min Chen Rajiv Kumar Sean McGinnis Steve McLellan Swapnil Kulkarni (coolsvap) Thierry Carrez Tony Xu Tyr Johanson Vu Cong Tuan ZhijunWei andrewbogott avnish eric huang.zhiping jacky06 lingyongxu ljhuang luke.li manchandavishal mareklycka qiaomin ricolin shashi.kant sonu.kumar sunqingliang6 xhzhf designate-dashboard-10.0.0/CONTRIBUTING.rst0000664000175000017500000000110013656747241020152 0ustar zuulzuul00000000000000If you would like to contribute to the development of OpenStack, you must follow the steps in the "If you're a developer, start here" section of this page: https://wiki.openstack.org/wiki/How_To_Contribute Once those steps have been completed, changes to OpenStack should be submitted for review via the Gerrit tool, following the workflow documented at: https://docs.openstack.org/infra/manual/developers.html Pull requests submitted through GitHub will be ignored. Bugs should be filed on Launchpad, not GitHub: https://bugs.launchpad.net/designate-dashboard designate-dashboard-10.0.0/test0000664000175000017500000000400013656747241016415 0ustar zuulzuul00000000000000SQLite format 3@ -æ ¶Jdesignate-dashboard-10.0.0/README.rst0000664000175000017500000000457613656747241017224 0ustar zuulzuul00000000000000======================== Team and repository tags ======================== .. image:: https://governance.openstack.org/tc/badges/designate-dashboard.svg :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on =================== designate dashboard =================== Designate Horizon UI bits * Free software: Apache license Features -------- * TODO Howto ----- 1. Package the designatedashboard by running:: python setup.py sdist This will create a python egg in the dist folder, which can be used to install on the horizon machine or within horizon's python virtual environment. -- or -- Install directly from source by running "python setup.py --install" Note: On some systems python may throw an error like 'Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository' this seems to be a result of mismatched pbr versioning. A hacking workaround for development purposes is replacing the pbr call with a hard-coded version (e.g. '1.0.1') in designatedashboard/__init__.py. 2. Copy panel plugin files into your Horizon config. These files can be found in designatedashboard/enabled and should be copied to /usr/share/openstack-dashboard/openstack_dashboard/local/enabled or the equivalent directory for your openstack-dashboard install. 3. Make sure your keystone catalog contains endpoints for service type 'dns'. If no such endpoints are found, the designatedashboard panels will not render. 4. (Optional) Copy the designate policy file into horizon's policy files folder, and add this config:: 'dns': 'designate_policy.json', 5. (Optional) Within your horizon settings file(s) (either the local settings or the other settings.py), add the line below. This will make it so the record create/update screen uses a drop down of your floating ip addresses instead of a free form text field:: DESIGNATE = { 'records_use_fips': True } Test ---- * How to run JS tests: * Install npm and nodejs=4.8.4 $ ``sudo apt-get install npm`` $ ``curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -`` $ ``sudo apt-get install nodejs`` 1. ``npm install`` (to create virtual environment and install all dependencies in package.json) 2. ``npm run lint`` for eslint 3. ``npm run test`` for JS unit tests designate-dashboard-10.0.0/designate_dashboard.egg-info/0000775000175000017500000000000013656747325023170 5ustar zuulzuul00000000000000designate-dashboard-10.0.0/designate_dashboard.egg-info/dependency_links.txt0000664000175000017500000000000113656747325027236 0ustar zuulzuul00000000000000 designate-dashboard-10.0.0/designate_dashboard.egg-info/requires.txt0000664000175000017500000000014713656747325025572 0ustar zuulzuul00000000000000oslo.log>=3.36.0 pbr!=2.1.0,>=2.0.0 Babel!=2.4.0,>=2.3.4 python-designateclient>=2.7.0 horizon>=17.1.0 designate-dashboard-10.0.0/designate_dashboard.egg-info/pbr.json0000664000175000017500000000005613656747325024647 0ustar zuulzuul00000000000000{"git_version": "41c19d9", "is_release": true}designate-dashboard-10.0.0/designate_dashboard.egg-info/PKG-INFO0000664000175000017500000000732613656747325024275 0ustar zuulzuul00000000000000Metadata-Version: 1.1 Name: designate-dashboard Version: 10.0.0 Summary: Designate Horizon UI bits Home-page: https://docs.openstack.org/developer/designate-dashboard/ Author: OpenStack Author-email: openstack-discuss@lists.openstack.org License: UNKNOWN Description: ======================== Team and repository tags ======================== .. image:: https://governance.openstack.org/tc/badges/designate-dashboard.svg :target: https://governance.openstack.org/tc/reference/tags/index.html .. Change things from this point on =================== designate dashboard =================== Designate Horizon UI bits * Free software: Apache license Features -------- * TODO Howto ----- 1. Package the designatedashboard by running:: python setup.py sdist This will create a python egg in the dist folder, which can be used to install on the horizon machine or within horizon's python virtual environment. -- or -- Install directly from source by running "python setup.py --install" Note: On some systems python may throw an error like 'Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository' this seems to be a result of mismatched pbr versioning. A hacking workaround for development purposes is replacing the pbr call with a hard-coded version (e.g. '1.0.1') in designatedashboard/__init__.py. 2. Copy panel plugin files into your Horizon config. These files can be found in designatedashboard/enabled and should be copied to /usr/share/openstack-dashboard/openstack_dashboard/local/enabled or the equivalent directory for your openstack-dashboard install. 3. Make sure your keystone catalog contains endpoints for service type 'dns'. If no such endpoints are found, the designatedashboard panels will not render. 4. (Optional) Copy the designate policy file into horizon's policy files folder, and add this config:: 'dns': 'designate_policy.json', 5. (Optional) Within your horizon settings file(s) (either the local settings or the other settings.py), add the line below. This will make it so the record create/update screen uses a drop down of your floating ip addresses instead of a free form text field:: DESIGNATE = { 'records_use_fips': True } Test ---- * How to run JS tests: * Install npm and nodejs=4.8.4 $ ``sudo apt-get install npm`` $ ``curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -`` $ ``sudo apt-get install nodejs`` 1. ``npm install`` (to create virtual environment and install all dependencies in package.json) 2. ``npm run lint`` for eslint 3. ``npm run test`` for JS unit tests Platform: UNKNOWN Classifier: Environment :: OpenStack Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: System Administrators Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 designate-dashboard-10.0.0/designate_dashboard.egg-info/top_level.txt0000664000175000017500000000002313656747325025715 0ustar zuulzuul00000000000000designatedashboard designate-dashboard-10.0.0/designate_dashboard.egg-info/not-zip-safe0000664000175000017500000000000113656747325025416 0ustar zuulzuul00000000000000 designate-dashboard-10.0.0/designate_dashboard.egg-info/SOURCES.txt0000664000175000017500000001522413656747325025060 0ustar zuulzuul00000000000000.zuul.yaml AUTHORS CONTRIBUTING.rst ChangeLog HACKING.rst LICENSE README.rst babel-django.cfg karma.conf.js lower-constraints.txt manage.py openstack-common.conf package.json requirements.txt setup.cfg setup.py test test-requirements.txt test-shim.js tox.ini designate_dashboard.egg-info/PKG-INFO designate_dashboard.egg-info/SOURCES.txt designate_dashboard.egg-info/dependency_links.txt designate_dashboard.egg-info/not-zip-safe designate_dashboard.egg-info/pbr.json designate_dashboard.egg-info/requires.txt designate_dashboard.egg-info/top_level.txt designatedashboard/__init__.py designatedashboard/exceptions.py designatedashboard/api/__init__.py designatedashboard/api/rest/__init__.py designatedashboard/api/rest/passthrough.py designatedashboard/dashboards/__init__.py designatedashboard/dashboards/project/__init__.py designatedashboard/dashboards/project/ngdns/__init__.py designatedashboard/dashboards/project/ngdns/reverse_dns/__init__.py designatedashboard/dashboards/project/ngdns/reverse_dns/panel.py designatedashboard/dashboards/project/ngdns/reverse_dns/urls.py designatedashboard/dashboards/project/ngdns/zones/__init__.py designatedashboard/dashboards/project/ngdns/zones/panel.py designatedashboard/dashboards/project/ngdns/zones/urls.py designatedashboard/enabled/_1710_project_dns_panel_group.py designatedashboard/enabled/_1721_dns_zones_panel.py designatedashboard/enabled/_1722_dns_reversedns_panel.py designatedashboard/enabled/__init__.py designatedashboard/locale/cs/LC_MESSAGES/django.po designatedashboard/locale/de/LC_MESSAGES/django.po designatedashboard/locale/en_GB/LC_MESSAGES/django.po designatedashboard/locale/es/LC_MESSAGES/django.po designatedashboard/locale/fr/LC_MESSAGES/django.po designatedashboard/locale/id/LC_MESSAGES/django.po designatedashboard/locale/ja/LC_MESSAGES/django.po designatedashboard/locale/ko_KR/LC_MESSAGES/django.po designatedashboard/locale/ne/LC_MESSAGES/django.po designatedashboard/locale/pt_BR/LC_MESSAGES/django.po designatedashboard/locale/ru/LC_MESSAGES/django.po designatedashboard/locale/tr_TR/LC_MESSAGES/django.po designatedashboard/locale/zh_CN/LC_MESSAGES/django.po designatedashboard/static/designatedashboard/designatedashboard.module.js designatedashboard/static/designatedashboard/designatedashboard.scss designatedashboard/static/designatedashboard/reverse_dns.html designatedashboard/static/designatedashboard/zones.html designatedashboard/static/designatedashboard/resources/resources.module.js designatedashboard/static/designatedashboard/resources/util.service.js designatedashboard/static/designatedashboard/resources/os-designate-floatingip/api.service.js designatedashboard/static/designatedashboard/resources/os-designate-floatingip/os-designate-floatingip.module.js designatedashboard/static/designatedashboard/resources/os-designate-floatingip/actions/actions.module.js designatedashboard/static/designatedashboard/resources/os-designate-floatingip/actions/set.service.js designatedashboard/static/designatedashboard/resources/os-designate-floatingip/actions/unset.service.js designatedashboard/static/designatedashboard/resources/os-designate-floatingip/details/details.module.js designatedashboard/static/designatedashboard/resources/os-designate-floatingip/details/drawer.html designatedashboard/static/designatedashboard/resources/os-designate-floatingip/details/overview.controller.js designatedashboard/static/designatedashboard/resources/os-designate-floatingip/details/overview.html designatedashboard/static/designatedashboard/resources/os-designate-recordset/api.service.js designatedashboard/static/designatedashboard/resources/os-designate-recordset/os-designate-recordset.module.js designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/actions.module.js designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/common-forms.service.js designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/create.service.js designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/delete.service.js designatedashboard/static/designatedashboard/resources/os-designate-recordset/actions/update.service.js designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/details.module.js designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/drawer.html designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/overview.controller.js designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/overview.html designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/zone-recordsets.controller.js designatedashboard/static/designatedashboard/resources/os-designate-recordset/details/zone-recordsets.html designatedashboard/static/designatedashboard/resources/os-designate-zone/api.service.js designatedashboard/static/designatedashboard/resources/os-designate-zone/os-designate-zone.module.js designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/actions.module.js designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/actions.module.spec.js designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/common-forms.service.js designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/create.html designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/create.service.js designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/delete.service.js designatedashboard/static/designatedashboard/resources/os-designate-zone/actions/update.service.js designatedashboard/static/designatedashboard/resources/os-designate-zone/details/details.module.js designatedashboard/static/designatedashboard/resources/os-designate-zone/details/drawer.html designatedashboard/static/designatedashboard/resources/os-designate-zone/details/overview.controller.js designatedashboard/static/designatedashboard/resources/os-designate-zone/details/overview.html designatedashboard/tests/.secret_key_store designatedashboard/tests/__init__.py designatedashboard/tests/base.py designatedashboard/tests/settings.py doc/requirements.txt doc/source/conf.py doc/source/index.rst doc/source/readme.rst doc/source/contributor/index.rst doc/source/install/index.rst doc/source/user/index.rst releasenotes/notes/drop-py-2-7-ae8cade4a0ee1da8.yaml releasenotes/notes/removed-v1-dashboard-56d4697d57baef09.yaml releasenotes/source/conf.py releasenotes/source/index.rst releasenotes/source/train.rst releasenotes/source/unreleased.rst releasenotes/source/locale/de/LC_MESSAGES/releasenotes.po releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.podesignate-dashboard-10.0.0/package.json0000664000175000017500000000133413656747241020010 0ustar zuulzuul00000000000000{ "version": "0.0.0", "private": true, "name": "designate-dashboard", "description": "Designate Dashboard", "repository": "none", "license": "Apache 2.0", "devDependencies": { "eslint": "1.10.3", "eslint-config-openstack": "1.2.4", "jasmine-core": "2.4.1", "karma": "1.1.2", "karma-chrome-launcher": "1.0.1", "karma-cli": "1.0.1", "karma-jasmine": "1.0.2", "karma-ng-html2js-preprocessor": "1.0.0" }, "scripts": { "postinstall": "if [ ! -d .venv ]; then tox -epy36 --notest; fi", "lint": "eslint --no-color designatedashboard/static", "lintq": "eslint --quiet designatedashboard/static", "test": "karma start karma.conf.js --single-run" }, "dependencies": {} } designate-dashboard-10.0.0/.zuul.yaml0000664000175000017500000000047513656747241017470 0ustar zuulzuul00000000000000- project: templates: - check-requirements - horizon-non-primary-django-jobs - horizon-nodejs10-jobs - openstack-cover-jobs-horizon - openstack-lower-constraints-jobs - openstack-python3-ussuri-jobs-horizon - publish-openstack-docs-pti - release-notes-jobs-python3 designate-dashboard-10.0.0/setup.py0000664000175000017500000000200613656747241017231 0ustar zuulzuul00000000000000# Copyright (c) 2013 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. # THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools # In python < 2.7.4, a lazy loading of package `pbr` will break # setuptools if some other modules registered functions in `atexit`. # solution from: http://bugs.python.org/issue15881#msg170215 try: import multiprocessing # noqa except ImportError: pass setuptools.setup( setup_requires=['pbr>=2.0.0'], pbr=True) designate-dashboard-10.0.0/karma.conf.js0000664000175000017500000001117613656747241020104 0ustar zuulzuul00000000000000/* * * 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. */ 'use strict'; var fs = require('fs'); var path = require('path'); module.exports = function (config) { // This tox venv is setup in the post-install npm step var toxPath = '.tox/py36/lib/python3.6/site-packages/'; var xstaticPath = toxPath + 'xstatic/pkg/'; config.set({ preprocessors: { // Used to collect templates for preprocessing. // NOTE: the templates must also be listed in the files section below. './static/**/*.html': ['ng-html2js'] }, // Sets up module to process templates. ngHtml2JsPreprocessor: { prependPrefix: '/', moduleName: 'templates' }, basePath: './', // Contains both source and test files. files: [ /* * shim, partly stolen from /i18n/js/horizon/ * Contains expected items not provided elsewhere (dynamically by * Django or via jasmine template. */ './test-shim.js', // from jasmine.html xstaticPath + 'jquery/data/jquery.js', xstaticPath + 'angular/data/angular.js', xstaticPath + 'angular/data/angular-route.js', xstaticPath + 'angular/data/angular-mocks.js', xstaticPath + 'angular/data/angular-cookies.js', xstaticPath + 'angular_bootstrap/data/angular-bootstrap.js', xstaticPath + 'angular_gettext/data/angular-gettext.js', xstaticPath + 'angular_fileupload/data/ng-file-upload-all.js', xstaticPath + 'angular/data/angular-sanitize.js', xstaticPath + 'd3/data/d3.js', xstaticPath + 'rickshaw/data/rickshaw.js', xstaticPath + 'angular_smart_table/data/smart-table.js', xstaticPath + 'angular_lrdragndrop/data/lrdragndrop.js', xstaticPath + 'spin/data/spin.js', xstaticPath + 'spin/data/spin.jquery.js', xstaticPath + 'tv4/data/tv4.js', xstaticPath + 'objectpath/data/ObjectPath.js', xstaticPath + 'angular_schema_form/data/schema-form.js', // TODO: These should be mocked. toxPath + '/horizon/static/horizon/js/horizon.js', /** * Include framework source code from horizon that we need. * Otherwise, karma will not be able to find them when testing. * These files should be mocked in the foreseeable future. */ toxPath + 'horizon/static/framework/**/*.module.js', toxPath + 'horizon/static/framework/**/!(*.spec|*.mock).js', toxPath + 'openstack_dashboard/static/**/*.module.js', toxPath + 'openstack_dashboard/static/**/!(*.spec|*.mock).js', toxPath + 'openstack_dashboard/dashboards/**/static/**/*.module.js', toxPath + 'openstack_dashboard/dashboards/**/static/**/!(*.spec|*.mock).js', /** * First, list all the files that defines application's angular modules. * Those files have extension of `.module.js`. The order among them is * not significant. */ './designatedashboard/static/**/*.module.js', /** * Followed by other JavaScript files that defines angular providers * on the modules defined in files listed above. And they are not mock * files or spec files defined below. The order among them is not * significant. */ './designatedashboard/static/**/!(*.spec|*.mock).js', /** * Then, list files for mocks with `mock.js` extension. The order * among them should not be significant. */ toxPath + 'openstack_dashboard/static/**/*.mock.js', //'./static/**/*.mock.js', /** * Finally, list files for spec with `spec.js` extension. The order * among them should not be significant. */ './designatedashboard/static/**/*.spec.js', /** * Angular external templates */ './designatedashboard/static/**/*.html', ], autoWatch: true, frameworks: ['jasmine'], browsers: ['Chrome'], phantomjsLauncher: { // Have phantomjs exit if a ResourceError is encountered // (useful if karma exits without killing phantom) exitOnResourceError: true }, reporters: ['progress'], plugins: [ 'karma-chrome-launcher', 'karma-jasmine', 'karma-ng-html2js-preprocessor' ] }); }; designate-dashboard-10.0.0/test-shim.js0000664000175000017500000000617613656747241020006 0ustar zuulzuul00000000000000/** * 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. */ /* * Shim for Javascript unit tests; supplying expected global features. * This should be removed from the codebase once i18n services are provided. * Taken from default i18n file provided by Django. */ var horizonPlugInModules = []; (function (globals) { var django = globals.django || (globals.django = {}); django.pluralidx = function (count) { return (count == 1) ? 0 : 1; }; /* gettext identity library */ django.gettext = function (msgid) { return msgid; }; django.ngettext = function (singular, plural, count) { return (count == 1) ? singular : plural; }; django.gettext_noop = function (msgid) { return msgid; }; django.pgettext = function (context, msgid) { return msgid; }; django.npgettext = function (context, singular, plural, count) { return (count == 1) ? singular : plural; }; django.interpolate = function (fmt, obj, named) { if (named) { return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); } else { return fmt.replace(/%s/g, function(match){return String(obj.shift())}); } }; /* formatting library */ django.formats = { "DATETIME_FORMAT": "N j, Y, P", "DATETIME_INPUT_FORMATS": [ "%Y-%m-%d %H:%M:%S", "%Y-%m-%d %H:%M:%S.%f", "%Y-%m-%d %H:%M", "%Y-%m-%d", "%m/%d/%Y %H:%M:%S", "%m/%d/%Y %H:%M:%S.%f", "%m/%d/%Y %H:%M", "%m/%d/%Y", "%m/%d/%y %H:%M:%S", "%m/%d/%y %H:%M:%S.%f", "%m/%d/%y %H:%M", "%m/%d/%y" ], "DATE_FORMAT": "N j, Y", "DATE_INPUT_FORMATS": [ "%Y-%m-%d", "%m/%d/%Y", "%m/%d/%y" ], "DECIMAL_SEPARATOR": ".", "FIRST_DAY_OF_WEEK": "0", "MONTH_DAY_FORMAT": "F j", "NUMBER_GROUPING": "3", "SHORT_DATETIME_FORMAT": "m/d/Y P", "SHORT_DATE_FORMAT": "m/d/Y", "THOUSAND_SEPARATOR": ",", "TIME_FORMAT": "P", "TIME_INPUT_FORMATS": [ "%H:%M:%S", "%H:%M:%S.%f", "%H:%M" ], "YEAR_MONTH_FORMAT": "F Y" }; django.get_format = function (format_type) { var value = django.formats[format_type]; if (typeof(value) == 'undefined') { return format_type; } else { return value; } }; /* add to global namespace */ globals.pluralidx = django.pluralidx; globals.gettext = django.gettext; globals.ngettext = django.ngettext; globals.gettext_noop = django.gettext_noop; globals.pgettext = django.pgettext; globals.npgettext = django.npgettext; globals.interpolate = django.interpolate; globals.get_format = django.get_format; globals.STATIC_URL = '/static/'; globals.WEBROOT = '/'; }(this)); designate-dashboard-10.0.0/LICENSE0000664000175000017500000002363613656747241016540 0ustar zuulzuul00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.