Merge "Rename 'murano' dashboard to 'app-catalog'"

This commit is contained in:
Jenkins 2016-09-20 09:54:50 +00:00 committed by Gerrit Code Review
commit 8c9f0e87ae
36 changed files with 118 additions and 116 deletions

View File

@ -346,7 +346,7 @@ class Wizard(generic_views.PageTitleMixin, views.ModalFormMixin, LazyWizard):
do_redirect = do_redirect or not wm_form_data.get(
'stay_at_the_catalog', True)
fail_url = reverse("horizon:murano:environments:index")
fail_url = reverse("horizon:app-catalog:environments:index")
environment_id = utils.ensure_python_obj(kwargs.get('environment_id'))
quick_environment_id = self.request.session.get('quick_env_id')
try:
@ -360,7 +360,7 @@ class Wizard(generic_views.PageTitleMixin, views.ModalFormMixin, LazyWizard):
environment_id = env.id
else:
environment_id = quick_environment_id
env_url = reverse('horizon:murano:environments:services',
env_url = reverse('horizon:app-catalog:environments:services',
args=(environment_id,))
srv = env_api.service_create(
@ -374,7 +374,7 @@ class Wizard(generic_views.PageTitleMixin, views.ModalFormMixin, LazyWizard):
LOG.exception(message)
if quick_environment_id:
env_api.environment_delete(self.request, quick_environment_id)
fail_url = reverse('horizon:murano:catalog:index')
fail_url = reverse('horizon:app-catalog:catalog:index')
exceptions.handle(self.request, message, redirect=fail_url)
else:
message = _("The '{0}' application successfully added to "
@ -554,21 +554,21 @@ class IndexView(generic_views.PageTitleMixin, list_view.ListView):
query_params['marker'] = marker
if sort_dir:
query_params['sort_dir'] = sort_dir
return '{0}?{1}'.format(reverse('horizon:murano:catalog:index'),
return '{0}?{1}'.format(reverse('horizon:app-catalog:catalog:index'),
http_utils.urlencode(query_params))
def prev_page_url(self):
query_params = self.get_query_params()
query_params['marker'] = self.get_marker(0)
query_params['sort_dir'] = 'desc'
return '{0}?{1}'.format(reverse('horizon:murano:catalog:index'),
return '{0}?{1}'.format(reverse('horizon:app-catalog:catalog:index'),
http_utils.urlencode(query_params))
def next_page_url(self):
query_params = self.get_query_params()
query_params['marker'] = self.get_marker()
query_params['sort_dir'] = 'asc'
return '{0}?{1}'.format(reverse('horizon:murano:catalog:index'),
return '{0}?{1}'.format(reverse('horizon:app-catalog:catalog:index'),
http_utils.urlencode(query_params))
def get_context_data(self, **kwargs):
@ -588,7 +588,7 @@ class IndexView(generic_views.PageTitleMixin, list_view.ListView):
context['tenant_id'] = self.request.session['token'].tenant['id']
context.update(get_environments_context(self.request))
context['display_repo_url'] = pkg_consts.DISPLAY_MURANO_REPO_URL
context['pkg_def_url'] = reverse('horizon:murano:packages:index')
context['pkg_def_url'] = reverse('horizon:app-catalog:packages:index')
context['no_apps'] = True
if self.get_current_category() != ALL_CATEGORY_NAME or search:
context['no_apps'] = False

View File

@ -31,7 +31,7 @@ LOG = logging.getLogger(__name__)
class AddCategory(tables.LinkAction):
name = "add_category"
verbose_name = _("Add Category")
url = "horizon:murano:categories:add"
url = "horizon:app-catalog:categories:add"
classes = ("ajax-modal",)
icon = "plus"
policy_rules = (("murano", "add_category"),)
@ -71,7 +71,7 @@ class DeleteCategory(policy.PolicyTargetMixin, tables.DeleteAction):
except exc.HTTPException:
msg = _('Unable to delete category')
LOG.exception(msg)
url = reverse('horizon:murano:categories:index')
url = reverse('horizon:app-catalog:categories:index')
exceptions.handle(request, msg, redirect=url)

View File

@ -89,6 +89,6 @@ class AddCategoryView(views.ModalFormView):
template_name = 'categories/add.html'
context_object_name = 'category'
page_title = _('Add Application Category')
success_url = reverse_lazy('horizon:murano:categories:index')
success_url = reverse_lazy('horizon:app-catalog:categories:index')
submit_label = _('Add')
submit_url = reverse_lazy('horizon:murano:categories:add')
submit_url = reverse_lazy('horizon:app-catalog:categories:add')

View File

@ -37,7 +37,7 @@ class ManagePanels(horizon.PanelGroup):
class Murano(horizon.Dashboard):
name = getattr(settings, 'MURANO_DASHBOARD_NAME', _("Applications"))
slug = "murano"
slug = "app-catalog"
panels = (DeployPanels, ManagePanels)
default_panel = "environments"
supports_tenants = True

View File

@ -595,7 +595,7 @@ def make_select_cls(fqns):
# NOTE(kzaitsev): this closure is needed to allow us have custom
# logic when clicking add button
def _make_link():
ns_url = 'horizon:murano:catalog:add'
ns_url = 'horizon:app-catalog:catalog:add'
ns_url_args = (environment_id, False, True)
# This will prevent horizon from adding an extra '+' button

View File

@ -77,18 +77,18 @@ class AddApplication(tables.LinkAction):
return status not in consts.NO_ACTION_ALLOWED_STATUSES
def get_link_url(self, datum=None):
base_url = reverse('horizon:murano:catalog:switch_env',
base_url = reverse('horizon:app-catalog:catalog:switch_env',
args=(self.table.kwargs['environment_id'],))
redirect_url = reverse('horizon:murano:catalog:index')
redirect_url = reverse('horizon:app-catalog:catalog:index')
return '{0}?next={1}'.format(base_url, redirect_url)
class CreateEnvironment(tables.LinkAction):
name = 'CreateEnvironment'
verbose_name = _('Create Environment')
url = 'horizon:murano:environments:create_environment'
url = 'horizon:app-catalog:environments:create_environment'
classes = ('btn-launch', 'add_env')
redirect_url = "horizon:murano:environments:index"
redirect_url = "horizon:app-catalog:environments:index"
icon = 'plus'
policy_rules = (("murano", "create_environment"),)
@ -107,7 +107,7 @@ class CreateEnvironment(tables.LinkAction):
class DeleteEnvironment(policy.PolicyTargetMixin, tables.DeleteAction):
redirect_url = "horizon:murano:environments:index"
redirect_url = "horizon:app-catalog:environments:index"
policy_rules = (("murano", "delete_environment"),)
@staticmethod
@ -150,7 +150,7 @@ class AbandonEnvironment(tables.DeleteAction):
help_text = _("This action cannot be undone. Any resources created by "
"this environment will have to be released manually.")
name = 'abandon'
redirect_url = "horizon:murano:environments:index"
redirect_url = "horizon:app-catalog:environments:index"
policy_rules = (("murano", "delete_environment"),)
@staticmethod
@ -231,7 +231,7 @@ class DeleteService(tables.DeleteAction):
service_id)
except Exception:
msg = _('Sorry, you can\'t delete service right now')
redirect = reverse("horizon:murano:environments:index")
redirect = reverse("horizon:app-catalog:environments:index")
exceptions.handle(request, msg, redirect=redirect)
@ -309,7 +309,7 @@ class DeployEnvironment(tables.BatchAction):
api.environment_deploy(request, environment_id)
except Exception:
msg = _('Unable to deploy. Try again later')
redirect = reverse('horizon:murano:environments:index')
redirect = reverse('horizon:app-catalog:environments:index')
exceptions.handle(request, msg, redirect=redirect)
@ -357,16 +357,16 @@ class DeployThisEnvironment(tables.Action):
msg = _('Unable to deploy. Try again later')
exceptions.handle(
request, msg,
redirect=reverse('horizon:murano:environments:index'))
redirect=reverse('horizon:app-catalog:environments:index'))
return shortcuts.redirect(
reverse('horizon:murano:environments:services',
reverse('horizon:app-catalog:environments:services',
args=(environment_id,)))
class ShowEnvironmentServices(tables.LinkAction):
name = 'show'
verbose_name = _('Manage Components')
url = 'horizon:murano:environments:services'
url = 'horizon:app-catalog:environments:services'
def allowed(self, request, environment):
return True
@ -436,7 +436,7 @@ class UpdateName(tables.UpdateAction):
class EnvironmentsTable(tables.DataTable):
name = md_utils.Column(
'name',
link='horizon:murano:environments:services',
link='horizon:app-catalog:environments:services',
verbose_name=_('Name'),
form_field=forms.CharField(required=False),
update_action=UpdateName)
@ -451,7 +451,7 @@ class EnvironmentsTable(tables.DataTable):
# NOTE: using the policy check for show_environment
if policy.check((("murano", "show_environment"),),
self.request, target={"environment": environment}):
return reverse("horizon:murano:environments:services",
return reverse("horizon:app-catalog:environments:services",
args=(environment.id,))
return None
@ -476,7 +476,7 @@ class EnvironmentsTable(tables.DataTable):
def get_service_details_link(service):
return reverse('horizon:murano:environments:service_details',
return reverse('horizon:app-catalog:environments:service_details',
args=(service.environment_id, service['?']['id']))
@ -534,7 +534,7 @@ class ServicesTable(tables.DataTable):
class CustomAction(tables.LinkAction):
name = action_datum['name']
verbose_name = action_datum.get('title') or name
url = reverse('horizon:murano:environments:start_action',
url = reverse('horizon:app-catalog:environments:start_action',
args=(environment_id, action_datum['id']))
classes = _classes
table = self
@ -563,7 +563,7 @@ class ServicesTable(tables.DataTable):
return pkg_consts.DISPLAY_MURANO_REPO_URL
def get_pkg_def_url(self):
return reverse('horizon:murano:packages:index')
return reverse('horizon:app-catalog:packages:index')
class Meta(object):
name = 'services'
@ -583,7 +583,7 @@ class ShowDeploymentDetails(tables.LinkAction):
def get_link_url(self, deployment=None):
kwargs = {'environment_id': deployment.environment_id,
'deployment_id': deployment.id}
return reverse('horizon:murano:environments:deployment_details',
return reverse('horizon:app-catalog:environments:deployment_details',
kwargs=kwargs)
def allowed(self, request, environment):

View File

@ -203,7 +203,7 @@ class EnvironmentServicesTab(tabs.TableTab):
def get_services_data(self):
services = []
self.environment_id = self.tab_group.kwargs['environment_id']
ns_url = "horizon:murano:environments:index"
ns_url = "horizon:app-catalog:environments:index"
try:
services = api.services_list(self.request, self.environment_id)
except exc.HTTPForbidden:
@ -242,7 +242,7 @@ class DeploymentTab(tabs.TableTab):
def get_deployments_data(self):
deployments = []
self.environment_id = self.tab_group.kwargs['environment_id']
ns_url = "horizon:murano:environments:index"
ns_url = "horizon:app-catalog:environments:index"
try:
deployments = api.deployments_list(self.request,
self.environment_id)

View File

@ -37,7 +37,7 @@ def get_app_image(request, app_fqdn, status=None):
url = static('dashboard/img/stack-gray.svg')
if package:
app_id = package.id
url = reverse("horizon:murano:catalog:images", args=(app_id,))
url = reverse("horizon:app-catalog:catalog:images", args=(app_id,))
return url

View File

@ -114,7 +114,7 @@ class EnvironmentDetails(tabs.TabbedTableView):
@staticmethod
def get_redirect_url():
return reverse_lazy("horizon:murano:environments:index")
return reverse_lazy("horizon:app-catalog:environments:index")
class DetailServiceView(tabs.TabbedTableView):
@ -131,7 +131,7 @@ class DetailServiceView(tabs.TabbedTableView):
context["environment_name"] = env.name
breadcrumb = [
(context["environment_name"],
reverse("horizon:murano:environments:services",
reverse("horizon:app-catalog:environments:services",
args=[self.environment_id])),
(_('Applications'),), ]
context["custom_breadcrumb"] = breadcrumb
@ -148,7 +148,7 @@ class DetailServiceView(tabs.TabbedTableView):
exceptions.handle(self.request)
except exc.HTTPForbidden:
redirect = reverse('horizon:murano:environments:index')
redirect = reverse('horizon:app-catalog:environments:index')
exceptions.handle(self.request,
_('Unable to retrieve details for '
'service'),
@ -170,7 +170,8 @@ class CreateEnvironmentView(views.ModalFormView):
page_title = _('Create Environment')
context_object_name = 'environment'
submit_label = _('Create')
submit_url = reverse_lazy('horizon:murano:environments:create_environment')
submit_url = reverse_lazy(
'horizon:app-catalog:environments:create_environment')
def get_form(self, form_class):
if 'next' in self.request.GET:
@ -183,9 +184,9 @@ class CreateEnvironmentView(views.ModalFormView):
env_id = self.request.session.get('env_id')
if env_id:
del self.request.session['env_id']
return reverse("horizon:murano:environments:services",
return reverse("horizon:app-catalog:environments:services",
args=[env_id])
return reverse_lazy('horizon:murano:environments:index')
return reverse_lazy('horizon:app-catalog:environments:index')
class DeploymentDetailsView(tabs.TabbedTableView):
@ -205,7 +206,7 @@ class DeploymentDetailsView(tabs.TabbedTableView):
self.deployment_id)
breadcrumb = [
(context["environment_name"],
reverse("horizon:murano:environments:services",
reverse("horizon:app-catalog:environments:services",
args=[self.environment_id])),
(_('Deployments'),), ]
context["custom_breadcrumb"] = breadcrumb
@ -219,7 +220,7 @@ class DeploymentDetailsView(tabs.TabbedTableView):
self.deployment_id)
except (exc.HTTPInternalServerError, exc.HTTPNotFound):
msg = _("Deployment with id %s doesn't exist anymore")
redirect = reverse("horizon:murano:environments:deployments")
redirect = reverse("horizon:app-catalog:environments:deployments")
exceptions.handle(self.request,
msg % self.deployment_id,
redirect=redirect)
@ -233,7 +234,7 @@ class DeploymentDetailsView(tabs.TabbedTableView):
self.deployment_id)
except (exc.HTTPInternalServerError, exc.HTTPNotFound):
msg = _('Deployment with id %s doesn\'t exist anymore')
redirect = reverse("horizon:murano:environments:deployments")
redirect = reverse("horizon:app-catalog:environments:deployments")
exceptions.handle(self.request,
msg % self.deployment_id,
redirect=redirect)
@ -271,7 +272,7 @@ class StartActionView(generic.View):
def post(request, environment_id, action_id):
if api.action_allowed(request, environment_id):
task_id = api.run_action(request, environment_id, action_id)
url = reverse('horizon:murano:environments:action_result',
url = reverse('horizon:app-catalog:environments:action_result',
args=(environment_id, task_id))
return JSONResponse({'url': url})
else:

View File

@ -112,7 +112,8 @@ class MarkImageForm(horizon_forms.SelfHandlingForm):
return img
except Exception:
exceptions.handle(request, _('Unable to mark image'),
redirect=reverse('horizon:murano:images:index'))
redirect=reverse(
'horizon:app-catalog:images:index'))
def clean_title(self):
cleaned_data = super(MarkImageForm, self).clean()

View File

@ -25,7 +25,7 @@ from muranodashboard.common import utils as md_utils
class MarkImage(tables.LinkAction):
name = "mark_image"
verbose_name = _("Mark Image")
url = "horizon:murano:images:mark_image"
url = "horizon:app-catalog:images:mark_image"
classes = ("ajax-modal",)
icon = "plus"
@ -56,7 +56,8 @@ class RemoveImageMetadata(tables.DeleteAction):
glance.image_update_properties(request, obj_id, remove_props)
except Exception:
exceptions.handle(request, _('Unable to remove metadata'),
redirect=reverse('horizon:murano:images:index'))
redirect=reverse(
'horizon:app-catalog:images:index'))
def allowed(self, request, image):
return request.user.is_superuser

View File

@ -85,7 +85,7 @@ class MarkedImagesView(horizon_tables.DataTableView):
images.reverse()
except Exception:
msg = _('Unable to retrieve list of images')
uri = reverse('horizon:murano:images:index')
uri = reverse('horizon:app-catalog:images:index')
exceptions.handle(self.request, msg, redirect=uri)
return images
@ -98,6 +98,6 @@ class MarkImageView(views.ModalFormView):
template_name = 'images/mark.html'
context_object_name = 'image'
page_title = _("Update Image")
success_url = reverse_lazy('horizon:murano:images:index')
success_url = reverse_lazy('horizon:app-catalog:images:index')
submit_label = _('Mark Image')
submit_url = reverse_lazy('horizon:murano:images:mark_image')
submit_url = reverse_lazy('horizon:app-catalog:images:mark_image')

View File

@ -1,7 +1,7 @@
from muranodashboard import exceptions
# The name of the dashboard to be added to HORIZON['dashboards']. Required.
DASHBOARD = 'murano'
DASHBOARD = 'app-catalog'
# If set to True, this dashboard will not be added to the settings.
DISABLED = False

View File

@ -215,7 +215,7 @@ class ModifyPackageForm(PackageParamsMixin, horizon_forms.SelfHandlingForm):
except (exc.HTTPException, Exception):
msg = _('Unable to get list of categories')
LOG.exception(msg)
redirect = reverse('horizon:murano:packages:index')
redirect = reverse('horizon:app-catalog:packages:index')
exceptions.handle(request,
msg,
redirect=redirect)
@ -234,7 +234,7 @@ class ModifyPackageForm(PackageParamsMixin, horizon_forms.SelfHandlingForm):
exceptions.handle(
request,
msg,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
except exc.HTTPConflict:
msg = _('Package or Class with the same name is already made '
'public')
@ -243,7 +243,7 @@ class ModifyPackageForm(PackageParamsMixin, horizon_forms.SelfHandlingForm):
exceptions.handle(
request,
msg,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
except Exception as original_e:
reason = ''
@ -259,7 +259,7 @@ class ModifyPackageForm(PackageParamsMixin, horizon_forms.SelfHandlingForm):
msg = _('Failed to modify the package. {0}').format(reason)
LOG.exception(msg)
redirect = reverse('horizon:murano:packages:index')
redirect = reverse('horizon:app-catalog:packages:index')
exceptions.handle(request,
msg,
redirect=redirect)
@ -284,7 +284,7 @@ class SelectCategories(forms.Form):
except (exc.HTTPException, Exception):
msg = _('Unable to get list of categories')
LOG.exception(msg)
redirect = reverse('horizon:murano:packages:index')
redirect = reverse('horizon:app-catalog:packages:index')
exceptions.handle(request,
msg,
redirect=redirect)

View File

@ -33,7 +33,7 @@ LOG = logging.getLogger(__name__)
class ImportBundle(tables.LinkAction):
name = 'import_bundle'
verbose_name = _('Import Bundle')
url = 'horizon:murano:packages:import_bundle'
url = 'horizon:app-catalog:packages:import_bundle'
classes = ('ajax-modal',)
icon = "plus"
policy_rules = (("murano", "upload_package"),)
@ -42,7 +42,7 @@ class ImportBundle(tables.LinkAction):
class ImportPackage(tables.LinkAction):
name = 'upload_package'
verbose_name = _('Import Package')
url = 'horizon:murano:packages:upload'
url = 'horizon:app-catalog:packages:upload'
classes = ('ajax-modal',)
icon = "plus"
policy_rules = (("murano", "upload_package"),)
@ -66,8 +66,8 @@ class PackagesFilterAction(tables.FilterAction):
class DownloadPackage(tables.LinkAction):
name = 'download_package'
verbose_name = _('Download Package')
url = 'horizon:murano:packages:download'
policy_rules = (("murano", "download_package"),)
url = 'horizon:app-catalog:packages:download'
def allowed(self, request, package):
return True
@ -110,7 +110,7 @@ class ToggleEnabled(tables.BatchAction):
exceptions.handle(
request,
msg,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
class TogglePublicEnabled(tables.BatchAction):
@ -146,7 +146,7 @@ class TogglePublicEnabled(tables.BatchAction):
exceptions.handle(
request,
msg,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
except exc.HTTPConflict:
msg = _('Package or Class with the same name is already made '
'public')
@ -155,7 +155,7 @@ class TogglePublicEnabled(tables.BatchAction):
exceptions.handle(
request,
msg,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
class DeletePackage(policy.PolicyTargetMixin, tables.DeleteAction):
@ -187,16 +187,16 @@ class DeletePackage(policy.PolicyTargetMixin, tables.DeleteAction):
exceptions.handle(
self.request,
msg,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
except exc.HTTPForbidden:
msg = _("You are not allowed to delete this package")
LOG.exception(msg)
exceptions.handle(
request, msg,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
except Exception:
LOG.exception(_('Unable to delete package in murano-api server'))
url = reverse('horizon:murano:packages:index')
url = reverse('horizon:app-catalog:packages:index')
exceptions.handle(request,
_('Unable to remove package.'),
redirect=url)
@ -205,7 +205,7 @@ class DeletePackage(policy.PolicyTargetMixin, tables.DeleteAction):
class ModifyPackage(tables.LinkAction):
name = 'modify_package'
verbose_name = _('Modify Package')
url = 'horizon:murano:packages:modify'
url = 'horizon:app-catalog:packages:modify'
classes = ('ajax-modal',)
icon = "edit"
policy_rules = (("murano", "modify_package"),)
@ -217,7 +217,7 @@ class ModifyPackage(tables.LinkAction):
class PackageDefinitionsTable(tables.DataTable):
name = md_utils.Column(
'name',
link="horizon:murano:packages:detail",
link="horizon:app-catalog:packages:detail",
verbose_name=_('Package Name'))
tenant_name = tables.Column('tenant_name', verbose_name=_('Tenant Name'))
enabled = tables.Column('enabled', verbose_name=_('Active'))

View File

@ -217,7 +217,7 @@ class ImportBundleWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
LOG.exception(msg)
messages.error(self.request, msg)
raise exceptions.Http302(
reverse('horizon:murano:packages:index'))
reverse('horizon:app-catalog:packages:index'))
glance_client = glance.glanceclient(self.request, version='1')
@ -294,7 +294,7 @@ class ImportBundleWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
return step_data
def done(self, form_list, **kwargs):
redirect = reverse('horizon:murano:packages:index')
redirect = reverse('horizon:app-catalog:packages:index')
msg = _('Bundle successfully imported.')
LOG.info(msg)
messages.success(self.request, msg)
@ -337,7 +337,7 @@ class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
installed_images = self.storage.get_step_data('upload').get(
'images', [])
redirect = reverse('horizon:murano:packages:index')
redirect = reverse('horizon:app-catalog:packages:index')
dep_data = {'enabled': data['enabled'],
'is_public': data['is_public']}
murano_client = api.muranoclient(self.request)
@ -374,7 +374,7 @@ class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
LOG.exception(msg)
exceptions.handle(
self.request, msg,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
except (exc.HTTPException, Exception):
LOG.exception(_('Modifying package failed'))
exceptions.handle(self.request,
@ -402,7 +402,7 @@ class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
exceptions.handle(
self.request,
msg,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
def process_step(self, form):
@catalog_views.update_latest_apps
@ -445,7 +445,7 @@ class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
LOG.exception(msg)
messages.error(self.request, msg)
raise exceptions.Http302(
reverse('horizon:murano:packages:index'))
reverse('horizon:app-catalog:packages:index'))
def _ensure_images(name, package):
try:
@ -520,7 +520,7 @@ class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
exceptions.handle(
self.request,
msg,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
except exc.HTTPInternalServerError as e:
self._handle_exception(e)
@ -533,7 +533,7 @@ class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
exceptions.handle(
self.request,
reason,
redirect=reverse('horizon:murano:packages:index'))
redirect=reverse('horizon:app-catalog:packages:index'))
except Exception as original_e:
self._handle_exception(original_e)
@ -553,8 +553,8 @@ class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin,
class ModifyPackageView(views.ModalFormView):
form_class = forms.ModifyPackageForm
template_name = 'packages/modify_package.html'
success_url = reverse_lazy('horizon:murano:packages:index')
failure_url = reverse_lazy('horizon:murano:packages:index')
success_url = reverse_lazy('horizon:app-catalog:packages:index')
failure_url = reverse_lazy('horizon:app-catalog:packages:index')
page_title = _("Modify Package")
def get_initial(self):
@ -587,7 +587,7 @@ class DetailView(horizon_views.HorizonTemplateView):
app_id = self.kwargs['app_id']
app = api.muranoclient(self.request).packages.get(app_id)
except Exception:
INDEX_URL = 'horizon:murano:packages:index'
INDEX_URL = 'horizon:app-catalog:packages:index'
exceptions.handle(self.request,
_('Unable to retrieve package details.'),
redirect=reverse(INDEX_URL))
@ -606,7 +606,7 @@ def download_packge(request, app_name, app_id):
return response
except exc.HTTPException:
LOG.exception(_('Something went wrong during package downloading'))
redirect = reverse('horizon:murano:packages:index')
redirect = reverse('horizon:app-catalog:packages:index')
exceptions.handle(request,
_('Unable to download package.'),
redirect=redirect)

View File

@ -333,7 +333,7 @@ $(function() {
.attr("width", width)
.attr("height", height);
ajaxUrl = '/murano/' + environmentId + '/services/get_d3_data';
ajaxUrl = '/app-catalog/' + environmentId + '/services/get_d3_data';
force = d3.layout.force()
.nodes(graph.nodes)
.links([])

View File

@ -65,7 +65,7 @@
function getPackages(params) {
var config = params ? { 'params' : params} : {};
return apiService.get('/api/murano/packages/', config)
return apiService.get('/api/app-catalog/packages/', config)
.error(function () {
toastService.add('error', gettext('Unable to retrieve the packages.'));
});

View File

@ -15,7 +15,7 @@
<div class="app-supplier clearfix">
{% if app.supplier.Logo %}
<div class="app-icon">
<img src="{% url 'horizon:murano:catalog:supplier_images' app.id %}" />
<img src="{% url 'horizon:app-catalog:catalog:supplier_images' app.id %}" />
</div>
{% endif %}
<div class="app-supplier-data">

View File

@ -1,7 +1,7 @@
{% load i18n %}
{% if environment %}
<a href="{% url 'horizon:murano:catalog:deploy' app.id environment.id %}" class="{{ class }}"><i class="fa fa-plus-circle"></i> {% trans "Add to Env" %}</a>
<a href="{% url 'horizon:app-catalog:catalog:deploy' app.id environment.id %}" class="{{ class }}"><i class="fa fa-plus-circle"></i> {% trans "Add to Env" %}</a>
{% else %}
<a href="{% url 'horizon:murano:environments:create_environment' %}?next={{ view.current_page_url|urlencode }}" class="{{ class }}"><i class="fa fa-plus-circle"></i> {% trans "Create Env" %}</a>
<a href="{% url 'horizon:app-catalog:environments:create_environment' %}?next={{ view.current_page_url|urlencode }}" class="{{ class }}"><i class="fa fa-plus-circle"></i> {% trans "Create Env" %}</a>
{% endif %}

View File

@ -30,7 +30,7 @@
</div>
<div class="clearfix">
<div class="app-icon pull-left">
<img src="{% url 'horizon:murano:catalog:images' app.id %}" />
<img src="{% url 'horizon:app-catalog:catalog:images' app.id %}" />
</div>
</div>
{{ tab_group.render }}

View File

@ -5,9 +5,9 @@
<div class="well app">
<div class="app-description">
<div class="col-xs-2 col-sm-4 col-md-4 col-lg-4 app-icon">
<a href="{% url 'horizon:murano:catalog:application_details' app.id %}"
<a href="{% url 'horizon:app-catalog:catalog:application_details' app.id %}"
class="btn-link">
<img src="{% url 'horizon:murano:catalog:images' app.id %}"/>
<img src="{% url 'horizon:app-catalog:catalog:images' app.id %}"/>
</a>
</div>
<div class="col-xs-10 col-sm-8 col-md-8 col-lg-8 description">
@ -16,7 +16,7 @@
<p>{{ app.description|striptags|truncatechars:130 }}</p>
<div class="app-details-link"><a
href="{% url 'horizon:murano:catalog:application_details' app.id %}"
href="{% url 'horizon:app-catalog:catalog:application_details' app.id %}"
class="btn-link">{% trans "Details" %} &raquo;</a></div>
</div>

View File

@ -9,7 +9,7 @@
<div class="colleft">
<ul>
{% for category in categories|firsthalf %}
<li><a href="{% url 'horizon:murano:catalog:index' %}?category={{ category|urlencode }}">{{ category }}</a></li>
<li><a href="{% url 'horizon:app-catalog:catalog:index' %}?category={{ category|urlencode }}">{{ category }}</a></li>
{% endfor %}
</ul>
</div>
@ -17,11 +17,11 @@
<div class="colright">
<ul>
{% for category in categories|lasthalf %}
<li><a href="{% url 'horizon:murano:catalog:index' %}?category={{ category|urlencode }}">{{ category }}</a></li>
<li><a href="{% url 'horizon:app-catalog:catalog:index' %}?category={{ category|urlencode }}">{{ category }}</a></li>
{% endfor %}
</ul>
</div>
{% else %}
<a href="{% url 'horizon:murano:catalog:index' %}?category={{ categories.0|urlencode }}">{{ categories.0 }}</a>
<a href="{% url 'horizon:app-catalog:catalog:index' %}?category={{ categories.0|urlencode }}">{{ categories.0 }}</a>
{% endif %}
</div>

View File

@ -7,14 +7,14 @@
{% if environment %}
<a href="#environment_switcher" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">{{ environment.name|truncatechars:30}} {% if num_of_envs > 1 %} <b class="caret"></b>{% endif %}</a>
{% else %}
<a href="{% url 'horizon:murano:environments:create_environment' %}?next={{ view.current_page_url|urlencode }}" title="{% trans 'Click to create new environment' %}" class="btn btn-default ajax-modal">{% trans "Create Environment" %}</a>
<a href="{% url 'horizon:app-catalog:environments:create_environment' %}?next={{ view.current_page_url|urlencode }}" title="{% trans 'Click to create new environment' %}" class="btn btn-default ajax-modal">{% trans "Create Environment" %}</a>
{% endif %}
{% if num_of_envs > 1 %}
<ul id="environment_list" class="dropdown-menu row_actions clearfix">
{% for env in available_environments %}
{% if env.id != environment.id %}
<li class="clearfix"><a tabindex="-1" href="{% url 'horizon:murano:catalog:switch_env' env.id %}?next={% url 'horizon:murano:catalog:index' %}" class="btn btn-small">{{ env.name }}</a></li>
<li class="clearfix"><a tabindex="-1" href="{% url 'horizon:app-catalog:catalog:switch_env' env.id %}?next={% url 'horizon:app-catalog:catalog:index' %}" class="btn btn-small">{{ env.name }}</a></li>
{% endif %}
{% endfor %}
</ul>

View File

@ -42,12 +42,12 @@
class="caret"></b></a>
<ul class="dropdown-menu row_actions clearfix scrollable-menu">
<li class="clearfix">
<a tabindex="-1" href="{% url 'horizon:murano:catalog:index' %}?category={{ ALL_CATEGORY_NAME|urlencode }}" class="btn btn-small">
<a tabindex="-1" href="{% url 'horizon:app-catalog:catalog:index' %}?category={{ ALL_CATEGORY_NAME|urlencode }}" class="btn btn-small">
{{ ALL_CATEGORY_NAME }}</a>
</li>
{% for category in categories %}
<li class="clearfix">
<a tabindex="-1" href="{% url 'horizon:murano:catalog:index' %}?category={{ category.name|urlencode }}" class="btn btn-small">
<a tabindex="-1" href="{% url 'horizon:app-catalog:catalog:index' %}?category={{ category.name|urlencode }}" class="btn btn-small">
{{ category.name }}
{% if not MURANO_USE_GLARE %}
({{category.package_count}})
@ -68,7 +68,7 @@
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 col-row">
<div class="table_search client pull-right">
<form class="search" method="GET"
action="{% url 'horizon:murano:catalog:index' %}">
action="{% url 'horizon:app-catalog:catalog:index' %}">
<div class="form-group has-feedback">
<input class="form-control"
value="{{ search }}" type="text"

View File

@ -1,4 +1,4 @@
{% load i18n %}
{% trans "Quick Deploy" as label %}
<a href="{% url 'horizon:murano:catalog:quick_deploy' app.id %}" class="{{ class }}"><i class="fa fa-rocket"></i> {{ label }}</a>
<a href="{% url 'horizon:app-catalog:catalog:quick_deploy' app.id %}" class="{{ class }}"><i class="fa fa-rocket"></i> {{ label }}</a>

View File

@ -11,7 +11,7 @@
<td colspan="{{ table.get_columns|length }}">
<h4 class="no_envs">{{ table.get_empty_message }}</h4>
<div class="add_env">
<a href="{% url 'horizon:murano:environments:create_environment' %}" class="btn btn-primary">
<a href="{% url 'horizon:app-catalog:environments:create_environment' %}" class="btn btn-primary">
<i class="fa fa-plus-circle"></i> {% trans "Add New" %}
</a></div>
</td>

View File

@ -3,7 +3,7 @@
{% load static %}
{% block form_id %}import_bundle{% endblock %}
{% block form_action %}{% url 'horizon:murano:packages:import_bundle' %}{% endblock %}
{% block form_action %}{% url 'horizon:app-catalog:packages:import_bundle' %}{% endblock %}
{% block modal_id %}upload_bundle_modal{% endblock %}
{% block modal-header %}{% trans 'Import Bundle' %}{% endblock %}
@ -43,7 +43,7 @@
{% endblock %}
{% block modal-footer %}
<a href='{% url 'horizon:murano:packages:index' %}' class='btn btn-default cancel'>{% trans 'Cancel' %}</a>
<a href='{% url 'horizon:app-catalog:packages:index' %}' class='btn btn-default cancel'>{% trans 'Cancel' %}</a>
{% if wizard.steps.next %}
<input type='submit' class='btn btn-primary' value='{% trans 'Next' %}'/>
{% else %}

View File

@ -2,7 +2,7 @@
{% load i18n %}
{% block form_id %}{% endblock %}
{% block form_action %}{% url 'horizon:murano:packages:modify' app_id %}{% endblock %}
{% block form_action %}{% url 'horizon:app-catalog:packages:modify' app_id %}{% endblock %}
{% block modal-header %}{% trans "Modify Package" %}{% endblock %}
{% block modal_id %}modify_package_modal{% endblock %}
@ -15,6 +15,6 @@
{% endblock %}
{% block modal-footer %}
<a href="{% url 'horizon:murano:packages:index' %}" class="btn btn-default cancel">{% trans "Cancel" %}</a>
<a href="{% url 'horizon:app-catalog:packages:index' %}" class="btn btn-default cancel">{% trans "Cancel" %}</a>
<input type='submit' class='btn btn-primary' value='{% trans "Update" %}' />
{% endblock %}

View File

@ -3,7 +3,7 @@
{% load static %}
{% block form_id %}upload_package{% endblock %}
{% block form_action %}{% url 'horizon:murano:packages:upload' %}{% endblock %}
{% block form_action %}{% url 'horizon:app-catalog:packages:upload' %}{% endblock %}
{% block form_attrs %}enctype="multipart/form-data"{% endblock %}
{% block modal_id %}upload_package_modal{% endblock %}
@ -61,7 +61,7 @@
{% endblock %}
{% block modal-footer %}
<a href='{% url 'horizon:murano:packages:index' %}' class='btn btn-default cancel'>{% trans 'Cancel' %}</a>
<a href='{% url 'horizon:app-catalog:packages:index' %}' class='btn btn-default cancel'>{% trans 'Cancel' %}</a>
{% if wizard.steps.next %}
<input type='submit' class='btn btn-primary' value='{% trans 'Next' %}'/>
{% else %}

View File

@ -1,13 +1,13 @@
{% extends "horizon/common/_modal_form.html" %}
{% load i18n humanize %}
{% block form_action %}
{% url 'horizon:murano:catalog:add' app_id environment_id do_redirect drop_wm_form %}
{% url 'horizon:app-catalog:catalog:add' app_id environment_id do_redirect drop_wm_form %}
{% endblock %}
{% block form_id %}form_{{ app_id }}{% endblock %}
{% block modal_id %}modal_{{ app_id }}{% endblock %}
{% block modal-header %}
<span class="wizard_title">
<img src="{% url 'horizon:murano:catalog:images' app_id %}" height="25" width="25"/>
<img src="{% url 'horizon:app-catalog:catalog:images' app_id %}" height="25" width="25"/>
{% trans "Configure Application" %}: {{ service_name }}
</span>
{% endblock %}

View File

@ -2,9 +2,9 @@
<div class="col-xs-2 draggable_app">
<div class="well well-sm" draggable="true">
<img class="centering" src="{% url 'horizon:murano:catalog:images' app.id %}"
<img class="centering" src="{% url 'horizon:app-catalog:catalog:images' app.id %}"
height="50" width="50" draggable="false"/>
<input type="hidden" value="{% url 'horizon:murano:catalog:add' app.id environment_id 'True' 'True' %}"/>
<input type="hidden" value="{% url 'horizon:app-catalog:catalog:add' app.id environment_id 'True' 'True' %}"/>
<div class="centering">{{ app.name }}</div>
</div>
</div>

View File

@ -32,8 +32,8 @@
{{ block.super }}
<script type="text/template" id="app_tile_small">
{% jstemplate %}
{% url 'horizon:murano:catalog:images' '[[app_id]]' as image_url %}
{% url 'horizon:murano:catalog:add' '[[app_id]]' '[[environment_id]]' 'True' 'True' as add_url %}
{% url 'horizon:app-catalog:catalog:images' '[[app_id]]' as image_url %}
{% url 'horizon:app-catalog:catalog:add' '[[app_id]]' '[[environment_id]]' 'True' 'True' as add_url %}
<div class="col-xs-2 draggable_app">
<div class="well well-sm" draggable="true">
<img class="centering" src="{{ image_url|unquote }}"

View File

@ -90,7 +90,7 @@ class UITestCase(BaseDeps):
self.driver = webdriver.Firefox()
self.addCleanup(self.driver.quit)
self.driver.maximize_window()
self.driver.get(cfg.common.horizon_url + '/murano/environments')
self.driver.get(cfg.common.horizon_url + '/app-catalog/environments')
self.driver.implicitly_wait(30)
self.addOnException(self.take_screenshot)
self.log_in()
@ -242,9 +242,8 @@ class UITestCase(BaseDeps):
def select_and_click_action_for_app(self, action, app):
self.driver.find_element_by_xpath(
"//*[@href='{0}/murano/catalog/{1}/{2}']".format(self.url_prefix,
action,
app)).click()
"//*[@href='{0}/app-catalog/catalog/{1}/{2}']".format(
self.url_prefix, action, app)).click()
def go_to_submenu(self, link):
element = self.wait_element_is_clickable(by.By.PARTIAL_LINK_TEXT, link)

View File

@ -1187,7 +1187,7 @@ class TestSuitePackages(base.PackageTestCase):
self.go_to_submenu('Browse')
# 'Quick Deploy' button contains id of the application.
# So it is possible to definitely determinate is it in catalog or not.
btn_xpath = ("//*[@href='{0}/murano/catalog/quick-add/{1}']"
btn_xpath = ("//*[@href='{0}/app-catalog/catalog/quick-add/{1}']"
"".format(self.url_prefix, self.postgre_id))
self.check_element_not_on_page(by.By.XPATH, btn_xpath)
@ -1244,7 +1244,7 @@ class TestSuitePackages(base.PackageTestCase):
self.go_to_submenu('Browse')
# 'Quick Deploy' button contains id of the application.
# So it is possible to definitely determine is it in catalog or not.
btn_xpath = ("//*[@href='{0}/murano/catalog/quick-add/{1}']"
btn_xpath = ("//*[@href='{0}/app-catalog/catalog/quick-add/{1}']"
"".format(self.url_prefix, self.postgre_id))
self.check_element_on_page(by.By.XPATH, btn_xpath)

View File

@ -16,4 +16,4 @@ import horizon
def get_user_home(user):
return horizon.get_dashboard('murano').get_absolute_url()
return horizon.get_dashboard('app-catalog').get_absolute_url()