Tagger: OpenStack Release Bot <infra-root@openstack.org>

Date:   Mon Sep 19 18:20:58 2016 +0000
 
 retag 3.0.0_rc1 of designate-dashboard 3.0.0.0rc1 release candidate
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJX6v1kAAoJENQWrRWsa0P++UwP+wUkZ3PsfXgbNEG6y83XqOXN
 b0Q5o6nrU3iL6ol2Fhpvbf5g3R5a/xAwi2nc6qrYDaqr+P3XrpmV2OnFfEJx0oht
 bUwW2SubYLE8WVFdXXHHOXOFUHTIv1a4/x5E8iaxLbV+Z7Mjxx7rg2c55mVk+FPq
 OMSckwp9Ikhmh4OCc1yQ2NLOmwwt58n8eF7UlSbUMr9U9Y5d6jOuN7V9QpjMdA4z
 1GgyQb7HoYR8I0V8L4AggITi2AsFSKvB8hzrKKiwZOlN7HKbuiAXdKr7Kce7YpVt
 H5f0PeUq4wgg4EejBUgVO6+RaJzn2lZpPEnluVUhAPSReryywWVkv6z+E273GeRB
 bYOjpAM8trfaFMHzXPEstSYICpe7WTL+MgVwLAC3/2fVCAgG5OLQ/qFRrNba4AgD
 1U8Knc1vw+RPuCXTy4UfVY7GGbfouQ0XJ87RJhXVJJQyO9wmeyU6r3BTDDnwwNul
 kKmub9tQ0kysJUbasfPN0CSvbodLcfMec6R9rGM8j3yGR1oXkp4JYL7HVyeBCiNY
 fwMCMvI2gI33lK9UiJGOlf0Ps8ZAqkus8wrL5BsTW+tFDFLKqTrJfu0HRyI4qZS0
 TESS9ZF3ZudMdHushAshurTbCuPU6lzLUuKT3UkugNC58Su51PuvRXFlW8OH8qIV
 e2OoLPFAiFF4lHlsZaIS
 =behh
 -----END PGP SIGNATURE-----

Merge tag '3.0.0_rc1' into debian/newton

Tagger: OpenStack Release Bot <infra-root@openstack.org>
Date:   Mon Sep 19 18:20:58 2016 +0000

retag 3.0.0_rc1 of designate-dashboard 3.0.0.0rc1 release candidate

  * New upstream release.
  * Fixed (build-)depends for this release.
  * Using OpenStack's Gerrit as VCS URLs.
  * Point .gitreview file to OpenStack's Gerrit packaging-deb.
  * d/s/options: ignore .gitreview changes.
  * Disable fix-init-fails-to-get-version.patch.

Change-Id: I7223607283ea21dee96fb94c8bf7fc357f171751
This commit is contained in:
Thomas Goirand 2016-09-28 01:14:53 +02:00
commit eb6d5f8c01
78 changed files with 5276 additions and 600 deletions

View File

@ -1,5 +1,5 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/designate-dashboard.git
defaultbranch=stable/mitaka
project=openstack/deb-designate-dashboard.git
defaultbranch=debian/newton

11
debian/changelog vendored
View File

@ -1,3 +1,14 @@
designate-dashboard (3.0.0~rc1-1) experimental; urgency=medium
* New upstream release.
* Fixed (build-)depends for this release.
* Using OpenStack's Gerrit as VCS URLs.
* Point .gitreview file to OpenStack's Gerrit packaging-deb.
* d/s/options: ignore .gitreview changes.
* Disable fix-init-fails-to-get-version.patch.
-- Thomas Goirand <zigo@debian.org> Wed, 28 Sep 2016 01:14:56 +0200
designate-dashboard (2.0.0-2) unstable; urgency=medium
[ Ondřej Nový ]

20
debian/control vendored
View File

@ -10,35 +10,35 @@ Build-Depends: debhelper (>= 9),
python-pbr (>= 1.8),
python-setuptools,
python-sphinx,
Build-Depends-Indep: openstack-dashboard (>= 3:9.0.0~rc1),
python-babel,
Build-Depends-Indep: openstack-dashboard (>= 3:10.0.0~rc1),
python-babel (>= 2.3.4),
python-coverage,
python-designateclient (>= 1.5.0),
python-django (>= 1.8),
python-django-compressor (>= 2.0),
python-django-nose,
python-django-openstack-auth (>= 2.0.0),
python-mock (>= 1.3),
python-django-nose (>= 1.4.4),
python-django-openstack-auth (>= 2.4.0),
python-mock (>= 2.0),
python-mox,
python-mox3 (>= 0.7.0),
python-nose,
python-nosehtmloutput,
python-nosexcover,
python-openstack.nose-plugin,
python-oslo.config (>= 1:3.7.0),
python-oslo.config (>= 1:3.14.0),
python-oslosphinx (>= 2.5.0),
python-testtools (>= 1.4.0),
python-unittest2,
testrepository,
Standards-Version: 3.9.8
Vcs-Browser: https://git.openstack.org/cgit/openstack/deb-designate-dashboard?h=debian%2Fnewton
Vcs-Git: https://git.openstack.org/openstack/deb-designate-dashboard.git -b debian/newton
Homepage: https://github.com/stackforge/designate-dashboard
Vcs-Git: https://anonscm.debian.org/git/openstack/designate-dashboard.git
Vcs-Browser: https://anonscm.debian.org/cgit/openstack/designate-dashboard.git/
Package: python-designate-dashboard
Architecture: all
Depends: openstack-dashboard (>= 3:9.0.0~rc1),
python-babel,
Depends: openstack-dashboard (>= 3:10.0.0~rc1),
python-babel (>= 2.3.4),
python-designateclient (>= 1.5.0),
python-pbr (>= 1.8),
python-pkg-resources,

View File

@ -1,2 +1,2 @@
install-missing-files.patch
fix-init-fails-to-get-version.patch
#fix-init-fails-to-get-version.patch

View File

@ -1 +1,2 @@
extend-diff-ignore = "^[^/]*[.]egg-info/"
extend-diff-ignore = "^[.]gitreview$"

View File

@ -16,4 +16,4 @@ import pbr.version
__version__ = pbr.version.VersionInfo(
'designatedashboard').version_string()
'designate-dashboard').version_string()

View File

@ -35,9 +35,6 @@ def designateclient(request):
LOG.debug('no dns service configured.')
return None
LOG.debug('designateclient connection created using token "%s"'
'and url "%s"' % (request.user.token.id, designate_url))
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)

View File

@ -0,0 +1,16 @@
# (c) Copyright <year(s)> 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

View File

@ -0,0 +1,114 @@
# 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 logging
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
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.
"""
service = 'dns' \
''
# 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
response = request_method(
_get_service_url(request, service) + 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<path>.+)$'
@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()

View File

@ -38,7 +38,7 @@ DOMAIN_NAME_REGEX = r'^(?!.{255,})(?:(?!\-)[A-Za-z0-9_\-]{1,63}(?<!\-)\.)+$'
WILDCARD_DOMAIN_NAME_REGEX = r'^(?!.{255,})(?:(^\*|(?!\-)[A-Za-z0-9_\-]{1,63})(?<!\-)\.)+$' # noqa
SRV_NAME_REGEX = r'^(?:_[A-Za-z0-9_\-]{1,62}\.){2}'
SRV_DATA_REGEX = r'^(?:(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])\s){2}(?!.{255,})((?!\-)[A-Za-z0-9_\-]{1,63}(?<!\-)\.)+$' # noqa
SSHFP_DATA_REGEX = r'^[1-3]\s[1-2]\s\b([0-9a-fA-F]{5,40}|[0-9a-fA-F]{64})\b$'
SSHFP_DATA_REGEX = r'^[1-4]\s[1-2]\s\b([0-9a-fA-F]{5,40}|[0-9a-fA-F]{64})\b$'
# The max length for a dns label
NAME_MAX_LENGTH = 63
@ -395,9 +395,9 @@ class RecordForm(forms.SelfHandlingForm):
# Name field
if self._is_field_blank(cleaned_data, 'name'):
if record_type in ['A', 'AAAA', 'CNAME', 'SRV', 'TXT', 'PTR']:
if record_type in ['CNAME', 'SRV']:
self._add_required_field_error('name')
elif record_type == 'MX':
elif record_type in ['MX', 'A', 'AAAA', 'TXT', 'PTR']:
cleaned_data['name'] = domain_name
else:
if record_type == 'SRV':
@ -459,7 +459,11 @@ class RecordForm(forms.SelfHandlingForm):
cleaned_data.pop('txt')
# Priority field
if self._is_field_blank(cleaned_data, 'priority'):
# Check against '' instead of using _is_field_blank because we need to
# allow a valud of 0.
if ('priority' not in cleaned_data or
cleaned_data['priority'] == '' or
cleaned_data['priority'] is None):
if record_type in ['MX', 'SRV']:
self._add_required_field_error('priority')

View File

@ -23,6 +23,7 @@ from openstack_dashboard.api.network import tenant_floating_ip_list
from openstack_dashboard.api.nova import server_list
from designatedashboard import api
from designatedashboard.api import rest # noqa
from .forms import DomainCreate # noqa
from .forms import DomainUpdate # noqa

View File

@ -0,0 +1 @@
from designatedashboard.api import rest # noqa

View File

@ -0,0 +1,25 @@
# (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)

View File

@ -0,0 +1,22 @@
# (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 designatedashboard.dashboards.project.ngdns.reverse_dns import views
urlpatterns = [
url('', views.IndexView.as_view(), name='index'),
]

View File

@ -0,0 +1,19 @@
# (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.views import generic
class IndexView(generic.TemplateView):
template_name = 'angular.html'

View File

@ -0,0 +1,25 @@
# (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)

View File

@ -0,0 +1,22 @@
# (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 designatedashboard.dashboards.project.ngdns.zones import views
urlpatterns = [
url('', views.IndexView.as_view(), name='index'),
]

View File

@ -0,0 +1,19 @@
# (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.views import generic
class IndexView(generic.TemplateView):
template_name = 'angular.html'

View File

@ -32,3 +32,5 @@ ADD_EXCEPTIONS = {
# Python panel class of the PANEL to be added.
ADD_PANEL = (
'designatedashboard.dashboards.project.dns_domains.panel.DNSDomains')
DISABLED = True

View File

@ -0,0 +1,40 @@
# 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

View File

@ -0,0 +1,38 @@
# 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

View File

@ -0,0 +1,341 @@
# Stanislav Ulrych <stanislav.ulrych@ultimum.io>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: designate-dashboard 3.0.0.0b2.dev4\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-06-14 17:42+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2016-06-14 12:09+0000\n"
"Last-Translator: Lenka Husáková <lenka.husakova@ultimum.io>\n"
"Language-Team: Czech\n"
"Language: cs\n"
"X-Generator: Zanata 3.7.3\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
msgid ""
"\n"
" From here you can edit the email address and TTL associated with a "
"domain.\n"
" "
msgstr ""
"\n"
" Zde můžete upravit emailovou adresu a TTL patřící k doméně.\n"
" "
msgid ""
"\n"
" The Email field should contain a valid email address to be associated\n"
" with the domain.\n"
" "
msgstr ""
"\n"
" Pole Email by mělo obsahovat platnou emailovou adresu, která je spojená\n"
" s doménou.\n"
" "
msgid ""
"\n"
" The Name field should contain a full-qualified domain name (with\n"
" trailing period).\n"
" "
msgstr ""
"\n"
" Pole Název by mělo obsahovat plně kvalifikovaný název domény (s \n"
" tečkou na \n"
" konci)."
msgid ""
"\n"
" The optional TTL field can be any value between 1 and 2147483647\n"
" seconds.\n"
" "
msgstr ""
"\n"
" TTL (volitelné) může být hodnota mezi 1 a 2147483647\n"
" sekund.\n"
" "
msgid ""
"\n"
" <p>\n"
" <strong>TTL</strong>\n"
" The TTL is the time-to-live for the record, in seconds.\n"
" </p>\n"
" <p>\n"
" See <a href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\" "
"target=\"_designate_record_defs\">more info</a> on record types.\n"
" </p>\n"
" "
msgstr ""
"\n"
" <p>\n"
" <strong>TTL</strong>\n"
" TTL je time-to-live záznamu, v sekundách.\n"
" </p>\n"
" <p>\n"
" Viz <a href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\" "
"target=\"_designate_record_defs\">více informací</a> o typech záznamů.\n"
" </p>\n"
" "
msgid "A - Address record"
msgstr "A - adresní záznam"
msgid "AAAA - IPv6 address record"
msgstr "AAAA - adresní záznam IPv6"
msgid "All Records"
msgstr "Všechny záznamy"
msgid "CNAME - Canonical name record"
msgstr "CNAME - záznam kanonického jména"
msgid "Cancel"
msgstr "Zrušit"
msgid "Canonical Name"
msgstr "Kanonické jméno"
msgid "Create Domain"
msgstr "Vytvořit doménu"
msgid "Create Domain Record"
msgstr "Vytvořit doménový záznam"
msgid "Create Record"
msgstr "Vytvořit záznam"
msgid "Create Record for"
msgstr "Vytvořit záznam pro"
msgid "Created"
msgstr "Vytvořeno"
msgid "Created At"
msgstr "Vytvořeno"
msgid "Data"
msgstr "Data"
msgid "Delete"
msgstr "Smazat"
msgid "Deleted"
msgstr "Smazáno"
msgid "Description"
msgstr "Popis"
msgid "Domain"
msgstr "Doména"
#, python-format
msgid "Domain %(name)s created."
msgstr "Doména %(name)s vytvořena."
#, python-format
msgid "Domain %(name)s updated."
msgstr "Doména %(name)s aktualizována."
msgid "Domain Detail"
msgstr "Detail domény"
msgid "Domain Name"
msgstr "Doménové jméno"
msgid "Domain Overview"
msgstr "Přehled domén"
msgid "Domain Records"
msgstr "Doménové záznamy"
#, python-format
msgid "Domain record %(name)s created."
msgstr "Doménový záznam %(name)s vytvořen."
#, python-format
msgid "Domain record %(name)s updated."
msgstr "Doménový záznam %(name)s aktualizován."
msgid "Domains"
msgstr "Domény"
msgid "Edit Domain"
msgstr "Upravit doménu"
msgid "Edit Record"
msgstr "Upravit záznam"
msgid "Email"
msgstr "E-mail"
msgid "Enter a valid IPv4 address"
msgstr "Zadejte platnou IPv4 adresu"
msgid "Enter a valid IPv6 address"
msgstr "Zadejte platnou IPv6 adresu"
msgid "Enter a valid SRV name"
msgstr "Zadejte platné SRV jméno"
msgid "Enter a valid SRV record"
msgstr "Zadejte platný SRV záznam"
msgid "Enter a valid SSHFP record"
msgstr "Zadejte platný SSHFP záznam"
msgid "Enter a valid domain name."
msgstr "Zadejte platné doménové jméno"
msgid "Enter a valid hostname"
msgstr "Zadejte platné jméno hostitele"
msgid ""
"Enter a valid hostname. The hostname should contain letters and numbers, and "
"be no more than 63 characters."
msgstr ""
"Zadejte platný název hostitele. Název hostitele by měl obsahovat písmena a "
"číslice a musí být maximálně 63 znaků."
msgid "ID"
msgstr "ID"
msgid "IP Address"
msgstr "IP adresa"
msgid "MX - Mail exchange record"
msgstr "MX - mailový záznam"
msgid "Mail Server"
msgstr "Mailový server"
msgid "Manage Records"
msgstr "Spravovat záznamy"
msgid "NS"
msgstr "NS"
msgid "Name"
msgstr "Název"
msgid "Name Server"
msgstr "Název serveru"
msgid "Nameservers"
msgstr "Jmenné servery"
msgid "None"
msgstr "Žádný"
msgid "PTR - Pointer record"
msgstr "PTR - záznam ukazatele"
msgid "PTR Domain Name"
msgstr "PTR doménové jméno"
msgid "Priority"
msgstr "Priorita"
msgid "Record"
msgstr "Záznam"
msgid "Record Data"
msgstr "Zaznamenat data"
msgid "Record Detail"
msgstr "Zaznamenat detail"
msgid "Record Type"
msgstr "Typ záznamu"
msgid "Records"
msgstr "Záznamy"
msgid "SOA"
msgstr "SOA"
msgid "SPF - Sender Policy Framework"
msgstr "SPF - Sender Policy Framework"
msgid "SRV - Service locator"
msgstr "SRV - lokátor služby"
msgid "SSHFP - SSH Public Key Fingerprint"
msgstr "SSHFP - Otisk veřejného klíče SSH"
msgid "Select an IP"
msgstr "Vyberte IP adresu"
msgid "Serial"
msgstr "Sériový"
msgid "TTL"
msgstr "TTL"
msgid "TTL (seconds)"
msgstr "TTL (sekund)"
msgid "TXT"
msgstr "TXT"
msgid "TXT - Text record"
msgstr "TXT - textový záznam"
msgid "Text"
msgstr "Text"
msgid "The quotas could not be retrieved."
msgstr "Nelze získat kvóty."
msgid "There are no floating IP addresses currently in use to select from."
msgstr "Žádné plovoucí IP nejsou k dispozici pro výběr."
msgid "This field is required"
msgstr "Toto pole je povinné"
msgid "Type"
msgstr "Typ"
msgid "Unable to create domain."
msgstr "Nelze vytvořit doménu."
msgid "Unable to create record."
msgstr "Nelze vytvořit záznam."
msgid "Unable to retrieve domain list."
msgstr "Nelze získat seznam domén."
msgid "Unable to retrieve domain record."
msgstr "Nelze získat doménový záznam."
msgid "Unable to retrieve record list."
msgstr "Nelze získat záznamy."
msgid "Unable to update domain."
msgstr "Nelze aktualizovat doménu."
msgid "Unknown"
msgstr "Neznámé"
msgid "Unknown instance name"
msgstr "Neznámé jméno instance"
msgid "Update Domain"
msgstr "Aktualizovat doménu"
msgid "Update Domain Record"
msgstr "Aktualizovat záznam domény"
msgid "Update Record"
msgstr "Aktualizovat záznam"
msgid "Updated"
msgstr "Aktualizováno"
msgid "Updated At"
msgstr "Aktualizováno"
msgid "Value"
msgstr "Hodnota"

View File

@ -1,515 +0,0 @@
# Translations template for PROJECT.
# Copyright (C) 2016 ORGANIZATION
# This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-03-30 06:46+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.2.0\n"
#: designatedashboard/dashboards/project/dns_domains/forms.py:84
msgid "Domain Name"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:86
msgid "Enter a valid domain name."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:90
#: designatedashboard/dashboards/project/dns_domains/tables.py:172
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:15
msgid "Email"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:95
msgid "TTL (seconds)"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:102
#: designatedashboard/dashboards/project/dns_domains/forms.py:330
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_create_domain.html:18
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:11
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:15
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_update_domain.html:18
msgid "Description"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:116
msgid "Unable to create domain."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:127
#, python-format
msgid "Domain %(name)s created."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:135
msgid "Unable to update domain."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:143
#: designatedashboard/dashboards/project/dns_domains/tables.py:178
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:13
msgid "Serial"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:149
msgid "Created At"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:155
msgid "Updated At"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:190
#, python-format
msgid "Domain %(name)s updated."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:220
msgid "Record Type"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:223
msgid "A - Address record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:224
msgid "AAAA - IPv6 address record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:225
msgid "CNAME - Canonical name record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:226
msgid "MX - Mail exchange record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:227
msgid "PTR - Pointer record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:228
msgid "SPF - Sender Policy Framework"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:229
msgid "SRV - Service locator"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:230
msgid "SSHFP - SSH Public Key Fingerprint"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:231
msgid "TXT - Text record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:244
#: designatedashboard/dashboards/project/dns_domains/forms.py:245
#: designatedashboard/dashboards/project/dns_domains/forms.py:246
#: designatedashboard/dashboards/project/dns_domains/forms.py:247
#: designatedashboard/dashboards/project/dns_domains/forms.py:248
#: designatedashboard/dashboards/project/dns_domains/forms.py:249
#: designatedashboard/dashboards/project/dns_domains/forms.py:250
#: designatedashboard/dashboards/project/dns_domains/forms.py:251
#: designatedashboard/dashboards/project/dns_domains/forms.py:252
#: designatedashboard/dashboards/project/dns_domains/forms.py:253
#: designatedashboard/dashboards/project/dns_domains/forms.py:254
#: designatedashboard/dashboards/project/dns_domains/tables.py:168
#: designatedashboard/dashboards/project/dns_domains/tables.py:200
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:9
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:9
msgid "Name"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:263
#: designatedashboard/dashboards/project/dns_domains/forms.py:264
#: designatedashboard/dashboards/project/dns_domains/forms.py:279
#: designatedashboard/dashboards/project/dns_domains/forms.py:280
msgid "IP Address"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:265
msgid "Canonical Name"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:266
msgid "Name Server"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:267
msgid "Mail Server"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:268
msgid "PTR Domain Name"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:269
#: designatedashboard/dashboards/project/dns_domains/forms.py:270
msgid "Value"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:285
msgid "TXT"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:290
#: designatedashboard/dashboards/project/dns_domains/forms.py:291
#: designatedashboard/dashboards/project/dns_domains/forms.py:292
msgid "Text"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:303
#: designatedashboard/dashboards/project/dns_domains/forms.py:304
#: designatedashboard/dashboards/project/dns_domains/tables.py:213
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:19
msgid "Priority"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:309
#: designatedashboard/dashboards/project/dns_domains/forms.py:316
#: designatedashboard/dashboards/project/dns_domains/forms.py:317
#: designatedashboard/dashboards/project/dns_domains/forms.py:318
#: designatedashboard/dashboards/project/dns_domains/forms.py:319
#: designatedashboard/dashboards/project/dns_domains/forms.py:320
#: designatedashboard/dashboards/project/dns_domains/forms.py:321
#: designatedashboard/dashboards/project/dns_domains/forms.py:322
#: designatedashboard/dashboards/project/dns_domains/forms.py:323
#: designatedashboard/dashboards/project/dns_domains/forms.py:324
#: designatedashboard/dashboards/project/dns_domains/forms.py:325
#: designatedashboard/dashboards/project/dns_domains/tables.py:175
#: designatedashboard/dashboards/project/dns_domains/tables.py:217
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:17
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:21
msgid "TTL"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:355
msgid "Unknown instance name"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:361
msgid "Select an IP"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:372
msgid "There are no floating IP addresses currently in use to select from."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:405
msgid "Enter a valid SRV name"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:413
msgid ""
"Enter a valid hostname. The hostname should contain letters and numbers, "
"and be no more than 63 characters."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:427
msgid "Enter a valid IPv4 address"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:434
msgid "Enter a valid IPv6 address"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:438
msgid "Enter a valid hostname"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:443
msgid "Enter a valid SRV record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:456
msgid "Enter a valid SSHFP record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:477
msgid "This field is required"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:491
#: designatedashboard/dashboards/project/dns_domains/forms.py:505
msgid "Unable to create record."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:497
#, python-format
msgid "Domain record %(name)s created."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:516
msgid "NS"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:517
msgid "SOA"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/forms.py:541
#, python-format
msgid "Domain record %(name)s updated."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/panel.py:21
#: designatedashboard/dashboards/project/dns_domains/tables.py:91
#: designatedashboard/dashboards/project/dns_domains/tables.py:182
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/index.html:3
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/records.html:14
msgid "Domains"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:46
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_create_domain.html:8
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_create_domain.html:36
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/create_domain.html:3
msgid "Create Domain"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:59
msgid "The quotas could not be retrieved."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:68
msgid "Edit Domain"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:78
msgid "Manage Records"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:88
#: designatedashboard/dashboards/project/dns_domains/tables.py:152
msgid "Delete"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:89
#: designatedashboard/dashboards/project/dns_domains/tables.py:153
msgid "Deleted"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:90
msgid "Domain"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:103
#: designatedashboard/dashboards/project/dns_domains/views.py:175
msgid "Create Record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:116
msgid "Edit Record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:136
#: designatedashboard/dashboards/project/dns_domains/tables.py:154
msgid "Record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:205
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:13
msgid "Type"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:209
msgid "Data"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/tables.py:222
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/records.html:15
msgid "Records"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/views.py:45
msgid "Unable to retrieve domain list."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/views.py:72
#: designatedashboard/dashboards/project/dns_domains/views.py:89
#: designatedashboard/dashboards/project/dns_domains/views.py:191
#: designatedashboard/dashboards/project/dns_domains/views.py:217
msgid "Unable to retrieve domain record."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/views.py:115
msgid "Unable to retrieve record list."
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/views.py:130
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_create_domain.html:37
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_update_domain.html:35
msgid "Cancel"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/views.py:204
msgid "Update Record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_create_domain.html:22
msgid ""
"\n"
" The Name field should contain a full-qualified domain name (with\n"
" trailing period).\n"
" "
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_create_domain.html:26
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_update_domain.html:25
msgid ""
"\n"
" The Email field should contain a valid email address to be "
"associated\n"
" with the domain.\n"
" "
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_create_domain.html:30
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_update_domain.html:29
msgid ""
"\n"
" The optional TTL field can be any value between 1 and 2147483647\n"
" seconds.\n"
" "
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_create_record.html:8
msgid "Create Record for"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_create_record.html:27
msgid ""
"\n"
" <p>\n"
" <strong>TTL</strong>\n"
" The TTL is the time-to-live for the record, in seconds.\n"
" </p>\n"
" <p>\n"
" See <a href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\""
" target=\"_designate_record_defs\">more info</a> on record types.\n"
" </p>\n"
" "
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:3
msgid "Domain Overview"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:7
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:11
msgid "ID"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:8
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:10
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:12
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:5
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:10
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:12
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:16
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:18
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:22
msgid "None"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:16
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:18
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:23
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:29
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:14
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:27
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:33
msgid "Unknown"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:19
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:23
msgid "Created"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_domain_detail.html:25
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:29
msgid "Updated"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:3
msgid "All Records"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_record_detail.html:17
msgid "Record Data"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_update_domain.html:8
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_update_domain.html:34
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/update_domain.html:3
msgid "Update Domain"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_update_domain.html:21
msgid ""
"\n"
" From here you can edit the email address and TTL associated with a "
"domain.\n"
" "
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/_update_record.html:8
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/update_record.html:3
msgid "Update Domain Record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/create_domain.html:6
msgid "\"Create Domain\""
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/create_record.html:3
msgid "Create Domain Record"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/create_record.html:6
msgid "\"Create Domain Record\""
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/domain_detail.html:3
msgid "Domain Detail"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/domain_detail.html:6
msgid "\"Domain\""
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/index.html:6
msgid "\"Domains\""
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/record_detail.html:3
msgid "Record Detail"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/records.html:3
msgid "Domain Records"
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/records.html:6
msgid "\"Domain Records\""
msgstr ""
#: designatedashboard/dashboards/project/dns_domains/templates/dns_domains/records.html:23
msgid "Nameservers"
msgstr ""

View File

@ -0,0 +1,345 @@
# OpenStack Infra <zanata@openstack.org>, 2015. #zanata
# Rob Cresswell <robert.cresswell@outlook.com>, 2015. #zanata
# Andi Chandler <andi@gowling.com>, 2016. #zanata
# Andreas Jaeger <jaegerandi@gmail.com>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: designate-dashboard 3.0.0.0b2.dev6\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-06-27 22:46+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2016-06-28 05:44+0000\n"
"Last-Translator: Andi Chandler <andi@gowling.com>\n"
"Language-Team: English (United Kingdom)\n"
"Language: en-GB\n"
"X-Generator: Zanata 3.7.3\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
msgid ""
"\n"
" From here you can edit the email address and TTL associated with a "
"domain.\n"
" "
msgstr ""
"\n"
" From here you can edit the email address and TTL associated with a "
"domain.\n"
" "
msgid ""
"\n"
" The Email field should contain a valid email address to be associated\n"
" with the domain.\n"
" "
msgstr ""
"\n"
" The Email field should contain a valid email address to be associated\n"
" with the domain.\n"
" "
msgid ""
"\n"
" The Name field should contain a full-qualified domain name (with\n"
" trailing period).\n"
" "
msgstr ""
"\n"
" The Name field should contain a full-qualified domain name (with\n"
" trailing period).\n"
" "
msgid ""
"\n"
" The optional TTL field can be any value between 1 and 2147483647\n"
" seconds.\n"
" "
msgstr ""
"\n"
" The optional TTL field can be any value between 1 and 2147483647\n"
" seconds.\n"
" "
msgid ""
"\n"
" <p>\n"
" <strong>TTL</strong>\n"
" The TTL is the time-to-live for the record, in seconds.\n"
" </p>\n"
" <p>\n"
" See <a href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\" "
"target=\"_designate_record_defs\">more info</a> on record types.\n"
" </p>\n"
" "
msgstr ""
"\n"
" <p>\n"
" <strong>TTL</strong>\n"
" The TTL is the time-to-live for the record, in seconds.\n"
" </p>\n"
" <p>\n"
" See <a href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\" "
"target=\"_designate_record_defs\">more info</a> on record types.\n"
" </p>\n"
" "
msgid "A - Address record"
msgstr "A - Address record"
msgid "AAAA - IPv6 address record"
msgstr "AAAA - IPv6 address record"
msgid "All Records"
msgstr "All Records"
msgid "CNAME - Canonical name record"
msgstr "CNAME - Canonical name record"
msgid "Cancel"
msgstr "Cancel"
msgid "Canonical Name"
msgstr "Canonical Name"
msgid "Create Domain"
msgstr "Create Domain"
msgid "Create Domain Record"
msgstr "Create Domain Record"
msgid "Create Record"
msgstr "Create Record"
msgid "Create Record for"
msgstr "Create Record for"
msgid "Created"
msgstr "Created"
msgid "Created At"
msgstr "Created At"
msgid "Data"
msgstr "Data"
msgid "Delete"
msgstr "Delete"
msgid "Deleted"
msgstr "Deleted"
msgid "Description"
msgstr "Description"
msgid "Domain"
msgstr "Domain"
#, python-format
msgid "Domain %(name)s created."
msgstr "Domain %(name)s created."
#, python-format
msgid "Domain %(name)s updated."
msgstr "Domain %(name)s updated."
msgid "Domain Detail"
msgstr "Domain Detail"
msgid "Domain Name"
msgstr "Domain Name"
msgid "Domain Overview"
msgstr "Domain Overview"
msgid "Domain Records"
msgstr "Domain Records"
#, python-format
msgid "Domain record %(name)s created."
msgstr "Domain record %(name)s created."
#, python-format
msgid "Domain record %(name)s updated."
msgstr "Domain record %(name)s updated."
msgid "Domains"
msgstr "Domains"
msgid "Edit Domain"
msgstr "Edit Domain"
msgid "Edit Record"
msgstr "Edit Record"
msgid "Email"
msgstr "Email"
msgid "Enter a valid IPv4 address"
msgstr "Enter a valid IPv4 address"
msgid "Enter a valid IPv6 address"
msgstr "Enter a valid IPv6 address"
msgid "Enter a valid SRV name"
msgstr "Enter a valid SRV name"
msgid "Enter a valid SRV record"
msgstr "Enter a valid SRV record"
msgid "Enter a valid SSHFP record"
msgstr "Enter a valid SSHFP record"
msgid "Enter a valid domain name."
msgstr "Enter a valid domain name."
msgid "Enter a valid hostname"
msgstr "Enter a valid hostname"
msgid ""
"Enter a valid hostname. The hostname should contain letters and numbers, and "
"be no more than 63 characters."
msgstr ""
"Enter a valid hostname. The hostname should contain letters and numbers, and "
"be no more than 63 characters."
msgid "ID"
msgstr "ID"
msgid "IP Address"
msgstr "IP Address"
msgid "MX - Mail exchange record"
msgstr "MX - Mail exchange record"
msgid "Mail Server"
msgstr "Mail Server"
msgid "Manage Records"
msgstr "Manage Records"
msgid "NS"
msgstr "NS"
msgid "Name"
msgstr "Name"
msgid "Name Server"
msgstr "Name Server"
msgid "Nameservers"
msgstr "Nameservers"
msgid "None"
msgstr "None"
msgid "PTR - Pointer record"
msgstr "PTR - Pointer record"
msgid "PTR Domain Name"
msgstr "PTR Domain Name"
msgid "Priority"
msgstr "Priority"
msgid "Record"
msgstr "Record"
msgid "Record Data"
msgstr "Record Data"
msgid "Record Detail"
msgstr "Record Detail"
msgid "Record Type"
msgstr "Record Type"
msgid "Records"
msgstr "Records"
msgid "SOA"
msgstr "SOA"
msgid "SPF - Sender Policy Framework"
msgstr "SPF - Sender Policy Framework"
msgid "SRV - Service locator"
msgstr "SRV - Service locator"
msgid "SSHFP - SSH Public Key Fingerprint"
msgstr "SSHFP - SSH Public Key Fingerprint"
msgid "Select an IP"
msgstr "Select an IP"
msgid "Serial"
msgstr "Serial"
msgid "TTL"
msgstr "TTL"
msgid "TTL (seconds)"
msgstr "TTL (seconds)"
msgid "TXT"
msgstr "TXT"
msgid "TXT - Text record"
msgstr "TXT - Text record"
msgid "Text"
msgstr "Text"
msgid "The quotas could not be retrieved."
msgstr "The quotas could not be retrieved."
msgid "There are no floating IP addresses currently in use to select from."
msgstr "There are no floating IP addresses currently in use to select from."
msgid "This field is required"
msgstr "This field is required"
msgid "Type"
msgstr "Type"
msgid "Unable to create domain."
msgstr "Unable to create domain."
msgid "Unable to create record."
msgstr "Unable to create record."
msgid "Unable to retrieve domain list."
msgstr "Unable to retrieve domain list."
msgid "Unable to retrieve domain record."
msgstr "Unable to retrieve domain record."
msgid "Unable to retrieve record list."
msgstr "Unable to retrieve record list."
msgid "Unable to update domain."
msgstr "Unable to update domain."
msgid "Unknown"
msgstr "Unknown"
msgid "Unknown instance name"
msgstr "Unknown instance name"
msgid "Update Domain"
msgstr "Update Domain"
msgid "Update Domain Record"
msgstr "Update Domain Record"
msgid "Update Record"
msgstr "Update Record"
msgid "Updated"
msgstr "Updated"
msgid "Updated At"
msgstr "Updated At"
msgid "Value"
msgstr "Value"

View File

@ -5,19 +5,18 @@
#
# Translators:
# Lucas Mascaro <mascaro.lucas@yahoo.fr>, 2015
# Kevin Tibi <kodokuu@gmail.com>, 2015. #zanata
# OpenStack Infra <zanata@openstack.org>, 2015. #zanata
# SOURDET Henri <hsourdet@gmail.com>, 2015. #zanata
# Andreas Jaeger <jaegerandi@gmail.com>, 2016. #zanata
# Gérald LONLAS <g.lonlas@gmail.com>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: designate-dashboard 2.0.0.0b2.dev12\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-01-08 20:53+0000\n"
"Project-Id-Version: designate-dashboard 2.0.1.dev8\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-04-21 12:59+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2015-09-18 03:36+0000\n"
"Last-Translator: SOURDET Henri <hsourdet@gmail.com>\n"
"PO-Revision-Date: 2016-04-07 05:25+0000\n"
"Last-Translator: Gérald LONLAS <g.lonlas@gmail.com>\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Generated-By: Babel 2.0\n"
@ -30,6 +29,9 @@ msgstr "A - Enregistrement d'adresse"
msgid "AAAA - IPv6 address record"
msgstr "AAAA - Enregistrement d'adresse IPv6"
msgid "All Records"
msgstr "Tous les enregistrements"
msgid "CNAME - Canonical name record"
msgstr "CNAME - Enregistrement de nom canonique"
@ -45,6 +47,12 @@ msgstr "Créer un domaine"
msgid "Create Record"
msgstr "Créer un enregistrement"
msgid "Create Record for"
msgstr "Créer un enregistrement pour"
msgid "Created"
msgstr "Créé"
msgid "Created At"
msgstr "Créé le"
@ -74,6 +82,9 @@ msgstr "Domaine %(name)s mis à jour"
msgid "Domain Name"
msgstr "Nom de domaine"
msgid "Domain Overview"
msgstr "Vue d'ensemble du domaine"
#, python-format
msgid "Domain record %(name)s created."
msgstr "Enregistrement du domaine %(name)s créé"
@ -122,6 +133,9 @@ msgstr ""
"Entrer un nom d'hôte valide. Le nom d'hôte ne doit contenir que des lettres "
"et des chiffres, et ne doit pas contenir plus de 63 caractères."
msgid "ID"
msgstr "ID"
msgid "IP Address"
msgstr "Adresse IP"
@ -143,6 +157,9 @@ msgstr "Nom"
msgid "Name Server"
msgstr "Nom de serveur"
msgid "None"
msgstr "Aucun"
msgid "PTR - Pointer record"
msgstr "PTR - Enregistrement pointeur"
@ -224,12 +241,24 @@ msgstr "Impossible de récupérer la liste des enregistrements."
msgid "Unable to update domain."
msgstr "Impossible de mettre a jour le domaine."
msgid "Unknown"
msgstr "Inconnu"
msgid "Unknown instance name"
msgstr "Nom d'instance inconnu"
msgid "Update Domain"
msgstr "Mise à jour du domaine"
msgid "Update Domain Record"
msgstr "Mise à jour des enregistrements du domaine"
msgid "Update Record"
msgstr "Enregistrer"
msgid "Updated"
msgstr "Mis à jour"
msgid "Updated At"
msgstr "Mis à jour le"

View File

@ -1,10 +1,10 @@
# Akihiro Motoki <amotoki@gmail.com>, 2016. #zanata
# KATO Tomoyuki <kato.tomoyuki@jp.fujitsu.com>, 2016. #zanata
# Andreas Jaeger <jaegerandi@gmail.com>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-03-29 14:05+0000\n"
"Project-Id-Version: designate-dashboard 2.0.1.dev8\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-04-21 12:59+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -82,21 +82,6 @@ msgstr ""
" </p>\n"
" "
msgid "\"Create Domain Record\""
msgstr "\"ドメインレコードの作成\""
msgid "\"Create Domain\""
msgstr "\"ドメインの作成\""
msgid "\"Domain Records\""
msgstr "\"ドメインレコード\""
msgid "\"Domain\""
msgstr "\"ドメイン\""
msgid "\"Domains\""
msgstr "\"ドメイン\""
msgid "A - Address record"
msgstr "A - アドレスレコード"

View File

@ -1,25 +1,96 @@
# Ian Y. Choi <ianyrchoi@gmail.com>, 2016. #zanata
# Andreas Jaeger <jaegerandi@gmail.com>, 2016. #zanata
# Sungjin Kang <gang.sungjin@gmail.com>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-03-18 13:46+0000\n"
"Project-Id-Version: designate-dashboard 2.0.1.dev8\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-04-21 12:59+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2016-03-22 11:51+0000\n"
"Last-Translator: Ian Y. Choi <ianyrchoi@gmail.com>\n"
"PO-Revision-Date: 2016-04-08 05:13+0000\n"
"Last-Translator: SeYeon Lee <sy_lee@kr.ibm.com>\n"
"Language-Team: Korean (South Korea)\n"
"Language: ko-KR\n"
"X-Generator: Zanata 3.7.3\n"
"Plural-Forms: nplurals=1; plural=0\n"
msgid ""
"\n"
" From here you can edit the email address and TTL associated with a "
"domain.\n"
" "
msgstr ""
"\n"
" 여기서부터 도메인과 연결된 이메일 주소와 TTL을 편집할 수 있습니다.\n"
" "
msgid ""
"\n"
" The Email field should contain a valid email address to be associated\n"
" with the domain.\n"
" "
msgstr ""
"\n"
" 이메일 피드는 도메인에 연결된 유료한 이메일 주소 값을\n"
" 포함해야 합니다.\n"
" "
msgid ""
"\n"
" The Name field should contain a full-qualified domain name (with\n"
" trailing period).\n"
" "
msgstr ""
"\n"
" 이름 필드는 정규화된 도메인 이름 (끝 마침표와 함께)을\n"
" 포함해야 합니다.\n"
" "
msgid ""
"\n"
" The optional TTL field can be any value between 1 and 2147483647\n"
" seconds.\n"
" "
msgstr ""
"\n"
" 옵션인 TTL 필드는 1 에서 2147483647 초 사이 임의의 값을\n"
" 사용할 수 있습니다.\n"
" "
msgid ""
"\n"
" <p>\n"
" <strong>TTL</strong>\n"
" The TTL is the time-to-live for the record, in seconds.\n"
" </p>\n"
" <p>\n"
" See <a href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\" "
"target=\"_designate_record_defs\">more info</a> on record types.\n"
" </p>\n"
" "
msgstr ""
"\n"
" <p>\n"
" <strong>TTL</strong>\n"
" TTL은 초 단위의 레코드에 대한 time-to-live 값입니다.\n"
" </p>\n"
" <p>\n"
" 레코드 유형에 관한 <a href=\"http://en.wikipedia.org/wiki/"
"List_of_DNS_record_types\" target=\"_designate_record_defs\">자세한 정보를</"
"a> 살펴봅니다.\n"
" </p>\n"
" "
msgid "A - Address record"
msgstr "A - 주소 레코드"
msgid "AAAA - IPv6 address record"
msgstr "AAAA - IPv6 주소 레코드"
msgid "All Records"
msgstr "모든 레코드"
msgid "CNAME - Canonical name record"
msgstr "CNAME - 대체 이름 레코드"
@ -32,9 +103,18 @@ msgstr "대체 이름"
msgid "Create Domain"
msgstr "도메인 생성"
msgid "Create Domain Record"
msgstr "도메인 레코드 생성"
msgid "Create Record"
msgstr "레코드 생성"
msgid "Create Record for"
msgstr "다음에 대한 레코드 생성"
msgid "Created"
msgstr "생성됨"
msgid "Created At"
msgstr "생성 시점"
@ -61,9 +141,18 @@ msgstr "도메인 %(name)s 이 생성되었습니다."
msgid "Domain %(name)s updated."
msgstr "도메인 %(name)s 이 수정되었습니다."
msgid "Domain Detail"
msgstr "도메인 세부 사항"
msgid "Domain Name"
msgstr "도메인 이름"
msgid "Domain Overview"
msgstr "도메인 개요"
msgid "Domain Records"
msgstr "도메인 레코드"
#, python-format
msgid "Domain record %(name)s created."
msgstr "도메인 레코드 %(name)s 가 생성되었습니다."
@ -112,6 +201,9 @@ msgstr ""
"유효한 호스트명을 입력합니다. 호스트명은 문자 및 숫자로 구성되어야 하며, 63 "
"문자를 초과할 수 없습니다."
msgid "ID"
msgstr "ID"
msgid "IP Address"
msgstr "IP 주소"
@ -133,6 +225,12 @@ msgstr "이름"
msgid "Name Server"
msgstr "네임 서버"
msgid "Nameservers"
msgstr "이름 서버"
msgid "None"
msgstr "없음"
msgid "PTR - Pointer record"
msgstr "PTR - 포인터 레코드"
@ -145,6 +243,12 @@ msgstr "우선순위"
msgid "Record"
msgstr "레코드"
msgid "Record Data"
msgstr "레코드 데이터"
msgid "Record Detail"
msgstr "레코드 세부 사항"
msgid "Record Type"
msgstr "레코드 타입"
@ -214,12 +318,24 @@ msgstr "레코드 목록을 가져올 수 없습니다."
msgid "Unable to update domain."
msgstr "도메인을 업데이트할 수 없습니다."
msgid "Unknown"
msgstr "알 수 없음"
msgid "Unknown instance name"
msgstr "알려지지 않은 인스턴스 이름"
msgid "Update Domain"
msgstr "도메인 업데이트"
msgid "Update Domain Record"
msgstr "도메인 레코드 업데이트"
msgid "Update Record"
msgstr "레코드 업데이트"
msgid "Updated"
msgstr "업데이트됨"
msgid "Updated At"
msgstr "갱신 시점"

View File

@ -1,21 +1,31 @@
# Andreas Jaeger <jaegerandi@gmail.com>, 2016. #zanata
# Eric Baum <ecbaum@gmail.com>, 2016. #zanata
# José Mello <jose.eduardo.jr@gmail.com>, 2016. #zanata
# Marcelo Dieder <marcelodieder@gmail.com>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-03-29 14:05+0000\n"
"Project-Id-Version: designate-dashboard 2.0.1.dev8\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-04-21 12:59+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2016-03-29 01:21+0000\n"
"PO-Revision-Date: 2016-03-30 11:23+0000\n"
"Last-Translator: Eric Baum <ecbaum@gmail.com>\n"
"Language-Team: Portuguese (Brazil)\n"
"Language: pt-BR\n"
"X-Generator: Zanata 3.7.3\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
msgid ""
"\n"
" From here you can edit the email address and TTL associated with a "
"domain.\n"
" "
msgstr ""
"\n"
" Aqui você pode editar o endereço de e-mail e o TTL associado ao "
"domínio.\n"
" "
msgid ""
"\n"
" The Email field should contain a valid email address to be associated\n"
@ -50,11 +60,29 @@ msgstr ""
" segundos.\n"
" "
msgid "\"Create Domain Record\""
msgstr "\"Criar Registro do Domínio\""
msgid "\"Create Domain\""
msgstr "\"Criar Domínio\""
msgid ""
"\n"
" <p>\n"
" <strong>TTL</strong>\n"
" The TTL is the time-to-live for the record, in seconds.\n"
" </p>\n"
" <p>\n"
" See <a href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\" "
"target=\"_designate_record_defs\">more info</a> on record types.\n"
" </p>\n"
" "
msgstr ""
"\n"
" <p>\n"
" <strong>TTL</strong>\n"
" O TTL é o tempo de vida do registro, em segundos.\n"
" </p>\n"
" <p>\n"
" Veja <a href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\" "
"target=\"_designate_record_defs\"> para mais informações </a> nos tipos de "
"registro.\n"
" </p>\n"
" "
msgid "A - Address record"
msgstr "A - Registro do endereço"
@ -115,12 +143,18 @@ msgstr "Domínio %(name)s criado."
msgid "Domain %(name)s updated."
msgstr "Domínio %(name)s atualizado."
msgid "Domain Detail"
msgstr "Detalhes do Domínio"
msgid "Domain Name"
msgstr "Nome do Domínio"
msgid "Domain Overview"
msgstr "Visão Geral do Domínio"
msgid "Domain Records"
msgstr "Registros do Domínio"
#, python-format
msgid "Domain record %(name)s created."
msgstr "Registro de domínio %(name)s criado."
@ -193,6 +227,9 @@ msgstr "Nome"
msgid "Name Server"
msgstr "Servidor de Nome"
msgid "Nameservers"
msgstr "Servidores de Nome"
msgid "None"
msgstr "Nenhum"
@ -211,6 +248,9 @@ msgstr "Registro"
msgid "Record Data"
msgstr "Dados do Registro"
msgid "Record Detail"
msgstr "Detalhes do Registro"
msgid "Record Type"
msgstr "Tipo de Registro"

View File

@ -5,12 +5,12 @@
#
# Translators:
# Denis Gubanov <v12aml@gmail.com>, 2015
# OpenStack Infra <zanata@openstack.org>, 2015. #zanata
# Andreas Jaeger <jaegerandi@gmail.com>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: designate-dashboard 2.0.0.0b2.dev12\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2016-01-08 20:53+0000\n"
"Project-Id-Version: designate-dashboard 2.0.1.dev8\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-04-21 12:59+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -45,6 +45,9 @@ msgstr "Создать домен"
msgid "Create Record"
msgstr "Создать запись"
msgid "Created"
msgstr "Создано"
msgid "Created At"
msgstr "Создано"
@ -122,6 +125,9 @@ msgstr ""
"Введите верное имя узла. Имя узла должно содержать буквы, цифры и быть не "
"длиннее 63 символов."
msgid "ID"
msgstr "ID"
msgid "IP Address"
msgstr "IP адрес"
@ -143,6 +149,9 @@ msgstr "Имя"
msgid "Name Server"
msgstr "Сервер имен"
msgid "None"
msgstr "Нет"
msgid "PTR - Pointer record"
msgstr "PTR - указатель на каноническое имя"
@ -224,12 +233,18 @@ msgstr "Невозможно получить список записей."
msgid "Unable to update domain."
msgstr "Невозможно обновить домен."
msgid "Unknown"
msgstr "Неизвестно"
msgid "Unknown instance name"
msgstr "Неизвестное имя инстанса"
msgid "Update Record"
msgstr "Обновить запись"
msgid "Updated"
msgstr "Обновлено"
msgid "Updated At"
msgstr "Обновлено"

View File

@ -5,12 +5,14 @@
#
# Translators:
# Alper Çiftçi <alprciftci@gmail.com>, 2015
# Mücahit Büyükyılmaz <mucahit@deltanoc.com>, 2015. #zanata
# OpenStack Infra <zanata@openstack.org>, 2015. #zanata
# Andreas Jaeger <jaegerandi@gmail.com>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: designate-dashboard 1.0.0.dev38\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-07-29 06:41+0000\n"
"Project-Id-Version: designate-dashboard 2.0.1.dev8\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-04-21 12:59+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -43,6 +45,9 @@ msgstr "Alan Oluştur"
msgid "Create Record"
msgstr "Kayıt Oluştur"
msgid "Created"
msgstr "Oluşturuldu"
msgid "Created At"
msgstr "Oluşturulduğu zaman"
@ -83,6 +88,9 @@ msgstr "%(name)s alan kaydı güncellendi"
msgid "Domains"
msgstr "Alanlar"
msgid "Edit Domain"
msgstr "Alan Değiştir"
msgid "Edit Record"
msgstr "Kaydı Düzenle"
@ -117,6 +125,9 @@ msgstr ""
"Geçerli bir sunucu adı girin. Sunucu adı 63 karakterden az olmayan harf ve "
"sayılar içermektedir."
msgid "ID"
msgstr "KİMLİK"
msgid "IP Address"
msgstr "IP Adresi"
@ -135,6 +146,9 @@ msgstr "İsim"
msgid "Name Server"
msgstr "İsim Sunucusu"
msgid "None"
msgstr "Yok"
msgid "PTR Domain Name"
msgstr "PTR Alan Adı"
@ -186,15 +200,24 @@ msgstr "Alan yaratılamıyor"
msgid "Unable to create record."
msgstr "Kayıt oluşturulamıyor"
msgid "Unable to retrieve domain list."
msgstr "Alan listesi alınamıyor."
msgid "Unable to update domain."
msgstr "Alan güncellenemiyor."
msgid "Unknown"
msgstr "Bilinmeyen"
msgid "Unknown instance name"
msgstr "Bilinmeyen mesafe adı"
msgid "Update Record"
msgstr "Kaydı Güncelle"
msgid "Updated"
msgstr "Güncellendi"
msgid "Updated At"
msgstr "Güncellendiği Zaman"

View File

@ -0,0 +1,345 @@
# OpenStack Infra <zanata@openstack.org>, 2015. #zanata
# Andreas Jaeger <jaegerandi@gmail.com>, 2016. #zanata
# Gaoxiao Zhu <zhu.gaoxiao@h3c.com>, 2016. #zanata
# Linda <duleish@cn.ibm.com>, 2016. #zanata
# Wu Han <wu.han@h3c.com>, 2016. #zanata
# ZHIYUAN SU <suzhiyuan@inspur.com>, 2016. #zanata
# vuuv <froms2008@gmail.com>, 2016. #zanata
msgid ""
msgstr ""
"Project-Id-Version: designate-dashboard 3.0.0.0b3.dev7\n"
"Report-Msgid-Bugs-To: https://bugs.launchpad.net/openstack-i18n/\n"
"POT-Creation-Date: 2016-08-25 22:21+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2016-08-30 08:56+0000\n"
"Last-Translator: ZHIYUAN SU <suzhiyuan@inspur.com>\n"
"Language-Team: Chinese (China)\n"
"Language: zh-CN\n"
"X-Generator: Zanata 3.7.3\n"
"Plural-Forms: nplurals=1; plural=0\n"
msgid ""
"\n"
" From here you can edit the email address and TTL associated with a "
"domain.\n"
" "
msgstr ""
"\n"
"从这里可以编辑邮件地址和关联到一个域的TTL\n"
" "
msgid ""
"\n"
" The Email field should contain a valid email address to be associated\n"
" with the domain.\n"
" "
msgstr ""
"\n"
"__电子邮件项应包括一个有效的邮件地址来\n"
"__跟域名进行关联\n"
"_"
msgid ""
"\n"
" The Name field should contain a full-qualified domain name (with\n"
" trailing period).\n"
" "
msgstr ""
"\n"
"__名称项应该包含一个完全合格的域名有一个\n"
"__尾随句点\n"
"__"
msgid ""
"\n"
" The optional TTL field can be any value between 1 and 2147483647\n"
" seconds.\n"
" "
msgstr ""
"\n"
"__可选的TTL项可以是1到2147483647之间的任何数字\n"
"__秒\n"
"__"
msgid ""
"\n"
" <p>\n"
" <strong>TTL</strong>\n"
" The TTL is the time-to-live for the record, in seconds.\n"
" </p>\n"
" <p>\n"
" See <a href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\" "
"target=\"_designate_record_defs\">more info</a> on record types.\n"
" </p>\n"
" "
msgstr ""
"\n"
"<p>\n"
"<strong>TTL</strong>\n"
"TTL是指 记录的存活时间或者存在时间,单位为秒\n"
"</p>\n"
"<p>\n"
"见 <a href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\" target="
"\"_designate_record_defs\">more info</a> on record types.\n"
"</p>\n"
" "
msgid "A - Address record"
msgstr "A-地址记录"
msgid "AAAA - IPv6 address record"
msgstr "AAAA-IPv6地址记录"
msgid "All Records"
msgstr "所有记录"
msgid "CNAME - Canonical name record"
msgstr "CNAME-标准名称记录"
msgid "Cancel"
msgstr "取消"
msgid "Canonical Name"
msgstr "规范名称"
msgid "Create Domain"
msgstr "创建域"
msgid "Create Domain Record"
msgstr "创建域记录"
msgid "Create Record"
msgstr "创建记录"
msgid "Create Record for"
msgstr "创建记录为:"
msgid "Created"
msgstr "已创建"
msgid "Created At"
msgstr "创建于"
msgid "Data"
msgstr "数据"
msgid "Delete"
msgstr "删除"
msgid "Deleted"
msgstr "删除"
msgid "Description"
msgstr "描述"
msgid "Domain"
msgstr "域"
#, python-format
msgid "Domain %(name)s created."
msgstr "域 %(name)s 已创建"
#, python-format
msgid "Domain %(name)s updated."
msgstr "域%(name)s已更新"
msgid "Domain Detail"
msgstr "域明细"
msgid "Domain Name"
msgstr "域名"
msgid "Domain Overview"
msgstr "域概览"
msgid "Domain Records"
msgstr "域记录"
#, python-format
msgid "Domain record %(name)s created."
msgstr "创建的域记录数 %(name)s "
#, python-format
msgid "Domain record %(name)s updated."
msgstr "更新的域记录数 %(name)s"
msgid "Domains"
msgstr "域"
msgid "Edit Domain"
msgstr "编辑域"
msgid "Edit Record"
msgstr "编辑记录"
msgid "Email"
msgstr "邮箱"
msgid "Enter a valid IPv4 address"
msgstr "输入一个有效的IPv4地址"
msgid "Enter a valid IPv6 address"
msgstr "输入一个有效的IPv6地址"
msgid "Enter a valid SRV name"
msgstr "输入一个有效的SRV名"
msgid "Enter a valid SRV record"
msgstr "输入一个有效的SRV记录"
msgid "Enter a valid SSHFP record"
msgstr "输入一个有效的SSHFP记录"
msgid "Enter a valid domain name."
msgstr "输入一个有效域名"
msgid "Enter a valid hostname"
msgstr "输入一个有效的主机名"
msgid ""
"Enter a valid hostname. The hostname should contain letters and numbers, and "
"be no more than 63 characters."
msgstr "输入一个有效的主机名。该主机名应包含字母和数字且不多余63个字符。"
msgid "ID"
msgstr "标识"
msgid "IP Address"
msgstr "IP 地址"
msgid "MX - Mail exchange record"
msgstr "MX-邮件交换记录"
msgid "Mail Server"
msgstr "邮件服务器"
msgid "Manage Records"
msgstr "管理记录"
msgid "NS"
msgstr "NS"
msgid "Name"
msgstr "名称"
msgid "Name Server"
msgstr "域名服务器"
msgid "Nameservers"
msgstr "名称服务器数"
msgid "None"
msgstr "无"
msgid "PTR - Pointer record"
msgstr "PTR-指针记录"
msgid "PTR Domain Name"
msgstr "域名"
msgid "Priority"
msgstr "优先级"
msgid "Record"
msgstr "记录"
msgid "Record Data"
msgstr "记录数据"
msgid "Record Detail"
msgstr "记录明细"
msgid "Record Type"
msgstr "记录类型"
msgid "Records"
msgstr "记录数"
msgid "SOA"
msgstr "SOA"
msgid "SPF - Sender Policy Framework"
msgstr "SPF-发送方策略框架"
msgid "SRV - Service locator"
msgstr "SRV-服务定位器"
msgid "SSHFP - SSH Public Key Fingerprint"
msgstr "SSHFP-SSH公钥指纹"
msgid "Select an IP"
msgstr "选择一个IP"
msgid "Serial"
msgstr "序列号"
msgid "TTL"
msgstr "Time-to-Live"
msgid "TTL (seconds)"
msgstr "生存时间(秒)"
msgid "TXT"
msgstr "TXT"
msgid "TXT - Text record"
msgstr "TXT-文本记录"
msgid "Text"
msgstr "文本"
msgid "The quotas could not be retrieved."
msgstr "无法获取配额"
msgid "There are no floating IP addresses currently in use to select from."
msgstr "没有可以从中选择的使用中的浮动IP地址"
msgid "This field is required"
msgstr "需要此字段"
msgid "Type"
msgstr "类型"
msgid "Unable to create domain."
msgstr "无法创建域"
msgid "Unable to create record."
msgstr "不能创建记录。"
msgid "Unable to retrieve domain list."
msgstr "无法获取域列表。"
msgid "Unable to retrieve domain record."
msgstr "无法获取域记录"
msgid "Unable to retrieve record list."
msgstr "无法获取记录列表"
msgid "Unable to update domain."
msgstr "无法更新域"
msgid "Unknown"
msgstr "未知"
msgid "Unknown instance name"
msgstr "未知实例名"
msgid "Update Domain"
msgstr "更新域"
msgid "Update Domain Record"
msgstr "更新域记录"
msgid "Update Record"
msgstr "更新记录"
msgid "Updated"
msgstr "已更新"
msgid "Updated At"
msgstr "已更新于"
msgid "Value"
msgstr "值"

View File

@ -0,0 +1,78 @@
/**
* (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');
}
})();

View File

@ -0,0 +1,66 @@
/**
* (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')
}
});
}
})();

View File

@ -0,0 +1,170 @@
/**
*
* (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 = {
initScope: initScope,
allowed: allowed,
perform: perform
};
return service;
/////////////////
function initScope() {
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();
}
}
})();

View File

@ -0,0 +1,139 @@
/**
*
* (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 = {
initScope: initScope,
allowed: allowed,
perform: perform
};
return service;
/////////////////
function initScope() {
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();
}
}
})();

View File

@ -0,0 +1,121 @@
/**
* (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
})
}
}
}());

View File

@ -0,0 +1,66 @@
/**
* (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;
}
}
})();

View File

@ -0,0 +1,10 @@
<hz-resource-property-list
ng-if="item"
resource-type-name="OS::Designate::FloatingIp"
item="item"
cls="dl-horizontal"
property-groups="[
['description'],
['id']
]">
</hz-resource-property-list>

View File

@ -0,0 +1,46 @@
/**
* (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;
}
}
})();

View File

@ -0,0 +1,11 @@
<div ng-controller="designatedashboard.resources.os-designate-floatingip.details.overviewController as ctrl">
<hz-resource-property-list
ng-if="ctrl.item"
resource-type-name="OS::Designate::FloatingIp"
item="ctrl.item"
cls="dl-horizontal"
property-groups="[
['ptrdname', 'description', 'id', 'ttl', 'status', 'action']
]">
</hz-resource-property-list>
</div>

View File

@ -0,0 +1,154 @@
/**
* (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.framework.conf.resource-type-registry.service',
'designatedashboard.resources.os-designate-floatingip.api',
'designatedashboard.resources.os-designate-floatingip.resourceType',
'designatedashboard.resources.util'
];
function run(
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: '<a ng-href="{$ \'project/ngdetails/OS::Designate::FloatingIp/\' + item.id $}">{$ item.address $}</a>'
})
.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;
});
}
}
})();

View File

@ -0,0 +1,79 @@
/**
* (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')
}
});
}
})();

View File

@ -0,0 +1,165 @@
/**
*
* (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
}
};
}
}
})();

View File

@ -0,0 +1,132 @@
/**
*
* (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 = {
initScope: initScope,
allowed: allowed,
perform: perform
};
return service;
/////////////////
function initScope() {
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();
}
}
})();

View File

@ -0,0 +1,182 @@
/**
* (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 scope, context, deletePromise;
var notAllowedMessage = gettext("You are not allowed to delete record sets: %s");
var allowedRecordsets = [];
var service = {
initScope: initScope,
allowed: allowed,
perform: perform
};
return service;
//////////////
function initScope(newScope) {
scope = newScope;
context = { };
deletePromise = policy.ifAllowed({rules: [['dns', 'delete_recordset']]});
}
function perform(items) {
var recordsets = angular.isArray(items) ? items : [items];
context.labels = labelize(recordsets.length);
context.deleteEntity = deleteRecordSet;
return $qExtensions.allSettled(recordsets.map(checkPermission)).then(afterCheck);
}
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(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(
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;
}
}
})();

View File

@ -0,0 +1,159 @@
/**
*
* (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 = {
initScope: initScope,
allowed: allowed,
perform: perform
};
return service;
/////////////////
function initScope() {
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(
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();
}
}
})();

View File

@ -0,0 +1,136 @@
/**
* (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.'));
});
}
}
}());

View File

@ -0,0 +1,109 @@
/**
* (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 "<zone_id>/<recordset_id>"
*/
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',
});
}
})();

View File

@ -0,0 +1,10 @@
<hz-resource-property-list
ng-if="item"
resource-type-name="OS::Designate::RecordSet"
item="item"
cls="dl-horizontal"
property-groups="[
['records', 'notes', 'description'],
['id']
]">
</hz-resource-property-list>

View File

@ -0,0 +1,46 @@
/**
* (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;
}
}
})();

View File

@ -0,0 +1,45 @@
<div ng-controller="designatedashboard.resources.os-designate-recordset.detailController as ctrl">
<div class="row">
<div class="col-md-6 detail">
<h3 translate>Details</h3>
<hr>
<hz-resource-property-list
ng-if="ctrl.item"
resource-type-name="OS::Designate::RecordSet"
item="ctrl.item"
cls="dl-horizontal"
property-groups="[
['id', 'type', 'name', 'records', 'notes', 'description', 'ttl', 'version', 'action', 'status']
]">
</hz-resource-property-list>
</div>
<div class="col-md-6 detail">
<h3 translate>Associations</h3>
<hr>
<hz-resource-property-list
ng-if="ctrl.item"
resource-type-name="OS::Designate::RecordSet"
item="ctrl.item"
cls="dl-horizontal"
property-groups="[
['zone_id', 'zone_name', 'project_id']
]">
</hz-resource-property-list>
</div>
</div>
<div class="row">
<div class="col-md-6 detail">
<h3 translate>Modification Times</h3>
<hr>
<hz-resource-property-list
ng-if="ctrl.item"
resource-type-name="OS::Designate::RecordSet"
item="ctrl.item"
cls="dl-horizontal"
property-groups="[
['created_at', 'updated_at']
]">
</hz-resource-property-list>
</div>
</div>
</div>

View File

@ -0,0 +1,39 @@
/**
* (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 };
}
})();

View File

@ -0,0 +1,8 @@
<div
ng-controller="designatedashboard.resources.os-designate-recordset.zoneRecordSetsController as ctrl">
<hz-resource-table
resource-type-name="{$ ctrl.resourceTypeName $}"
list-function-extra-params="ctrl.extraListParams"
track-by="_timestampId">
</hz-resource-table>
</div>

View File

@ -0,0 +1,238 @@
/**
* (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('SPR - 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')
})
.constant(
'designatedashboard.resources.os-designate-recordset.editableTypes',
[
"A",
"AAAA",
"CNAME",
"MX",
"PTR",
"SPF",
"SRV",
"SSHFP",
"TXT"
])
.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.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(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: '<a ng-href="{$ \'project/ngdetails/OS::Designate::RecordSet/\' + item.zone_id + \'/\' + item.id $}">{$ item.name $}</a>'
})
.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;
});
}
}
})();

View File

@ -0,0 +1,76 @@
/**
* (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'
}
});
}
})();

View File

@ -0,0 +1,184 @@
/**
*
* (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"),
"placeholder": "owner@example.com",
"description": gettext("Email address to contact the zone owner."),
"validationMessage": gettext("Email address must contain a single '@' character"),
"type": "text",
"required": true
},
{
"key": "ttl",
"title": gettext("TTL"),
"description": gettext("Time To Live in seconds."),
"type": "number",
"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
}
};
}
}
})();

View File

@ -0,0 +1 @@
<h1>CREATE TEMPLATE</h1>

View File

@ -0,0 +1,126 @@
/**
*
* (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 = {
initScope: initScope,
allowed: allowed,
perform: perform
};
return service;
/////////////////
function initScope() {
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();
}
}
})();

View File

@ -0,0 +1,169 @@
/**
* (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 scope, context, deleteZonePromise;
var notAllowedMessage = gettext("You are not allowed to delete zones: %s");
var service = {
initScope: initScope,
allowed: allowed,
perform: perform
};
return service;
//////////////
function initScope(newScope) {
scope = newScope;
context = { };
deleteZonePromise = policy.ifAllowed({rules: [['dns', 'delete_zone']]});
}
function perform(items) {
var zones = angular.isArray(items) ? items : [items];
context.labels = labelize(zones.length);
context.deleteEntity = deleteZone;
return $qExtensions.allSettled(zones.map(checkPermission)).then(afterCheck);
}
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(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;
}
}
})();

View File

@ -0,0 +1,147 @@
/**
*
* (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 = {
initScope: initScope,
allowed: allowed,
perform: perform
};
return service;
/////////////////
function initScope() {
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();
}
}
})();

View File

@ -0,0 +1,152 @@
/**
* (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.'));
})
}
}
}());

View File

@ -0,0 +1,61 @@
/**
* (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);
}
}
})();

View File

@ -0,0 +1,10 @@
<hz-resource-property-list
ng-if="item"
resource-type-name="OS::Designate::Zone"
item="item"
cls="dl-horizontal"
property-groups="[
['description', 'email'],
['id', 'pool_id', 'project_id']
]">
</hz-resource-property-list>

View File

@ -0,0 +1,46 @@
/**
* (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;
}
}
})();

View File

@ -0,0 +1,58 @@
<div ng-controller="designatedashboard.resources.os-designate-zone.detailController as ctrl">
<div class="row">
<div class="col-md-6 detail">
<h3 translate>Details</h3>
<hr>
<hz-resource-property-list
ng-if="ctrl.item"
resource-type-name="OS::Designate::Zone"
item="ctrl.item"
cls="dl-horizontal"
property-groups="[
['id', 'description', 'type', 'status', 'action', 'email', 'serial', 'ttl', 'version']
]">
</hz-resource-property-list>
</div>
<div class="col-md-6 detail">
<h3 translate>Attributes</h3>
<hr>
<hz-resource-property-list
ng-if="ctrl.item"
resource-type-name="OS::Designate::Zone"
item="ctrl.item"
cls="dl-horizontal"
property-groups="[
['attributes']
]">
</hz-resource-property-list>
</div>
</div>
<div class="row">
<div class="col-md-6 detail">
<h3 translate>Modification Times</h3>
<hr>
<hz-resource-property-list
ng-if="ctrl.item"
resource-type-name="OS::Designate::Zone"
item="ctrl.item"
cls="dl-horizontal"
property-groups="[
['created_at', 'updated_at', 'transferred_at']
]">
</hz-resource-property-list>
</div>
<div class="col-md-6 detail">
<h3 translate>Associations</h3>
<hr>
<hz-resource-property-list
ng-if="ctrl.item"
resource-type-name="OS::Designate::Zone"
item="ctrl.item"
cls="dl-horizontal"
property-groups="[
['pool_id', 'project_id', 'masters']
]">
</hz-resource-property-list>
</div>
</div>
</div>

View File

@ -0,0 +1,202 @@
/**
* (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.framework.conf.resource-type-registry.service',
'designatedashboard.resources.os-designate-zone.api',
'designatedashboard.resources.os-designate-zone.resourceType',
'designatedashboard.resources.util'
];
function run(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: '<a ng-href="{$ \'project/ngdetails/OS::Designate::Zone/\' + item.id $}">{$ item.name $}</a>'
})
.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, 'updated_at');
return response;
});
}
}
})();

View File

@ -0,0 +1,36 @@
/*
* (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'
]);
})();

View File

@ -0,0 +1,107 @@
/**
* (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;
});
}
}
}());

View File

@ -0,0 +1,4 @@
<hz-resource-panel resource-type-name="OS::Designate::FloatingIp">
<hz-resource-table resource-type-name="OS::Designate::FloatingIp"
track-by="_timestampId"></hz-resource-table>
</hz-resource-panel>

View File

@ -0,0 +1,4 @@
<hz-resource-panel resource-type-name="OS::Designate::Zone">
<hz-resource-table resource-type-name="OS::Designate::Zone"
track-by="_timestampId"></hz-resource-table>
</hz-resource-panel>

View File

@ -100,7 +100,8 @@ class ARecordFormTests(base.BaseRecordFormCleanTests):
def test_missing_name_field(self):
self.form.cleaned_data['name'] = ''
self.form.clean()
self.assert_required_error('name')
self.assert_no_errors()
self.assertIsNotNone(self.form.cleaned_data['name'])
def test_missing_data_field(self):
self.form.cleaned_data['data'] = ''
@ -162,7 +163,8 @@ class AAAARecordFormTests(base.BaseRecordFormCleanTests):
def test_missing_name_field(self):
self.form.cleaned_data['name'] = ''
self.form.clean()
self.assert_required_error('name')
self.assert_no_errors()
self.assertIsNotNone(self.form.cleaned_data['name'])
def test_missing_data_field(self):
self.form.cleaned_data['data'] = ''
@ -317,7 +319,8 @@ class TXTRecordFormTests(base.BaseRecordFormCleanTests):
def test_missing_name_field(self):
self.form.cleaned_data['name'] = ''
self.form.clean()
self.assert_required_error('name')
self.assert_no_errors()
self.assertIsNotNone(self.form.cleaned_data['name'])
def test_missing_txt_field(self):
self.form.cleaned_data['txt'] = ''

View File

@ -37,7 +37,8 @@ class PTRRecordFormTests(base.BaseRecordFormCleanTests):
def test_missing_name_field(self):
self.form.cleaned_data['name'] = ''
self.form.clean()
self.assert_required_error('name')
self.assert_no_errors()
self.assertIsNotNone(self.form.cleaned_data['name'])
def test_invalid_name_field(self):
self.form.cleaned_data['name'] = '#@$foo!!'

View File

@ -2,5 +2,5 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr>=1.6 # Apache-2.0
Babel>=1.3 # BSD
Babel>=2.3.4 # BSD
python-designateclient>=1.5.0 # Apache-2.0

View File

@ -5,7 +5,7 @@ description-file =
README.rst
author = OpenStack
author-email = openstack-dev@lists.openstack.org
home-page = http://www.openstack.org/
home-page = http://docs.openstack.org/developer/designate-dashboard/
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology

View File

@ -4,24 +4,23 @@
hacking<0.11,>=0.10.0
coverage>=3.6 # Apache-2.0
discover # BSD
mock>=1.2 # BSD
mock>=2.0 # BSD
mox>=0.5.3 # Apache-2.0
mox3>=0.7.0 # Apache-2.0
oslo.config>=3.7.0 # Apache-2.0
pylint==1.4.5 # GNU GPL v2
oslo.config>=3.14.0 # Apache-2.0
pylint==1.4.5 # GPLv2
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
unittest2 # BSD
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD
sphinx!=1.3b1,<1.3,>=1.2.1 # BSD
oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
nose # LGPL
nosehtmloutput>=0.0.3 # Apache-2.0
openstack.nose-plugin>=0.7 # Apache-2.0
django-nose>=1.2 # BSD
django-nose>=1.4.4 # BSD
nosexcover # BSD
# Horizon requirements
Django<1.9,>=1.8 # BSD
django-compressor>=2.0 # MIT
django-openstack-auth>=2.0.0 # Apache-2.0
django-openstack-auth>=2.4.0 # Apache-2.0