Retiring App Catalog

This commit removes content associated with the app catalog.
This is part of the first step, following the guide at:
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project

Earlier this year the TC agreed to retire this project:
https://review.openstack.org/#/c/452086/

In July, Fungi sent
a note to the operators list as well:
http://lists.openstack.org/pipermail/openstack-operators/2017-July/013965.html

Depends-On: I52ce13057643d69a0fd87bce20ee460c6b7c2f17
Change-Id: I5b75e850a40db0936fdd01e3afa5107b37ae0a4e
This commit is contained in:
Christopher Aedo 2017-12-10 10:09:31 -08:00 committed by Andreas Jaeger
parent 4f5e9f658b
commit ca8ca41545
76 changed files with 8 additions and 2558 deletions

View File

@ -1,53 +0,0 @@
# Set up globals
globals:
angular: false
extends: openstack
# Most environment options are not explicitly enabled or disabled, only
# included here for completeness' sake. They are commented out, because the
# global updates.py script would otherwise override them during a global
# requirements synchronization.
#
# Individual projects should choose which platforms they deploy to.
env:
# browser global variables.
browser: true
# Adds all of the Jasmine testing global variables for version 1.3 and 2.0.
jasmine: true
# Enable eslint-plugin-angular
plugins:
- angular
# Below we adjust rules specific to horizon's usage of openstack's linting
# rules, and its own plugin inclusions.
rules:
#############################################################################
# Disabled Rules from eslint-config-openstack
#############################################################################
valid-jsdoc: 1
brace-style: 1
no-extra-parens: 1
consistent-return: 1
callback-return: 1
guard-for-in: 1
block-scoped-var: 1
semi-spacing: 1
no-redeclare: 1
no-new: 1
#############################################################################
# Angular Plugin Customization
#############################################################################
angular/controller-as-vm:
- 1
- "ctrl"
# Remove after migrating to angular 1.4 or later.
angular/no-cookiestore:
- 1

28
.gitignore vendored
View File

@ -1,28 +0,0 @@
# Packages
*.egg
*.egg-info
dist
build
.eggs
eggs
parts
bin
var
sdist
develop-eggs
.idea
# unit tests
.tox
# reno
releasenotes/build/
# npm
node_modules/
npm-debug.log
*.pyc
.tox
.idea
*.egg-info

View File

@ -1,4 +0,0 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/app-catalog-ui.git

180
LICENSE
View File

@ -1,180 +0,0 @@
Some icons from here:
http://jxnblk.com/ - License: MIT
The rest is Apache 2.0:
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

View File

@ -1,6 +0,0 @@
include setup.py
recursive-include app_catalog/enabled *
recursive-include app_catalog/static *
recursive-include app_catalog/templates *
recursive-include component_catalog/templates *

View File

@ -1,57 +1,10 @@
==============
app-catalog-ui
==============
This project is no longer maintained.
This makes the Applications and Components stored in the OpenStack Application
Catalog available to users in their own Cloud's Horizon UI.
The contents of this repository are still available in the Git
source code management system. To see the contents of this
repository before it reached its end of life, please check out the
previous commit with "git checkout HEAD^1".
.. image:: doc/images/app-catalog-ui-apps-v1.png
:alt: App Catalog Application view screenshot
.. image:: doc/images/app-catalog-ui-components-v1.png
:alt: App Catalog Components view screenshot
Requirements
============
app-catalog-ui is intended to use only on systems running Horizon
How to try this package
=======================
With Devstack
-------------
Add the following to your Devstack local.conf file
::
enable_plugin app-catalog-ui https://git.openstack.org/openstack/app-catalog-ui
With Horizon
------------
::
git clone http://github.com/openstack/horizon.git
git clone http://github.com/openstack/app-catalog-ui.git
cd horizon
./run_tests.sh -f --docs
cp ./openstack_dashboard/local/local_settings.py.example ./openstack_dashboard/local/local_settings.py
pushd ../apps-catalog-ui
../horizon/tools/with_venv.sh pip install --upgrade .
cp -a app_catalog/enabled/* ../horizon/openstack_dashboard/enabled/
popd
#FOR Murano Dashboard support:
git clone http://github.com/openstack/murano-dashboard.git
pushd ../murano-dashboard
../horizon/tools/with_venv.sh pip install --upgrade .
cp muranodashboard/local/_50_murano.py ../horizon/openstack_dashboard/enabled/
popd
#If you want to test against you own app-catalog checkout:
echo "APP_CATALOG_URL='http://localhost:18001'" >> openstack_dashboard/local/local_settings.py
#Start test server
./run_tests.sh --runserver 127.0.0.1:18000
For any further questions, please email
openstack-dev@lists.openstack.org or join #openstack-dev on
Freenode.

View File

@ -1,16 +0,0 @@
{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "Application Catalog" %}{% endblock %}
{% block page_header %}
{% include "horizon/common/_page_header.html" with title=_("Application Catalog") %}
{% endblock page_header %}
{% block main %}
<div ng-cloak
ng-controller="appCatalogTableCtrl" ng-init='init({{ APP_CATALOG_SETTINGS }})'>
<ng-include src="'{{ STATIC_URL }}dashboard/project/app_catalog/main_panel.html'"></ng-include>
</div>
{% endblock %}

View File

@ -1,16 +0,0 @@
{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "Component Catalog" %}{% endblock %}
{% block page_header %}
{% include "horizon/common/_page_header.html" with title=_("Component Catalog ") %}
{% endblock page_header %}
{% block main %}
<div ng-cloak
ng-controller="appComponentCatalogTableCtrl" ng-init="init({{ APP_CATALOG_SETTINGS }})">
<ng-include src="'{{ STATIC_URL }}dashboard/project/app_catalog/main_panel.html'"></ng-include>
</div>
{% endblock %}

View File

@ -1,22 +0,0 @@
# Copyright 2015 IBM Corp.
#
# 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
class AppCatalog(horizon.Panel):
name = _("Applications")
slug = "app_catalog"

View File

@ -1,22 +0,0 @@
# Copyright 2015 IBM Corp.
#
# 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 import urls
from app_catalog.app_catalog import views
urlpatterns = [
urls.url(r'^$', views.IndexView.as_view(), name='index'),
]

View File

@ -1,78 +0,0 @@
# 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 app_catalog.version import version_info as acvi
from django.conf import settings
from horizon import Horizon
from horizon.version import version_info as hvi
from horizon import views
from openstack_dashboard import api
import re
import json
class IndexView(views.APIView):
# A very simple class-based view...
template_name = 'app_catalog/index.html'
def get_data(self, request, context, *args, **kwargs):
has_murano = False
try:
Horizon.get_dashboard('murano')
has_murano = True
except Exception:
pass
regex = re.compile('(\d+\.\d+\.\d+)-?(.*)')
heat_version = None
heat_release = None
try:
info = api.heat.heatclient(
request).build_info.build_info()['engine']['revision']
match = regex.match(info)
if match:
heat_version = match.group(1)
heat_release = match.group(0)
except Exception:
pass
heat_version = getattr(settings,
'APP_CATALOG_HEAT_VERSION', heat_version)
heat_release = getattr(settings,
'APP_CATALOG_HEAT_RELEASE', heat_release)
murano_version = getattr(settings,
'APP_CATALOG_MURANO_VERSION', None)
murano_release = getattr(settings,
'APP_CATALOG_MURANO_RELEASE', None)
app_catalog_settings = {
'HEAT_VERSION': {
'VER': heat_version,
'REL': heat_release
},
'HAS_MURANO': has_murano,
'MURANO_VERSION': {
'VER': murano_version,
'REL': murano_release
},
'HORIZON_VERSION': {
'VER': hvi.version_string(),
'REL': hvi.release_string()
},
'APP_CATALOG_VERSION': {
'VER': acvi.version_string(),
'REL': acvi.release_string()
},
'APP_CATALOG_URL': getattr(settings,
'APP_CATALOG_URL',
'//apps.openstack.org')
}
context['APP_CATALOG_SETTINGS'] = json.dumps(app_catalog_settings)
return context

View File

@ -1,22 +0,0 @@
# Copyright 2015 IBM Corp.
#
# 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
class ComponentCatalog(horizon.Panel):
name = _("Components")
slug = "component_catalog"

View File

@ -1,7 +0,0 @@
from horizon.test import helpers as test
class FivecircleTests(test.TestCase):
# Unit tests for AppCatalog.
def test_me(self):
self.assertTrue(1 + 1 == 2)

View File

@ -1,22 +0,0 @@
# Copyright 2015 IBM Corp.
#
# 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 import urls
from app_catalog.component_catalog import views
urlpatterns = [
urls.url(r'^$', views.IndexView.as_view(), name='index'),
]

View File

@ -1,6 +0,0 @@
from app_catalog.app_catalog.views import IndexView as ACView
class IndexView(ACView):
# A very simple class-based view...
template_name = 'component_catalog/index.html'

View File

@ -1,28 +0,0 @@
# Copyright (c) 2013 Mirantis, Inc.
#
# 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
class AppCatalog(horizon.Dashboard):
name = _("App Catalog")
slug = "app-catalog"
default_panel = "app_catalog"
supports_tenants = True
try:
horizon.base.Horizon.registered('app-catalog')
except horizon.base.NotRegistered:
horizon.register(AppCatalog)

View File

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

View File

@ -1,23 +0,0 @@
# 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.
ADD_INSTALLED_APPS = [
'app_catalog',
]
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.app_catalog']
ADD_JS_FILES = ['dashboard/project/app_catalog/app_catalog.js']
ADD_SCSS_FILES = ['dashboard/project/app_catalog/app_catalog.scss']
FEATURE = True

View File

@ -1,8 +0,0 @@
from django.utils.translation import ugettext_lazy as _
# The name of the panel group to be added to HORIZON_CONFIG. Required.
PANEL_GROUP = 'app-catalog_browse_group'
# The display name of the PANEL_GROUP. Required.
PANEL_GROUP_NAME = _('Browse')
# The name of the dashboard the PANEL_GROUP associated with. Required.
PANEL_GROUP_DASHBOARD = 'app-catalog'

View File

@ -1,21 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The name of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'app_catalog_panel'
# The name of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'app-catalog'
# The name of the panel group the PANEL is associated with.
PANEL_GROUP = 'app-catalog_browse_group'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'app_catalog.app_catalog.panel.AppCatalog'

View File

@ -1,21 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The name of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'component_catalog_panel'
# The name of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'app-catalog'
# The name of the panel group the PANEL is associated with.
PANEL_GROUP = 'app-catalog_browse_group'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'app_catalog.component_catalog.panel.ComponentCatalog'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

View File

@ -1,47 +0,0 @@
<div>
<dl class="dl-horizontal">
<dt>
<div style="
width:64px;
height:64px;
overflow: hidden;
">
<img style="
margin: {$ asset.icon.top/2 $}px 0px 0px {$ asset.icon.left/2 $}px;
height: {$ asset.icon.height/2 $}px;
" src="{$ asset.icon.url $}">
</div>
</dt>
<dd>
<div>{$ asset.name $}</div>
<div>{$ asset.provided_by.company $}</div>
<div ng-switch="appaction" style="float:right">
<div ng-switch-when='true' app-action ng-scope ng-init='extraclasses="btn-lg";installclasses="btn-primary";launchclasses="btn-success"'></div>
</div>
</dd>
<dt>License</dt>
<dd ng-switch="asset.license_url || '_undefined_'">
<div>{$ asset.license $}</div>
<a ng-switch-default class="btn btn-default btn-sm" target="_blank" href="{$ asset.license_url $}">License Details</a>
<div ng-switch-when="_undefined_"></div>
</dd>
<dt>Description</dt>
<dd>{$ asset.description $}</dd>
<dt ng-switch="asset.depends || '_undefined_'">
<div ng-switch-default>Dependencies</div>
<div ng-switch-when="_undefined_"></div>
</dt>
<dd ng-switch="asset.depends || '_undefined_'">
<div ng-switch-default>
<table>
<tr ng-repeat="dep in asset.depends">
<td>{$ dep.asset.name $}</td>
<td><div app-action ng-scope ng-init='extraclasses="btn-sm";no_launch=true;asset=dep.asset'></div></td>
</tr>
</table>
<div ng-switch-when="_undefined_"></div>
</dd>
</dl>
</div>

View File

@ -1,51 +0,0 @@
<div ng-switch="asset.disabled">
<div ng-switch-when="true">
<a ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Unsupported</a>
</div>
<div ng-switch-default ng-switch="asset.service.type">
<div ng-switch-when="heat" ng-switch="asset.validated">
<a ng-switch-default ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/}">Checking</a>
<a ng-switch-when="error" ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Error</a>
<a ng-switch-when="unsupported" ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Unsupported</a>
<div ng-switch-when="true" ng-switch="asset.service.environment || '_undefined_'">
<a ng-switch-when="_undefined_" ng-class="[extraclasses, launchclasses]" class="btn btn-default ajax-modal" href="{$ WEBROOT $}project/stacks/select_template?template_source=url&template_url={$ asset.attributes.url | encodeURIComponent $}">Launch</a>
<a ng-switch-default ng-class="[extraclasses, launchclasses]" class="btn btn-default ajax-modal" href="{$ WEBROOT $}project/stacks/select_template?template_source=url&template_url={$ asset.attributes.url | encodeURIComponent $}&environment_source=raw&environment_data={$ asset.service.environment | encodeURIComponent $}">Launch</a>
</div>
</div>
<div ng-switch-when="glance" ng-switch="asset.attributes.indirect_url || '_undefined_'">
<a ng-switch-default ng-class="[extraclasses, installclasses]" class="btn btn-default" target="_blank" href="{$ asset.attributes.indirect_url $}">Install Instructions</a>
<div ng-switch-when="_undefined_" ng-switch="asset.installed">
<a ng-switch-default ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Checking</a>
<a ng-switch-when="false" ng-class="[extraclasses, installclasses]" class="btn btn-default ajax-modal" href="{$ WEBROOT $}project/images/create/?name={$ asset.name | encodeURIComponent $}&source_type=url&image_url={$ asset.attributes.url | encodeURIComponent $}&disk_format={$ asset.service.disk_format $}&architecture={$ asset.service.architecture $}&minimum_disk={$ asset.service.min_disk $}&minimum_ram={$ asset.service.min_ram $}&description={$ asset.description $}">Install</a>
<div ng-switch-when="true" ng-switch="no_launch || '_undefined_'">
<a ng-switch-when="true" ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Installed</a>
<a ng-switch-default ng-class="[extraclasses, launchclasses]" class="btn btn-default ajax-modal" href="{$ WEBROOT $}project/instances/launch?source_type=image_id&source_id={$ asset.installed_id $}">Launch</a>
</div>
</div>
</div>
<div ng-switch-when="murano" ng-switch="asset.has_murano">
<a ng-switch-when="false" ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Unsupported</a>
<div ng-switch-when="true" ng-switch="asset.installed">
<a ng-switch-default ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Checking</a>
<a ng-switch-when="false" ng-class="[extraclasses, installclasses]" class="btn btn-default ajax-modal" href="{$ WEBROOT $}app-catalog/packages/upload?repo_name={$ asset.service.package_name | encodeURIComponent $}&import_type=by_name">Install</a>
<div ng-switch-when="true" ng-switch="no_launch || '_undefined_'">
<a ng-switch-when="true" ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Installed</a>
<a ng-switch-default ng-class="[extraclasses, launchclasses]" class="btn btn-default ajax-modal" href="{$ WEBROOT $}murano/catalog/quick-add/{$ asset.service.murano_id $}">Launch</a>
</div>
</div>
</div>
<div ng-switch-when="bundle" ng-switch="asset.service.murano_package_name || '_undefined_'">
<div ng-switch-when="_undefined_"></div>
<div ng-switch-default ng-switch="asset.has_murano">
<a ng-switch-when="false" ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Unsupported</a>
<div ng-switch-when="true" ng-switch="asset.installed || '_undefined_'">
<a ng-switch-default ng-class="[extraclasses, installclasses] class="btn btn-default ajax-modal" href="{$ WEBROOT $}app-catalog/packages/import_bundle?name={$ asset.service.murano_package_name | encodeURIComponent $}&import_type=by_repo">Install</a>
<a ng-switch-when="true" ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Installed</a>
</div>
</div>
</div>
<div ng-switch-default>
<a ng-switch-when="false" ng-class="extraclasses" class="btn btn-default disabled ajax-modal" href="/">Unsupported</a>
</div>
</div>
</div>

View File

@ -1,583 +0,0 @@
/*
* Copyright 2015 IBM Corp.
* Copyright 2015 Kevin Fox.
*
* 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('horizon.dashboard.project.app_catalog', [])
.filter('encodeURIComponent', function() {
return window.encodeURIComponent;
}).directive('appAction', function () {
return {
restrict: 'EA',
templateUrl: STATIC_URL + 'dashboard/project/app_catalog/action.html'
};
}).directive('appCatalogMagicSearch', [
'horizon.framework.widgets.basePath',
appCatalogMagicSearchBar
]).controller('appCatalogTableCtrl', [
'$scope',
'$http',
'$timeout',
'$modal',
'horizon.framework.widgets.toast.service',
'appCatalogModel',
appCatalogTableCtrl
]).controller('appComponentCatalogTableCtrl', [
'$scope',
'$http',
'$timeout',
'$modal',
'horizon.framework.widgets.toast.service',
'appCatalogModel',
appComponentCatalogTableCtrl
]).service('appCatalogModel', [
'$http',
'$injector',
'horizon.app.core.openstack-service-api.heat',
'horizon.app.core.openstack-service-api.glance',
'horizon.app.core.openstack-service-api.serviceCatalog',
appCatalogModel
]).directive('stars', stars);
function appCatalogModel($http, $injector, heatAPI, glanceAPI, serviceCatalog) {
var $scope = this;
var callbacks = {
update: [],
error: [],
deprecated: [],
retired: []
};
this.assets = [];
this.assets_filtered = [];
//FIXME reduce duplication here....
this.supported_service_type_to_label = {
heat: 'Orchestration',
glance: 'Images',
murano: 'Murano'
};
this.service_filters = [
{id:'heat', name:'Orchestration'},
{id:'glance', name: 'Images'},
{id:'murano', name: 'Murano'}
];
this.service_filters_selections = {
'heat':false,
'glance':false,
'murano':false
};
var notifyUpdate = function() {
angular.forEach(callbacks.update, function(callback) {
callback();
});
};
var notifyError = function(message) {
angular.forEach(callbacks.error, function(callback) {
callback(message);
});
};
var notifyDeprecated = function(message) {
angular.forEach(callbacks.deprecated, function(callback) {
callback(message);
});
};
var notifyRetired = function() {
angular.forEach(callbacks.retired, function(callback) {
callback();
});
};
var muranoAPI;
$scope.has_murano = false;
$scope.selected_facets = [];
$scope.selected_text = "";
if ($injector.has('horizon.app.core.openstack-service-api.murano')) {
muranoAPI = $injector.get('horizon.app.core.openstack-service-api.murano');
$scope.has_murano = true;
}
//FIXME [{'name':'heat', 'type':'orchestration'}, {'name':'glance', 'type':'image'}]
serviceCatalog.get().then(function(catalog) {
angular.forEach(catalog, function(entry) {
if (entry.name in $scope.supported_service_type_to_label) {
$scope.service_filters_selections[entry.name] = true;
}
});
$scope.catalog = catalog;
$scope.update_assets_filtered();
});
this.update_assets_filtered = function() {
//FIXME this is not ideal...
var textSearchableFields = [
['name'],
['provided_by', 'name'],
['provided_by', 'company'],
['supported_by', 'name'],
['description'],
['license'],
['service', 'type'],
['service', 'container_format'],
['service', 'disk_format'],
['service', 'package_name'],
['service', 'murano_package_name']
];
$scope.assets_filtered.length = 0;
angular.forEach($scope.assets, function(asset) {
if ($scope.service_filters_selections[asset.service.type] == true ||
asset.service.type == 'bundle') {
var filteredOut = false;
angular.forEach(asset.depends, function(dep) {
if ($scope.service_filters_selections[dep.asset.service.type] == false) {
filteredOut = true;
}
});
if ($scope.selected_facets.length != 0) {
angular.forEach($scope.selected_facets, function(filter) {
var val = filter[0].split('.').reduce(function(obj,i) {return obj[i];}, asset);
if (val.toLowerCase().indexOf(filter[1].toLowerCase()) == -1) {
filteredOut = true;
}
});
}
if ($scope.selected_text != '') {
var found = false;
angular.forEach(textSearchableFields, function(field) {
try {
var val = field.reduce(function(obj,i) {return obj[i];}, asset);
if (val.toLowerCase().indexOf($scope.selected_text.toLowerCase()) != -1) {
found = true;
}
} catch (e) {}
});
if (!found) {
filteredOut = true;
}
}
if (!filteredOut) {
$scope.assets_filtered.push(asset);
}
}
});
var types = {};
angular.forEach($scope.assets_filtered, function(asset) {
types[asset.service.type] = true;
});
//FIXME dedup some of this later.
var map = {'heat': 'Orchestration', 'glance': 'Images'};
var options = [];
angular.forEach(types, function(type) {
if (type in map) {
options.push({'key':type, 'label':map[type]});
}
});
angular.forEach($scope.asset_filter_facets, function(facet) {
if (facet.name == 'service.type') {
//FIXME Doesn't seem to work currently
// facet['options'] = options;
}
});
notifyUpdate();
};
this.toggle_service_filter = function(serviceName) {
var value = $scope.service_filters_selections[serviceName];
if (value) {
value = false;
} else {
value = true;
}
$scope.service_filters_selections[serviceName] = value;
$scope.update_assets_filtered();
};
this.register_callback = function(type, callback) {
callbacks[type].push(callback);
};
var semver_compare = function(a, b) {
var v = a[0] - b[0]
if (v === 0) {
v = a[1] - b[1];
if (v === 0) {
v = a[2] - b[2];
}
}
return v;
};
$scope.eversion_check = function(asset, version) {
if (!( 'ever' in asset.service)) {
return true;
}
var matched = false;
angular.forEach(asset.service.ever, function(ever) {
var has_min = 'min' in ever;
var has_max = 'max' in ever;
if(has_max && has_min) {
if (semver_compare(ever.min, version) <= 0 &&
semver_compare(version, ever.max) <= 0) {
matched = true;
}
} else if (has_max) {
if (semver_compare(version, ever.max) <= 0) {
matched = true;
}
} else if (has_min) {
if (semver_compare(ever.min, version) <= 0) {
matched = true;
}
}
});
return matched;
};
this.init = function(appCatalogSettings) {
//FIXME move this to a test file.
// test_evars($scope);
var tver = appCatalogSettings.APP_CATALOG_VERSION.VER;
var defaultVersion = [2015, 2, 0]; //Mitaka
if (tver.indexOf('8.') === 0) {
defaultVersion = [2015,1,0]; //Liberty
}
var appCatalogUrl = appCatalogSettings.APP_CATALOG_URL;
$scope.heat_release = appCatalogSettings.HEAT_VERSION.REL;
$scope.heat_version = appCatalogSettings.HEAT_VERSION.VER;
if($scope.heat_version) {
$scope.heat_version = $scope.heat_version.split('.', 3).map(Number);
} else {
$scope.heat_version = defaultVersion;
}
$scope.murano_release = appCatalogSettings.MURANO_VERSION.REL;
$scope.murano_version = appCatalogSettings.MURANO_VERSION.VER;
if($scope.murano_version) {
$scope.murano_version = $scope.murano_version.split('.', 3).map(Number);
} else {
$scope.murano_version = defaultVersion;
}
var req = {
url: appCatalogUrl + '/api/v1/assets',
headers: {
'X-Requested-With': undefined,
'X-App-Catalog-Versions': [
appCatalogSettings.HORIZON_VERSION.VER,
appCatalogSettings.HORIZON_VERSION.REL,
appCatalogSettings.APP_CATALOG_VERSION.VER,
appCatalogSettings.APP_CATALOG_VERSION.REL
].join(' ')
}
};
$http(req).success(function(data) {
if ('deprecated' in data) {
notifyDeprecated(data.deprecated);
}
if ('retired' in data) {
notifyRetired();
}
var process = function(asset) {
var url = asset.attributes.url;
var args = {'template_url': url};
if ($scope.eversion_check(asset, $scope.heat_version) != true) {
asset.disabled = true;
notifyUpdate();
return;
}
if ('environment' in asset.service ) {
args['environment'] = asset.service.environment;
}
heatAPI.validate(args, true).success(function(data) {
asset.validated = true;
notifyUpdate();
}).error(function(data, status) {
var str = 'ERROR: Could not retrieve template:';
asset.disabled = true;
asset.validated = 'unsupported';
if (status == 400 && data.slice(0, str.length) == str) {
asset.validated = 'error';
}
notifyUpdate();
});
};
angular.forEach(data.assets, function(asset) {
$scope.assets.push(asset);
if ('version' in asset.service && asset.service.version > 1) {
asset.disabled = true;
} else if (asset.service.type == 'heat') {
process(asset);
} else if (asset.service.type == 'murano') {
asset.validated = true;
asset.disabled = !$scope.has_murano;
if ($scope.eversion_check(asset, $scope.murano_version) != true) {
asset.disabled = true;
}
} else if (asset.service.type != 'glance' && asset.service.type != 'bundle') {
asset.disabled = true;
}
asset.has_murano = $scope.has_murano;
});
$scope.glance_loaded = true;
$scope.murano_loaded = true;
updateFoundAssets($scope);
}).error(function() {
notifyError('There was an error while retrieving entries from the Application Catalog.');
});
if ($scope.has_murano) {
muranoAPI.getPackages().success(function(data) {
$scope.murano_packages = data;
var muranoPackageDefinitions = {};
angular.forEach(data.packages, function(pkg) {
angular.forEach(pkg.class_definitions, function(definition) {
muranoPackageDefinitions[definition] = {'id': pkg.id};
});
});
$scope.murano_package_definitions = muranoPackageDefinitions;
updateFoundAssets($scope);
});
}
glanceAPI.getImages().success(function(data) {
$scope.glance_images = data;
var glanceNames = {};
angular.forEach(data.items, function(item) {
glanceNames[item.name] = {'id': item.id};
});
$scope.glance_names = glanceNames;
updateFoundAssets($scope);
});
};
this.update_selected_facets = function(selectedFacets) {
$scope.selected_facets.length = 0;
if (selectedFacets != undefined) {
angular.forEach(selectedFacets, function(facet) {
$scope.selected_facets.push(facet);
});
}
$scope.update_assets_filtered();
};
this.update_selected_text = function(selectedText) {
$scope.selected_text = selectedText;
$scope.update_assets_filtered();
};
this.asset_filter_strings = {
cancel: gettext('Cancel'),
prompt: gettext('Search'),
remove: gettext('Remove'),
text: gettext('Text')
};
this.asset_filter_facets = [
{
name: 'name',
label: gettext('Name'),
singleton: true
},
{
name: 'license',
label: gettext('License'),
singleton: true
},
{
name: 'service.type',
label: gettext('Service Type'),
//FIXME make dynamic later.
options: [
{key: 'heat', label: 'Orchestration'},
{key: 'glance', label: 'Images'},
{key: 'murano', label: 'Murano'}
],
singleton: true
}];
}
function commonInit($scope, $modal, toast, appCatalogModel) {
$scope.WEBROOT = WEBROOT;
$scope.STATIC_URL = STATIC_URL;
$scope.toggle_service_filter = appCatalogModel.toggle_service_filter;
$scope.service_filters = appCatalogModel.service_filters;
$scope.service_filters_selections = appCatalogModel.service_filters_selections;
$scope.asset_filter_strings = appCatalogModel.asset_filter_strings;
$scope.asset_filter_facets = appCatalogModel.asset_filter_facets;
$scope.init = appCatalogModel.init;
var retired = function() {
var newscope = $scope.$new();
var modal = $modal.open({
templateUrl: STATIC_URL + "dashboard/project/app_catalog/retired_panel.html",
scope: newscope
});
newscope.cancel = function() {
modal.dismiss('');
};
};
var error = function(message) {
toast.add('error', message);
};
var deprecated = function(message) {
toast.add('warning', message);
};
appCatalogModel.register_callback('error', error);
appCatalogModel.register_callback('deprecated', deprecated);
appCatalogModel.register_callback('retired', retired);
//FIXME probably belongs in its own directive...
var textSearchWatcher = $scope.$on('textSearch', function(event, text) {
appCatalogModel.update_selected_text(text);
});
var textSearchWatcher2 = $scope.$on('searchUpdated', function(event, query) {
var selectedFacets;
if (query != '') {
selectedFacets = query.split('&');
for (var i = 0; i < selectedFacets.length; i++) {
var s = selectedFacets[i];
var idx = s.indexOf('=');
selectedFacets[i] = [s.slice(0, idx), s.slice(idx + 1)];
}
}
appCatalogModel.update_selected_facets(selectedFacets);
});
}
function appCatalogMagicSearchBar(basePath) {
var directive = {
compile: function (element, attrs) {
/**
* Need to set template here since MagicSearch template
* attribute is not interpolated. Can't hardcode the
* template location and need to use basePath.
*/
var templateUrl = basePath + 'magic-search/magic-search.html';
element.find('magic-search').attr('template', templateUrl);
element.addClass('hz-magic-search-bar');
},
restrict: 'E',
templateUrl: STATIC_URL + "dashboard/project/app_catalog/magic_search.html"
};
return directive;
}
function appCatalogTableCtrl($scope, $http, $timeout, $modal, toast, appCatalogModel) {
$scope.assets = [];
var update = function() {
$scope.assets = [];
angular.forEach(appCatalogModel.assets_filtered, function(asset) {
if (typeof asset.tags !== "undefined" && asset.tags.indexOf('app') > -1) {
$scope.assets.push(asset);
}
});
};
appCatalogModel.register_callback('update', update);
commonInit($scope, $modal, toast, appCatalogModel);
$scope.switcher = {pannel: 'app', active: 'grid'};
$scope.changeActivePanel = function(name) {
$scope.switcher.active = name;
};
$scope.details = function(asset) {
var newscope = $scope.$new();
newscope.asset = asset;
var modal = $modal.open({
templateUrl: STATIC_URL + "dashboard/project/app_catalog/details_panel.html",
scope: newscope
});
newscope.cancel = function() {
modal.dismiss('');
};
};
}
function appComponentCatalogTableCtrl($scope, $http, $timeout, $modal, toast, appCatalogModel) {
$scope.assets = appCatalogModel.assets_filtered;
var update = function() {
$timeout(function() {
$scope.assets = appCatalogModel.assets_filtered;
}, 0, false);
};
appCatalogModel.register_callback('update', update);
commonInit($scope, $modal, toast, appCatalogModel);
$scope.switcher = {pannel: 'component', active: 'list'};
}
function updateFoundAssets($scope) {
var i;
if ('glance_loaded' in $scope && 'glance_names' in $scope) {
for (i in $scope.assets) {
if ($scope.assets[i].service.type != 'glance') {
continue;
}
var name = $scope.assets[i].name;
var isInstalled = name in $scope.glance_names;
$scope.assets[i].installed = isInstalled;
if (isInstalled) {
$scope.assets[i].installed_id = $scope.glance_names[name].id;
}
}
}
if ('murano_loaded' in $scope && 'murano_package_definitions' in $scope) {
for (i in $scope.assets) {
if ($scope.assets[i].service.type != 'murano') {
continue;
}
var definition = $scope.assets[i].service.package_name;
var isInstalled = definition in ($scope.murano_package_definitions);
$scope.assets[i].installed = isInstalled;
if (isInstalled) {
$scope.assets[i].service.murano_id = $scope.murano_package_definitions[definition].id;
}
}
}
var assetNameToAsset = {};
angular.forEach($scope.assets, function(asset) {
assetNameToAsset[asset.name] = asset;
});
angular.forEach($scope.assets, function(asset) {
asset.disabled = false;
if ('depends' in asset) {
angular.forEach(asset.depends, function(dep) {
dep.asset = assetNameToAsset[dep.name];
if('disabled' in asset && dep.asset.disabled) {
asset.disabled = true;
}
});
}
});
$scope.update_assets_filtered();
}
function stars() {
var star = angular.element('<i>');
star.addClass('fa fa-star');
star.css({ color: 'goldenrod' });
return {
restrict: 'E',
scope: { value: '=' },
link: function(scope, element) {
for (var i = 0; i < scope.value; i++) {
element.append(star.clone());
}
}
};
}
/*FIXME move out to testing file.*/
function test_evars($scope) {
var assert = function(t, a, b) {
if (!t) {
console.log("Failed", a, b);
}
}
assert($scope.eversion_check({service:{}}, [2014,1,1]), [], [2014,1,1]);
assert($scope.eversion_check({service:{ever:[{min:[2014,1,1]}]}}, [2014,1,1]), [2014,1,1], [2014,1,1]);
assert($scope.eversion_check({service:{ever:[{max:[2014,1,1]}]}}, [2014,1,1]), [2014,1,1], [2014,1,1]);
assert(!$scope.eversion_check({service:{ever:[{max:[2014,1,1]}]}}, [2015,1,1]), [2014,1,1], [2015,1,1]);
assert($scope.eversion_check({service:{ever:[{max:[2014,1,1]}]}}, [2013,1,1]), [2014,1,1], [2013,1,1]);
assert(!$scope.eversion_check({service:{ever:[{min:[2016,1,1]}]}}, [2015,1,1]), [2016,1,1], [2015,1,1]);
assert($scope.eversion_check({service:{ever:[{min:[2013,1,1]}]}}, [2014,1,1]), [2013,1,1], [2014,1,1]);
assert($scope.eversion_check({service:{ever:[{min:[2013,1,1],max:[2015,1,1]}]}}, [2014,1,1]), [2013,2015], [2014,1,1]);
assert(!$scope.eversion_check({service:{ever:[{min:[2013,1,1],max:[2015,1,1]}]}}, [2011,1,1]), [2013,2015], [2011,1,1]);
assert(!$scope.eversion_check({service:{ever:[{min:[2013,1,1],max:[2015,1,1]}]}}, [2016,1,1]), [2013,2015], [2016,1,1]);
}
})();

View File

@ -1,11 +0,0 @@
.app_catalog_grid_item_hidden {
height: 172px;
width: 182px;
margin: -170px 0px 0px -10px;
opacity: 1;
overflow: hidden;
display: block;
position: relative;
background: rgba(0, 0, 0, .25);
z-index: 100;
}

View File

@ -1,11 +0,0 @@
<div>
<div class="modal-header">
<h3 class="modal-title">Details</h3>
</div>
<div class="modal-body">
<ng-include src="STATIC_URL + 'dashboard/project/app_catalog/_details_panel.html'" onload="appaction=true"></ng-include>
</div>
<div class="modal-footer">
<button class="btn btn-default" ng-click="cancel()">Close</button>
</div>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,12 +0,0 @@
<div class="magic-search-bar">
<div class="input-group input-group-sm">
<span class="input-group-addon">
<span class="fa fa-search"></span>
</span>
<magic-search
template="/static/framework/widgets/magic-search/magic-search.html"
strings="asset_filter_strings"
facets="{$ asset_filter_facets $}">
</magic-search>
</div>
</div>

View File

@ -1,151 +0,0 @@
<div style="margin-bottom: 4px;">
Service Types:
<label ng-repeat="service in service_filters">
<input
type="checkbox"
name="selected_filters[]"
value="{$ service.id $}"
ng-checked="service_filters_selections[service.id]"
ng-click="toggle_service_filter(service.id)"
> {$ service.name $}
</label>
<span ng-switch="switcher.pannel" style="float:right">
<span ng-switch-when="app" style="float: right" class="toggleView btn-group">
<img class="btn btn-default" ng-class="{active: (switcher.active == 'grid')}" ng-src="{$ STATIC_URL $}dashboard/project/app_catalog/1439233859_grid.png" ng-click="changeActivePanel('grid')"/>
<img class="btn btn-default" ng-class="{active: (switcher.active == 'list')}" ng-src="{$ STATIC_URL $}dashboard/project/app_catalog/1439233889_list.png" ng-click="changeActivePanel('list')"/>
</span>
</span>
</div>
<div ng-switch="switcher.active">
<app-catalog-magic-search></app-catalog-magic-search>
<div ng-switch-when="grid" style="
background-color:#f9f9f9;
overflow: auto;
border-color:#cccccc; border-width:1px; border-style: solid;
">
<div ng-repeat="asset in assets | orderBy:'name':false" style="border:1px;
margin: 10px;
width: 200px; height: 180px; float: left;
">
<div ng-click="details(asset)" style="
margin:10px;
border-color:#cccccc; border-width:1px;
border-radius: 2px;
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
padding:8px;
height: 170px;
overflow: hidden;
background-color:#ffffff;
position: relative;
">
<div style="">
<div style="
width:128px;
height:128px;
overflow: hidden;
margin-left: auto; margin-right:auto;
">
<img style="
margin: {$ asset.icon.top $}px 0px 0px {$ asset.icon.left $}px;
height: {$ asset.icon.height $}px;
" src="{$ asset.icon.url $}">
</div>
<!--FIXME Move images out to common repo.-->
<span style="
max-height: 100%;
width: 23px;
height: 23px;
top: 0;
right: 0;
position: absolute;
background: rgba(0, 0, 0, 0) url('{$ STATIC_URL $}dashboard/project/app_catalog/featured-corner-{$ asset.service.type $}.png') no-repeat scroll right top;
">
</span>
</div>
<div title="{$ asset.name $}" style="
overflow: hidden;
white-space: nowrap;
position: relative;
line-height: 18px;
font-size: 16px;
"> {$ asset.name $}
<span style="
max-height: 100%;
width: 40px;
height: 20px;
bottom: 0;
right: 0;
position: absolute;
background: rgba(0, 0, 0, 0) linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)) repeat scroll 0 0;
">
</span>
</div>
<div title="{$ asset.provided_by.name $}" style="
overflow: hidden;
white-space: nowrap;
position: relative;
line-height: 14px;
font-size: 12px;
"> {$ asset.provided_by.name $}
<span style="
max-height: 100%;
width: 40px;
height: 20px;
bottom: 0;
right: 0;
position: absolute;
background: rgba(0, 0, 0, 0) linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)) repeat scroll 0 0;
">
</span>
</div>
<div ng-switch="asset.disabled">
<div ng-switch-when="true" class="app_catalog_grid_item_hidden"></div>
</div>
</div>
</div>
</div>
<div ng-switch-when="list">
<table hz-table ng-cloak st-table="dispassets" st-safe-src="assets"
class="table-striped table-rsp table-detail modern">
<thead>
<tr>
<th class="expander"></th>
<th st-sort="name" st-sort-default="true" class="rsp-p1">Name</th>
<th st-sort='license' class="rsp-p1">License</th>
<th class="rsp-p1"></th>
</tr>
</thead>
<tbody>
<tr ng-repeat-start="asset in dispassets track by asset.name">
<td class="expander">
<i class="fa fa-chevron-right" hz-expand-detail duration="200"></i>
</td>
<td class="rsp-p1">{$ asset.name $}</td>
<td class="rsp-p2">{$ asset.license $}</td>
<td class="rsp-p2"><div app-action ng-scope ng-init="extraclasses='btn-sm';installclasses='btn-primary';launchclasses='btn-success'"></div></td>
</tr>
<tr ng-repeat-end class="detail-row">
<td class="detail" colspan="4">
<ng-include src="STATIC_URL + 'dashboard/project/app_catalog/_details_panel.html'"></ng-include>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5" class="text-center">
<div st-pagination="" st-items-by-page="itemsByPage" st-displayed-pages="7"></div>
</td>
</tr>
</tfoot>
</table>
</div>
</div>

View File

@ -1,11 +0,0 @@
<div>
<div class="modal-header">
<h3 class="modal-title">Retired</h3>
</div>
<div class="modal-body">
The OpenStack App Catalog no longer supports this version of the Horizon plugin. Please contact your Cloud Administrator for an upgraded version.
</div>
<div class="modal-footer">
<button class="btn btn-default" ng-click="cancel()">Close</button>
</div>
</div>

View File

@ -1,16 +0,0 @@
{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "Application Catalog" %}{% endblock %}
{% block page_header %}
{% include "horizon/common/_page_header.html" with title=_("Application Catalog") %}
{% endblock page_header %}
{% block main %}
<div ng-cloak
ng-controller="appCatalogTableCtrl" ng-init='init({{ APP_CATALOG_SETTINGS }})'>
<ng-include src="'{{ STATIC_URL }}dashboard/project/app_catalog/main_panel.html'"></ng-include>
</div>
{% endblock %}

View File

@ -1,16 +0,0 @@
{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "Component Catalog" %}{% endblock %}
{% block page_header %}
{% include "horizon/common/_page_header.html" with title=_("Component Catalog ") %}
{% endblock page_header %}
{% block main %}
<div ng-cloak
ng-controller="appComponentCatalogTableCtrl" ng-init="init({{ APP_CATALOG_SETTINGS }})">
<ng-include src="'{{ STATIC_URL }}dashboard/project/app_catalog/main_panel.html'"></ng-include>
</div>
{% endblock %}

View File

@ -1,7 +0,0 @@
from horizon.test import helpers as test
class FivecircleTests(test.TestCase):
# Unit tests for AppCatalog.
def test_me(self):
self.assertTrue(1 + 1 == 2)

View File

@ -1,23 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2010-2011 OpenStack Foundation
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslotest import base
class TestCase(base.BaseTestCase):
"""Test case base class for all unit tests."""

View File

@ -1,79 +0,0 @@
#
# Configuration filed based on Tempest's tempest.conf.sample
#
[dashboard]
# Where the dashboard can be found (string value)
dashboard_url=http://localhost/dashboard/
# Login page for the dashboard (string value)
login_url=http://localhost/dashboard/auth/login/
# Dashboard help page url (string value)
help_url=http://docs.openstack.org/
[selenium]
# Timeout in seconds to wait for a page to become available
# (integer value)
page_timeout=30
# Output directory for screenshots.
# (string value)
screenshots_directory=integration_tests_screenshots
# Implicit timeout to wait until element become available,
# this timeout is used for every find_element, find_elements call.
# (integer value)
implicit_wait=10
# Explicit timeout is used for long lasting operations,
# methods using explicit timeout are usually prefixed with 'wait',
# those methods ignore implicit_wait when looking up web elements.
# (integer value)
explicit_wait=300
[image]
# http accessible image (string value)
http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
[identity]
# Username to use for non-admin API requests. (string value)
username=demo
# API key to use when authenticating. (string value)
password=secretadmin
# Administrative Username to use for admin API requests.
# (string value)
admin_username=admin
# API key to use when authenticating as admin. (string value)
admin_password=secretadmin
[scenario]
# ssh username for image file (string value)
ssh_user=cirros
[launch_instances]
#available zone to launch instances
available_zone=nova
#image_name to launch instances
image_name=cirros-0.3.4-x86_64-uec (24.0 MB)
[plugin]
is_plugin=True
plugin_page_path=app_catalog.tests.integration_tests.pages
plugin_page_structure={
"Project":
{
"Catalog":
{
"_":
[
"Applications",
"Components"
]
}
}
}

View File

@ -1,20 +0,0 @@
# 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 openstack_dashboard.test.integration_tests.pages import basepage
class ApplicationsPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(ApplicationsPage, self).__init__(driver, conf)
self._page_title = "Application Catalog"

View File

@ -1,20 +0,0 @@
# 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 openstack_dashboard.test.integration_tests.pages import basepage
class ComponentsPage(basepage.BaseNavigationPage):
def __init__(self, driver, conf):
super(ComponentsPage, self).__init__(driver, conf)
self._page_title = "Components Catalog"

View File

@ -1,27 +0,0 @@
# 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 openstack_dashboard.test.integration_tests import helpers
class TestApplications(helpers.TestCase):
def setUp(self):
super(TestApplications, self).setUp()
self.home_pg.go_to_catalog_applicationspage()
def test_applications(self):
self._save_screenshot(None)
# TODO(markvan): Place holder for tests
def tearDown(self):
super(TestApplications, self).tearDown()

View File

@ -1,27 +0,0 @@
# 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 openstack_dashboard.test.integration_tests import helpers
class TestComponents(helpers.TestCase):
def setUp(self):
super(TestComponents, self).setUp()
self.home_pg.go_to_catalog_componentspage()
def test_components(self):
self._save_screenshot(None)
# TODO(markvan): Place holder for tests
def tearDown(self):
super(TestComponents, self).tearDown()

View File

@ -1,188 +0,0 @@
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import importlib
import os
import six
from horizon.test.settings import * # noqa
from horizon.utils import secret_key
from openstack_dashboard import exceptions
DEBUG = True
TEMPLATE_DEBUG = DEBUG
TEST_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_PATH = os.path.abspath(os.path.join(TEST_DIR, ".."))
MEDIA_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'media'))
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'static'))
STATIC_URL = '/static/'
SECRET_KEY = secret_key.generate_or_read_from_file(
os.path.join(TEST_DIR, '.secret_key_store'))
ROOT_URLCONF = 'app_catalog.tests.urls'
TEMPLATE_DIRS = (
os.path.join(TEST_DIR, 'templates'),
)
TEMPLATE_CONTEXT_PROCESSORS += (
'openstack_dashboard.context_processors.openstack',
)
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.staticfiles',
'django.contrib.messages',
'django.contrib.humanize',
'django_nose',
'openstack_auth',
'compressor',
'horizon',
'openstack_dashboard',
'openstack_dashboard.dashboards',
)
AUTHENTICATION_BACKENDS = ('openstack_auth.backend.KeystoneBackend',)
SITE_BRANDING = 'OpenStack'
HORIZON_CONFIG = {
"password_validator": {
"regex": '^.{8,18}$',
"help_text": "Password must be between 8 and 18 characters."
},
'user_home': None,
'help_url': "http://docs.openstack.org",
'exceptions': {'recoverable': exceptions.RECOVERABLE,
'not_found': exceptions.NOT_FOUND,
'unauthorized': exceptions.UNAUTHORIZED},
'angular_modules': [],
'js_files': [],
}
# Load the pluggable dashboard settings
from openstack_dashboard.utils import settings
dashboard_module_names = [
'openstack_dashboard.enabled',
'openstack_dashboard.local.enabled',
'app_catalog.enabled',
]
dashboard_modules = []
# All dashboards must be enabled for the namespace to get registered, which is
# needed by the unit tests.
for module_name in dashboard_module_names:
module = importlib.import_module(module_name)
dashboard_modules.append(module)
for submodule in six.itervalues(settings.import_submodules(module)):
if getattr(submodule, 'DISABLED', None):
delattr(submodule, 'DISABLED')
INSTALLED_APPS = list(INSTALLED_APPS) # Make sure it's mutable
settings.update_dashboards(dashboard_modules, HORIZON_CONFIG, INSTALLED_APPS)
# Set to True to allow users to upload images to glance via Horizon server.
# When enabled, a file form field will appear on the create image form.
# See documentation for deployment considerations.
HORIZON_IMAGES_ALLOW_UPLOAD = True
AVAILABLE_REGIONS = [
('http://localhost:5000/v2.0', 'local'),
('http://remote:5000/v2.0', 'remote'),
]
OPENSTACK_API_VERSIONS = {
"identity": 3
}
OPENSTACK_KEYSTONE_URL = "http://localhost:5000/v2.0"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_"
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'test_domain'
OPENSTACK_KEYSTONE_BACKEND = {
'name': 'native',
'can_edit_user': True,
'can_edit_group': True,
'can_edit_project': True,
'can_edit_domain': True,
'can_edit_role': True
}
OPENSTACK_CINDER_FEATURES = {
'enable_backup': True,
}
OPENSTACK_NEUTRON_NETWORK = {
'enable_lb': False,
'enable_firewall': False,
'enable_vpn': False
}
OPENSTACK_HYPERVISOR_FEATURES = {
'can_set_mount_point': True,
# NOTE: as of Grizzly this is not yet supported in Nova so enabling this
# setting will not do anything useful
'can_encrypt_volumes': False
}
LOGGING['loggers']['openstack_dashboard'] = {
'handlers': ['test'],
'propagate': False,
}
LOGGING['loggers']['selenium'] = {
'handlers': ['test'],
'propagate': False,
}
LOGGING['loggers']['app_catalog_ui'] = {
'handlers': ['test'],
'propagate': False,
}
SECURITY_GROUP_RULES = {
'all_tcp': {
'name': 'ALL TCP',
'ip_protocol': 'tcp',
'from_port': '1',
'to_port': '65535',
},
'http': {
'name': 'HTTP',
'ip_protocol': 'tcp',
'from_port': '80',
'to_port': '80',
},
}
NOSE_ARGS = ['--nocapture',
'--nologcapture',
'--cover-package=openstack_dashboard',
'--cover-inclusive',
'--all-modules']
POLICY_FILES_PATH = os.path.join(ROOT_PATH, "conf")
POLICY_FILES = {
'identity': 'keystone_policy.json',
'compute': 'nova_policy.json'
}
# The openstack_auth.user.Token object isn't JSON-serializable ATM
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'

View File

@ -1,28 +0,0 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""
test_app_catalog_dashboard
----------------------------------
Tests for `app_catalog_dashboard` module.
"""
from app_catalog.tests import base
class TestApp_Catalog_dashboard(base.TestCase):
def test_something(self):
pass

View File

@ -1,20 +0,0 @@
#
# 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 import urls
import openstack_dashboard.urls
urlpatterns = urls.patterns(
'',
urls.url(r'', urls.include(openstack_dashboard.urls))
)

View File

@ -1,15 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import pbr.version
version_info = pbr.version.VersionInfo('app_catalog_ui')

View File

@ -1,18 +0,0 @@
=================================
Enabling App Catalog in Devstack
=================================
1. Download DevStack::
> git clone https://git.openstack.org/openstack-dev/devstack
> cd devstack
2. Add this repo as an external plugin repository::
cat >> local.conf <<EOF
[[local|localrc]]
enable_plugin app-catalog-ui https://github.com/openstack/app-catalog-ui
EOF
3. Run ``stack.sh``

View File

@ -1,54 +0,0 @@
# plugin.sh - DevStack plugin.sh dispatch script app-catalog-ui
function install_app-catalog-ui {
mv $APP_CAT_UI_DIR/test-requirements.txt $APP_CAT_UI_DIR/_test-requirements.txt
setup_develop $APP_CAT_UI_DIR
mv $APP_CAT_UI_DIR/_test-requirements.txt $APP_CAT_UI_DIR/test-requirements.txt
}
function configure_app-catalog-ui {
cp -a ${APP_CAT_UI_DIR}/app_catalog/enabled/* ${DEST}/horizon/openstack_dashboard/enabled/
}
# check for service enabled
if is_service_enabled app-catalog-ui; then
if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
# Set up system services
# no-op
:
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
# Perform installation of service source
echo_summary "Installing App Catalog UI"
install_app-catalog-ui
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured
echo_summary "Configuring App Catalog UI"
configure_app-catalog-ui
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize and start the app-catalog-ui service
# no-op
:
fi
if [[ "$1" == "unstack" ]]; then
# Shut down app-catalog-ui services
# no-op
:
fi
if [[ "$1" == "clean" ]]; then
# Remove state and transient data
# Remember clean.sh first calls unstack.sh
rm -f ${DEST}/horizon/openstack_dashboard/enabled/_50_dashboard_catalog.*
rm -f ${DEST}/horizon/openstack_dashboard/enabled/_51_app_catalog.*
rm -f ${DEST}/horizon/openstack_dashboard/enabled/_60_panel_group_browse.*
rm -f ${DEST}/horizon/openstack_dashboard/enabled/_61_app_catalog_panel.*
rm -f ${DEST}/horizon/openstack_dashboard/enabled/_62_project_component_catalog_panel.*
fi
fi

View File

@ -1,3 +0,0 @@
# settings file for app-catalog-ui plugin
APP_CAT_UI_DIR=$DEST/app-catalog-ui
enable_service app-catalog-ui

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

View File

@ -1,27 +0,0 @@
{
"version": "0.0.0",
"private": true,
"name": "app-catalog-ui",
"description": "Application Catalog Dashboard",
"repository": "none",
"license": "Apache 2.0",
"devDependencies": {
"eslint": "1.2.1",
"eslint-config-openstack": "1.2.3",
"eslint-plugin-angular": "0.15.0",
"jasmine-core": "2.2.0",
"karma": "0.12.31",
"karma-chrome-launcher": "0.1.8",
"karma-cli": "0.0.4",
"karma-coverage": "0.3.1",
"karma-jasmine": "0.3.5",
"karma-ng-html2js-preprocessor": "0.1.2",
"karma-phantomjs-launcher": "0.2.0",
"karma-threshold-reporter": "0.1.15",
"phantomjs": "1.9.17"
},
"scripts": {
"lint": "eslint --no-color app_catalog/static"
},
"dependencies": {}
}

View File

@ -1,280 +0,0 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# App Catalog UI Release Notes
# documentation build configuration file, created by
# sphinx-quickstart on Tue Nov 3 17:40:50 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'oslosphinx',
'reno.sphinxext',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'App Catalog UI Release Notes'
copyright = u'2015, App Catalog Developers'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
from app_catalog.version import version_info
# The full version, including alpha/beta/rc tags.
release = version_info.version_string_with_vcs()
# The short X.Y version.
version = version_info.canonical_version_string()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all
# documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
# html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
# If false, no module index is generated.
# html_domain_indices = True
# If false, no index is generated.
# html_use_index = True
# If true, the index is split into individual pages for each letter.
# html_split_index = False
# If true, links to the reST sources are added to the pages.
# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'AppCatalogUIReleaseNotesdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
# 'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'AppCatalogUIReleaseNotes.tex',
u'App Catalog UI Release Notes Documentation',
u'AppCatalogUI Developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False
# If true, show page references after internal links.
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
# latex_show_urls = False
# Documents to append as an appendix to all manuals.
# latex_appendices = []
# If false, no module index is generated.
# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'appcataloguireleasenotes',
u'App Catalog UI Release Notes Documentation',
[u'App Catalog UI Developers'], 1)
]
# If true, show URL addresses after external links.
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'AppCatalogUIReleaseNotes',
u'App Catalog UI Release Notes Documentation',
u'App Catalog Developers', 'AppCatalogUIReleaseNotes',
'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
# texinfo_appendices = []
# If false, no module index is generated.
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False
# -- Options for Internationalization output ------------------------------
locale_dirs = ['locale/']

View File

@ -1,8 +0,0 @@
==============================
App Catalog UI Release Notes
==============================
.. toctree::
:maxdepth: 1
unreleased

View File

@ -1,5 +0,0 @@
==============================
Current Series Release Notes
==============================
.. release-notes::

View File

@ -1,5 +0,0 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr<2.0,>=1.3

View File

@ -1,28 +0,0 @@
[metadata]
name = app-catalog-ui
description = 'OpenStack Application Catalog for the OpenStack Dashboard',
author = OpenStack Foundation
author_email = openstack-dev@lists.openstack.org
description-file = README.rst
classifier =
Development Status :: 4 - Beta
Environment :: OpenStack
Framework :: Django
Intended Audience :: Developers
Intended Audience :: System Administrators
Intended Audience :: Information Technology
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Topic :: Internet :: WWW/HTTP
[files]
packages =
app_catalog
[global]
setup-hooks =
pbr.hooks.setup_hook

View File

@ -1,21 +0,0 @@
#! /usr/bin/env python
#
# 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 setuptools import setup
setup(
setup_requires=['pbr>=1.3'],
pbr=True,
)

View File

@ -1,23 +0,0 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# Hacking already pins down pep8, pyflakes and flake8
hacking<0.11,>=0.10.0
http://tarballs.openstack.org/horizon/horizon-master.tar.gz#egg=horizon
coverage>=3.6
ddt>=1.0.1 # MIT
django-nose>=1.2
python-subunit>=0.0.18
nose-exclude # LGPL
selenium!=2.49,!=2.50 # Apache-2.0
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
reno>=0.1.1 # Apache2
testrepository>=0.0.18
testscenarios>=0.4
testtools>=1.4.0
# This also needs xvfb library installed on your OS
xvfbwrapper!=0.2.8,>=0.1.3 #license: MIT

View File

@ -1,5 +0,0 @@
#!/bin/bash
set -ex
export APP_CATALOG_SCREENSHOTS_DIR=/opt/stack/new/app-catalog-ui/.tox/py27integration/src/horizon/openstack_dashboard/test/integration_tests/integration_tests_screenshots

View File

@ -1,19 +0,0 @@
#!/bin/bash
# This script will be executed inside post_test_hook function in devstack gate
set -x
DIR=${BASH_SOURCE%/*}
source $DIR/commons $@
set +e
cd /opt/stack/new/app-catalog-ui
sudo -H -u stack tox -e py27integration
retval=$?
set -e
if [ -d ${APP_CATALOG_SCREENSHOTS_DIR}/ ]; then
cp -r ${APP_CATALOG_SCREENSHOTS_DIR}/ /home/jenkins/workspace/gate-app-catalog-ui-dsvm-integration/
fi
exit $retval

View File

@ -1,8 +0,0 @@
#!/bin/bash
# This script will be executed inside pre_test_hook function in devstack gate
set -ex
DIR=${BASH_SOURCE%/*}
source $DIR/commons $@

48
tox.ini
View File

@ -1,48 +0,0 @@
[tox]
minversion = 1.6
envlist = pep8,eslint
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
NOSE_WITH_OPENSTACK=1
NOSE_OPENSTACK_COLOR=1
NOSE_OPENSTACK_RED=0.05
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = /usr/bin/npm
/bin/bash
[testenv:pep8]
commands = flake8
[testenv:eslint]
# npm must be installed on the system, for example
# sudo apt-get install npm
commands = npm install
npm run lint
[testenv:py27integration]
basepython = python2.7
setenv =
INTEGRATION_TESTS=1
SELENIUM_HEADLESS=1
HORIZON_INTEGRATION_TESTS_CONFIG_FILE=app_catalog/tests/integration_tests/horizon.conf
DJANGO_SETTINGS_MODULE=app_catalog.tests.settings
commands = nosetests app_catalog/tests/integration_tests/tests {posargs}
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build