bastion 6.1.2 → 6.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/bastion/components/bst-resource-switcher.directive.js +15 -1
- data/app/assets/javascripts/bastion/components/nutupane.factory.js +2 -3
- data/app/assets/javascripts/bastion/components/views/bst-resource-switcher.html +2 -1
- data/app/controllers/bastion/bastion_controller.rb +1 -0
- data/app/helpers/bastion/layout_helper.rb +27 -0
- data/app/views/bastion/layouts/assets.html.erb +2 -4
- data/lib/bastion/version.rb +1 -1
- data/test/components/{bst-resource-switcher.test.js → bst-resource-switcher.directive.test.js} +3 -1
- data/test/components/nutupane.factory.test.js +2 -4
- metadata +71 -70
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e32f9919ec36649db8df13976138dfef0655aa0
|
4
|
+
data.tar.gz: a0452a24564cb16562312de14460c293366d1657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '085946022ce49c10d721fc48cef2f182f1a1656c84c627b10a87f657e141869c214b61bab7d7b4918a53f2bb24366a981fb3d3883b50aa76f1355439fb19fed2'
|
7
|
+
data.tar.gz: 2c83a9564861e335069b2a66a0b439364441a38623ddcbec2eaac57c55a43cbb302faba060b0c76be7e04c7448e01c82ee6c7270a64e7b874a4074d30bd0df71
|
@@ -22,7 +22,7 @@
|
|
22
22
|
return {
|
23
23
|
templateUrl: 'components/views/bst-resource-switcher.html',
|
24
24
|
link: function (scope) {
|
25
|
-
var breadcrumbs = $breadcrumb.getStatesChain(), listUrl;
|
25
|
+
var breadcrumbs = $breadcrumb.getStatesChain(), listUrl, unregisterWatcher;
|
26
26
|
scope.table = {rows: []};
|
27
27
|
|
28
28
|
if (breadcrumbs.length > 0) {
|
@@ -48,6 +48,20 @@
|
|
48
48
|
nextUrl = currentUrl.replace(/\d+([^\d+]*)$/, id + '$1');
|
49
49
|
$location.path(nextUrl);
|
50
50
|
};
|
51
|
+
|
52
|
+
unregisterWatcher = scope.$watch('table.rows', function (rows) {
|
53
|
+
var currentId = parseInt($location.path().match(/\d+/)[0], 10);
|
54
|
+
|
55
|
+
angular.forEach(rows, function (row) {
|
56
|
+
if (row.id === currentId) {
|
57
|
+
row.selected = true;
|
58
|
+
} else {
|
59
|
+
row.selected = false;
|
60
|
+
}
|
61
|
+
});
|
62
|
+
|
63
|
+
unregisterWatcher();
|
64
|
+
});
|
51
65
|
}
|
52
66
|
};
|
53
67
|
}
|
@@ -461,15 +461,14 @@ angular.module('Bastion.components').factory('Nutupane',
|
|
461
461
|
};
|
462
462
|
|
463
463
|
self.table.sortBy = function (column) {
|
464
|
-
var sort = self.table.resource.sort;
|
465
464
|
if (!column) {
|
466
465
|
return;
|
467
466
|
}
|
468
467
|
if (column.id) {
|
469
468
|
params["sort_by"] = column.id;
|
470
469
|
}
|
471
|
-
if (column.id ===
|
472
|
-
params["sort_order"] = (
|
470
|
+
if (column.id === params["sort_by"] || column.id) {
|
471
|
+
params["sort_order"] = (params["sort_order"] === 'ASC') ? 'DESC' : 'ASC';
|
473
472
|
} else {
|
474
473
|
params["sort_order"] = 'ASC';
|
475
474
|
}
|
@@ -21,7 +21,8 @@
|
|
21
21
|
</button>
|
22
22
|
</div>
|
23
23
|
</form>
|
24
|
-
<li ng-class="{'table-mask': table.refreshing || table.working
|
24
|
+
<li ng-class="{'table-mask': table.refreshing || table.working, 'active': item.selected}"
|
25
|
+
ng-repeat="item in table.rows | filter:resourceFilter">
|
25
26
|
<a ng-click="changeResource(item.id)">{{ item.name }}</a>
|
26
27
|
</li>
|
27
28
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Bastion
|
2
|
+
module LayoutHelper
|
3
|
+
def include_plugin_js(plugin)
|
4
|
+
return unless plugin[:javascript]
|
5
|
+
|
6
|
+
if plugin[:javascript].is_a?(Proc)
|
7
|
+
js = instance_eval(&plugin[:javascript])
|
8
|
+
js = js.join("\n") if js.is_a?(Array)
|
9
|
+
js.html_safe
|
10
|
+
else
|
11
|
+
javascript_include_tag(plugin[:javascript])
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def include_plugin_styles(plugin)
|
16
|
+
return unless plugin[:stylesheet]
|
17
|
+
|
18
|
+
if plugin[:stylesheet].is_a?(Proc)
|
19
|
+
styles = instance_eval(&plugin[:stylesheet])
|
20
|
+
styles = styles.join("\n") if styles.is_a?(Array)
|
21
|
+
styles.html_safe
|
22
|
+
else
|
23
|
+
stylesheet_link_tag(plugin[:stylesheet])
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -5,9 +5,7 @@
|
|
5
5
|
<% content_for(:stylesheets) do %>
|
6
6
|
<%= stylesheet_link_tag "bastion/bastion" %>
|
7
7
|
<% Bastion.plugins.each do |name, plugin| %>
|
8
|
-
|
9
|
-
<%= stylesheet_link_tag(plugin[:stylesheet]) %>
|
10
|
-
<% end %>
|
8
|
+
<%= include_plugin_styles(plugin) %>
|
11
9
|
<% end %>
|
12
10
|
<% end %>
|
13
11
|
|
@@ -31,7 +29,7 @@
|
|
31
29
|
angular.module('Bastion.auth').value('Permissions', angular.fromJson('<%= User.current.cached_roles.collect { |role| role.permissions }.flatten.to_json.html_safe %>'));
|
32
30
|
</script>
|
33
31
|
<% Bastion.plugins.each do |name, plugin| %>
|
34
|
-
<%=
|
32
|
+
<%= include_plugin_js(plugin) %>
|
35
33
|
<% end %>
|
36
34
|
<% end %>
|
37
35
|
|
data/lib/bastion/version.rb
CHANGED
@@ -428,10 +428,8 @@ describe('Factory: Nutupane', function() {
|
|
428
428
|
|
429
429
|
it("toggles the sort order if already sorting by that column", function() {
|
430
430
|
var expectedParams = {sort_by: 'name', sort_order: 'DESC', search: '', paged: true, page: 1, per_page: entriesPerPage};
|
431
|
-
nutupane.table.
|
432
|
-
|
433
|
-
order: 'ASC'
|
434
|
-
};
|
431
|
+
nutupane.table.params["sort_by"] = 'name';
|
432
|
+
nutupane.table.params["sort_order"] = 'ASC';
|
435
433
|
|
436
434
|
spyOn(Resource, 'queryPaged').and.callThrough();
|
437
435
|
nutupane.table.sortBy({id: "name"});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bastion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric D Helms
|
@@ -9,34 +9,34 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-10
|
12
|
+
date: 2017-11-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: angular-rails-templates
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 1.0.2
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 1.0.2
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: uglifier
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
description: Bastion provides a UI library of AngularJS based components designed
|
@@ -48,6 +48,12 @@ executables: []
|
|
48
48
|
extensions: []
|
49
49
|
extra_rdoc_files: []
|
50
50
|
files:
|
51
|
+
- ".eslintignore"
|
52
|
+
- ".jshintrc"
|
53
|
+
- Gruntfile.js
|
54
|
+
- LICENSE
|
55
|
+
- README.md
|
56
|
+
- Rakefile
|
51
57
|
- app/assets/javascripts/bastion/auth/auth.module.js
|
52
58
|
- app/assets/javascripts/bastion/auth/authorization.service.js
|
53
59
|
- app/assets/javascripts/bastion/bastion-bootstrap.js
|
@@ -111,8 +117,10 @@ files:
|
|
111
117
|
- app/assets/javascripts/bastion/features/feature-flag.service.js
|
112
118
|
- app/assets/javascripts/bastion/features/features.module.js
|
113
119
|
- app/assets/javascripts/bastion/features/features.service.js
|
120
|
+
- app/assets/javascripts/bastion/i18n/README
|
114
121
|
- app/assets/javascripts/bastion/i18n/bastion.pot
|
115
122
|
- app/assets/javascripts/bastion/i18n/i18n.module.js
|
123
|
+
- app/assets/javascripts/bastion/i18n/locale/README
|
116
124
|
- app/assets/javascripts/bastion/i18n/locale/de.po
|
117
125
|
- app/assets/javascripts/bastion/i18n/locale/es.po
|
118
126
|
- app/assets/javascripts/bastion/i18n/locale/fr.po
|
@@ -120,11 +128,9 @@ files:
|
|
120
128
|
- app/assets/javascripts/bastion/i18n/locale/ja.po
|
121
129
|
- app/assets/javascripts/bastion/i18n/locale/ko.po
|
122
130
|
- app/assets/javascripts/bastion/i18n/locale/pt_BR.po
|
123
|
-
- app/assets/javascripts/bastion/i18n/locale/README
|
124
131
|
- app/assets/javascripts/bastion/i18n/locale/ru.po
|
125
132
|
- app/assets/javascripts/bastion/i18n/locale/zh_CN.po
|
126
133
|
- app/assets/javascripts/bastion/i18n/locale/zh_TW.po
|
127
|
-
- app/assets/javascripts/bastion/i18n/README
|
128
134
|
- app/assets/javascripts/bastion/i18n/translate.service.js
|
129
135
|
- app/assets/javascripts/bastion/i18n/translations.js
|
130
136
|
- app/assets/javascripts/bastion/i18n/zanata.xml
|
@@ -163,15 +169,64 @@ files:
|
|
163
169
|
- app/assets/stylesheets/bastion/typography.scss
|
164
170
|
- app/assets/stylesheets/bastion/variables.scss
|
165
171
|
- app/controllers/bastion/bastion_controller.rb
|
172
|
+
- app/helpers/bastion/layout_helper.rb
|
166
173
|
- app/views/bastion/layouts/application.html.erb
|
167
174
|
- app/views/bastion/layouts/application_ie.html.erb
|
168
175
|
- app/views/bastion/layouts/assets.html.erb
|
169
|
-
-
|
176
|
+
- bastion.js
|
177
|
+
- bower.json
|
170
178
|
- config/routes.rb
|
179
|
+
- config/routes/mount_engine.rb
|
180
|
+
- eslint.yaml
|
181
|
+
- grunt/bower.js
|
182
|
+
- grunt/eslint.js
|
183
|
+
- grunt/htmlhint.js
|
184
|
+
- grunt/karma.js
|
185
|
+
- grunt/nggettext_compile.js
|
186
|
+
- grunt/nggettext_extract.js
|
187
|
+
- lib/bastion.rb
|
171
188
|
- lib/bastion/engine.rb
|
172
189
|
- lib/bastion/version.rb
|
173
|
-
-
|
174
|
-
-
|
190
|
+
- package.json
|
191
|
+
- test/auth/authorization.service.test.js
|
192
|
+
- test/bastion-config.test.js
|
193
|
+
- test/bastion/test-constants.js
|
194
|
+
- test/components/bst-alert.directive.test.js
|
195
|
+
- test/components/bst-bookmark.directive.test.js
|
196
|
+
- test/components/bst-bookmark.factory.test.js
|
197
|
+
- test/components/bst-dropdown.directive.test.js
|
198
|
+
- test/components/bst-edit.directive.test.js
|
199
|
+
- test/components/bst-flyout.directive.test.js
|
200
|
+
- test/components/bst-form-buttons.directive.test.js
|
201
|
+
- test/components/bst-form-group.directive.test.js
|
202
|
+
- test/components/bst-menu.directive.test.js
|
203
|
+
- test/components/bst-modal.directive.test.js
|
204
|
+
- test/components/bst-resource-switcher.directive.test.js
|
205
|
+
- test/components/bst-table.directive.test.js
|
206
|
+
- test/components/formatters/array-to-string.filter.test.js
|
207
|
+
- test/components/formatters/boolean-to-yes-no.filter.test.js
|
208
|
+
- test/components/formatters/capitalize.filter.test.js
|
209
|
+
- test/components/formatters/key-value-to-string.filter.test.js
|
210
|
+
- test/components/formatters/unlimited-filter.filter.test.js
|
211
|
+
- test/components/notification.service.test.js
|
212
|
+
- test/components/nutupane.factory.test.js
|
213
|
+
- test/components/page-title.directive.test.js
|
214
|
+
- test/components/page-title.service.test.js
|
215
|
+
- test/components/path-selector.directive.test.js
|
216
|
+
- test/components/table-cache.service.test.js
|
217
|
+
- test/components/typeahead-empty.directive.test.js
|
218
|
+
- test/features/bst-feature-flag.directive.test.js
|
219
|
+
- test/features/feature-flag.service.test.js
|
220
|
+
- test/i18n/translate.service.test.js
|
221
|
+
- test/menu/menu-expander.service.test.js
|
222
|
+
- test/routing.module.test.js
|
223
|
+
- test/test-mocks.module.js
|
224
|
+
- test/utils/bastion-resource.factory.test.js
|
225
|
+
- test/utils/disable-link.directive.test.js
|
226
|
+
- test/utils/form-utils.service.test.js
|
227
|
+
- test/utils/round-up.filter.test.js
|
228
|
+
- test/utils/stop-event.directive.test.js
|
229
|
+
- test/utils/urlencode.filter.test.js
|
175
230
|
- vendor/assets/javascripts/bastion/angular-animate/angular-animate.js
|
176
231
|
- vendor/assets/javascripts/bastion/angular-blocks/angular-blocks.js
|
177
232
|
- vendor/assets/javascripts/bastion/angular-bootstrap/ui-bootstrap-tpls.js
|
@@ -1682,63 +1737,9 @@ files:
|
|
1682
1737
|
- vendor/assets/javascripts/bastion/angular-ui-bootstrap/timepicker.js
|
1683
1738
|
- vendor/assets/javascripts/bastion/angular-ui-router/angular-ui-router.js
|
1684
1739
|
- vendor/assets/javascripts/bastion/angular-uuid4/angular-uuid4.js
|
1740
|
+
- vendor/assets/javascripts/bastion/angular/angular.js
|
1685
1741
|
- vendor/assets/javascripts/bastion/json3/json3.js
|
1686
1742
|
- vendor/assets/javascripts/bastion/ngUpload/ng-upload.js
|
1687
|
-
- grunt/bower.js
|
1688
|
-
- grunt/eslint.js
|
1689
|
-
- grunt/htmlhint.js
|
1690
|
-
- grunt/karma.js
|
1691
|
-
- grunt/nggettext_compile.js
|
1692
|
-
- grunt/nggettext_extract.js
|
1693
|
-
- Rakefile
|
1694
|
-
- README.md
|
1695
|
-
- Gruntfile.js
|
1696
|
-
- package.json
|
1697
|
-
- bower.json
|
1698
|
-
- bastion.js
|
1699
|
-
- eslint.yaml
|
1700
|
-
- .eslintignore
|
1701
|
-
- LICENSE
|
1702
|
-
- .jshintrc
|
1703
|
-
- test/auth/authorization.service.test.js
|
1704
|
-
- test/bastion/test-constants.js
|
1705
|
-
- test/bastion-config.test.js
|
1706
|
-
- test/components/bst-alert.directive.test.js
|
1707
|
-
- test/components/bst-bookmark.directive.test.js
|
1708
|
-
- test/components/bst-bookmark.factory.test.js
|
1709
|
-
- test/components/bst-dropdown.directive.test.js
|
1710
|
-
- test/components/bst-edit.directive.test.js
|
1711
|
-
- test/components/bst-flyout.directive.test.js
|
1712
|
-
- test/components/bst-form-buttons.directive.test.js
|
1713
|
-
- test/components/bst-form-group.directive.test.js
|
1714
|
-
- test/components/bst-menu.directive.test.js
|
1715
|
-
- test/components/bst-modal.directive.test.js
|
1716
|
-
- test/components/bst-resource-switcher.test.js
|
1717
|
-
- test/components/bst-table.directive.test.js
|
1718
|
-
- test/components/formatters/array-to-string.filter.test.js
|
1719
|
-
- test/components/formatters/boolean-to-yes-no.filter.test.js
|
1720
|
-
- test/components/formatters/capitalize.filter.test.js
|
1721
|
-
- test/components/formatters/key-value-to-string.filter.test.js
|
1722
|
-
- test/components/formatters/unlimited-filter.filter.test.js
|
1723
|
-
- test/components/notification.service.test.js
|
1724
|
-
- test/components/nutupane.factory.test.js
|
1725
|
-
- test/components/page-title.directive.test.js
|
1726
|
-
- test/components/page-title.service.test.js
|
1727
|
-
- test/components/path-selector.directive.test.js
|
1728
|
-
- test/components/table-cache.service.test.js
|
1729
|
-
- test/components/typeahead-empty.directive.test.js
|
1730
|
-
- test/features/bst-feature-flag.directive.test.js
|
1731
|
-
- test/features/feature-flag.service.test.js
|
1732
|
-
- test/i18n/translate.service.test.js
|
1733
|
-
- test/menu/menu-expander.service.test.js
|
1734
|
-
- test/routing.module.test.js
|
1735
|
-
- test/test-mocks.module.js
|
1736
|
-
- test/utils/bastion-resource.factory.test.js
|
1737
|
-
- test/utils/disable-link.directive.test.js
|
1738
|
-
- test/utils/form-utils.service.test.js
|
1739
|
-
- test/utils/round-up.filter.test.js
|
1740
|
-
- test/utils/stop-event.directive.test.js
|
1741
|
-
- test/utils/urlencode.filter.test.js
|
1742
1743
|
homepage: http://www.github.com/Katello/bastion
|
1743
1744
|
licenses: []
|
1744
1745
|
metadata: {}
|
@@ -1748,17 +1749,17 @@ require_paths:
|
|
1748
1749
|
- lib
|
1749
1750
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1750
1751
|
requirements:
|
1751
|
-
- -
|
1752
|
+
- - ">="
|
1752
1753
|
- !ruby/object:Gem::Version
|
1753
1754
|
version: '0'
|
1754
1755
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1755
1756
|
requirements:
|
1756
|
-
- -
|
1757
|
+
- - ">="
|
1757
1758
|
- !ruby/object:Gem::Version
|
1758
1759
|
version: '0'
|
1759
1760
|
requirements: []
|
1760
1761
|
rubyforge_project:
|
1761
|
-
rubygems_version: 2.
|
1762
|
+
rubygems_version: 2.6.11
|
1762
1763
|
signing_key:
|
1763
1764
|
specification_version: 4
|
1764
1765
|
summary: UI library of AngularJS based components for Foreman
|
@@ -1776,7 +1777,7 @@ test_files:
|
|
1776
1777
|
- test/components/bst-form-group.directive.test.js
|
1777
1778
|
- test/components/bst-menu.directive.test.js
|
1778
1779
|
- test/components/bst-modal.directive.test.js
|
1779
|
-
- test/components/bst-resource-switcher.test.js
|
1780
|
+
- test/components/bst-resource-switcher.directive.test.js
|
1780
1781
|
- test/components/bst-table.directive.test.js
|
1781
1782
|
- test/components/formatters/array-to-string.filter.test.js
|
1782
1783
|
- test/components/formatters/boolean-to-yes-no.filter.test.js
|