Fix links on env details package in case of packages absence
Change-Id: Ifa7c41722d3cdb5d47a9a4752205c4947452e3e6 Closes-Bug: #1500845
This commit is contained in:
parent
c66986289c
commit
2c66c3f43d
@ -24,6 +24,7 @@ from horizon import exceptions
|
||||
from horizon import forms
|
||||
from horizon import messages
|
||||
from horizon import tables
|
||||
from muranoclient.common import exceptions as exc
|
||||
from oslo_log import log as logging
|
||||
|
||||
from muranodashboard import api as api_utils
|
||||
@ -32,8 +33,8 @@ from muranodashboard.catalog import views as catalog_views
|
||||
from muranodashboard.environments import api
|
||||
from muranodashboard.environments import consts
|
||||
from muranodashboard.environments import forms as env_forms
|
||||
from muranodashboard.packages import consts as pkg_consts
|
||||
|
||||
from muranoclient.common import exceptions as exc
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -410,6 +411,12 @@ class ServicesTable(tables.DataTable):
|
||||
actions.extend(sorted(app_actions, key=lambda x: x.name))
|
||||
return actions
|
||||
|
||||
def get_repo_url(self):
|
||||
return pkg_consts.MURANO_REPO_URL
|
||||
|
||||
def get_pkg_def_url(self):
|
||||
return reverse('horizon:murano:packages:index')
|
||||
|
||||
class Meta(object):
|
||||
name = 'services'
|
||||
verbose_name = _('Component List')
|
||||
|
@ -62,16 +62,18 @@
|
||||
</div>
|
||||
{% else %}
|
||||
<p id="no_apps_in_catalog_message" class="col-xs-12 alert alert-info ">
|
||||
{% blocktrans %} There are no applications in the catalog.
|
||||
You can import apps from<a href="{{ repo_url }}"
|
||||
target="_blank"> {{ repo_url }}</a>
|
||||
.
|
||||
<br><br>
|
||||
Go to
|
||||
<b><a href={{ pkg_def_url }}>Package
|
||||
Definitions</a></b>,
|
||||
click 'Import Package' and select <i>Repository</i> as
|
||||
a <i>Package Source</i>. {% endblocktrans %}
|
||||
{% with repo_url=table.get_repo_url pkg_def_url=table.get_pkg_def_url %}
|
||||
{% blocktrans %} There are no applications in the
|
||||
catalog.
|
||||
You can import apps from
|
||||
<a href="{{ repo_url }}" target="_blank"> {{ repo_url }}</a>.
|
||||
<br><br>
|
||||
Go to
|
||||
<b><a href={{ pkg_def_url }}>Package Definitions</a></b>,
|
||||
click 'Import Package' and select
|
||||
<i>Repository</i> as a <i>Package Source</i>.
|
||||
{% endblocktrans %}
|
||||
{% endwith %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user