bastion 6.1.13 → 6.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/bastion/bastion.module.js +11 -2
- data/app/assets/javascripts/bastion/components/formatters/array-to-string.filter.js +2 -3
- data/app/assets/javascripts/bastion/components/views/bst-edit-multiselect.html +3 -11
- data/lib/bastion/version.rb +1 -1
- data/test/components/formatters/array-to-string.filter.test.js +4 -8
- metadata +31 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14aaa052bc03f059c45f2691f5cf4fb403afa3d0
|
4
|
+
data.tar.gz: 9e649fdfefda9a1c100c3a57ffbdee3178508d6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a0a7e5a181b7752a4721d23b221b09b9aa7cb918f7e2797e92418f80aac309efd77fba1c849c26ee6a14f32d19d50e48a2d5ccbc0fbf6b36c85446b792129c3
|
7
|
+
data.tar.gz: fb9682b06a3d8190de0dfbf998c3bf24bb5a82e5fdd0a6b892df788421f84c4e7993f124ef52496b16b0b161079156514f4902f7315bb3094ce3d0ed85382e7f
|
@@ -76,18 +76,27 @@ angular.module('Bastion').config(
|
|
76
76
|
* @requires $breadcrumb
|
77
77
|
* @requires PageTitle
|
78
78
|
* @requires BastionConfig
|
79
|
+
* @requires repositoryTypes
|
79
80
|
*
|
80
81
|
* @description
|
81
82
|
* Set up some common state related functionality and set the current language.
|
82
83
|
*/
|
83
|
-
angular.module('Bastion').run(['$rootScope', '$state', '$stateParams', 'gettextCatalog', 'currentLocale', '$location', '$window', '$breadcrumb', 'PageTitle', 'BastionConfig',
|
84
|
-
function ($rootScope, $state, $stateParams, gettextCatalog, currentLocale, $location, $window, $breadcrumb, PageTitle, BastionConfig) {
|
84
|
+
angular.module('Bastion').run(['$rootScope', '$state', '$stateParams', 'gettextCatalog', 'currentLocale', '$location', '$window', '$breadcrumb', 'PageTitle', 'BastionConfig', 'repositoryTypes',
|
85
|
+
function ($rootScope, $state, $stateParams, gettextCatalog, currentLocale, $location, $window, $breadcrumb, PageTitle, BastionConfig, repositoryTypes) {
|
85
86
|
var fromState, fromParams, orgSwitcherRegex;
|
86
87
|
|
87
88
|
$rootScope.$state = $state;
|
88
89
|
$rootScope.$stateParams = $stateParams;
|
89
90
|
$rootScope.transitionTo = $state.transitionTo;
|
90
91
|
$rootScope.$location = $location;
|
92
|
+
$rootScope.$repositoryTypes = repositoryTypes;
|
93
|
+
$rootScope.repositoryTypeEnabled = function(desiredType) {
|
94
|
+
var found = _.find(repositoryTypes, function(type) {
|
95
|
+
return type['id'] === desiredType;
|
96
|
+
});
|
97
|
+
return angular.isDefined(found);
|
98
|
+
}
|
99
|
+
|
91
100
|
|
92
101
|
$rootScope.isState = function (stateName) {
|
93
102
|
return $state.is(stateName);
|
@@ -9,9 +9,8 @@
|
|
9
9
|
*
|
10
10
|
*/
|
11
11
|
angular.module('Bastion.components.formatters').filter('arrayToString', [function () {
|
12
|
-
return function (toFormat,
|
13
|
-
stringToPluck = stringToPluck || 'name';
|
12
|
+
return function (toFormat, separator) {
|
14
13
|
separator = separator || ', ';
|
15
|
-
return
|
14
|
+
return toFormat.join(separator);
|
16
15
|
};
|
17
16
|
}]);
|
@@ -1,17 +1,9 @@
|
|
1
1
|
<div class="bst-dialog bst-multiselect" ng-class="{open: editMode, closed: !editMode}">
|
2
2
|
<i class="fa fa-remove fr" ng-click="editMode = false" ng-show="editMode"></i>
|
3
3
|
<form ng-show="editMode" role="form">
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
type="text"
|
8
|
-
placeholder="{{ 'Filter' | translate }}"/>
|
9
|
-
<ul>
|
10
|
-
<li ng-repeat="option in options | filter:searchTerm">
|
11
|
-
<input type="checkbox" ng-model="option.selected" ng-change="toggleOption(option)"/>
|
12
|
-
<span ng-click="toggleOption(option)">{{ option.name }}</span>
|
13
|
-
</li>
|
14
|
-
</ul>
|
4
|
+
<p ng-repeat="option in options">
|
5
|
+
<input type="checkbox" ng-model="option.selected"/> {{ option.name }}
|
6
|
+
</p>
|
15
7
|
</form>
|
16
8
|
<div bst-edit></div>
|
17
9
|
</div>
|
data/lib/bastion/version.rb
CHANGED
@@ -5,22 +5,18 @@ describe('Filter:arrayToString', function() {
|
|
5
5
|
|
6
6
|
beforeEach(inject(function($filter) {
|
7
7
|
array = [
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
'one',
|
9
|
+
'two',
|
10
|
+
'three'
|
11
11
|
];
|
12
12
|
arrayToStringFilter = $filter('arrayToString');
|
13
13
|
}));
|
14
14
|
|
15
15
|
it("transforms an array to a string.", function() {
|
16
|
-
expect(arrayToStringFilter(array, "id")).toBe('1, 2, 3');
|
17
|
-
});
|
18
|
-
|
19
|
-
it("defaults item to pluck to 'name' if not provided.", function() {
|
20
16
|
expect(arrayToStringFilter(array)).toBe('one, two, three');
|
21
17
|
});
|
22
18
|
|
23
19
|
it("allows a custom separator", function() {
|
24
|
-
expect(arrayToStringFilter(array,
|
20
|
+
expect(arrayToStringFilter(array, ':')).toBe('one:two:three');
|
25
21
|
});
|
26
22
|
});
|
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.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric D Helms
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: angular-rails-templates
|
@@ -1766,42 +1766,42 @@ signing_key:
|
|
1766
1766
|
specification_version: 4
|
1767
1767
|
summary: UI library of AngularJS based components for Foreman
|
1768
1768
|
test_files:
|
1769
|
+
- test/test-mocks.module.js
|
1770
|
+
- test/i18n/translate.service.test.js
|
1771
|
+
- test/features/feature-flag.service.test.js
|
1772
|
+
- test/features/bst-feature-flag.directive.test.js
|
1769
1773
|
- test/auth/authorization.service.test.js
|
1770
|
-
- test/
|
1774
|
+
- test/menu/menu-expander.service.test.js
|
1771
1775
|
- test/bastion/test-constants.js
|
1772
|
-
- test/
|
1773
|
-
- test/
|
1774
|
-
- test/
|
1775
|
-
- test/
|
1776
|
-
- test/
|
1776
|
+
- test/routing.module.test.js
|
1777
|
+
- test/bastion-config.test.js
|
1778
|
+
- test/utils/bastion-resource.factory.test.js
|
1779
|
+
- test/utils/form-utils.service.test.js
|
1780
|
+
- test/utils/round-up.filter.test.js
|
1781
|
+
- test/utils/disable-link.directive.test.js
|
1782
|
+
- test/utils/stop-event.directive.test.js
|
1783
|
+
- test/utils/urlencode.filter.test.js
|
1777
1784
|
- test/components/bst-flyout.directive.test.js
|
1785
|
+
- test/components/nutupane.factory.test.js
|
1786
|
+
- test/components/notification.service.test.js
|
1787
|
+
- test/components/path-selector.directive.test.js
|
1788
|
+
- test/components/bst-edit.directive.test.js
|
1778
1789
|
- test/components/bst-form-buttons.directive.test.js
|
1790
|
+
- test/components/bst-table.directive.test.js
|
1791
|
+
- test/components/bst-bookmark.factory.test.js
|
1779
1792
|
- test/components/bst-form-group.directive.test.js
|
1793
|
+
- test/components/page-title.directive.test.js
|
1794
|
+
- test/components/bst-dropdown.directive.test.js
|
1795
|
+
- test/components/typeahead-empty.directive.test.js
|
1780
1796
|
- test/components/bst-menu.directive.test.js
|
1781
|
-
- test/components/
|
1797
|
+
- test/components/table-cache.service.test.js
|
1798
|
+
- test/components/bst-alert.directive.test.js
|
1782
1799
|
- test/components/bst-resource-switcher.directive.test.js
|
1783
|
-
- test/components/
|
1800
|
+
- test/components/page-title.service.test.js
|
1801
|
+
- test/components/bst-bookmark.directive.test.js
|
1802
|
+
- test/components/bst-modal.directive.test.js
|
1803
|
+
- test/components/formatters/capitalize.filter.test.js
|
1784
1804
|
- test/components/formatters/array-to-string.filter.test.js
|
1785
1805
|
- test/components/formatters/boolean-to-yes-no.filter.test.js
|
1786
|
-
- test/components/formatters/capitalize.filter.test.js
|
1787
|
-
- test/components/formatters/key-value-to-string.filter.test.js
|
1788
1806
|
- test/components/formatters/unlimited-filter.filter.test.js
|
1789
|
-
- test/components/
|
1790
|
-
- test/components/nutupane.factory.test.js
|
1791
|
-
- test/components/page-title.directive.test.js
|
1792
|
-
- test/components/page-title.service.test.js
|
1793
|
-
- test/components/path-selector.directive.test.js
|
1794
|
-
- test/components/table-cache.service.test.js
|
1795
|
-
- test/components/typeahead-empty.directive.test.js
|
1796
|
-
- test/features/bst-feature-flag.directive.test.js
|
1797
|
-
- test/features/feature-flag.service.test.js
|
1798
|
-
- test/i18n/translate.service.test.js
|
1799
|
-
- test/menu/menu-expander.service.test.js
|
1800
|
-
- test/routing.module.test.js
|
1801
|
-
- test/test-mocks.module.js
|
1802
|
-
- test/utils/bastion-resource.factory.test.js
|
1803
|
-
- test/utils/disable-link.directive.test.js
|
1804
|
-
- test/utils/form-utils.service.test.js
|
1805
|
-
- test/utils/round-up.filter.test.js
|
1806
|
-
- test/utils/stop-event.directive.test.js
|
1807
|
-
- test/utils/urlencode.filter.test.js
|
1807
|
+
- test/components/formatters/key-value-to-string.filter.test.js
|