katello 3.3.0.rc1.1 → 3.3.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +8 -1
- data/app/controllers/katello/api/v2/content_views_controller.rb +30 -7
- data/app/controllers/katello/api/v2/host_contents_controller.rb +1 -0
- data/app/controllers/katello/products_controller.rb +9 -10
- data/app/controllers/katello/providers_controller.rb +3 -2
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +48 -24
- data/app/lib/actions/katello/repository/clear.rb +2 -1
- data/app/lib/actions/katello/repository/clone_docker_content.rb +13 -7
- data/app/lib/actions/katello/repository/clone_to_environment.rb +1 -1
- data/app/lib/actions/katello/repository/clone_to_version.rb +1 -1
- data/app/lib/katello/util/docker_manifest_clause_generator.rb +44 -0
- data/app/lib/katello/util/package_filter.rb +24 -5
- data/app/models/katello/concerns/content_facet_host_extensions.rb +3 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +0 -7
- data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -1
- data/app/models/katello/content_view_docker_filter.rb +37 -0
- data/app/models/katello/content_view_docker_filter_rule.rb +23 -0
- data/app/models/katello/content_view_filter.rb +17 -4
- data/app/models/katello/content_view_puppet_environment.rb +6 -0
- data/app/models/katello/content_view_puppet_module.rb +5 -0
- data/app/models/katello/docker_manifest.rb +1 -1
- data/app/models/katello/glue/pulp/repo.rb +1 -1
- data/app/models/katello/host/content_facet.rb +2 -0
- data/app/views/dashboard/_content_views_widget.html.erb +1 -1
- data/app/views/dashboard/_subscription_status_widget.html.erb +1 -1
- data/app/views/dashboard/_subscription_widget.html.erb +1 -1
- data/app/views/foreman/job_templates/install_errata.erb +1 -1
- data/app/views/foreman/unattended/kickstart-katello-atomic.erb +10 -1
- data/app/views/foreman/unattended/kickstart-katello.erb +1 -1
- data/app/views/katello/api/v2/content_facet/base.json.rabl +5 -0
- data/app/views/katello/api/v2/content_facet/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_filters/base.json.rabl +5 -0
- data/app/views/katello/api/v2/docker_tags/show.json.rabl +1 -1
- data/app/views/katello/api/v2/gpg_keys/show.json.rabl +2 -4
- data/app/views/katello/providers/redhat/_repos.html.erb +4 -0
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +12 -10
- data/db/migrate/20160924213020_change_katello_widget_names.rb +21 -0
- data/db/migrate/20161102194100_create_content_view_docker_filter_rules.rb +13 -0
- data/db/migrate/20161214151548_move_content_source_id_to_content_facets.rb +38 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +11 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-view.factory.js +9 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.controller.js +1 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +349 -221
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-deletion.controller.js +5 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-activation-keys.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-confirm.controller.js +8 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-content-hosts.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/content-view-deletion.html +12 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-activation-keys.html +3 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-confirm.html +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-content-hosts.html +67 -71
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-environments.html +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-available-content-views.controller.js +3 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-content-views-list.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +19 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +65 -63
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite.html +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-docker-repositories.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-file-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-ostree-repositories.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +8 -124
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-docker-repositories-list.controller.js +29 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-file-repositories-list.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-ostree-repositories-list.controller.js +29 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-promotion.controller.js +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-repositories-list.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-repositories.service.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +133 -25
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-errata-filter.controller.js +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-package-group-filter.controller.js +8 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/date-type-errata-filter.controller.js +6 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/edit-filter.controller.js +4 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/errata-filter-list.controller.js +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/errata-filter.controller.js +0 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-repositories.controller.js +11 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filters.controller.js +11 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/new-filter.controller.js +7 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/package-filter.controller.js +8 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/package-group-list-filter.controller.js +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/date-type-errata-filter.html +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/edit-filter.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter-details.html +16 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter.html +10 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-details.html +5 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-repositories.html +98 -104
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filters.html +12 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/new-filter.html +53 -62
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-filter-details.html +187 -179
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-filter.html +26 -35
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-group-filter-details.html +10 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-group-filter.html +8 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/views/content-view-history.html +9 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-names.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +15 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +8 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-names.html +28 -41
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-versions.html +31 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-modules.html +6 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-copy.html +18 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details-tasks.html +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +133 -160
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-docker-repositories.html +40 -64
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-file-repositories.html +78 -110
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +29 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-ostree-repositories.html +78 -110
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-promotion.html +1 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-publish.html +32 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-repositories.html +93 -123
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +71 -75
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/content-view-new.controller.js +2 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/views/content-view-new.html +16 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-components.html +3 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-docker.html +2 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html +39 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-file.html +2 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +2 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-package-groups.html +8 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-packages.html +2 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-puppet-modules.html +2 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-yum.html +2 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +60 -75
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html +50 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/docker-tag-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-environments.html +9 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-details.html +3 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-details.html +9 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +9 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +17 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-modules-details-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +8 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/tasks-table.directive.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-index.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html +35 -34
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/tasks.scss +0 -8
- data/lib/katello/engine.rb +7 -0
- data/lib/katello/plugin.rb +9 -8
- data/lib/katello/tasks/clean_published_repo_directories.rake +52 -0
- data/lib/katello/tasks/reimport.rake +2 -1
- data/lib/katello/tasks/upgrades/2.4/import_puppet_modules.rake +1 -0
- data/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake +1 -1
- data/lib/katello/version.rb +1 -1
- metadata +11 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-breadcrumb.html +0 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/package-group-filter.controller.js +0 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views-table-collapsed.html +0 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views-table-full.html +0 -46
@@ -21,7 +21,8 @@ angular.module('Bastion.content-views').controller('ContentViewCompositeContentV
|
|
21
21
|
'full_result': true
|
22
22
|
}, 'contentViewComponents');
|
23
23
|
|
24
|
-
|
24
|
+
nutupane.masterOnly = true;
|
25
|
+
$scope.table = nutupane.table;
|
25
26
|
|
26
27
|
$scope.saveContentViewComponent = function (contentViewComponent) {
|
27
28
|
var component = {
|
@@ -1,6 +1,12 @@
|
|
1
1
|
<span page-title ng-model="contentView">{{ 'Available Content Views for Composite Content View:' | translate }} {{ contentView.name }}</span>
|
2
2
|
|
3
|
-
<
|
3
|
+
<header data-block="sub-header">
|
4
|
+
<h3 translate>
|
5
|
+
Add Content Views to {{ contentView.name }}
|
6
|
+
</h3>
|
7
|
+
</header>
|
8
|
+
|
9
|
+
<div data-extend-template="layouts/partials/table.html">
|
4
10
|
<div data-block="messages">
|
5
11
|
<p bst-alert="info" ng-show="contentView.components.length === 0">
|
6
12
|
<span translate>
|
@@ -9,23 +15,21 @@
|
|
9
15
|
</p>
|
10
16
|
</div>
|
11
17
|
|
12
|
-
<div data-block="actions">
|
13
|
-
<button class="btn btn-primary
|
14
|
-
ng-disabled="
|
18
|
+
<div data-block="list-actions">
|
19
|
+
<button class="btn btn-primary"
|
20
|
+
ng-disabled="table.numSelected === 0"
|
15
21
|
ng-click="addContentViews()">
|
16
|
-
<i class="fa fa-plus"></i>
|
17
22
|
<span translate>Add Content Views</span>
|
18
23
|
</button>
|
19
24
|
</div>
|
20
25
|
|
21
|
-
<
|
22
|
-
|
23
|
-
|
24
|
-
placeholder="{{ 'Filter...' | translate }}"
|
25
|
-
ng-model="contentViewFilter"/>
|
26
|
-
</div>
|
26
|
+
<span data-block="no-rows-message" translate>
|
27
|
+
No Content Views available to add to {{ contentView.name }}. Create some non-composite Content Views first.
|
28
|
+
</span>
|
27
29
|
|
28
|
-
<span data-block="
|
30
|
+
<span data-block="no-search-results-message" translate>
|
31
|
+
No Content Views match the search.
|
32
|
+
</span>
|
29
33
|
|
30
34
|
<div data-block="table">
|
31
35
|
<table class="table table-bordered table-striped">
|
@@ -41,7 +45,7 @@
|
|
41
45
|
|
42
46
|
<tbody>
|
43
47
|
<tr bst-table-row
|
44
|
-
ng-repeat="componentContentView in
|
48
|
+
ng-repeat="componentContentView in table.rows"
|
45
49
|
row-select="componentContentView" ng-init="componentContentView.versionId='latest'">
|
46
50
|
<td bst-table-cell>{{ componentContentView.name }}</td>
|
47
51
|
<td bst-table-cell ng-init="availableVersions = getAvailableVersions(componentContentView)">
|
@@ -66,12 +70,12 @@
|
|
66
70
|
<td bst-table-cell>{{ componentContentView.description }}</td>
|
67
71
|
<td bst-table-cell>
|
68
72
|
<div>
|
69
|
-
<a ui-sref="content-
|
73
|
+
<a ui-sref="content-view.repositories.yum.list({contentViewId: componentContentView.id})" translate>
|
70
74
|
{{ componentContentView.repositories.length || 0 }} Repositories
|
71
75
|
</a>
|
72
76
|
</div>
|
73
77
|
<div>
|
74
|
-
<a ui-sref="content-
|
78
|
+
<a ui-sref="content-view.puppet-modules.list({contentViewId: componentContentView.id})" translate>
|
75
79
|
{{ componentContentView.puppet_modules.length || 0 }} Puppet Modules
|
76
80
|
</a>
|
77
81
|
</div>
|
@@ -1,86 +1,88 @@
|
|
1
1
|
<span page-title ng-model="contentView">{{ 'Content Views for Composite Content View:' | translate }} {{ contentView.name }}</span>
|
2
2
|
|
3
|
-
<
|
4
|
-
<
|
3
|
+
<header data-block="sub-header">
|
4
|
+
<h3 translate>
|
5
|
+
Content Views for {{ contentView.name }}
|
6
|
+
</h3>
|
7
|
+
</header>
|
5
8
|
|
6
|
-
|
7
|
-
|
9
|
+
<div data-extend-template="layouts/partials/table.html">
|
10
|
+
<div data-block="list-actions">
|
11
|
+
<button class="btn btn-default fr"
|
8
12
|
ng-hide="denied('edit_content_views', contentView)"
|
9
|
-
ng-disabled="
|
13
|
+
ng-disabled="table.numSelected === 0"
|
10
14
|
ng-click="removeContentViewComponents()">
|
11
|
-
<i class="fa fa-trash-o"></i>
|
12
15
|
<span translate>Remove Content Views</span>
|
13
16
|
</button>
|
14
17
|
</div>
|
15
18
|
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
placeholder="{{ 'Filter...' | translate }}"
|
20
|
-
ng-model="componentContentViewFilter"/>
|
21
|
-
</div>
|
19
|
+
<span data-block="no-rows-message" translate>
|
20
|
+
No Content Views belong to {{ contentView.name }}. Use the add tab to add Content Views.
|
21
|
+
</span>
|
22
22
|
|
23
|
-
<span data-block="
|
23
|
+
<span data-block="no-search-results-message" translate>
|
24
|
+
No Content Views match the search.
|
25
|
+
</span>
|
24
26
|
|
25
27
|
<div data-block="table">
|
26
28
|
<table class="table table-bordered table-striped">
|
27
29
|
<thead>
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
<tr bst-table-head row-select>
|
31
|
+
<th bst-table-column translate>Name</th>
|
32
|
+
<th bst-table-column translate>Version</th>
|
33
|
+
<th bst-table-column translate>Environment</th>
|
34
|
+
<th bst-table-column translate>Description</th>
|
35
|
+
<th bst-table-column translate>Content</th>
|
36
|
+
</tr>
|
35
37
|
</thead>
|
36
38
|
|
37
39
|
<tbody>
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
40
|
+
<tr bst-table-row ng-repeat="contentViewComponent in table.rows" row-select="contentViewComponent">
|
41
|
+
<td bst-table-cell>{{ contentViewComponent.content_view.name }}</td>
|
42
|
+
<td bst-table-cell ng-init="contentViewComponent.versionId = getVersionId(contentViewComponent)">
|
43
|
+
<span bst-edit-select="contentViewComponent.versionId"
|
44
|
+
display-value="getVersionString(contentViewComponent)"
|
45
|
+
display-value-default="getVersionString(contentViewComponent)"
|
46
|
+
readonly="denied('edit_content_views', contentView)"
|
47
|
+
selector="contentViewComponent.versionId"
|
48
|
+
options="getAvailableVersions(contentViewComponent.content_view)"
|
49
|
+
options-format="option.id as option.version for option in options"
|
50
|
+
on-save="saveContentViewComponent(contentViewComponent)"
|
51
|
+
ng-if="contentViewComponent.content_view.version_count > 0">
|
52
|
+
</span>
|
53
|
+
<div ng-if="contentViewComponent.content_view.version_count > 0" ng-show="(!contentViewComponent.latest) && contentViewComponent.content_view_version.version != contentViewComponent.content_view.latest_version" translate>
|
54
|
+
A newer version is available: {{ contentViewComponent.content_view.latest_version }}
|
55
|
+
</div>
|
56
|
+
<div ng-if="contentViewComponent.content_view.version_count === 0 " translate>
|
57
|
+
Latest (Currently no version)
|
58
|
+
</div>
|
59
|
+
</td>
|
60
|
+
<td bst-table-cell>
|
61
|
+
<span ng-show="contentViewComponent.content_view_version.environments.length !== 0"
|
62
|
+
ng-repeat="environment in contentViewComponent.content_view_version.environments">
|
63
|
+
{{ environment.name }}<span ng-if="!$last">, </span>
|
64
|
+
</span>
|
65
|
+
<span ng-show="contentViewComponent.content_view.version_count === 0 || contentViewComponent.content_view_version.environments.length === 0" translate>
|
66
|
+
Not yet published
|
51
67
|
</span>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</
|
67
|
-
</td>
|
68
|
-
<td bst-table-cell>{{ contentViewComponent.content_view.description }}</td>
|
69
|
-
<td bst-table-cell>
|
70
|
-
<div>
|
71
|
-
<a ui-sref="content-views.details.repositories.yum.list({contentViewId: contentViewComponent.content_view.id})" translate>
|
72
|
-
{{ contentViewComponent.content_view_version.repositories.length || 0 }} Repositories
|
73
|
-
</a>
|
74
|
-
</div>
|
75
|
-
<div>
|
76
|
-
<a ui-sref="content-views.details.puppet-modules.list({contentViewId: contentViewComponent.content_view.id})" translate>
|
77
|
-
{{ contentViewComponent.content_view_version.puppet_module_count || 0 }} Puppet Modules
|
78
|
-
</a>
|
79
|
-
</div>
|
80
|
-
</td>
|
81
|
-
</tr>
|
68
|
+
</td>
|
69
|
+
<td bst-table-cell>{{ contentViewComponent.content_view.description }}</td>
|
70
|
+
<td bst-table-cell>
|
71
|
+
<div>
|
72
|
+
<a ui-sref="content-view.repositories.yum.list({contentViewId: contentViewComponent.content_view.id})" translate>
|
73
|
+
{{ contentViewComponent.content_view_version.repositories.length || 0 }} Repositories
|
74
|
+
</a>
|
75
|
+
</div>
|
76
|
+
<div>
|
77
|
+
<a ui-sref="content-view.puppet-modules.list({contentViewId: contentViewComponent.content_view.id})" translate>
|
78
|
+
{{ contentViewComponent.content_view_version.puppet_module_count || 0 }} Puppet Modules
|
79
|
+
</a>
|
80
|
+
</div>
|
81
|
+
</td>
|
82
|
+
</tr>
|
82
83
|
</tbody>
|
83
84
|
</table>
|
84
85
|
</div>
|
85
86
|
</div>
|
86
87
|
|
88
|
+
|
@@ -2,16 +2,16 @@
|
|
2
2
|
|
3
3
|
<nav>
|
4
4
|
<ul class="nav nav-tabs" ng-show="permitted('edit_content_views', contentView)">
|
5
|
-
<li ng-class="{active: isState('content-
|
6
|
-
<a ui-sref="content-
|
5
|
+
<li ng-class="{active: isState('content-view.components.composite-content-views.list')}">
|
6
|
+
<a ui-sref="content-view.components.composite-content-views.list">
|
7
7
|
<span translate>
|
8
8
|
List/Remove
|
9
9
|
</span>
|
10
10
|
</a>
|
11
11
|
</li>
|
12
12
|
|
13
|
-
<li ng-class="{active: isState('content-
|
14
|
-
<a ui-sref="content-
|
13
|
+
<li ng-class="{active: isState('content-view.components.composite-content-views.available')}" ng-show="!contentView.permissions.editable">
|
14
|
+
<a ui-sref="content-view.components.composite-content-views.available">
|
15
15
|
<span translate>
|
16
16
|
Add
|
17
17
|
</span>
|
@@ -28,9 +28,9 @@ angular.module('Bastion.content-views').controller('ContentViewAvailableDockerRe
|
|
28
28
|
},
|
29
29
|
'queryUnpaged');
|
30
30
|
|
31
|
-
nutupane.
|
31
|
+
nutupane.masterOnly = true;
|
32
32
|
|
33
|
-
$scope.
|
33
|
+
$scope.table = nutupane.table;
|
34
34
|
|
35
35
|
$scope.addRepositories = function (contentView) {
|
36
36
|
$scope.addSelectedRepositoriesToContentView(nutupane, contentView);
|
@@ -28,9 +28,9 @@ angular.module('Bastion.content-views').controller('ContentViewAvailableOstreeRe
|
|
28
28
|
},
|
29
29
|
'queryUnpaged');
|
30
30
|
|
31
|
-
nutupane.
|
31
|
+
nutupane.masterOnly = true;
|
32
32
|
|
33
|
-
$scope.
|
33
|
+
$scope.table = nutupane.table;
|
34
34
|
|
35
35
|
$scope.addRepositories = function (contentView) {
|
36
36
|
$scope.addSelectedRepositoriesToContentView(nutupane, contentView);
|
@@ -32,7 +32,7 @@ angular.module('Bastion.content-views').controller('ContentViewAvailableReposito
|
|
32
32
|
|
33
33
|
nutupane.load();
|
34
34
|
|
35
|
-
$scope.
|
35
|
+
$scope.table = nutupane.table;
|
36
36
|
|
37
37
|
$scope.addRepositories = function (contentView) {
|
38
38
|
$scope.addSelectedRepositoriesToContentView(nutupane, contentView);
|
@@ -5,127 +5,26 @@
|
|
5
5
|
* @requires $scope
|
6
6
|
* @requires $q
|
7
7
|
* @requires ContentView
|
8
|
-
* @requires Nutupane
|
9
8
|
* @requires translate
|
10
9
|
* @requires ApiErrorHandler
|
10
|
+
* @requires GlobalNotification
|
11
11
|
*
|
12
12
|
* @description
|
13
|
-
* Provides the functionality specific to
|
14
|
-
* Defines the columns to display and the transform function for how to generate each row
|
15
|
-
* within the table.
|
13
|
+
* Provides the functionality specific to the Content View Details page.
|
16
14
|
*/
|
17
15
|
angular.module('Bastion.content-views').controller('ContentViewDetailsController',
|
18
|
-
['$scope', '$q', 'ContentView', '
|
19
|
-
function ($scope, $q, ContentView,
|
20
|
-
var nutupane, contentViewId = $scope.$stateParams.contentViewId;
|
21
|
-
|
22
|
-
$scope.panel = {
|
23
|
-
error: false,
|
24
|
-
loading: true
|
25
|
-
};
|
26
|
-
|
27
|
-
if ($scope.contentView) {
|
28
|
-
$scope.panel.loading = false;
|
29
|
-
contentViewId = $scope.contentView.id;
|
30
|
-
}
|
31
|
-
|
32
|
-
nutupane = new Nutupane(ContentViewVersion, {'content_view_id': contentViewId});
|
33
|
-
nutupane.setSearchKey('contentViewVersionSearch');
|
34
|
-
nutupane.masterOnly = true;
|
35
|
-
|
16
|
+
['$scope', '$q', 'ContentView', 'translate', 'ApiErrorHandler', 'GlobalNotification',
|
17
|
+
function ($scope, $q, ContentView, translate, ApiErrorHandler, GlobalNotification) {
|
36
18
|
$scope.saveSuccess = function () {
|
37
|
-
|
19
|
+
GlobalNotification.setSuccessMessage(translate('Content View updated.'));
|
38
20
|
};
|
39
21
|
|
40
22
|
$scope.saveError = function (response) {
|
41
23
|
angular.forEach(response.data.errors, function (errorMessage) {
|
42
|
-
|
24
|
+
GlobalNotification.setErrorMessage(translate("An error occurred updating the Content View: ") + errorMessage);
|
43
25
|
});
|
44
26
|
};
|
45
27
|
|
46
|
-
function promotionMessage(version, task) {
|
47
|
-
return translate("Successfully promoted %cv version %ver to %env")
|
48
|
-
.replace('%cv', version['content_view'].name)
|
49
|
-
.replace('%ver', version.version)
|
50
|
-
.replace('%env', task.input['environment_name']);
|
51
|
-
}
|
52
|
-
|
53
|
-
function deletionMessage(version, task) {
|
54
|
-
var message;
|
55
|
-
|
56
|
-
if (task.input['content_view_ids'] && task.input['content_view_ids'].length > 0) {
|
57
|
-
message = translate("Successfully deleted %cv version %ver.")
|
58
|
-
.replace('%cv', version['content_view'].name)
|
59
|
-
.replace('%ver', version.version);
|
60
|
-
} else {
|
61
|
-
message = translate("Successfully removed %cv version %ver from environments: %env")
|
62
|
-
.replace('%cv', version['content_view'].name)
|
63
|
-
.replace('%ver', version.version)
|
64
|
-
.replace('%env', task.input['environment_names'].join(', '));
|
65
|
-
}
|
66
|
-
return message;
|
67
|
-
}
|
68
|
-
|
69
|
-
function publishMessage(version) {
|
70
|
-
return translate("Successfully published %cv version %ver and promoted to Library")
|
71
|
-
.replace('%cv', version['content_view'].name)
|
72
|
-
.replace('%ver', version.version);
|
73
|
-
}
|
74
|
-
|
75
|
-
function taskUpdated(version, task) {
|
76
|
-
var taskTypes = $scope.taskTypes;
|
77
|
-
|
78
|
-
if (!task.pending) {
|
79
|
-
$scope.pendingVersionTask = false;
|
80
|
-
|
81
|
-
if (task.result === 'success') {
|
82
|
-
if (task.label === taskTypes.promotion) {
|
83
|
-
$scope.successMessages.push(promotionMessage(version, task));
|
84
|
-
} else if (task.label === taskTypes.publish) {
|
85
|
-
$scope.successMessages.push(publishMessage(version));
|
86
|
-
} else if (task.label === taskTypes.deletion) {
|
87
|
-
$scope.successMessages.push(deletionMessage(version, task));
|
88
|
-
$scope.reloadVersions();
|
89
|
-
}
|
90
|
-
}
|
91
|
-
} else {
|
92
|
-
$scope.pendingVersionTask = true;
|
93
|
-
}
|
94
|
-
}
|
95
|
-
|
96
|
-
function updateVersion(version) {
|
97
|
-
var versionIds = _.map($scope.detailsTable.rows, 'id'),
|
98
|
-
versionIndex = versionIds.indexOf(version.id);
|
99
|
-
|
100
|
-
ContentViewVersion.get({'id': version.id}).$promise.then(function (newVersion) {
|
101
|
-
$scope.contentView.versions[versionIndex] = newVersion;
|
102
|
-
$scope.detailsTable.rows[versionIndex] = newVersion;
|
103
|
-
});
|
104
|
-
}
|
105
|
-
|
106
|
-
function processTasks(versions) {
|
107
|
-
_.each(versions, function (version) {
|
108
|
-
var taskIds = _.map(version['active_history'], function (history) {
|
109
|
-
return history.task.id;
|
110
|
-
});
|
111
|
-
|
112
|
-
if (taskIds.length > 0) {
|
113
|
-
version.task = AggregateTask.new(taskIds, function (task) {
|
114
|
-
taskUpdated(version, task);
|
115
|
-
if (task.label === $scope.taskTypes.publish && !task.pending && task.result === 'success') {
|
116
|
-
updateVersion(version);
|
117
|
-
}
|
118
|
-
});
|
119
|
-
}
|
120
|
-
});
|
121
|
-
}
|
122
|
-
|
123
|
-
$scope.successMessages = [];
|
124
|
-
$scope.errorMessages = [];
|
125
|
-
|
126
|
-
$scope.detailsTable = nutupane.table;
|
127
|
-
$scope.pendingVersionTask = false;
|
128
|
-
|
129
28
|
$scope.panel = {
|
130
29
|
error: false,
|
131
30
|
loading: true
|
@@ -133,10 +32,8 @@ angular.module('Bastion.content-views').controller('ContentViewDetailsController
|
|
133
32
|
|
134
33
|
$scope.contentView = ContentView.get({id: $scope.$stateParams.contentViewId}, function () {
|
135
34
|
$scope.panel.loading = false;
|
136
|
-
$scope.loading = false;
|
137
35
|
}, function (response) {
|
138
36
|
$scope.panel.loading = false;
|
139
|
-
$scope.loading = false;
|
140
37
|
ApiErrorHandler.handleGETRequestErrors(response, $scope);
|
141
38
|
});
|
142
39
|
|
@@ -150,25 +47,12 @@ angular.module('Bastion.content-views').controller('ContentViewDetailsController
|
|
150
47
|
|
151
48
|
$scope.copy = function (newName) {
|
152
49
|
ContentView.copy({id: $scope.contentView.id, 'content_view': {name: newName}}, function (response) {
|
153
|
-
$scope.
|
154
|
-
$scope.table.addRow(response);
|
155
|
-
$scope.transitionTo('content-views.details.info', {contentViewId: response.id});
|
50
|
+
$scope.transitionTo('content-view.info', {contentViewId: response.id});
|
156
51
|
}, function (response) {
|
157
|
-
|
52
|
+
GlobalNotification.setErrorMessage(response.data.displayMessage);
|
158
53
|
});
|
159
54
|
};
|
160
55
|
|
161
|
-
$scope.reloadVersions = function () {
|
162
|
-
$scope.detailsTable.rows = [];
|
163
|
-
nutupane.refresh();
|
164
|
-
};
|
165
|
-
|
166
|
-
$scope.$watch('detailsTable.rows', function () {
|
167
|
-
if ($scope.detailsTable && $scope.detailsTable.rows.length > 0) {
|
168
|
-
processTasks($scope.detailsTable.rows);
|
169
|
-
}
|
170
|
-
});
|
171
|
-
|
172
56
|
$scope.save = function (contentView) {
|
173
57
|
return contentView.$update($scope.saveSuccess, $scope.saveError);
|
174
58
|
};
|