iguazio.dashboard-controls 0.39.7-3.5.1 → 0.39.8-3.5.2

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.
@@ -3263,11 +3263,26 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
3263
3263
  hiveMetastorePath: [generateRule.endNotWith('/')]
3264
3264
  },
3265
3265
  clusters: {
3266
- label: commonRules.prefixedQualifiedName.concat({
3267
- name: 'prefixNotStart',
3268
- label: '[' + $i18next.t('functions:PREFIX', { lng: lng }) + '] ' + $i18next.t('common:NOT_START_WITH_FORBIDDEN_WORDS_K8S', { lng: lng }),
3269
- pattern: /^(?!kubernetes\.io\/)(?!k8s\.io\/)/
3270
- })
3266
+ label: {
3267
+ key: commonRules.prefixedQualifiedName.concat({
3268
+ name: 'prefixNotStart',
3269
+ label: '[' + $i18next.t('functions:PREFIX', { lng: lng }) + '] ' + $i18next.t('common:NOT_START_WITH_FORBIDDEN_WORDS_K8S', { lng: lng }),
3270
+ pattern: /^(?!kubernetes\.io\/)(?!k8s\.io\/)/
3271
+ }),
3272
+ value: [{
3273
+ name: 'valueBeginEnd',
3274
+ label: '[' + $i18next.t('common:VALUE', { lng: lng }) + '] ' + $i18next.t('common:BEGIN_END_WITH', { lng: lng }) + ': a–z, A–Z, 0–9',
3275
+ pattern: /^([^/]+\/)?([A-Za-z0-9][^/]*)?[A-Za-z0-9]$/
3276
+ }, {
3277
+ name: 'valueMaxLength',
3278
+ label: '[' + $i18next.t('common:VALUE', { lng: lng }) + '] ' + $i18next.t('common:MAX_LENGTH_CHARACTERS', { lng: lng, count: 63 }),
3279
+ pattern: /^([^/]+\/)?[^/]{1,63}$/
3280
+ }, {
3281
+ name: 'valueValidCharacters',
3282
+ label: '[' + $i18next.t('common:VALUE', { lng: lng }) + '] ' + $i18next.t('common:VALID_CHARACTERS', { lng: lng }) + ': a–z, A–Z, 0–9, –, _, .',
3283
+ pattern: /^[a-zA-Z0-9\-_.]+$/
3284
+ }]
3285
+ }
3271
3286
  },
3272
3287
  container: {
3273
3288
  name: [generateRule.validCharacters('a-z 0-9 - _'), generateRule.beginEndWith('a-z 0-9'), generateRule.noConsecutiveCharacters('--'), generateRule.noConsecutiveCharacters('__'), {
@@ -3572,6 +3587,85 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
3572
3587
  })();
3573
3588
  'use strict';
3574
3589
 
3590
+ (function () {
3591
+ 'use strict';
3592
+
3593
+ IgzActionCheckbox.$inject = ['$scope', '$rootScope', 'lodash'];
3594
+ angular.module('iguazio.dashboard-controls').component('igzActionCheckbox', {
3595
+ bindings: {
3596
+ item: '<',
3597
+ itemType: '@?',
3598
+ onClickCallback: '&?'
3599
+ },
3600
+ templateUrl: 'igz_controls/components/action-checkbox/action-checkbox.tpl.html',
3601
+ controller: IgzActionCheckbox
3602
+ });
3603
+
3604
+ function IgzActionCheckbox($scope, $rootScope, lodash) {
3605
+ var ctrl = this;
3606
+
3607
+ ctrl.$onInit = onInit;
3608
+
3609
+ ctrl.onCheck = onCheck;
3610
+
3611
+ //
3612
+ // Hook methods
3613
+ //
3614
+
3615
+ /**
3616
+ * Constructor method
3617
+ */
3618
+ function onInit() {
3619
+ $scope.$on('action-checkbox-all_check-all', toggleCheckedAll);
3620
+ }
3621
+
3622
+ //
3623
+ // Public methods
3624
+ //
3625
+
3626
+ /**
3627
+ * Handles mouse click on checkbox
3628
+ * @param {Object} $event - event object
3629
+ */
3630
+ function onCheck($event) {
3631
+ ctrl.item.ui.checked = !ctrl.item.ui.checked;
3632
+
3633
+ if (angular.isFunction(ctrl.onClickCallback)) {
3634
+ $event.stopPropagation();
3635
+ ctrl.onClickCallback();
3636
+ }
3637
+
3638
+ $rootScope.$broadcast('action-checkbox_item-checked', {
3639
+ item: ctrl.item,
3640
+ itemType: !lodash.isEmpty(ctrl.itemType) ? ctrl.itemType : null,
3641
+ checked: ctrl.item.ui.checked
3642
+ });
3643
+ }
3644
+
3645
+ //
3646
+ // Private methods
3647
+ //
3648
+
3649
+ /**
3650
+ * Triggers on Check all button clicked
3651
+ * @param {Object} event
3652
+ * @param {Object} data
3653
+ */
3654
+ function toggleCheckedAll(event, data) {
3655
+ var isTypeValid = lodash.isNil(data.itemsType) || data.itemsType === ctrl.itemType;
3656
+
3657
+ if (ctrl.item.ui.checked !== data.checked && isTypeValid) {
3658
+ ctrl.item.ui.checked = !ctrl.item.ui.checked;
3659
+ }
3660
+
3661
+ if (angular.isFunction(ctrl.onClickCallback) && isTypeValid) {
3662
+ ctrl.onClickCallback();
3663
+ }
3664
+ }
3665
+ }
3666
+ })();
3667
+ 'use strict';
3668
+
3575
3669
  (function () {
3576
3670
  'use strict';
3577
3671
 
@@ -3767,85 +3861,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
3767
3861
  })();
3768
3862
  'use strict';
3769
3863
 
3770
- (function () {
3771
- 'use strict';
3772
-
3773
- IgzActionCheckbox.$inject = ['$scope', '$rootScope', 'lodash'];
3774
- angular.module('iguazio.dashboard-controls').component('igzActionCheckbox', {
3775
- bindings: {
3776
- item: '<',
3777
- itemType: '@?',
3778
- onClickCallback: '&?'
3779
- },
3780
- templateUrl: 'igz_controls/components/action-checkbox/action-checkbox.tpl.html',
3781
- controller: IgzActionCheckbox
3782
- });
3783
-
3784
- function IgzActionCheckbox($scope, $rootScope, lodash) {
3785
- var ctrl = this;
3786
-
3787
- ctrl.$onInit = onInit;
3788
-
3789
- ctrl.onCheck = onCheck;
3790
-
3791
- //
3792
- // Hook methods
3793
- //
3794
-
3795
- /**
3796
- * Constructor method
3797
- */
3798
- function onInit() {
3799
- $scope.$on('action-checkbox-all_check-all', toggleCheckedAll);
3800
- }
3801
-
3802
- //
3803
- // Public methods
3804
- //
3805
-
3806
- /**
3807
- * Handles mouse click on checkbox
3808
- * @param {Object} $event - event object
3809
- */
3810
- function onCheck($event) {
3811
- ctrl.item.ui.checked = !ctrl.item.ui.checked;
3812
-
3813
- if (angular.isFunction(ctrl.onClickCallback)) {
3814
- $event.stopPropagation();
3815
- ctrl.onClickCallback();
3816
- }
3817
-
3818
- $rootScope.$broadcast('action-checkbox_item-checked', {
3819
- item: ctrl.item,
3820
- itemType: !lodash.isEmpty(ctrl.itemType) ? ctrl.itemType : null,
3821
- checked: ctrl.item.ui.checked
3822
- });
3823
- }
3824
-
3825
- //
3826
- // Private methods
3827
- //
3828
-
3829
- /**
3830
- * Triggers on Check all button clicked
3831
- * @param {Object} event
3832
- * @param {Object} data
3833
- */
3834
- function toggleCheckedAll(event, data) {
3835
- var isTypeValid = lodash.isNil(data.itemsType) || data.itemsType === ctrl.itemType;
3836
-
3837
- if (ctrl.item.ui.checked !== data.checked && isTypeValid) {
3838
- ctrl.item.ui.checked = !ctrl.item.ui.checked;
3839
- }
3840
-
3841
- if (angular.isFunction(ctrl.onClickCallback) && isTypeValid) {
3842
- ctrl.onClickCallback();
3843
- }
3844
- }
3845
- }
3846
- })();
3847
- 'use strict';
3848
-
3849
3864
  (function () {
3850
3865
  'use strict';
3851
3866
 
@@ -4968,228 +4983,62 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
4968
4983
  })();
4969
4984
  'use strict';
4970
4985
 
4986
+ /* eslint max-statements: ["error", 100] */
4987
+ /* eslint complexity: ["error", 12] */
4971
4988
  (function () {
4972
4989
  'use strict';
4973
4990
 
4974
- IgzElementLoadingStatusController.$inject = ['$element', '$scope', '$state', '$i18next', 'i18next', 'lodash'];
4975
- angular.module('iguazio.dashboard-controls').component('igzElementLoadingStatus', {
4976
- bindings: {
4977
- errorMessage: '@?',
4978
- loadingStatusSize: '@?',
4979
- name: '@',
4980
- refresh: '<?',
4981
- textStatus: '<?',
4982
- title: '@?',
4983
- tooltipLabel: '@?'
4984
- },
4985
- templateUrl: 'igz_controls/components/element-loading-status/element-loading-status.tpl.html',
4986
- controller: IgzElementLoadingStatusController,
4987
- transclude: true
4988
- });
4989
-
4990
- function IgzElementLoadingStatusController($element, $scope, $state, $i18next, i18next, lodash) {
4991
- var ctrl = this;
4992
- var lng = i18next.language;
4993
-
4994
- ctrl.isShowContent = false;
4995
- ctrl.isShowError = false;
4996
- ctrl.isShowSpinner = true;
4997
-
4998
- ctrl.deregisterHideError = null;
4999
- ctrl.deregisterHideSpinner = null;
5000
- ctrl.deregisterShowError = null;
5001
- ctrl.deregisterShowSpinner = null;
5002
-
5003
- ctrl.$onDestroy = onDestroy;
5004
- ctrl.$onInit = onInit;
5005
- ctrl.$onChanges = onChanges;
5006
-
5007
- ctrl.checkSize = checkSize;
5008
- ctrl.refreshPage = refreshPage;
5009
-
5010
- //
5011
- // Hook methods
5012
- //
5013
-
5014
- /**
5015
- * Destructor method
5016
- */
5017
- function onDestroy() {
5018
- deregisterBroadcasts();
5019
- }
5020
-
5021
- /**
5022
- * Initialization method
5023
- */
5024
- function onInit() {
5025
- registerBroadcasts();
5026
- }
5027
-
5028
- /**
5029
- * Changes method
5030
- * @param {Object} changes
5031
- */
5032
- function onChanges(changes) {
5033
- lodash.defaults(ctrl, {
5034
- loadingStatusSize: 'default',
5035
- refresh: false,
5036
- title: '',
5037
- tooltipLabel: ''
5038
- });
5039
-
5040
- if (lodash.isEmpty(ctrl.errorMessage)) {
5041
- lodash.assign(ctrl, {
5042
- errorMessage: $i18next.t('common:ERROR_MSG.ELEMENT_LOADING_DEFAULT_1', { lng: lng }),
5043
- title: $i18next.t('common:OOPS', { lng: lng }),
5044
- refresh: true
5045
- });
5046
- }
5047
-
5048
- if (changes && changes.name && !lodash.isEmpty(changes.name.previousValue) && changes.name.currentValue !== changes.name.previousValue) {
5049
- deregisterBroadcasts();
5050
- registerBroadcasts();
5051
- }
5052
- }
5053
-
5054
- //
5055
- // Public methods
5056
- //
5057
-
5058
- /**
5059
- * Check if given size is actual
5060
- * @param {string} size - size name ('small', 'default')
5061
- */
5062
- function checkSize(size) {
5063
- return ctrl.loadingStatusSize === size;
5064
- }
5065
-
5066
- /**
5067
- * Refresh current page (ui-router state)
5068
- * @param {Object} $event - angular event object
5069
- */
5070
- function refreshPage($event) {
5071
-
5072
- // Prevent 'upper' events to be triggered
5073
- $event.stopPropagation();
5074
-
5075
- $state.go($state.current, {}, { reload: true });
5076
- }
5077
-
5078
- //
5079
- // Private methods
5080
- //
5081
-
5082
- /**
5083
- * Deregister broadcasts
5084
- */
5085
- function deregisterBroadcasts() {
5086
- ctrl.deregisterHideError();
5087
- ctrl.deregisterHideSpinner();
5088
- ctrl.deregisterShowError();
5089
- ctrl.deregisterShowSpinner();
5090
- }
5091
-
5092
- /**
5093
- * Hide given loading error
5094
- */
5095
- function hideError() {
5096
- ctrl.isShowError = false;
5097
- }
5098
-
5099
- /**
5100
- * Hide given loading spinner
5101
- */
5102
- function hideSpinner() {
5103
- ctrl.isShowSpinner = false;
5104
- ctrl.isShowContent = true;
5105
- }
5106
-
5107
- /**
5108
- * Register broadcasts
5109
- */
5110
- function registerBroadcasts() {
5111
- ctrl.deregisterHideError = $scope.$on('element-loading-status_hide-error_' + ctrl.name, hideError);
5112
- ctrl.deregisterHideSpinner = $scope.$on('element-loading-status_hide-spinner_' + ctrl.name, hideSpinner);
5113
- ctrl.deregisterShowError = $scope.$on('element-loading-status_show-error_' + ctrl.name, showError);
5114
- ctrl.deregisterShowSpinner = $scope.$on('element-loading-status_show-spinner_' + ctrl.name, showSpinner);
5115
- }
5116
-
5117
- /**
5118
- * Show given loading error
5119
- */
5120
- function showError() {
5121
- ctrl.isShowError = true;
5122
- ctrl.isShowSpinner = false;
5123
- }
5124
-
5125
- /**
5126
- * Show given loading spinner
5127
- */
5128
- function showSpinner() {
5129
- ctrl.isShowError = false;
5130
- ctrl.isShowContent = false;
5131
- ctrl.isShowSpinner = true;
5132
- }
5133
- }
5134
- })();
5135
- 'use strict';
5136
-
5137
- /* eslint max-statements: ["error", 100] */
5138
- /* eslint complexity: ["error", 12] */
5139
- (function () {
5140
- 'use strict';
5141
-
5142
- /**
5143
- * @name igzDefaultDropdown
5144
- * @description
5145
- * Default drop down component. This component is a toggleable menu that allows the user to choose one value from a
5146
- * predefined list. It can also become a combo-box where the user can enter text. It can also auto-complete the
5147
- * option by the partially enetered value.
5148
- *
5149
- * @param {Object|string} selectedItem - an object/string to be set by the component.
5150
- * The value that will be set as selected item from predefined list.
5151
- * Note: if `enableTyping` is equal to `true` it means that the user can mutate this value. In this case
5152
- * after modifying the value the new list item will be created.
5153
- * @param {Array.<Object>} valuesArray - an array of objects describing the available options that user can select.
5154
- * @param {boolean} [additionalClass] - optionally add another CSS class name to the containing HTML element of the drop-down.
5155
- * @param {boolean} [autocomplete=false] - set to `true` to allow filtering of options by entered text.
5156
- * @param {boolean} [autocompleteIgnoreCase=false] - set to `true` to ignore case while filtering options.
5157
- * @param {boolean} [autocompleteMatch='prefix'] - set to `'prefix'` to match the entered text as a prefix of an
5158
- * option, or `'contains'` to match it as a substring anywhere in the option.
5159
- * @param {function} [bottomButtonCallback] - callback on toggleable menu's bottom button click.
5160
- * @param {string} [bottomButtonText] - the text of the toggleable menu's bottom button.
5161
- * @param {string} [dropdownType='regular'] - type of the predefined dropdown (`'regular'`, `'badges-dropdown'`,
5162
- * `'priority'`).
5163
- * @param {boolean} [enableTyping=false] - set to `true` to allow typing new value in the collapsed dropdown input.
5164
- * In case the entered value does not match any of the options in `valuesArray`, the `item` parameter passed
5165
- * to `itemSelectCallback` will have a `typed` property of `true`.
5166
- * @param {boolean} [enableOverlap=false] - set to `true` to dropdown overlap the parental block (please set z-index
5167
- * for `.default-container` if it needed).
5168
- * @param {Object} [formObject] - form object.
5169
- * @param {string} [inputName] - name of the input.
5170
- * @param {boolean} [iconClass='igz-icon-dropdown'] - a CSS class name to use for the drop-down arrow icon.
5171
- * @param {boolean} [isDisabled=false] - set to `true` to make this instance of the component read-only.
5172
- * @param {boolean} [isFocused=false] - should input be focused when screen is displayed
5173
- * @param {boolean} [isCapitalized=false] - set to `true` to make capitalized all text from listing and selected
5174
- * value.
5175
- * @param {boolean} [isPagination=false] - set to `true` to remove check mark from selected list`s item.
5176
- * Note: only for pagination dropdown.
5177
- * @param {boolean} [isRequired=false] - set to `true` to make required selection of a value.
5178
- * @param {string} [itemSelectField] - name of the field that should be set from the selected value.
5179
- * @param {function} [itemSelectCallback] - callback on selecting item from a list.
5180
- * @param {Object} [matchPattern] - pattern for validating typed value if enableTyping is `true`.
5181
- * @param {string} [nameKey] - name of the list`s item which should be shown.
5182
- * @param {function} [onOpenDropdown] - callback on opening dropdown menu.
5183
- * @param {function} [onCloseDropdown] - callback on closing dropdown menu.
5184
- * @param {boolean} [readOnly=false] - marked dropdown as `readonly`.
5185
- * @param {boolean} [preventDropUp=false] - set to `true` to prevent drop up the menu.
5186
- * @param {string} [placeholder] - text which should be shown if no value is selected.
5187
- * @param {string} [selectPropertyOnly] - name of the property which should be set to selectedItem.
5188
- * Note: in that case ctrl.selectedItem will be a string value.
5189
- * @param {boolean} [skipSelection=false] - make the dropdown unselectable. On selecting any item, dropdown doesn't
5190
- * select it, and always shows placeholder.
5191
- * @param {boolean} [trim=true] - whether the input value will automatically trim
5192
- */
4991
+ /**
4992
+ * @name igzDefaultDropdown
4993
+ * @description
4994
+ * Default drop down component. This component is a toggleable menu that allows the user to choose one value from a
4995
+ * predefined list. It can also become a combo-box where the user can enter text. It can also auto-complete the
4996
+ * option by the partially enetered value.
4997
+ *
4998
+ * @param {Object|string} selectedItem - an object/string to be set by the component.
4999
+ * The value that will be set as selected item from predefined list.
5000
+ * Note: if `enableTyping` is equal to `true` it means that the user can mutate this value. In this case
5001
+ * after modifying the value the new list item will be created.
5002
+ * @param {Array.<Object>} valuesArray - an array of objects describing the available options that user can select.
5003
+ * @param {boolean} [additionalClass] - optionally add another CSS class name to the containing HTML element of the drop-down.
5004
+ * @param {boolean} [autocomplete=false] - set to `true` to allow filtering of options by entered text.
5005
+ * @param {boolean} [autocompleteIgnoreCase=false] - set to `true` to ignore case while filtering options.
5006
+ * @param {boolean} [autocompleteMatch='prefix'] - set to `'prefix'` to match the entered text as a prefix of an
5007
+ * option, or `'contains'` to match it as a substring anywhere in the option.
5008
+ * @param {function} [bottomButtonCallback] - callback on toggleable menu's bottom button click.
5009
+ * @param {string} [bottomButtonText] - the text of the toggleable menu's bottom button.
5010
+ * @param {string} [dropdownType='regular'] - type of the predefined dropdown (`'regular'`, `'badges-dropdown'`,
5011
+ * `'priority'`).
5012
+ * @param {boolean} [enableTyping=false] - set to `true` to allow typing new value in the collapsed dropdown input.
5013
+ * In case the entered value does not match any of the options in `valuesArray`, the `item` parameter passed
5014
+ * to `itemSelectCallback` will have a `typed` property of `true`.
5015
+ * @param {boolean} [enableOverlap=false] - set to `true` to dropdown overlap the parental block (please set z-index
5016
+ * for `.default-container` if it needed).
5017
+ * @param {Object} [formObject] - form object.
5018
+ * @param {string} [inputName] - name of the input.
5019
+ * @param {boolean} [iconClass='igz-icon-dropdown'] - a CSS class name to use for the drop-down arrow icon.
5020
+ * @param {boolean} [isDisabled=false] - set to `true` to make this instance of the component read-only.
5021
+ * @param {boolean} [isFocused=false] - should input be focused when screen is displayed
5022
+ * @param {boolean} [isCapitalized=false] - set to `true` to make capitalized all text from listing and selected
5023
+ * value.
5024
+ * @param {boolean} [isPagination=false] - set to `true` to remove check mark from selected list`s item.
5025
+ * Note: only for pagination dropdown.
5026
+ * @param {boolean} [isRequired=false] - set to `true` to make required selection of a value.
5027
+ * @param {string} [itemSelectField] - name of the field that should be set from the selected value.
5028
+ * @param {function} [itemSelectCallback] - callback on selecting item from a list.
5029
+ * @param {Object} [matchPattern] - pattern for validating typed value if enableTyping is `true`.
5030
+ * @param {string} [nameKey] - name of the list`s item which should be shown.
5031
+ * @param {function} [onOpenDropdown] - callback on opening dropdown menu.
5032
+ * @param {function} [onCloseDropdown] - callback on closing dropdown menu.
5033
+ * @param {boolean} [readOnly=false] - marked dropdown as `readonly`.
5034
+ * @param {boolean} [preventDropUp=false] - set to `true` to prevent drop up the menu.
5035
+ * @param {string} [placeholder] - text which should be shown if no value is selected.
5036
+ * @param {string} [selectPropertyOnly] - name of the property which should be set to selectedItem.
5037
+ * Note: in that case ctrl.selectedItem will be a string value.
5038
+ * @param {boolean} [skipSelection=false] - make the dropdown unselectable. On selecting any item, dropdown doesn't
5039
+ * select it, and always shows placeholder.
5040
+ * @param {boolean} [trim=true] - whether the input value will automatically trim
5041
+ */
5193
5042
 
5194
5043
  IgzDefaultDropdownController.$inject = ['$scope', '$element', '$document', '$timeout', '$transclude', '$window', 'lodash', 'EventHelperService', 'FormValidationService', 'PreventDropdownCutOffService', 'PriorityDropdownService', 'SeverityDropdownService'];
5195
5044
  angular.module('iguazio.dashboard-controls').component('igzDefaultDropdown', {
@@ -5824,68 +5673,234 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
5824
5673
  (function () {
5825
5674
  'use strict';
5826
5675
 
5827
- IgzImportProjectDialogController.$inject = ['$scope', '$i18next', 'i18next', 'lodash'];
5828
- angular.module('iguazio.dashboard-controls').component('igzImportProjectDialog', {
5676
+ IgzElementLoadingStatusController.$inject = ['$element', '$scope', '$state', '$i18next', 'i18next', 'lodash'];
5677
+ angular.module('iguazio.dashboard-controls').component('igzElementLoadingStatus', {
5829
5678
  bindings: {
5830
- closeDialog: '&',
5831
- dialogTitle: '<',
5832
- displayAllOptions: '<'
5679
+ errorMessage: '@?',
5680
+ loadingStatusSize: '@?',
5681
+ name: '@',
5682
+ refresh: '<?',
5683
+ textStatus: '<?',
5684
+ title: '@?',
5685
+ tooltipLabel: '@?'
5833
5686
  },
5834
- templateUrl: 'igz_controls/components/import-project-dialog/import-project-dialog.tpl.html',
5835
- controller: IgzImportProjectDialogController
5687
+ templateUrl: 'igz_controls/components/element-loading-status/element-loading-status.tpl.html',
5688
+ controller: IgzElementLoadingStatusController,
5689
+ transclude: true
5836
5690
  });
5837
5691
 
5838
- function IgzImportProjectDialogController($scope, $i18next, i18next, lodash) {
5692
+ function IgzElementLoadingStatusController($element, $scope, $state, $i18next, i18next, lodash) {
5839
5693
  var ctrl = this;
5840
5694
  var lng = i18next.language;
5841
5695
 
5842
- var checkedItem = 'singleFunction';
5696
+ ctrl.isShowContent = false;
5697
+ ctrl.isShowError = false;
5698
+ ctrl.isShowSpinner = true;
5843
5699
 
5844
- ctrl.option = [];
5845
- ctrl.optionList = [{
5846
- label: $i18next.t('common:APPLY_TO_ALL_FUNCTIONS_IN_THIS_PROJECT', { lng: lng }),
5847
- id: 'singleProject',
5848
- value: 'singleProject',
5849
- disabled: false,
5850
- visibility: true
5851
- }, {
5852
- label: $i18next.t('common:APPLY_TO_ALL_FUNCTIONS_IN_ALL_PROJECT', { lng: lng }),
5853
- id: 'allProjects',
5854
- value: 'allProjects',
5855
- disabled: false,
5856
- visibility: true
5857
- }];
5700
+ ctrl.deregisterHideError = null;
5701
+ ctrl.deregisterHideSpinner = null;
5702
+ ctrl.deregisterShowError = null;
5703
+ ctrl.deregisterShowSpinner = null;
5858
5704
 
5705
+ ctrl.$onDestroy = onDestroy;
5859
5706
  ctrl.$onInit = onInit;
5707
+ ctrl.$onChanges = onChanges;
5860
5708
 
5861
- ctrl.onClose = onClose;
5862
- ctrl.onCheckboxChange = onCheckboxChange;
5709
+ ctrl.checkSize = checkSize;
5710
+ ctrl.refreshPage = refreshPage;
5863
5711
 
5864
5712
  //
5865
5713
  // Hook methods
5866
5714
  //
5867
5715
 
5716
+ /**
5717
+ * Destructor method
5718
+ */
5719
+ function onDestroy() {
5720
+ deregisterBroadcasts();
5721
+ }
5722
+
5868
5723
  /**
5869
5724
  * Initialization method
5870
5725
  */
5871
5726
  function onInit() {
5872
- lodash.set(ctrl.optionList, '[1].visibility', ctrl.displayAllOptions);
5727
+ registerBroadcasts();
5873
5728
  }
5874
5729
 
5875
- //
5876
- // Public methods
5877
- //
5878
-
5879
5730
  /**
5880
- * Handles checking/un-checking checkbox
5731
+ * Changes method
5732
+ * @param {Object} changes
5881
5733
  */
5882
- function onCheckboxChange() {
5883
- if (!lodash.isNil(ctrl.option)) {
5884
- if (lodash.includes(ctrl.option, 'allProjects')) {
5885
- lodash.set(ctrl.optionList, '[0].disabled', true);
5886
-
5887
- if (ctrl.option.length === 1) {
5888
- ctrl.option.unshift('singleProject');
5734
+ function onChanges(changes) {
5735
+ lodash.defaults(ctrl, {
5736
+ loadingStatusSize: 'default',
5737
+ refresh: false,
5738
+ title: '',
5739
+ tooltipLabel: ''
5740
+ });
5741
+
5742
+ if (lodash.isEmpty(ctrl.errorMessage)) {
5743
+ lodash.assign(ctrl, {
5744
+ errorMessage: $i18next.t('common:ERROR_MSG.ELEMENT_LOADING_DEFAULT_1', { lng: lng }),
5745
+ title: $i18next.t('common:OOPS', { lng: lng }),
5746
+ refresh: true
5747
+ });
5748
+ }
5749
+
5750
+ if (changes && changes.name && !lodash.isEmpty(changes.name.previousValue) && changes.name.currentValue !== changes.name.previousValue) {
5751
+ deregisterBroadcasts();
5752
+ registerBroadcasts();
5753
+ }
5754
+ }
5755
+
5756
+ //
5757
+ // Public methods
5758
+ //
5759
+
5760
+ /**
5761
+ * Check if given size is actual
5762
+ * @param {string} size - size name ('small', 'default')
5763
+ */
5764
+ function checkSize(size) {
5765
+ return ctrl.loadingStatusSize === size;
5766
+ }
5767
+
5768
+ /**
5769
+ * Refresh current page (ui-router state)
5770
+ * @param {Object} $event - angular event object
5771
+ */
5772
+ function refreshPage($event) {
5773
+
5774
+ // Prevent 'upper' events to be triggered
5775
+ $event.stopPropagation();
5776
+
5777
+ $state.go($state.current, {}, { reload: true });
5778
+ }
5779
+
5780
+ //
5781
+ // Private methods
5782
+ //
5783
+
5784
+ /**
5785
+ * Deregister broadcasts
5786
+ */
5787
+ function deregisterBroadcasts() {
5788
+ ctrl.deregisterHideError();
5789
+ ctrl.deregisterHideSpinner();
5790
+ ctrl.deregisterShowError();
5791
+ ctrl.deregisterShowSpinner();
5792
+ }
5793
+
5794
+ /**
5795
+ * Hide given loading error
5796
+ */
5797
+ function hideError() {
5798
+ ctrl.isShowError = false;
5799
+ }
5800
+
5801
+ /**
5802
+ * Hide given loading spinner
5803
+ */
5804
+ function hideSpinner() {
5805
+ ctrl.isShowSpinner = false;
5806
+ ctrl.isShowContent = true;
5807
+ }
5808
+
5809
+ /**
5810
+ * Register broadcasts
5811
+ */
5812
+ function registerBroadcasts() {
5813
+ ctrl.deregisterHideError = $scope.$on('element-loading-status_hide-error_' + ctrl.name, hideError);
5814
+ ctrl.deregisterHideSpinner = $scope.$on('element-loading-status_hide-spinner_' + ctrl.name, hideSpinner);
5815
+ ctrl.deregisterShowError = $scope.$on('element-loading-status_show-error_' + ctrl.name, showError);
5816
+ ctrl.deregisterShowSpinner = $scope.$on('element-loading-status_show-spinner_' + ctrl.name, showSpinner);
5817
+ }
5818
+
5819
+ /**
5820
+ * Show given loading error
5821
+ */
5822
+ function showError() {
5823
+ ctrl.isShowError = true;
5824
+ ctrl.isShowSpinner = false;
5825
+ }
5826
+
5827
+ /**
5828
+ * Show given loading spinner
5829
+ */
5830
+ function showSpinner() {
5831
+ ctrl.isShowError = false;
5832
+ ctrl.isShowContent = false;
5833
+ ctrl.isShowSpinner = true;
5834
+ }
5835
+ }
5836
+ })();
5837
+ 'use strict';
5838
+
5839
+ (function () {
5840
+ 'use strict';
5841
+
5842
+ IgzImportProjectDialogController.$inject = ['$scope', '$i18next', 'i18next', 'lodash'];
5843
+ angular.module('iguazio.dashboard-controls').component('igzImportProjectDialog', {
5844
+ bindings: {
5845
+ closeDialog: '&',
5846
+ dialogTitle: '<',
5847
+ displayAllOptions: '<'
5848
+ },
5849
+ templateUrl: 'igz_controls/components/import-project-dialog/import-project-dialog.tpl.html',
5850
+ controller: IgzImportProjectDialogController
5851
+ });
5852
+
5853
+ function IgzImportProjectDialogController($scope, $i18next, i18next, lodash) {
5854
+ var ctrl = this;
5855
+ var lng = i18next.language;
5856
+
5857
+ var checkedItem = 'singleFunction';
5858
+
5859
+ ctrl.option = [];
5860
+ ctrl.optionList = [{
5861
+ label: $i18next.t('common:APPLY_TO_ALL_FUNCTIONS_IN_THIS_PROJECT', { lng: lng }),
5862
+ id: 'singleProject',
5863
+ value: 'singleProject',
5864
+ disabled: false,
5865
+ visibility: true
5866
+ }, {
5867
+ label: $i18next.t('common:APPLY_TO_ALL_FUNCTIONS_IN_ALL_PROJECT', { lng: lng }),
5868
+ id: 'allProjects',
5869
+ value: 'allProjects',
5870
+ disabled: false,
5871
+ visibility: true
5872
+ }];
5873
+
5874
+ ctrl.$onInit = onInit;
5875
+
5876
+ ctrl.onClose = onClose;
5877
+ ctrl.onCheckboxChange = onCheckboxChange;
5878
+
5879
+ //
5880
+ // Hook methods
5881
+ //
5882
+
5883
+ /**
5884
+ * Initialization method
5885
+ */
5886
+ function onInit() {
5887
+ lodash.set(ctrl.optionList, '[1].visibility', ctrl.displayAllOptions);
5888
+ }
5889
+
5890
+ //
5891
+ // Public methods
5892
+ //
5893
+
5894
+ /**
5895
+ * Handles checking/un-checking checkbox
5896
+ */
5897
+ function onCheckboxChange() {
5898
+ if (!lodash.isNil(ctrl.option)) {
5899
+ if (lodash.includes(ctrl.option, 'allProjects')) {
5900
+ lodash.set(ctrl.optionList, '[0].disabled', true);
5901
+
5902
+ if (ctrl.option.length === 1) {
5903
+ ctrl.option.unshift('singleProject');
5889
5904
  }
5890
5905
  } else {
5891
5906
  lodash.set(ctrl.optionList, '[0].disabled', false);
@@ -7839,416 +7854,63 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
7839
7854
  })();
7840
7855
  'use strict';
7841
7856
 
7857
+ /* eslint complexity: ["error", 15] */
7842
7858
  (function () {
7843
7859
  'use strict';
7844
7860
 
7845
- SearchHelperService.$inject = ['lodash'];
7846
- angular.module('iguazio.dashboard-controls').factory('SearchHelperService', SearchHelperService);
7861
+ IgzSizeController.$inject = ['$filter', '$scope', '$i18next', '$timeout', 'i18next', 'lodash', 'moment', 'ConfigService', 'PaletteService'];
7862
+ angular.module('iguazio.dashboard-controls').component('igzSize', {
7863
+ bindings: {
7864
+ entity: '<',
7865
+ showChart: '<',
7866
+ type: '@'
7867
+ },
7868
+ templateUrl: 'igz_controls/components/size/size.tpl.html',
7869
+ controller: IgzSizeController
7870
+ });
7847
7871
 
7848
- function SearchHelperService(lodash) {
7849
- return {
7850
- makeSearch: makeSearch
7872
+ function IgzSizeController($filter, $scope, $i18next, $timeout, i18next, lodash, moment, ConfigService, PaletteService) {
7873
+ var ctrl = this;
7874
+ var lng = i18next.language;
7875
+ var timeout = null;
7876
+
7877
+ var TOOLTIP_ARROW_SIZE = 7;
7878
+ var tooltipByType = {
7879
+ container: $i18next.t('common:TOOLTIP.LAST_MONTH', { lng: lng }),
7880
+ service: $i18next.t('common:TOOLTIP.LAST_HOUR', { lng: lng }),
7881
+ function: $i18next.t('common:TOOLTIP.LAST_HOUR', { lng: lng }),
7882
+ storage_pool: $i18next.t('common:TOOLTIP.LAST_MONTH', { lng: lng }),
7883
+ cluster: $i18next.t('common:TOOLTIP.LAST_10_MINUTES', { lng: lng }),
7884
+ node: $i18next.t('common:TOOLTIP.LAST_10_MINUTES', { lng: lng }),
7885
+ tenant: $i18next.t('common:TOOLTIP.LAST_MONTH', { lng: lng })
7851
7886
  };
7852
7887
 
7888
+ var CPU_TYPES = ['nodes', 'clusters'];
7889
+ var CPU_CORES_TYPES = ['services_cpu', 'functions_cpu'];
7890
+ var GPU_CORES_TYPES = ['services_gpu', 'functions_gpu'];
7891
+ var SIZE_TYPES = ['containers', 'storage-pools', 'tenants', 'services_memory', 'functions_memory'];
7892
+ var COUNT_TYPES = ['functions_events'];
7893
+
7894
+ ctrl.outOf = '';
7895
+
7896
+ ctrl.$onInit = onInit;
7897
+ ctrl.$onChanges = onChanges;
7898
+ ctrl.$onDestroy = onDestroy;
7899
+
7900
+ ctrl.defaultTo = lodash.defaultTo;
7901
+ ctrl.getDisplayValue = getDisplayValue;
7902
+
7853
7903
  //
7854
- // Public methods
7904
+ // Hook methods
7855
7905
  //
7856
7906
 
7857
7907
  /**
7858
- * Perform search of data based on text query
7859
- * @param {string} searchQuery - text query entered to a search input
7860
- * @param {Array.<Object>} data - array of data
7861
- * @param {Array.<string>} pathsForSearchArray - array of keys in which search will be made
7862
- * @param {boolean} isHierarchical - flag which indicates if passed data has hierarchical structure
7863
- * @param {string} ruleType - string representing the type of rule resource
7864
- * @param {Object} searchStates
7865
- * @param {string} [multiSearchName] - unique name of the search input
7908
+ * On change bindings method
7909
+ * @param {Object} changes
7866
7910
  */
7867
- function makeSearch(searchQuery, data, pathsForSearchArray, isHierarchical, ruleType, searchStates, multiSearchName) {
7868
- searchStates.searchNotFound = false;
7869
- searchStates.searchInProgress = false;
7870
-
7871
- if (isHierarchical) {
7872
- data = data.ui.children;
7873
- } else {
7874
- ruleType = '';
7875
- }
7876
- if (searchQuery === '') {
7877
- showAllChildren(data, multiSearchName);
7878
- } else if (angular.isString(searchQuery)) {
7879
- searchStates.searchNotFound = true;
7880
- searchStates.searchInProgress = true;
7881
- findBySearchQuery(searchQuery, data, pathsForSearchArray, isHierarchical, ruleType, searchStates, multiSearchName);
7882
- }
7883
- }
7884
-
7885
- //
7886
- // Private methods
7887
- //
7888
-
7889
- /**
7890
- * Loop through all given data to show/hide them depending on query match criteria (recursively)
7891
- * @param {string} searchQuery - text query entered to a search input
7892
- * @param {Array.<Object>} children - array of child data
7893
- * @param {Array.<string>} pathsForSearch - array of strings, representing data's properties keys to search from
7894
- * @param {boolean} isHierarchical - flag which indicates if passed data has hierarchical structure
7895
- * @param {string} ruleType - string representing the type of rule resource
7896
- * @param {Object} searchStates
7897
- * @param {string} [multiSearchName] - unique name of the search input
7898
- */
7899
- function findBySearchQuery(searchQuery, children, pathsForSearch, isHierarchical, ruleType, searchStates, multiSearchName) {
7900
- angular.forEach(children, function (child) {
7901
- // Search by text in data without children data only
7902
- if (angular.isString(child.type) && child.type !== ruleType && isHierarchical) {
7903
- // Hide all parent data while search among children and proceed recursively
7904
- child.ui.isFitQuery = false;
7905
- findBySearchQuery(searchQuery, child.ui.children, pathsForSearch, isHierarchical, ruleType, searchStates, multiSearchName);
7906
- } else {
7907
- showRelevantItem(searchQuery, child, pathsForSearch, searchStates, multiSearchName);
7908
- }
7909
- });
7910
- }
7911
-
7912
- /**
7913
- * Get all current item's properties string values and push to stringValuesArray (recursively)
7914
- * @param {string} itemPropertyValue - item's attribute value
7915
- * @param {Array} stringValuesArray - array to collect current item's all properties string values
7916
- */
7917
- function getStringValuesFromItem(itemPropertyValue, stringValuesArray) {
7918
- if (angular.isObject(itemPropertyValue)) {
7919
- angular.forEach(itemPropertyValue, function (value) {
7920
- getStringValuesFromItem(value, stringValuesArray);
7921
- });
7922
- } else if (angular.isString(itemPropertyValue) && itemPropertyValue.length > 0 || angular.isNumber(itemPropertyValue)) {
7923
- stringValuesArray.push(itemPropertyValue.toString());
7924
- }
7925
-
7926
- return stringValuesArray;
7927
- }
7928
-
7929
- /**
7930
- * Sets isFitQuery value for data item
7931
- * @param {Object} dataItem - current item
7932
- * @param {string} [multiSearchName] - unique name of the search input
7933
- * @param {boolean} isFitQuery - `true` if item is matched with search query
7934
- */
7935
- function setFitQueryValue(dataItem, multiSearchName, isFitQuery) {
7936
- var filterPath = lodash.isEmpty(multiSearchName) ? 'isFitQuery' : ['filters', multiSearchName, 'isFitQuery'];
7937
-
7938
- lodash.set(dataItem.ui, filterPath, isFitQuery);
7939
- }
7940
-
7941
- /**
7942
- * Show all data item's children chain (recursively)
7943
- * @param {Array.<Object>} data - child items
7944
- * @param {string} [multiSearchName] - unique name of the search input
7945
- */
7946
- function showAllChildren(data, multiSearchName) {
7947
- angular.forEach(data, function (value) {
7948
- var children = value.ui.children;
7949
-
7950
- setFitQueryValue(value, multiSearchName, true);
7951
-
7952
- if (!lodash.isEmpty(children)) {
7953
- showAllChildren(children);
7954
- }
7955
- });
7956
- }
7957
-
7958
- /**
7959
- * Show item's all direct ancestors chain (recursively)
7960
- * @param {Object} dataItem - current item
7961
- */
7962
- function showAllParents(dataItem) {
7963
- var parent = dataItem.ui.parent;
7964
- if (angular.isDefined(parent)) {
7965
- parent.ui.isFitQuery = true;
7966
- showAllParents(parent);
7967
- }
7968
- }
7969
-
7970
- /**
7971
- * Loop through all given data's properties and show/hide current data depending on query match criteria
7972
- * @param {string} searchQuery - query entered to a search input
7973
- * @param {Object} dataItem - current item
7974
- * @param {Array} pathsForSearch - array of strings, representing paths to item's properties to search from
7975
- * @param {Object} searchStates
7976
- * @param {string} [multiSearchName] - unique name of the search input
7977
- */
7978
- function showRelevantItem(searchQuery, dataItem, pathsForSearch, searchStates, multiSearchName) {
7979
- var isFitQuery;
7980
- var stringValuesArray = [];
7981
-
7982
- angular.forEach(pathsForSearch, function (pathForSearch) {
7983
- getStringValuesFromItem(lodash.get(dataItem, pathForSearch), stringValuesArray);
7984
- });
7985
-
7986
- // If at least one value in item's properties string values matched - show current item and all its direct ancestors chain
7987
- isFitQuery = stringValuesArray.some(function (value) {
7988
- return lodash.includes(value.toLowerCase(), searchQuery.toLowerCase());
7989
- });
7990
-
7991
- setFitQueryValue(dataItem, multiSearchName, isFitQuery);
7992
-
7993
- if (dataItem.ui.isFitQuery) {
7994
- searchStates.searchNotFound = false;
7995
- showAllParents(dataItem);
7996
- }
7997
- }
7998
- }
7999
- })();
8000
- 'use strict';
8001
-
8002
- (function () {
8003
- 'use strict';
8004
-
8005
- IgzSearchInputController.$inject = ['$scope', '$timeout', 'lodash', 'SearchHelperService'];
8006
- angular.module('iguazio.dashboard-controls').component('igzSearchInput', {
8007
- bindings: {
8008
- dataSet: '<',
8009
- initSearchQuery: '@?',
8010
- isSearchHierarchically: '@?',
8011
- liveSearch: '<?',
8012
- multiSearchName: '@?',
8013
- onSearchSubmit: '&?',
8014
- placeholder: '@',
8015
- ruleType: '@?',
8016
- searchCallback: '&?',
8017
- searchKeys: '<',
8018
- searchStates: '<',
8019
- searchType: '@?',
8020
- type: '@?'
8021
- },
8022
- templateUrl: 'igz_controls/components/search-input/search-input.tpl.html',
8023
- controller: IgzSearchInputController
8024
- });
8025
-
8026
- function IgzSearchInputController($scope, $timeout, lodash, SearchHelperService) {
8027
- var ctrl = this;
8028
-
8029
- ctrl.isInputFocused = false;
8030
- ctrl.isSearchHierarchically = String(ctrl.isSearchHierarchically) === 'true';
8031
- ctrl.searchQuery = '';
8032
-
8033
- ctrl.$onInit = onInit;
8034
- ctrl.onPressEnter = onPressEnter;
8035
- ctrl.clearInputField = clearInputField;
8036
- ctrl.toggleInputFocus = toggleInputFocus;
8037
-
8038
- //
8039
- // Hook method
8040
- //
8041
-
8042
- /**
8043
- * Initialization method
8044
- */
8045
- function onInit() {
8046
- ctrl.searchStates.searchNotFound = false;
8047
- ctrl.searchStates.searchInProgress = false;
8048
-
8049
- if (!lodash.isUndefined(ctrl.initSearchQuery)) {
8050
- ctrl.searchQuery = ctrl.initSearchQuery;
8051
- }
8052
-
8053
- if (angular.isUndefined(ctrl.searchType)) {
8054
- ctrl.searchType = 'infoPage';
8055
- }
8056
-
8057
- if (angular.isUndefined(ctrl.liveSearch) || ctrl.liveSearch) {
8058
- $scope.$watch('$ctrl.searchQuery', onChangeSearchQuery);
8059
- }
8060
-
8061
- $scope.$on('search-input_refresh-search', onDataChanged);
8062
- $scope.$on('search-input_reset', resetSearch);
8063
- }
8064
-
8065
- //
8066
- // Public methods
8067
- //
8068
-
8069
- /**
8070
- * Initializes search and apply filters on press enter
8071
- * @param {Event} e
8072
- */
8073
- function onPressEnter(e) {
8074
- if (e.keyCode === 13) {
8075
- makeSearch();
8076
-
8077
- if (angular.isFunction(ctrl.onSearchSubmit) && ctrl.isInputFocused) {
8078
- ctrl.onSearchSubmit();
8079
- }
8080
- }
8081
- }
8082
-
8083
- /**
8084
- * Clear search input field
8085
- */
8086
- function clearInputField() {
8087
- ctrl.searchQuery = '';
8088
- }
8089
-
8090
- /**
8091
- * Toggles input focus
8092
- */
8093
- function toggleInputFocus() {
8094
- ctrl.isInputFocused = !ctrl.isInputFocused;
8095
- }
8096
-
8097
- //
8098
- // Private methods
8099
- //
8100
-
8101
- /**
8102
- * Calls service method for search
8103
- */
8104
- function makeSearch() {
8105
- if (angular.isFunction(ctrl.searchCallback)) {
8106
-
8107
- // call custom search method
8108
- ctrl.searchCallback(lodash.pick(ctrl, ['searchQuery', 'dataSet', 'searchKeys', 'isSearchHierarchically', 'ruleType', 'searchStates', 'multiSearchName']));
8109
- }
8110
-
8111
- if (angular.isUndefined(ctrl.type)) {
8112
-
8113
- // default search functionality
8114
- SearchHelperService.makeSearch(ctrl.searchQuery, ctrl.dataSet, ctrl.searchKeys, ctrl.isSearchHierarchically, ctrl.ruleType, ctrl.searchStates, ctrl.multiSearchName);
8115
- }
8116
- }
8117
-
8118
- /**
8119
- * Tracks input changing and initializes search
8120
- */
8121
- function onChangeSearchQuery(newValue, oldValue) {
8122
- if (angular.isDefined(newValue) && newValue !== oldValue) {
8123
- makeSearch();
8124
- }
8125
- }
8126
-
8127
- /**
8128
- * Initializes search when all html has been rendered
8129
- */
8130
- function onDataChanged() {
8131
- $timeout(makeSearch);
8132
- }
8133
-
8134
- /**
8135
- * Resets search query and initializes search
8136
- */
8137
- function resetSearch() {
8138
- ctrl.searchQuery = '';
8139
- $timeout(makeSearch);
8140
- }
8141
- }
8142
- })();
8143
- 'use strict';
8144
-
8145
- (function () {
8146
- 'use strict';
8147
-
8148
- igzShowHideSearchItem.$inject = ['lodash'];
8149
- angular.module('iguazio.dashboard-controls').directive('igzShowHideSearchItem', igzShowHideSearchItem);
8150
-
8151
- function igzShowHideSearchItem(lodash) {
8152
- return {
8153
- restrict: 'A',
8154
- scope: {
8155
- dataItem: '=igzShowHideSearchItem'
8156
- },
8157
- link: link
8158
- };
8159
-
8160
- function link(scope, element) {
8161
- activate();
8162
-
8163
- //
8164
- // Private methods
8165
- //
8166
-
8167
- /**
8168
- * Constructor method
8169
- */
8170
- function activate() {
8171
- scope.$watch('dataItem.ui.isFitQuery', changeVisibility);
8172
- scope.$watch('dataItem.ui.filters', changeVisibility, true);
8173
- }
8174
-
8175
- /**
8176
- * Method sets display property of element to false if it doesn't fit the query in search otherwise removes these property
8177
- * @param {boolean} newValue - value displays if current element fit search query
8178
- */
8179
- function changeVisibility(newValue) {
8180
- var displayValue = '';
8181
-
8182
- if (lodash.isObject(newValue)) {
8183
- displayValue = lodash.some(newValue, { isFitQuery: false }) ? 'none' : '';
8184
- } else {
8185
- displayValue = newValue === false ? 'none' : '';
8186
- }
8187
-
8188
- element.css('display', displayValue);
8189
- }
8190
- }
8191
- }
8192
- })();
8193
- 'use strict';
8194
-
8195
- /* eslint complexity: ["error", 15] */
8196
- (function () {
8197
- 'use strict';
8198
-
8199
- IgzSizeController.$inject = ['$filter', '$scope', '$i18next', '$timeout', 'i18next', 'lodash', 'moment', 'ConfigService', 'PaletteService'];
8200
- angular.module('iguazio.dashboard-controls').component('igzSize', {
8201
- bindings: {
8202
- entity: '<',
8203
- showChart: '<',
8204
- type: '@'
8205
- },
8206
- templateUrl: 'igz_controls/components/size/size.tpl.html',
8207
- controller: IgzSizeController
8208
- });
8209
-
8210
- function IgzSizeController($filter, $scope, $i18next, $timeout, i18next, lodash, moment, ConfigService, PaletteService) {
8211
- var ctrl = this;
8212
- var lng = i18next.language;
8213
- var timeout = null;
8214
-
8215
- var TOOLTIP_ARROW_SIZE = 7;
8216
- var tooltipByType = {
8217
- container: $i18next.t('common:TOOLTIP.LAST_MONTH', { lng: lng }),
8218
- service: $i18next.t('common:TOOLTIP.LAST_HOUR', { lng: lng }),
8219
- function: $i18next.t('common:TOOLTIP.LAST_HOUR', { lng: lng }),
8220
- storage_pool: $i18next.t('common:TOOLTIP.LAST_MONTH', { lng: lng }),
8221
- cluster: $i18next.t('common:TOOLTIP.LAST_10_MINUTES', { lng: lng }),
8222
- node: $i18next.t('common:TOOLTIP.LAST_10_MINUTES', { lng: lng }),
8223
- tenant: $i18next.t('common:TOOLTIP.LAST_MONTH', { lng: lng })
8224
- };
8225
-
8226
- var CPU_TYPES = ['nodes', 'clusters'];
8227
- var CPU_CORES_TYPES = ['services_cpu', 'functions_cpu'];
8228
- var GPU_CORES_TYPES = ['services_gpu', 'functions_gpu'];
8229
- var SIZE_TYPES = ['containers', 'storage-pools', 'tenants', 'services_memory', 'functions_memory'];
8230
- var COUNT_TYPES = ['functions_events'];
8231
-
8232
- ctrl.outOf = '';
8233
-
8234
- ctrl.$onInit = onInit;
8235
- ctrl.$onChanges = onChanges;
8236
- ctrl.$onDestroy = onDestroy;
8237
-
8238
- ctrl.defaultTo = lodash.defaultTo;
8239
- ctrl.getDisplayValue = getDisplayValue;
8240
-
8241
- //
8242
- // Hook methods
8243
- //
8244
-
8245
- /**
8246
- * On change bindings method
8247
- * @param {Object} changes
8248
- */
8249
- function onChanges(changes) {
8250
- if (changes && changes.showChart && changes.showChart.currentValue) {
8251
- timeout = $timeout(updateChart);
7911
+ function onChanges(changes) {
7912
+ if (changes && changes.showChart && changes.showChart.currentValue) {
7913
+ timeout = $timeout(updateChart);
8252
7914
  }
8253
7915
  }
8254
7916
 
@@ -8486,20 +8148,255 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
8486
8148
  ctrl.entity.ui.lineChartOptions[ctrl.type].options.yAxis.max = 100;
8487
8149
  }
8488
8150
 
8489
- $scope.$on('size_update-charts', updateChart);
8490
- $scope.$on('info-page-pane_toggled', updateChart);
8491
- $scope.$on('resize-size-cells', updateChart);
8151
+ $scope.$on('size_update-charts', updateChart);
8152
+ $scope.$on('info-page-pane_toggled', updateChart);
8153
+ $scope.$on('resize-size-cells', updateChart);
8154
+
8155
+ timeout = $timeout(updateChart);
8156
+ }
8157
+
8158
+ /**
8159
+ * Destructor method
8160
+ */
8161
+ function onDestroy() {
8162
+ if (!lodash.isNil(timeout)) {
8163
+ $timeout.cancel(timeout);
8164
+ }
8165
+ }
8166
+
8167
+ //
8168
+ // Public methods
8169
+ //
8170
+
8171
+ /**
8172
+ * Gets display value
8173
+ * @returns {string}
8174
+ */
8175
+ function getDisplayValue() {
8176
+ var defaultValue = isCpu() ? '0%' : isSize() ? '0 bytes' : '0';
8177
+ var metricName = isCpu() ? 'cpu.idle' : isCpuCores() ? 'cpu.cores' : isGpuCores() ? 'gpu.cores' : isSize() ? 'size' : 'count';
8178
+ var value = ctrl.entity.ui.metrics[metricName];
8179
+ var sizePercentage = ctrl.entity.ui.metrics.sizePercentage;
8180
+ sizePercentage = lodash.isUndefined(sizePercentage) ? '' : ' (' + sizePercentage + '%)';
8181
+
8182
+ return lodash.isNil(value) ? defaultValue : isCpu() ? $filter('number')(value > 0 ? 100 - value : 0, 0) + '%' : isCpuCores() || isGpuCores() ? $filter('scale')(value, 0, 'nanos') : isSize() ? $filter('bytes')(value, 2) + sizePercentage : $filter('scale')(value);
8183
+ }
8184
+
8185
+ //
8186
+ // Private methods
8187
+ //
8188
+
8189
+ /**
8190
+ * Hides chart tooltip
8191
+ */
8192
+ function hideChartTooltip() {
8193
+ if (!ctrl.entity.ui[ctrl.chartObjName].tooltip.isHidden) {
8194
+ ctrl.entity.ui[ctrl.chartObjName].tooltip.hide();
8195
+ }
8196
+ }
8197
+
8198
+ /**
8199
+ * Determines whether this chart is for Count
8200
+ * @returns {boolean} `true` if this chart is for Count or `false` otherwise
8201
+ */
8202
+ function isCount() {
8203
+ return lodash.includes(COUNT_TYPES, ctrl.type);
8204
+ }
8205
+
8206
+ /**
8207
+ * Determines whether this chart is for CPU
8208
+ * @returns {boolean} `true` if this chart is for CPU or `false` otherwise
8209
+ */
8210
+ function isCpu() {
8211
+ return lodash.includes(CPU_TYPES, ctrl.type);
8212
+ }
8213
+
8214
+ /**
8215
+ * Determines whether this chart is for CPU cores
8216
+ * @returns {boolean} `true` if this chart is for CPU cores or `false` otherwise
8217
+ */
8218
+ function isCpuCores() {
8219
+ return lodash.includes(CPU_CORES_TYPES, ctrl.type);
8220
+ }
8221
+
8222
+ /**
8223
+ * Determines whether this chart is for GPU cores
8224
+ * @returns {boolean} `true` if this chart is for GPU cores or `false` otherwise
8225
+ */
8226
+ function isGpuCores() {
8227
+ return lodash.includes(GPU_CORES_TYPES, ctrl.type);
8228
+ }
8229
+
8230
+ /**
8231
+ * Defines if max quota value and max point in chart data has difference less than 20%
8232
+ * @returns {boolean}
8233
+ */
8234
+ function isMaxQuotaValueAppropriate() {
8235
+ var maxGraphicPoint = lodash.maxBy(lodash.values(ctrl.entity.ui.metrics.sizeLineChartData), function (point) {
8236
+ return point[1];
8237
+ });
8238
+
8239
+ return (ctrl.entity.attr.quota - maxGraphicPoint[1]) / ctrl.entity.attr.quota * 100 <= 20;
8240
+ }
8241
+
8242
+ /**
8243
+ * Determines whether this chart is for Size
8244
+ * @returns {boolean} `true` if this chart is for Size or `false` otherwise
8245
+ */
8246
+ function isSize() {
8247
+ return lodash.includes(SIZE_TYPES, ctrl.type);
8248
+ }
8249
+
8250
+ /**
8251
+ * Checks if chart should have a tooltip
8252
+ * @returns {boolean}
8253
+ */
8254
+ function isTooltipEnabled() {
8255
+ return lodash.includes(['containers', 'storage-pools', 'tenants', 'services_memory', 'services_cpu', 'services_gpu', 'functions_memory', 'functions_cpu', 'functions_gpu', 'functions_events'], ctrl.type);
8256
+ }
8257
+
8258
+ /**
8259
+ * Initializes data according to passed page type
8260
+ * @param {string} type - page type
8261
+ */
8262
+ function prepareData(type) {
8263
+ var dataTypes = {
8264
+ 'clusters': prepareCpuData,
8265
+ 'containers': prepareSizeData,
8266
+ 'nodes': prepareCpuData,
8267
+ 'functions_cpu': prepareCpuCoresData,
8268
+ 'functions_gpu': prepareGpuCoresData,
8269
+ 'functions_memory': prepareSizeData,
8270
+ 'functions_events': prepareCountData,
8271
+ 'services_cpu': prepareCpuData,
8272
+ 'services_gpu': prepareGpuData,
8273
+ 'services_memory': prepareSizeData,
8274
+ 'storage-pools': prepareStoragePoolsData,
8275
+ 'storage-pools_containers': prepareStoragePoolsContainersData,
8276
+ 'tenants': prepareSizeData
8277
+ };
8278
+
8279
+ dataTypes[type]();
8280
+
8281
+ function prepareCpuData() {
8282
+ lodash.defaults(ctrl.entity.ui.metrics, { 'cpu.idle': 0 });
8283
+ }
8284
+
8285
+ function prepareCpuCoresData() {
8286
+ lodash.defaults(ctrl.entity.ui.metrics, { 'cpu.cores': 0 });
8287
+ }
8288
+
8289
+ function prepareGpuCoresData() {
8290
+ lodash.defaults(ctrl.entity.ui.metrics, { 'gpu.cores': 0 });
8291
+ }
8292
+
8293
+ function prepareGpuData() {
8294
+ lodash.defaults(ctrl.entity.ui.metrics, { 'gpu.idle': 0 });
8295
+ }
8296
+
8297
+ function prepareSizeData() {
8298
+ lodash.defaults(ctrl.entity.ui.metrics, { size: 0 });
8299
+ }
8300
+
8301
+ function prepareCountData() {
8302
+ lodash.defaults(ctrl.entity.ui.metrics, { count: 0 });
8303
+ }
8304
+
8305
+ function prepareStoragePoolsData() {
8306
+ lodash.defaults(ctrl.entity.ui.metrics, { size: 0 });
8307
+ updateOutOf();
8308
+ }
8309
+
8310
+ function prepareStoragePoolsContainersData() {
8311
+ lodash.defaults(ctrl.entity.ui.metrics, { size: 0 });
8312
+
8313
+ ctrl.reserved = angular.isDefined(ctrl.entity.attr.reserved) ? $filter('bytes')(ctrl.entity.attr.reserved, 2) : 0;
8314
+ ctrl.quota = angular.isDefined(ctrl.entity.attr.quota) ? $filter('bytes')(ctrl.entity.attr.quota, 2) : -1;
8315
+ }
8316
+ }
8317
+
8318
+ /**
8319
+ * Updates chart on broadcasted event
8320
+ */
8321
+ function updateChart() {
8322
+ var reflow = lodash.get(ctrl.entity.ui, ctrl.chartObjName + '.reflow');
8323
+ if (angular.isFunction(reflow)) {
8324
+ ctrl.entity.ui[ctrl.chartObjName].reflow();
8325
+ }
8326
+ }
8327
+
8328
+ function updateOutOf() {
8329
+ var usableCapacity = ctrl.entity.attr.usable_capacity;
8330
+ ctrl.outOf = lodash.isNil(usableCapacity) ? '-' : $filter('bytes')(usableCapacity, 2);
8331
+ }
8332
+ }
8333
+ })();
8334
+ 'use strict';
8335
+
8336
+ (function () {
8337
+ 'use strict';
8338
+
8339
+ IgzSliderInputBlockController.$inject = ['$rootScope', '$scope', '$timeout', 'lodash', 'ConverterService'];
8340
+ angular.module('iguazio.dashboard-controls').component('igzSliderInputBlock', {
8341
+ bindings: {
8342
+ allowFullRange: '<',
8343
+ onChangeCallback: '<',
8344
+ onSliderChanging: '<?',
8345
+ sliderConfig: '<',
8346
+ sliderBlockUpdatingBroadcast: '@',
8347
+ measureUnits: '<?',
8348
+ valueUnit: '<?',
8349
+ updateSliderInput: '@?'
8350
+ },
8351
+ templateUrl: 'igz_controls/components/slider-input-block/slider-input-block.tpl.html',
8352
+ controller: IgzSliderInputBlockController
8353
+ });
8354
+
8355
+ function IgzSliderInputBlockController($rootScope, $scope, $timeout, lodash, ConverterService) {
8356
+ var ctrl = this;
8357
+
8358
+ var defaultMeasureUnits = [{
8359
+ pow: 1,
8360
+ name: 'KB/s'
8361
+ }, {
8362
+ pow: 2,
8363
+ name: 'MB/s'
8364
+ }, {
8365
+ pow: 3,
8366
+ name: 'GB/s'
8367
+ }];
8368
+
8369
+ ctrl.$onInit = onInit;
8370
+
8371
+ ctrl.changeTrafficUnit = changeTrafficUnit;
8492
8372
 
8493
- timeout = $timeout(updateChart);
8494
- }
8373
+ //
8374
+ // Hook methods
8375
+ //
8495
8376
 
8496
8377
  /**
8497
- * Destructor method
8378
+ * Initialization method
8498
8379
  */
8499
- function onDestroy() {
8500
- if (!lodash.isNil(timeout)) {
8501
- $timeout.cancel(timeout);
8380
+ function onInit() {
8381
+
8382
+ // Set default measureUnits if undefined
8383
+ if (angular.isUndefined(ctrl.measureUnits)) {
8384
+ ctrl.measureUnits = defaultMeasureUnits;
8502
8385
  }
8386
+
8387
+ $scope.$on(ctrl.sliderBlockUpdatingBroadcast, setData);
8388
+
8389
+ $timeout(function () {
8390
+
8391
+ // Bind needed callbacks to configuration objects with updated `ctrl.selectedData` values (for rz-slider library usage)
8392
+ ctrl.sliderConfig.options.onEnd = setValue;
8393
+ ctrl.sliderConfig.options.onChange = checkIfUnlimited;
8394
+ });
8395
+
8396
+ ctrl.selectedItem = lodash.find(ctrl.measureUnits, ['name', ctrl.sliderConfig.unitLabel]);
8397
+
8398
+ // Update data with values from external scope
8399
+ fillRange();
8503
8400
  }
8504
8401
 
8505
8402
  //
@@ -8507,17 +8404,14 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
8507
8404
  //
8508
8405
 
8509
8406
  /**
8510
- * Gets display value
8511
- * @returns {string}
8407
+ * Method changes measurement unit
8408
+ * @param {Object} trafficUnit - selected measurement unit value
8512
8409
  */
8513
- function getDisplayValue() {
8514
- var defaultValue = isCpu() ? '0%' : isSize() ? '0 bytes' : '0';
8515
- var metricName = isCpu() ? 'cpu.idle' : isCpuCores() ? 'cpu.cores' : isGpuCores() ? 'gpu.cores' : isSize() ? 'size' : 'count';
8516
- var value = ctrl.entity.ui.metrics[metricName];
8517
- var sizePercentage = ctrl.entity.ui.metrics.sizePercentage;
8518
- sizePercentage = lodash.isUndefined(sizePercentage) ? '' : ' (' + sizePercentage + '%)';
8410
+ function changeTrafficUnit(trafficUnit) {
8411
+ ctrl.sliderConfig.unitLabel = trafficUnit.name;
8412
+ ctrl.sliderConfig.pow = trafficUnit.pow;
8519
8413
 
8520
- return lodash.isNil(value) ? defaultValue : isCpu() ? $filter('number')(value > 0 ? 100 - value : 0, 0) + '%' : isCpuCores() || isGpuCores() ? $filter('scale')(value, 0, 'nanos') : isSize() ? $filter('bytes')(value, 2) + sizePercentage : $filter('scale')(value);
8414
+ setValue();
8521
8415
  }
8522
8416
 
8523
8417
  //
@@ -8525,147 +8419,223 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
8525
8419
  //
8526
8420
 
8527
8421
  /**
8528
- * Hides chart tooltip
8422
+ * Method checks current value in slider. If it's maximum available then 'U/L'(unlimited) sets in label which displays data.
8423
+ * If it's not maximum - label sets with new value.
8424
+ * Calls onSliderChanging method if it was defined
8529
8425
  */
8530
- function hideChartTooltip() {
8531
- if (!ctrl.entity.ui[ctrl.chartObjName].tooltip.isHidden) {
8532
- ctrl.entity.ui[ctrl.chartObjName].tooltip.hide();
8426
+ function checkIfUnlimited() {
8427
+ ctrl.sliderConfig.valueLabel = ctrl.sliderConfig.value === ctrl.sliderConfig.options.ceil && !ctrl.allowFullRange ? 'U/L' : ctrl.sliderConfig.value;
8428
+
8429
+ if (angular.isFunction(ctrl.onSliderChanging) && ctrl.sliderConfig.value !== ctrl.sliderConfig.options.ceil) {
8430
+ ctrl.onSliderChanging(ctrl.sliderConfig.value, ctrl.updateSliderInput);
8533
8431
  }
8534
- }
8535
8432
 
8536
- /**
8537
- * Determines whether this chart is for Count
8538
- * @returns {boolean} `true` if this chart is for Count or `false` otherwise
8539
- */
8540
- function isCount() {
8541
- return lodash.includes(COUNT_TYPES, ctrl.type);
8433
+ $timeout(function () {
8434
+ $rootScope.$broadcast('rzSliderForceRender');
8435
+ });
8542
8436
  }
8543
8437
 
8544
8438
  /**
8545
- * Determines whether this chart is for CPU
8546
- * @returns {boolean} `true` if this chart is for CPU or `false` otherwise
8439
+ * Update slider data with values from external scope
8547
8440
  */
8548
- function isCpu() {
8549
- return lodash.includes(CPU_TYPES, ctrl.type);
8550
- }
8441
+ function fillRange() {
8442
+ if (ctrl.selectedData) {
8443
+ var result = ConverterService.getConvertedBytes(ctrl.selectedData[ctrl.sliderConfig.options.id]);
8551
8444
 
8552
- /**
8553
- * Determines whether this chart is for CPU cores
8554
- * @returns {boolean} `true` if this chart is for CPU cores or `false` otherwise
8555
- */
8556
- function isCpuCores() {
8557
- return lodash.includes(CPU_CORES_TYPES, ctrl.type);
8445
+ ctrl.sliderConfig.value = result.value;
8446
+ ctrl.sliderConfig.valueLabel = result.value;
8447
+ ctrl.sliderConfig.unitLabel = result.label;
8448
+ ctrl.sliderConfig.pow = result.pow;
8449
+
8450
+ ctrl.selectedItem = lodash.find(defaultMeasureUnits, ['name', ctrl.sliderConfig.unitLabel]);
8451
+
8452
+ checkIfUnlimited();
8453
+ }
8558
8454
  }
8559
8455
 
8560
8456
  /**
8561
- * Determines whether this chart is for GPU cores
8562
- * @returns {boolean} `true` if this chart is for GPU cores or `false` otherwise
8457
+ * Set slider data with a value passed through broadcast.
8458
+ * Set current selected rule to bind data properly.
8459
+ * @param {Object} event - triggering event
8460
+ * @param {Object} data - passed data
8563
8461
  */
8564
- function isGpuCores() {
8565
- return lodash.includes(GPU_CORES_TYPES, ctrl.type);
8462
+ function setData(event, data) {
8463
+ ctrl.selectedData = data.item.attr;
8464
+
8465
+ fillRange();
8566
8466
  }
8567
8467
 
8568
8468
  /**
8569
- * Defines if max quota value and max point in chart data has difference less than 20%
8570
- * @returns {boolean}
8469
+ * Method sets new value in bytes
8571
8470
  */
8572
- function isMaxQuotaValueAppropriate() {
8573
- var maxGraphicPoint = lodash.maxBy(lodash.values(ctrl.entity.ui.metrics.sizeLineChartData), function (point) {
8574
- return point[1];
8575
- });
8471
+ function setValue() {
8472
+ if (!lodash.isNil(ctrl.onChangeCallback)) {
8473
+ ctrl.onChangeCallback(ctrl.sliderConfig.value === ctrl.sliderConfig.options.ceil ? null : ctrl.sliderConfig.value * Math.pow(1024, ctrl.sliderConfig.pow), ctrl.updateSliderInput);
8474
+ }
8576
8475
 
8577
- return (ctrl.entity.attr.quota - maxGraphicPoint[1]) / ctrl.entity.attr.quota * 100 <= 20;
8476
+ if (!lodash.isNil(ctrl.selectedData)) {
8477
+ ctrl.selectedData[ctrl.sliderConfig.options.id] = ctrl.sliderConfig.value === ctrl.sliderConfig.options.ceil ? 0 : ctrl.sliderConfig.value * Math.pow(1024, ctrl.sliderConfig.pow);
8478
+ }
8578
8479
  }
8480
+ }
8481
+ })();
8482
+ 'use strict';
8483
+
8484
+ (function () {
8485
+ 'use strict';
8486
+
8487
+ SearchHelperService.$inject = ['lodash'];
8488
+ angular.module('iguazio.dashboard-controls').factory('SearchHelperService', SearchHelperService);
8489
+
8490
+ function SearchHelperService(lodash) {
8491
+ return {
8492
+ makeSearch: makeSearch
8493
+ };
8494
+
8495
+ //
8496
+ // Public methods
8497
+ //
8579
8498
 
8580
8499
  /**
8581
- * Determines whether this chart is for Size
8582
- * @returns {boolean} `true` if this chart is for Size or `false` otherwise
8500
+ * Perform search of data based on text query
8501
+ * @param {string} searchQuery - text query entered to a search input
8502
+ * @param {Array.<Object>} data - array of data
8503
+ * @param {Array.<string>} pathsForSearchArray - array of keys in which search will be made
8504
+ * @param {boolean} isHierarchical - flag which indicates if passed data has hierarchical structure
8505
+ * @param {string} ruleType - string representing the type of rule resource
8506
+ * @param {Object} searchStates
8507
+ * @param {string} [multiSearchName] - unique name of the search input
8583
8508
  */
8584
- function isSize() {
8585
- return lodash.includes(SIZE_TYPES, ctrl.type);
8509
+ function makeSearch(searchQuery, data, pathsForSearchArray, isHierarchical, ruleType, searchStates, multiSearchName) {
8510
+ searchStates.searchNotFound = false;
8511
+ searchStates.searchInProgress = false;
8512
+
8513
+ if (isHierarchical) {
8514
+ data = data.ui.children;
8515
+ } else {
8516
+ ruleType = '';
8517
+ }
8518
+ if (searchQuery === '') {
8519
+ showAllChildren(data, multiSearchName);
8520
+ } else if (angular.isString(searchQuery)) {
8521
+ searchStates.searchNotFound = true;
8522
+ searchStates.searchInProgress = true;
8523
+ findBySearchQuery(searchQuery, data, pathsForSearchArray, isHierarchical, ruleType, searchStates, multiSearchName);
8524
+ }
8586
8525
  }
8587
8526
 
8527
+ //
8528
+ // Private methods
8529
+ //
8530
+
8588
8531
  /**
8589
- * Checks if chart should have a tooltip
8590
- * @returns {boolean}
8532
+ * Loop through all given data to show/hide them depending on query match criteria (recursively)
8533
+ * @param {string} searchQuery - text query entered to a search input
8534
+ * @param {Array.<Object>} children - array of child data
8535
+ * @param {Array.<string>} pathsForSearch - array of strings, representing data's properties keys to search from
8536
+ * @param {boolean} isHierarchical - flag which indicates if passed data has hierarchical structure
8537
+ * @param {string} ruleType - string representing the type of rule resource
8538
+ * @param {Object} searchStates
8539
+ * @param {string} [multiSearchName] - unique name of the search input
8591
8540
  */
8592
- function isTooltipEnabled() {
8593
- return lodash.includes(['containers', 'storage-pools', 'tenants', 'services_memory', 'services_cpu', 'services_gpu', 'functions_memory', 'functions_cpu', 'functions_gpu', 'functions_events'], ctrl.type);
8541
+ function findBySearchQuery(searchQuery, children, pathsForSearch, isHierarchical, ruleType, searchStates, multiSearchName) {
8542
+ angular.forEach(children, function (child) {
8543
+ // Search by text in data without children data only
8544
+ if (angular.isString(child.type) && child.type !== ruleType && isHierarchical) {
8545
+ // Hide all parent data while search among children and proceed recursively
8546
+ child.ui.isFitQuery = false;
8547
+ findBySearchQuery(searchQuery, child.ui.children, pathsForSearch, isHierarchical, ruleType, searchStates, multiSearchName);
8548
+ } else {
8549
+ showRelevantItem(searchQuery, child, pathsForSearch, searchStates, multiSearchName);
8550
+ }
8551
+ });
8594
8552
  }
8595
8553
 
8596
8554
  /**
8597
- * Initializes data according to passed page type
8598
- * @param {string} type - page type
8555
+ * Get all current item's properties string values and push to stringValuesArray (recursively)
8556
+ * @param {string} itemPropertyValue - item's attribute value
8557
+ * @param {Array} stringValuesArray - array to collect current item's all properties string values
8599
8558
  */
8600
- function prepareData(type) {
8601
- var dataTypes = {
8602
- 'clusters': prepareCpuData,
8603
- 'containers': prepareSizeData,
8604
- 'nodes': prepareCpuData,
8605
- 'functions_cpu': prepareCpuCoresData,
8606
- 'functions_gpu': prepareGpuCoresData,
8607
- 'functions_memory': prepareSizeData,
8608
- 'functions_events': prepareCountData,
8609
- 'services_cpu': prepareCpuData,
8610
- 'services_gpu': prepareGpuData,
8611
- 'services_memory': prepareSizeData,
8612
- 'storage-pools': prepareStoragePoolsData,
8613
- 'storage-pools_containers': prepareStoragePoolsContainersData,
8614
- 'tenants': prepareSizeData
8615
- };
8616
-
8617
- dataTypes[type]();
8618
-
8619
- function prepareCpuData() {
8620
- lodash.defaults(ctrl.entity.ui.metrics, { 'cpu.idle': 0 });
8621
- }
8622
-
8623
- function prepareCpuCoresData() {
8624
- lodash.defaults(ctrl.entity.ui.metrics, { 'cpu.cores': 0 });
8625
- }
8626
-
8627
- function prepareGpuCoresData() {
8628
- lodash.defaults(ctrl.entity.ui.metrics, { 'gpu.cores': 0 });
8559
+ function getStringValuesFromItem(itemPropertyValue, stringValuesArray) {
8560
+ if (angular.isObject(itemPropertyValue)) {
8561
+ angular.forEach(itemPropertyValue, function (value) {
8562
+ getStringValuesFromItem(value, stringValuesArray);
8563
+ });
8564
+ } else if (angular.isString(itemPropertyValue) && itemPropertyValue.length > 0 || angular.isNumber(itemPropertyValue)) {
8565
+ stringValuesArray.push(itemPropertyValue.toString());
8629
8566
  }
8630
8567
 
8631
- function prepareGpuData() {
8632
- lodash.defaults(ctrl.entity.ui.metrics, { 'gpu.idle': 0 });
8633
- }
8568
+ return stringValuesArray;
8569
+ }
8634
8570
 
8635
- function prepareSizeData() {
8636
- lodash.defaults(ctrl.entity.ui.metrics, { size: 0 });
8637
- }
8571
+ /**
8572
+ * Sets isFitQuery value for data item
8573
+ * @param {Object} dataItem - current item
8574
+ * @param {string} [multiSearchName] - unique name of the search input
8575
+ * @param {boolean} isFitQuery - `true` if item is matched with search query
8576
+ */
8577
+ function setFitQueryValue(dataItem, multiSearchName, isFitQuery) {
8578
+ var filterPath = lodash.isEmpty(multiSearchName) ? 'isFitQuery' : ['filters', multiSearchName, 'isFitQuery'];
8638
8579
 
8639
- function prepareCountData() {
8640
- lodash.defaults(ctrl.entity.ui.metrics, { count: 0 });
8641
- }
8580
+ lodash.set(dataItem.ui, filterPath, isFitQuery);
8581
+ }
8642
8582
 
8643
- function prepareStoragePoolsData() {
8644
- lodash.defaults(ctrl.entity.ui.metrics, { size: 0 });
8645
- updateOutOf();
8646
- }
8583
+ /**
8584
+ * Show all data item's children chain (recursively)
8585
+ * @param {Array.<Object>} data - child items
8586
+ * @param {string} [multiSearchName] - unique name of the search input
8587
+ */
8588
+ function showAllChildren(data, multiSearchName) {
8589
+ angular.forEach(data, function (value) {
8590
+ var children = value.ui.children;
8647
8591
 
8648
- function prepareStoragePoolsContainersData() {
8649
- lodash.defaults(ctrl.entity.ui.metrics, { size: 0 });
8592
+ setFitQueryValue(value, multiSearchName, true);
8650
8593
 
8651
- ctrl.reserved = angular.isDefined(ctrl.entity.attr.reserved) ? $filter('bytes')(ctrl.entity.attr.reserved, 2) : 0;
8652
- ctrl.quota = angular.isDefined(ctrl.entity.attr.quota) ? $filter('bytes')(ctrl.entity.attr.quota, 2) : -1;
8653
- }
8594
+ if (!lodash.isEmpty(children)) {
8595
+ showAllChildren(children);
8596
+ }
8597
+ });
8654
8598
  }
8655
8599
 
8656
8600
  /**
8657
- * Updates chart on broadcasted event
8601
+ * Show item's all direct ancestors chain (recursively)
8602
+ * @param {Object} dataItem - current item
8658
8603
  */
8659
- function updateChart() {
8660
- var reflow = lodash.get(ctrl.entity.ui, ctrl.chartObjName + '.reflow');
8661
- if (angular.isFunction(reflow)) {
8662
- ctrl.entity.ui[ctrl.chartObjName].reflow();
8604
+ function showAllParents(dataItem) {
8605
+ var parent = dataItem.ui.parent;
8606
+ if (angular.isDefined(parent)) {
8607
+ parent.ui.isFitQuery = true;
8608
+ showAllParents(parent);
8663
8609
  }
8664
8610
  }
8665
8611
 
8666
- function updateOutOf() {
8667
- var usableCapacity = ctrl.entity.attr.usable_capacity;
8668
- ctrl.outOf = lodash.isNil(usableCapacity) ? '-' : $filter('bytes')(usableCapacity, 2);
8612
+ /**
8613
+ * Loop through all given data's properties and show/hide current data depending on query match criteria
8614
+ * @param {string} searchQuery - query entered to a search input
8615
+ * @param {Object} dataItem - current item
8616
+ * @param {Array} pathsForSearch - array of strings, representing paths to item's properties to search from
8617
+ * @param {Object} searchStates
8618
+ * @param {string} [multiSearchName] - unique name of the search input
8619
+ */
8620
+ function showRelevantItem(searchQuery, dataItem, pathsForSearch, searchStates, multiSearchName) {
8621
+ var isFitQuery;
8622
+ var stringValuesArray = [];
8623
+
8624
+ angular.forEach(pathsForSearch, function (pathForSearch) {
8625
+ getStringValuesFromItem(lodash.get(dataItem, pathForSearch), stringValuesArray);
8626
+ });
8627
+
8628
+ // If at least one value in item's properties string values matched - show current item and all its direct ancestors chain
8629
+ isFitQuery = stringValuesArray.some(function (value) {
8630
+ return lodash.includes(value.toLowerCase(), searchQuery.toLowerCase());
8631
+ });
8632
+
8633
+ setFitQueryValue(dataItem, multiSearchName, isFitQuery);
8634
+
8635
+ if (dataItem.ui.isFitQuery) {
8636
+ searchStates.searchNotFound = false;
8637
+ showAllParents(dataItem);
8638
+ }
8669
8639
  }
8670
8640
  }
8671
8641
  })();
@@ -8674,67 +8644,64 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
8674
8644
  (function () {
8675
8645
  'use strict';
8676
8646
 
8677
- IgzSliderInputBlockController.$inject = ['$rootScope', '$scope', '$timeout', 'lodash', 'ConverterService'];
8678
- angular.module('iguazio.dashboard-controls').component('igzSliderInputBlock', {
8647
+ IgzSearchInputController.$inject = ['$scope', '$timeout', 'lodash', 'SearchHelperService'];
8648
+ angular.module('iguazio.dashboard-controls').component('igzSearchInput', {
8679
8649
  bindings: {
8680
- allowFullRange: '<',
8681
- onChangeCallback: '<',
8682
- onSliderChanging: '<?',
8683
- sliderConfig: '<',
8684
- sliderBlockUpdatingBroadcast: '@',
8685
- measureUnits: '<?',
8686
- valueUnit: '<?',
8687
- updateSliderInput: '@?'
8650
+ dataSet: '<',
8651
+ initSearchQuery: '@?',
8652
+ isSearchHierarchically: '@?',
8653
+ liveSearch: '<?',
8654
+ multiSearchName: '@?',
8655
+ onSearchSubmit: '&?',
8656
+ placeholder: '@',
8657
+ ruleType: '@?',
8658
+ searchCallback: '&?',
8659
+ searchKeys: '<',
8660
+ searchStates: '<',
8661
+ searchType: '@?',
8662
+ type: '@?'
8688
8663
  },
8689
- templateUrl: 'igz_controls/components/slider-input-block/slider-input-block.tpl.html',
8690
- controller: IgzSliderInputBlockController
8664
+ templateUrl: 'igz_controls/components/search-input/search-input.tpl.html',
8665
+ controller: IgzSearchInputController
8691
8666
  });
8692
8667
 
8693
- function IgzSliderInputBlockController($rootScope, $scope, $timeout, lodash, ConverterService) {
8668
+ function IgzSearchInputController($scope, $timeout, lodash, SearchHelperService) {
8694
8669
  var ctrl = this;
8695
8670
 
8696
- var defaultMeasureUnits = [{
8697
- pow: 1,
8698
- name: 'KB/s'
8699
- }, {
8700
- pow: 2,
8701
- name: 'MB/s'
8702
- }, {
8703
- pow: 3,
8704
- name: 'GB/s'
8705
- }];
8671
+ ctrl.isInputFocused = false;
8672
+ ctrl.isSearchHierarchically = String(ctrl.isSearchHierarchically) === 'true';
8673
+ ctrl.searchQuery = '';
8706
8674
 
8707
8675
  ctrl.$onInit = onInit;
8708
-
8709
- ctrl.changeTrafficUnit = changeTrafficUnit;
8676
+ ctrl.onPressEnter = onPressEnter;
8677
+ ctrl.clearInputField = clearInputField;
8678
+ ctrl.toggleInputFocus = toggleInputFocus;
8710
8679
 
8711
8680
  //
8712
- // Hook methods
8681
+ // Hook method
8713
8682
  //
8714
8683
 
8715
8684
  /**
8716
8685
  * Initialization method
8717
8686
  */
8718
8687
  function onInit() {
8688
+ ctrl.searchStates.searchNotFound = false;
8689
+ ctrl.searchStates.searchInProgress = false;
8719
8690
 
8720
- // Set default measureUnits if undefined
8721
- if (angular.isUndefined(ctrl.measureUnits)) {
8722
- ctrl.measureUnits = defaultMeasureUnits;
8691
+ if (!lodash.isUndefined(ctrl.initSearchQuery)) {
8692
+ ctrl.searchQuery = ctrl.initSearchQuery;
8723
8693
  }
8724
8694
 
8725
- $scope.$on(ctrl.sliderBlockUpdatingBroadcast, setData);
8726
-
8727
- $timeout(function () {
8728
-
8729
- // Bind needed callbacks to configuration objects with updated `ctrl.selectedData` values (for rz-slider library usage)
8730
- ctrl.sliderConfig.options.onEnd = setValue;
8731
- ctrl.sliderConfig.options.onChange = checkIfUnlimited;
8732
- });
8695
+ if (angular.isUndefined(ctrl.searchType)) {
8696
+ ctrl.searchType = 'infoPage';
8697
+ }
8733
8698
 
8734
- ctrl.selectedItem = lodash.find(ctrl.measureUnits, ['name', ctrl.sliderConfig.unitLabel]);
8699
+ if (angular.isUndefined(ctrl.liveSearch) || ctrl.liveSearch) {
8700
+ $scope.$watch('$ctrl.searchQuery', onChangeSearchQuery);
8701
+ }
8735
8702
 
8736
- // Update data with values from external scope
8737
- fillRange();
8703
+ $scope.$on('search-input_refresh-search', onDataChanged);
8704
+ $scope.$on('search-input_reset', resetSearch);
8738
8705
  }
8739
8706
 
8740
8707
  //
@@ -8742,14 +8709,31 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
8742
8709
  //
8743
8710
 
8744
8711
  /**
8745
- * Method changes measurement unit
8746
- * @param {Object} trafficUnit - selected measurement unit value
8712
+ * Initializes search and apply filters on press enter
8713
+ * @param {Event} e
8747
8714
  */
8748
- function changeTrafficUnit(trafficUnit) {
8749
- ctrl.sliderConfig.unitLabel = trafficUnit.name;
8750
- ctrl.sliderConfig.pow = trafficUnit.pow;
8715
+ function onPressEnter(e) {
8716
+ if (e.keyCode === 13) {
8717
+ makeSearch();
8751
8718
 
8752
- setValue();
8719
+ if (angular.isFunction(ctrl.onSearchSubmit) && ctrl.isInputFocused) {
8720
+ ctrl.onSearchSubmit();
8721
+ }
8722
+ }
8723
+ }
8724
+
8725
+ /**
8726
+ * Clear search input field
8727
+ */
8728
+ function clearInputField() {
8729
+ ctrl.searchQuery = '';
8730
+ }
8731
+
8732
+ /**
8733
+ * Toggles input focus
8734
+ */
8735
+ function toggleInputFocus() {
8736
+ ctrl.isInputFocused = !ctrl.isInputFocused;
8753
8737
  }
8754
8738
 
8755
8739
  //
@@ -8757,62 +8741,93 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
8757
8741
  //
8758
8742
 
8759
8743
  /**
8760
- * Method checks current value in slider. If it's maximum available then 'U/L'(unlimited) sets in label which displays data.
8761
- * If it's not maximum - label sets with new value.
8762
- * Calls onSliderChanging method if it was defined
8744
+ * Calls service method for search
8763
8745
  */
8764
- function checkIfUnlimited() {
8765
- ctrl.sliderConfig.valueLabel = ctrl.sliderConfig.value === ctrl.sliderConfig.options.ceil && !ctrl.allowFullRange ? 'U/L' : ctrl.sliderConfig.value;
8746
+ function makeSearch() {
8747
+ if (angular.isFunction(ctrl.searchCallback)) {
8766
8748
 
8767
- if (angular.isFunction(ctrl.onSliderChanging) && ctrl.sliderConfig.value !== ctrl.sliderConfig.options.ceil) {
8768
- ctrl.onSliderChanging(ctrl.sliderConfig.value, ctrl.updateSliderInput);
8749
+ // call custom search method
8750
+ ctrl.searchCallback(lodash.pick(ctrl, ['searchQuery', 'dataSet', 'searchKeys', 'isSearchHierarchically', 'ruleType', 'searchStates', 'multiSearchName']));
8769
8751
  }
8770
8752
 
8771
- $timeout(function () {
8772
- $rootScope.$broadcast('rzSliderForceRender');
8773
- });
8753
+ if (angular.isUndefined(ctrl.type)) {
8754
+
8755
+ // default search functionality
8756
+ SearchHelperService.makeSearch(ctrl.searchQuery, ctrl.dataSet, ctrl.searchKeys, ctrl.isSearchHierarchically, ctrl.ruleType, ctrl.searchStates, ctrl.multiSearchName);
8757
+ }
8774
8758
  }
8775
8759
 
8776
8760
  /**
8777
- * Update slider data with values from external scope
8761
+ * Tracks input changing and initializes search
8778
8762
  */
8779
- function fillRange() {
8780
- if (ctrl.selectedData) {
8781
- var result = ConverterService.getConvertedBytes(ctrl.selectedData[ctrl.sliderConfig.options.id]);
8782
-
8783
- ctrl.sliderConfig.value = result.value;
8784
- ctrl.sliderConfig.valueLabel = result.value;
8785
- ctrl.sliderConfig.unitLabel = result.label;
8786
- ctrl.sliderConfig.pow = result.pow;
8787
-
8788
- ctrl.selectedItem = lodash.find(defaultMeasureUnits, ['name', ctrl.sliderConfig.unitLabel]);
8789
-
8790
- checkIfUnlimited();
8763
+ function onChangeSearchQuery(newValue, oldValue) {
8764
+ if (angular.isDefined(newValue) && newValue !== oldValue) {
8765
+ makeSearch();
8791
8766
  }
8792
8767
  }
8793
8768
 
8794
8769
  /**
8795
- * Set slider data with a value passed through broadcast.
8796
- * Set current selected rule to bind data properly.
8797
- * @param {Object} event - triggering event
8798
- * @param {Object} data - passed data
8770
+ * Initializes search when all html has been rendered
8799
8771
  */
8800
- function setData(event, data) {
8801
- ctrl.selectedData = data.item.attr;
8802
-
8803
- fillRange();
8772
+ function onDataChanged() {
8773
+ $timeout(makeSearch);
8804
8774
  }
8805
8775
 
8806
8776
  /**
8807
- * Method sets new value in bytes
8777
+ * Resets search query and initializes search
8808
8778
  */
8809
- function setValue() {
8810
- if (!lodash.isNil(ctrl.onChangeCallback)) {
8811
- ctrl.onChangeCallback(ctrl.sliderConfig.value === ctrl.sliderConfig.options.ceil ? null : ctrl.sliderConfig.value * Math.pow(1024, ctrl.sliderConfig.pow), ctrl.updateSliderInput);
8779
+ function resetSearch() {
8780
+ ctrl.searchQuery = '';
8781
+ $timeout(makeSearch);
8782
+ }
8783
+ }
8784
+ })();
8785
+ 'use strict';
8786
+
8787
+ (function () {
8788
+ 'use strict';
8789
+
8790
+ igzShowHideSearchItem.$inject = ['lodash'];
8791
+ angular.module('iguazio.dashboard-controls').directive('igzShowHideSearchItem', igzShowHideSearchItem);
8792
+
8793
+ function igzShowHideSearchItem(lodash) {
8794
+ return {
8795
+ restrict: 'A',
8796
+ scope: {
8797
+ dataItem: '=igzShowHideSearchItem'
8798
+ },
8799
+ link: link
8800
+ };
8801
+
8802
+ function link(scope, element) {
8803
+ activate();
8804
+
8805
+ //
8806
+ // Private methods
8807
+ //
8808
+
8809
+ /**
8810
+ * Constructor method
8811
+ */
8812
+ function activate() {
8813
+ scope.$watch('dataItem.ui.isFitQuery', changeVisibility);
8814
+ scope.$watch('dataItem.ui.filters', changeVisibility, true);
8812
8815
  }
8813
8816
 
8814
- if (!lodash.isNil(ctrl.selectedData)) {
8815
- ctrl.selectedData[ctrl.sliderConfig.options.id] = ctrl.sliderConfig.value === ctrl.sliderConfig.options.ceil ? 0 : ctrl.sliderConfig.value * Math.pow(1024, ctrl.sliderConfig.pow);
8817
+ /**
8818
+ * Method sets display property of element to false if it doesn't fit the query in search otherwise removes these property
8819
+ * @param {boolean} newValue - value displays if current element fit search query
8820
+ */
8821
+ function changeVisibility(newValue) {
8822
+ var displayValue = '';
8823
+
8824
+ if (lodash.isObject(newValue)) {
8825
+ displayValue = lodash.some(newValue, { isFitQuery: false }) ? 'none' : '';
8826
+ } else {
8827
+ displayValue = newValue === false ? 'none' : '';
8828
+ }
8829
+
8830
+ element.css('display', displayValue);
8816
8831
  }
8817
8832
  }
8818
8833
  }
@@ -9944,127 +9959,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
9944
9959
  })();
9945
9960
  'use strict';
9946
9961
 
9947
- (function () {
9948
- 'use strict';
9949
-
9950
- IgzInfoPageContentController.$inject = ['$scope', '$timeout', '$window', '$element'];
9951
- angular.module('iguazio.dashboard-controls').component('igzInfoPageContent', {
9952
- bindings: {
9953
- scrolled: '<',
9954
- watchId: '@?'
9955
- },
9956
- templateUrl: 'igz_controls/components/info-page/info-page-content/info-page-content.tpl.html',
9957
- transclude: true,
9958
- controller: IgzInfoPageContentController
9959
- });
9960
-
9961
- function IgzInfoPageContentController($scope, $timeout, $window, $element) {
9962
- var ctrl = this;
9963
-
9964
- ctrl.isFiltersShowed = false;
9965
- ctrl.isInfoPaneShowed = false;
9966
-
9967
- // Config for horizontal scrollbar on containers view
9968
- ctrl.scrollConfigHorizontal = {
9969
- axis: 'x',
9970
- scrollInertia: 0
9971
- };
9972
-
9973
- ctrl.$onInit = onInit;
9974
- ctrl.$postLink = postLink;
9975
-
9976
- //
9977
- // Hook methods
9978
- //
9979
-
9980
- /**
9981
- * Init method
9982
- */
9983
- function onInit() {
9984
- var watchId = angular.isDefined(ctrl.watchId) ? '-' + ctrl.watchId : '';
9985
-
9986
- $scope.$on('info-page-upper-pane_toggle-start' + watchId, onUpperPaneToggleStart);
9987
- $scope.$on('info-page-filters_toggle-start' + watchId, onFiltersPaneToggleStart);
9988
- $scope.$on('info-page-pane_toggle-start' + watchId, onInfoPaneToggleStart);
9989
- $scope.$on('info-page-pane_toggled', dispatchResize);
9990
- }
9991
-
9992
- /**
9993
- * Post linking method
9994
- */
9995
- function postLink() {
9996
- $timeout(function () {
9997
- manageHorizontalScroll();
9998
-
9999
- $scope.$on('info-page-filters_toggled', manageHorizontalScroll);
10000
-
10001
- $scope.$on('info-page-pane_toggled', manageHorizontalScroll);
10002
-
10003
- $scope.$on('igzWatchWindowResize::resize', manageHorizontalScroll);
10004
- });
10005
- }
10006
-
10007
- //
10008
- // Private methods
10009
- //
10010
-
10011
- /**
10012
- * Manages x-scrollbar behavior
10013
- * Needed to get rid of accidental wrong content width calculations made by 'ng-scrollbars' library
10014
- * We just control x-scrollbar with lib's native enable/disable methods
10015
- */
10016
- function manageHorizontalScroll() {
10017
- var $scrollXContainer = $element.find('.igz-scrollable-container.horizontal').first();
10018
- var contentWrapperWidth = $element.find('.igz-info-page-content-wrapper').first().width();
10019
- var contentMinWidth = parseInt($element.find('.igz-info-page-content').css('min-width'));
10020
-
10021
- if ($scrollXContainer.length && contentWrapperWidth < (contentMinWidth || 946)) {
10022
- $scrollXContainer.mCustomScrollbar('update');
10023
- } else if ($scrollXContainer.length) {
10024
- $scrollXContainer.mCustomScrollbar('disable', true);
10025
- $element.find('.mCSB_container').first().width('100%');
10026
- }
10027
- }
10028
-
10029
- /**
10030
- * Upper pane toggle start $broadcast listener
10031
- * @param {Object} e - broadcast event
10032
- * @param {boolean} isShown - represents upper pane state
10033
- */
10034
- function onUpperPaneToggleStart(e, isShown) {
10035
- ctrl.isUpperPaneShowed = isShown;
10036
- }
10037
-
10038
- /**
10039
- * Filters pane toggle start $broadcast listener
10040
- * @param {Object} e - broadcast event
10041
- * @param {boolean} isShown - represents filters pane state
10042
- */
10043
- function onFiltersPaneToggleStart(e, isShown) {
10044
- ctrl.isFiltersShowed = isShown;
10045
- }
10046
-
10047
- /**
10048
- * Info pane toggle start $broadcast listener
10049
- * @param {Object} e - broadcast event
10050
- * @param {boolean} isShown - represents info pane state
10051
- */
10052
- function onInfoPaneToggleStart(e, isShown) {
10053
- ctrl.isInfoPaneShowed = isShown;
10054
- }
10055
-
10056
- /**
10057
- * Updates Ui-Layout library's containers size
10058
- */
10059
- function dispatchResize() {
10060
- $timeout(function () {
10061
- $window.dispatchEvent(new Event('resize'));
10062
- }, 0);
10063
- }
10064
- }
10065
- })();
10066
- 'use strict';
10067
-
10068
9962
  (function () {
10069
9963
  'use strict';
10070
9964
 
@@ -10238,17 +10132,138 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
10238
10132
  InfoPageFiltersService.$inject = ['$rootScope'];
10239
10133
  angular.module('iguazio.dashboard-controls').factory('InfoPageFiltersService', InfoPageFiltersService);
10240
10134
 
10241
- function InfoPageFiltersService($rootScope) {
10242
- return {
10243
- changeBadge: changeBadge
10244
- };
10135
+ function InfoPageFiltersService($rootScope) {
10136
+ return {
10137
+ changeBadge: changeBadge
10138
+ };
10139
+
10140
+ /**
10141
+ * Changes a quantity of applied filters on the badge of filters pane
10142
+ * @param {number} delta
10143
+ */
10144
+ function changeBadge(delta) {
10145
+ $rootScope.$broadcast('info-page-filters_change-badge', delta);
10146
+ }
10147
+ }
10148
+ })();
10149
+ 'use strict';
10150
+
10151
+ (function () {
10152
+ 'use strict';
10153
+
10154
+ IgzInfoPageContentController.$inject = ['$scope', '$timeout', '$window', '$element'];
10155
+ angular.module('iguazio.dashboard-controls').component('igzInfoPageContent', {
10156
+ bindings: {
10157
+ scrolled: '<',
10158
+ watchId: '@?'
10159
+ },
10160
+ templateUrl: 'igz_controls/components/info-page/info-page-content/info-page-content.tpl.html',
10161
+ transclude: true,
10162
+ controller: IgzInfoPageContentController
10163
+ });
10164
+
10165
+ function IgzInfoPageContentController($scope, $timeout, $window, $element) {
10166
+ var ctrl = this;
10167
+
10168
+ ctrl.isFiltersShowed = false;
10169
+ ctrl.isInfoPaneShowed = false;
10170
+
10171
+ // Config for horizontal scrollbar on containers view
10172
+ ctrl.scrollConfigHorizontal = {
10173
+ axis: 'x',
10174
+ scrollInertia: 0
10175
+ };
10176
+
10177
+ ctrl.$onInit = onInit;
10178
+ ctrl.$postLink = postLink;
10179
+
10180
+ //
10181
+ // Hook methods
10182
+ //
10183
+
10184
+ /**
10185
+ * Init method
10186
+ */
10187
+ function onInit() {
10188
+ var watchId = angular.isDefined(ctrl.watchId) ? '-' + ctrl.watchId : '';
10189
+
10190
+ $scope.$on('info-page-upper-pane_toggle-start' + watchId, onUpperPaneToggleStart);
10191
+ $scope.$on('info-page-filters_toggle-start' + watchId, onFiltersPaneToggleStart);
10192
+ $scope.$on('info-page-pane_toggle-start' + watchId, onInfoPaneToggleStart);
10193
+ $scope.$on('info-page-pane_toggled', dispatchResize);
10194
+ }
10195
+
10196
+ /**
10197
+ * Post linking method
10198
+ */
10199
+ function postLink() {
10200
+ $timeout(function () {
10201
+ manageHorizontalScroll();
10202
+
10203
+ $scope.$on('info-page-filters_toggled', manageHorizontalScroll);
10204
+
10205
+ $scope.$on('info-page-pane_toggled', manageHorizontalScroll);
10206
+
10207
+ $scope.$on('igzWatchWindowResize::resize', manageHorizontalScroll);
10208
+ });
10209
+ }
10210
+
10211
+ //
10212
+ // Private methods
10213
+ //
10214
+
10215
+ /**
10216
+ * Manages x-scrollbar behavior
10217
+ * Needed to get rid of accidental wrong content width calculations made by 'ng-scrollbars' library
10218
+ * We just control x-scrollbar with lib's native enable/disable methods
10219
+ */
10220
+ function manageHorizontalScroll() {
10221
+ var $scrollXContainer = $element.find('.igz-scrollable-container.horizontal').first();
10222
+ var contentWrapperWidth = $element.find('.igz-info-page-content-wrapper').first().width();
10223
+ var contentMinWidth = parseInt($element.find('.igz-info-page-content').css('min-width'));
10224
+
10225
+ if ($scrollXContainer.length && contentWrapperWidth < (contentMinWidth || 946)) {
10226
+ $scrollXContainer.mCustomScrollbar('update');
10227
+ } else if ($scrollXContainer.length) {
10228
+ $scrollXContainer.mCustomScrollbar('disable', true);
10229
+ $element.find('.mCSB_container').first().width('100%');
10230
+ }
10231
+ }
10232
+
10233
+ /**
10234
+ * Upper pane toggle start $broadcast listener
10235
+ * @param {Object} e - broadcast event
10236
+ * @param {boolean} isShown - represents upper pane state
10237
+ */
10238
+ function onUpperPaneToggleStart(e, isShown) {
10239
+ ctrl.isUpperPaneShowed = isShown;
10240
+ }
10241
+
10242
+ /**
10243
+ * Filters pane toggle start $broadcast listener
10244
+ * @param {Object} e - broadcast event
10245
+ * @param {boolean} isShown - represents filters pane state
10246
+ */
10247
+ function onFiltersPaneToggleStart(e, isShown) {
10248
+ ctrl.isFiltersShowed = isShown;
10249
+ }
10250
+
10251
+ /**
10252
+ * Info pane toggle start $broadcast listener
10253
+ * @param {Object} e - broadcast event
10254
+ * @param {boolean} isShown - represents info pane state
10255
+ */
10256
+ function onInfoPaneToggleStart(e, isShown) {
10257
+ ctrl.isInfoPaneShowed = isShown;
10258
+ }
10245
10259
 
10246
10260
  /**
10247
- * Changes a quantity of applied filters on the badge of filters pane
10248
- * @param {number} delta
10261
+ * Updates Ui-Layout library's containers size
10249
10262
  */
10250
- function changeBadge(delta) {
10251
- $rootScope.$broadcast('info-page-filters_change-badge', delta);
10263
+ function dispatchResize() {
10264
+ $timeout(function () {
10265
+ $window.dispatchEvent(new Event('resize'));
10266
+ }, 0);
10252
10267
  }
10253
10268
  }
10254
10269
  })();
@@ -10477,6 +10492,72 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
10477
10492
  })();
10478
10493
  'use strict';
10479
10494
 
10495
+ (function () {
10496
+ 'use strict';
10497
+
10498
+ NclTestEventsNavigationTabsController.$inject = ['$i18next', 'i18next'];
10499
+ angular.module('iguazio.dashboard-controls').component('nclTestEventsNavigationTabs', {
10500
+ bindings: {
10501
+ activeTab: '<',
10502
+ tabItems: '<',
10503
+ selectedLogLevel: '<?',
10504
+ onChangeActiveTab: '&',
10505
+ onChangeLogLevel: '&?'
10506
+ },
10507
+ templateUrl: 'nuclio/functions/version/version-code/function-event-pane/test-events-navigation-tabs/test-events-navigation-tabs.tpl.html',
10508
+ controller: NclTestEventsNavigationTabsController
10509
+ });
10510
+
10511
+ function NclTestEventsNavigationTabsController($i18next, i18next) {
10512
+ var ctrl = this;
10513
+ var lng = i18next.language;
10514
+
10515
+ ctrl.logLevelValues = [{
10516
+ id: 'error',
10517
+ name: $i18next.t('common:ERROR', { lng: lng }),
10518
+ visible: true
10519
+ }, {
10520
+ id: 'warn',
10521
+ name: $i18next.t('common:WARNING', { lng: lng }),
10522
+ visible: true
10523
+ }, {
10524
+ id: 'info',
10525
+ name: $i18next.t('common:INFO', { lng: lng }),
10526
+ visible: true
10527
+ }, {
10528
+ id: 'debug',
10529
+ name: $i18next.t('common:DEBUG', { lng: lng }),
10530
+ visible: true
10531
+ }];
10532
+
10533
+ ctrl.changeActiveTab = changeActiveTab;
10534
+ ctrl.isActiveTab = isActiveTab;
10535
+
10536
+ //
10537
+ // Public methods
10538
+ //
10539
+
10540
+ /**
10541
+ * Changes active nav tab
10542
+ * @param {Object} item - current status
10543
+ */
10544
+ function changeActiveTab(item) {
10545
+ ctrl.activeTab = item;
10546
+
10547
+ ctrl.onChangeActiveTab({ activeTab: item });
10548
+ }
10549
+
10550
+ /**
10551
+ * Checks if it is an active tab
10552
+ * @param {Object} item - current tab
10553
+ */
10554
+ function isActiveTab(item) {
10555
+ return ctrl.activeTab.id === item.id;
10556
+ }
10557
+ }
10558
+ })();
10559
+ 'use strict';
10560
+
10480
10561
  (function () {
10481
10562
  'use strict';
10482
10563
 
@@ -10567,72 +10648,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
10567
10648
  })();
10568
10649
  'use strict';
10569
10650
 
10570
- (function () {
10571
- 'use strict';
10572
-
10573
- NclTestEventsNavigationTabsController.$inject = ['$i18next', 'i18next'];
10574
- angular.module('iguazio.dashboard-controls').component('nclTestEventsNavigationTabs', {
10575
- bindings: {
10576
- activeTab: '<',
10577
- tabItems: '<',
10578
- selectedLogLevel: '<?',
10579
- onChangeActiveTab: '&',
10580
- onChangeLogLevel: '&?'
10581
- },
10582
- templateUrl: 'nuclio/functions/version/version-code/function-event-pane/test-events-navigation-tabs/test-events-navigation-tabs.tpl.html',
10583
- controller: NclTestEventsNavigationTabsController
10584
- });
10585
-
10586
- function NclTestEventsNavigationTabsController($i18next, i18next) {
10587
- var ctrl = this;
10588
- var lng = i18next.language;
10589
-
10590
- ctrl.logLevelValues = [{
10591
- id: 'error',
10592
- name: $i18next.t('common:ERROR', { lng: lng }),
10593
- visible: true
10594
- }, {
10595
- id: 'warn',
10596
- name: $i18next.t('common:WARNING', { lng: lng }),
10597
- visible: true
10598
- }, {
10599
- id: 'info',
10600
- name: $i18next.t('common:INFO', { lng: lng }),
10601
- visible: true
10602
- }, {
10603
- id: 'debug',
10604
- name: $i18next.t('common:DEBUG', { lng: lng }),
10605
- visible: true
10606
- }];
10607
-
10608
- ctrl.changeActiveTab = changeActiveTab;
10609
- ctrl.isActiveTab = isActiveTab;
10610
-
10611
- //
10612
- // Public methods
10613
- //
10614
-
10615
- /**
10616
- * Changes active nav tab
10617
- * @param {Object} item - current status
10618
- */
10619
- function changeActiveTab(item) {
10620
- ctrl.activeTab = item;
10621
-
10622
- ctrl.onChangeActiveTab({ activeTab: item });
10623
- }
10624
-
10625
- /**
10626
- * Checks if it is an active tab
10627
- * @param {Object} item - current tab
10628
- */
10629
- function isActiveTab(item) {
10630
- return ctrl.activeTab.id === item.id;
10631
- }
10632
- }
10633
- })();
10634
- 'use strict';
10635
-
10636
10651
  (function () {
10637
10652
  'use strict';
10638
10653
 
@@ -10987,266 +11002,204 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
10987
11002
  (function () {
10988
11003
  'use strict';
10989
11004
 
10990
- NclVersionConfigurationBuildController.$inject = ['$rootScope', '$scope', '$timeout', '$i18next', 'i18next', 'lodash', 'ngDialog', 'Upload', 'ConfigService', 'FunctionsService', 'ValidationService'];
10991
- angular.module('iguazio.dashboard-controls').component('nclVersionConfigurationBuild', {
11005
+ NclVersionConfigurationLabelsController.$inject = ['$element', '$i18next', '$rootScope', '$timeout', 'i18next', 'lodash', 'FormValidationService', 'FunctionsService', 'PreventDropdownCutOffService', 'ValidationService', 'VersionHelperService'];
11006
+ angular.module('iguazio.dashboard-controls').component('nclVersionConfigurationLabels', {
10992
11007
  bindings: {
10993
11008
  version: '<',
10994
11009
  onChangeCallback: '<',
10995
11010
  isFunctionDeploying: '&'
10996
11011
  },
10997
- templateUrl: 'nuclio/functions/version/version-configuration/tabs/version-configuration-build/version-configuration-build.tpl.html',
10998
- controller: NclVersionConfigurationBuildController
11012
+ templateUrl: 'nuclio/functions/version/version-configuration/tabs/version-configuration-labels/version-configuration-labels.tpl.html',
11013
+ controller: NclVersionConfigurationLabelsController
10999
11014
  });
11000
11015
 
11001
- function NclVersionConfigurationBuildController($rootScope, $scope, $timeout, $i18next, i18next, lodash, ngDialog, Upload, ConfigService, FunctionsService, ValidationService) {
11016
+ function NclVersionConfigurationLabelsController($element, $i18next, $rootScope, $timeout, i18next, lodash, FormValidationService, FunctionsService, PreventDropdownCutOffService, ValidationService, VersionHelperService) {
11002
11017
  var ctrl = this;
11003
11018
  var lng = i18next.language;
11004
- var uploadType = '';
11005
11019
 
11006
- ctrl.actions = initActions();
11007
- ctrl.build = {
11008
- runtimeAttributes: {}
11009
- };
11010
- ctrl.script = {
11011
- uploading: false,
11012
- uploaded: false,
11013
- progress: '0%',
11014
- icon: 'ncl-icon-script',
11015
- name: ''
11020
+ ctrl.igzScrollConfig = {
11021
+ maxElementsCount: 10,
11022
+ childrenSelector: '.table-body'
11016
11023
  };
11017
- ctrl.file = {
11018
- uploading: false,
11019
- uploaded: false,
11020
- progress: '0%',
11021
- icon: 'ncl-icon-file',
11022
- name: ''
11024
+ ctrl.isKubePlatform = false;
11025
+ ctrl.labelsForm = null;
11026
+ ctrl.scrollConfig = {
11027
+ axis: 'y',
11028
+ advanced: {
11029
+ updateOnContentResize: true
11030
+ }
11023
11031
  };
11024
- ctrl.disabled = true;
11025
- ctrl.platformKindIsKube = false;
11026
- ctrl.onBuildImageDescription = '';
11032
+ ctrl.tooltip = '<a class="link" target="_blank" ' + 'href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/">' + $i18next.t('functions:TOOLTIP.LABELS.HEAD', { lng: lng }) + '</a> ' + $i18next.t('functions:TOOLTIP.LABELS.REST', { lng: lng });
11027
11033
 
11028
- ctrl.defaultFunctionConfig = lodash.get(ConfigService, 'nuclio.defaultFunctionConfig.attributes', {});
11029
- ctrl.imageNameValidationPattern = ValidationService.dockerReference;
11030
- ctrl.maxLengths = {
11031
- imageName: ValidationService.getMaxLength('function.imageName')
11034
+ ctrl.keyTooltip = $i18next.t('functions:TOOLTIP.PREFIXED_NAME', {
11035
+ lng: lng,
11036
+ name: $i18next.t('common:LABEL', { lng: lng })
11037
+ });
11038
+ ctrl.validationRules = {
11039
+ key: ValidationService.getValidationRules('function.label.key', [{
11040
+ name: 'uniqueness',
11041
+ label: $i18next.t('functions:UNIQUENESS', { lng: lng }),
11042
+ pattern: validateUniqueness
11043
+ }]),
11044
+ value: ValidationService.getValidationRules('k8s.qualifiedName')
11032
11045
  };
11033
- ctrl.imageName = '';
11034
11046
 
11035
- ctrl.$onInit = onInit;
11047
+ ctrl.$postLink = postLink;
11036
11048
  ctrl.$onChanges = onChanges;
11037
- ctrl.$onDestroy = onDestroy;
11038
11049
 
11039
- ctrl.deleteFile = deleteFile;
11040
- ctrl.getFileConfig = getFileConfig;
11041
- ctrl.inputValueCallback = inputValueCallback;
11042
- ctrl.isDemoMode = ConfigService.isDemoMode;
11043
- ctrl.onFireAction = onFireAction;
11044
- ctrl.uploadFile = uploadFile;
11050
+ ctrl.addNewLabel = addNewLabel;
11051
+ ctrl.handleAction = handleAction;
11052
+ ctrl.isLabelsDisabled = isLabelsDisabled;
11053
+ ctrl.onChangeData = onChangeData;
11045
11054
 
11046
11055
  //
11047
11056
  // Hook methods
11048
11057
  //
11049
11058
 
11050
11059
  /**
11051
- * Initialization method
11052
- */
11053
- function onInit() {
11054
- ctrl.onBuildImageDescription = $i18next.t('functions:ONBUILD_IMAGE_DESCRIPTION', {
11055
- interpolation: {
11056
- prefix: '__',
11057
- suffix: '__'
11058
- },
11059
- lng: lng
11060
- });
11061
- ctrl.platformKindIsKube = FunctionsService.isKubePlatform();
11062
- }
11063
-
11064
- /**
11065
- * On changes hook method.
11066
- * @param {Object} changes
11060
+ * Post linking method
11067
11061
  */
11068
- function onChanges(changes) {
11069
- if (angular.isDefined(changes.version)) {
11070
- ctrl.disabled = lodash.get(ctrl.version, 'spec.build.codeEntryType') === 'image';
11071
- ctrl.build.commands = lodash.get(ctrl.version, 'spec.build.commands', []);
11072
- ctrl.build.commands = ctrl.build.commands.join('\n').replace(/''/g, '\'');
11073
-
11074
- ctrl.build.dependencies = lodash.get(ctrl.version, 'spec.build.dependencies', []).join('\n');
11075
- ctrl.build.runtimeAttributes.repositories = lodash.get(ctrl.version, 'spec.build.runtimeAttributes.repositories', []).join('\n');
11062
+ function postLink() {
11063
+ ctrl.isKubePlatform = FunctionsService.isKubePlatform();
11076
11064
 
11077
- ctrl.imageName = lodash.get(ctrl.version, 'spec.build.image');
11078
- var imageNamePrefix = ctrl.version.ui.imageNamePrefix;
11079
- if (!lodash.isEmpty(imageNamePrefix) && lodash.startsWith(ctrl.imageName, imageNamePrefix)) {
11080
- ctrl.imageName = ctrl.imageName.replace(imageNamePrefix, '');
11081
- }
11065
+ // Bind DOM-related preventDropdownCutOff method to component's controller
11066
+ PreventDropdownCutOffService.preventDropdownCutOff($element, '.three-dot-menu');
11067
+ }
11068
+
11069
+ /**
11070
+ * On changes hook method.
11071
+ * @param {Object} changes
11072
+ */
11073
+ function onChanges(changes) {
11074
+ if (lodash.has(changes, 'version')) {
11075
+ ctrl.labels = lodash.chain(ctrl.version).get('metadata.labels', {}).omitBy(function (value, key) {
11076
+ return lodash.startsWith(key, 'nuclio.io/');
11077
+ }).map(function (value, key) {
11078
+ return {
11079
+ name: key,
11080
+ value: value,
11081
+ ui: {
11082
+ editModeActive: false,
11083
+ isFormValid: false,
11084
+ name: 'label'
11085
+ }
11086
+ };
11087
+ }).value();
11088
+ ctrl.labels = lodash.compact(ctrl.labels);
11089
+ ctrl.addNewLabelTooltip = VersionHelperService.isVersionDeployed(ctrl.version) ? $i18next.t('functions:TOOLTIP.ADD_LABELS', { lng: lng }) : '';
11082
11090
 
11083
11091
  $timeout(function () {
11084
- if (ctrl.buildForm.$invalid) {
11085
- ctrl.buildForm.$setSubmitted();
11086
- $rootScope.$broadcast('change-state-deploy-button', { component: 'build', isDisabled: true });
11092
+ if (ctrl.labelsForm.$invalid) {
11093
+ ctrl.labelsForm.$setSubmitted();
11094
+ $rootScope.$broadcast('change-state-deploy-button', { component: 'label', isDisabled: true });
11087
11095
  }
11088
11096
  });
11089
11097
  }
11090
11098
  }
11091
11099
 
11092
- /**
11093
- * Destructor method
11094
- */
11095
- function onDestroy() {
11096
- $rootScope.$broadcast('change-state-deploy-button', {
11097
- component: 'build',
11098
- isDisabled: lodash.get(ctrl.buildForm, '$invalid', false)
11099
- });
11100
- }
11101
-
11102
11100
  //
11103
11101
  // Public methods
11104
11102
  //
11105
11103
 
11106
11104
  /**
11107
- * Update spec.buildCommands value
11108
- * @param {string} newData
11109
- * @param {string} field
11105
+ * Adds new label
11110
11106
  */
11111
- function inputValueCallback(newData, field) {
11112
- if (lodash.includes(['commands', 'dependencies', 'runtimeAttributes.repositories'], field)) {
11113
- if (lodash.isEmpty(newData)) {
11114
- lodash.unset(ctrl.build, field);
11115
- lodash.unset(ctrl.version, 'spec.build.' + field);
11116
- } else {
11117
- var commands = newData.replace(/\r/g, '\n').split(/\n+/);
11118
-
11119
- lodash.set(ctrl.build, field, newData);
11120
- lodash.set(ctrl.version, 'spec.build.' + field, commands);
11121
- }
11122
- } else if (field === 'imageName') {
11123
- var imageNamePrefix = ctrl.version.ui.imageNamePrefix;
11124
- var prefix = lodash.isEmpty(imageNamePrefix) ? '' : imageNamePrefix;
11125
- lodash.set(ctrl.version, 'spec.build.image', prefix + newData);
11126
- ctrl.imageName = newData;
11127
- } else {
11128
- if (field === 'readinessTimeoutSeconds' && newData === '') {
11129
- lodash.unset(ctrl.version, field);
11130
- } else {
11131
- lodash.set(ctrl.version, field, newData);
11132
- }
11107
+ function addNewLabel(event) {
11108
+ // prevent adding labels for deployed functions
11109
+ if (ctrl.isLabelsDisabled() || ctrl.isFunctionDeploying()) {
11110
+ return;
11133
11111
  }
11134
11112
 
11135
11113
  $timeout(function () {
11136
- $rootScope.$broadcast('change-state-deploy-button', {
11137
- component: 'build',
11138
- isDisabled: lodash.get(ctrl.buildForm, '$invalid', false)
11139
- });
11140
- });
11114
+ if (ctrl.labels.length < 1 || lodash.last(ctrl.labels).ui.isFormValid) {
11115
+ ctrl.labels.push({
11116
+ name: '',
11117
+ value: '',
11118
+ ui: {
11119
+ editModeActive: true,
11120
+ isFormValid: false,
11121
+ name: 'label'
11122
+ }
11123
+ });
11141
11124
 
11142
- ctrl.onChangeCallback();
11125
+ $rootScope.$broadcast('change-state-deploy-button', { component: 'label', isDisabled: true });
11126
+ event.stopPropagation();
11127
+ }
11128
+ }, 50);
11143
11129
  }
11144
11130
 
11145
11131
  /**
11146
- * Returns uploading file config object
11147
- * @returns {Object}
11132
+ * Handler on specific action type
11133
+ * @param {string} actionType
11134
+ * @param {number} index - index of label in array
11148
11135
  */
11149
- function getFileConfig() {
11150
- return ctrl[uploadType];
11136
+ function handleAction(actionType, index) {
11137
+ if (actionType === 'delete') {
11138
+ ctrl.labels.splice(index, 1);
11139
+
11140
+ $timeout(function () {
11141
+ updateLabels();
11142
+ });
11143
+ }
11151
11144
  }
11152
11145
 
11153
11146
  /**
11154
- * According to given action name calls proper action handler
11155
- * @param {string} fileType - a type of uploading file
11156
- * @returns {boolean} if file of this fileType already uploaded
11147
+ * Checks if labels should be disabled
11148
+ * @returns {boolean}
11157
11149
  */
11158
- function onFireAction(fileType) {
11159
-
11160
- // this if is a temporary solution as at the moment we don't know the maximum quantity of the uploading files
11161
- if (fileType === 'file' && ctrl.file.uploaded || fileType === 'script' && ctrl.script.uploaded) {
11162
- return false;
11163
- }
11150
+ function isLabelsDisabled() {
11151
+ return ctrl.isKubePlatform && VersionHelperService.isVersionDeployed(ctrl.version);
11152
+ }
11164
11153
 
11165
- uploadType = fileType;
11154
+ /**
11155
+ * Changes labels data
11156
+ * @param {Object} label
11157
+ * @param {number} index
11158
+ */
11159
+ function onChangeData(label, index) {
11160
+ ctrl.labels[index] = lodash.cloneDeep(label);
11166
11161
 
11167
- ngDialog.open({
11168
- template: '<ncl-version-configuration-build-dialog data-close-dialog="closeThisDialog(file)"></ncl-version-configuration-build-dialog>',
11169
- plain: true,
11170
- scope: $scope,
11171
- className: 'ngdialog-theme-nuclio version-configuration-build-dialog-wrapper'
11172
- }).closePromise.then(function (data) {
11173
- if (!lodash.isNil(data.value)) {
11174
- ctrl.uploadFile(data.value);
11175
- }
11176
- });
11162
+ updateLabels();
11177
11163
  }
11178
11164
 
11165
+ //
11166
+ // Private methods
11167
+ //
11168
+
11179
11169
  /**
11180
- * Upload selected file on server
11181
- * @param {Object} file - selected file
11170
+ * Updates function`s labels
11182
11171
  */
11183
- function uploadFile(file) {
11184
- var uploadingData = getFileConfig();
11172
+ function updateLabels() {
11173
+ var isFormValid = true;
11174
+ var newLabels = {};
11185
11175
 
11186
- Upload.upload({
11187
- url: '', // TODO
11188
- data: { file: file }
11189
- }).then(function (response) {
11190
- // on success
11191
- if (!uploadingData.uploaded && !lodash.isNil(response.config.data.file)) {
11192
- uploadingData.uploading = false;
11193
- uploadingData.uploaded = true;
11194
- uploadingData.name = response.config.data.file.name;
11195
- uploadingData.progress = '100%';
11176
+ lodash.forEach(ctrl.labels, function (label) {
11177
+ if (!label.ui.isFormValid) {
11178
+ isFormValid = false;
11196
11179
  }
11197
- }, function (response) {
11198
- // on error
11199
- uploadingData.uploading = false;
11200
- uploadingData.uploaded = false;
11201
- }, function (load) {
11202
- // on progress
11203
- if (!lodash.isNil(load.config.data.file)) {
11204
- var progressPercentage = parseInt(100.0 * load.loaded / load.total);
11205
11180
 
11206
- uploadingData.uploading = true;
11207
- uploadingData.progress = progressPercentage + '%';
11208
- uploadingData.name = load.config.data.file.name;
11209
- }
11181
+ newLabels[label.name] = label.value;
11210
11182
  });
11211
11183
 
11212
- uploadingData.uploading = false;
11213
- }
11184
+ // since uniqueness validation rule of some fields is dependent on the entire label list, then whenever
11185
+ // the list is modified - the rest of the labels need to be re-validated
11186
+ FormValidationService.validateAllFields(ctrl.labelsForm);
11214
11187
 
11215
- /**
11216
- * Delete file button handler
11217
- * @param {string} type - type of file
11218
- */
11219
- function deleteFile(type) {
11220
- ctrl[type] = {
11221
- uploading: false,
11222
- uploaded: false,
11223
- progress: '0%',
11224
- icon: 'ncl-icon-' + type,
11225
- name: ''
11226
- };
11188
+ $rootScope.$broadcast('change-state-deploy-button', {
11189
+ component: 'label',
11190
+ isDisabled: !isFormValid
11191
+ });
11192
+
11193
+ lodash.set(ctrl.version, 'metadata.labels', newLabels);
11227
11194
  ctrl.onChangeCallback();
11228
11195
  }
11229
11196
 
11230
- //
11231
- // Private methods
11232
- //
11233
-
11234
11197
  /**
11235
- * Initializes actions
11236
- * @returns {Object[]} - list of actions
11198
+ * Determines `uniqueness` validation for `Key` field
11199
+ * @param {string} value - value to validate
11237
11200
  */
11238
- function initActions() {
11239
- return [{
11240
- id: 'script',
11241
- label: $i18next.t('functions:SCRIPT', { lng: lng }),
11242
- icon: 'ncl-icon-script',
11243
- active: true
11244
- }, {
11245
- id: 'file',
11246
- label: $i18next.t('common:FILE', { lng: lng }),
11247
- icon: 'ncl-icon-file',
11248
- active: true
11249
- }];
11201
+ function validateUniqueness(value) {
11202
+ return lodash.filter(ctrl.labels, ['name', value]).length === 1;
11250
11203
  }
11251
11204
  }
11252
11205
  })();
@@ -11449,22 +11402,58 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
11449
11402
  // then whenever the list is modified - the rest of the environment variables need to be re-validated
11450
11403
  FormValidationService.validateAllFields(ctrl.environmentVariablesForm);
11451
11404
 
11452
- $rootScope.$broadcast('change-state-deploy-button', {
11453
- component: 'variable',
11454
- isDisabled: !isFormValid
11455
- });
11405
+ $rootScope.$broadcast('change-state-deploy-button', {
11406
+ component: 'variable',
11407
+ isDisabled: !isFormValid
11408
+ });
11409
+
11410
+ lodash.set(ctrl.version, 'spec.env', variables);
11411
+ ctrl.onChangeCallback();
11412
+ }
11413
+
11414
+ /**
11415
+ * Determines `uniqueness` validation for `Key` and `ConfigMap key` fields
11416
+ * @param {string} path
11417
+ * @param {string} value
11418
+ */
11419
+ function validateUniqueness(path, value) {
11420
+ return lodash.filter(ctrl.variables, [path, value]).length === 1;
11421
+ }
11422
+ }
11423
+ })();
11424
+ 'use strict';
11425
+
11426
+ (function () {
11427
+ 'use strict';
11428
+
11429
+ NclVersionConfigurationLoggingController.$inject = ['lodash'];
11430
+ angular.module('iguazio.dashboard-controls').component('nclVersionConfigurationLogging', {
11431
+ bindings: {
11432
+ version: '<',
11433
+ onChangeCallback: '<'
11434
+ },
11435
+ templateUrl: 'nuclio/functions/version/version-configuration/tabs/version-configuration-logging/version-configuration-logging.tpl.html',
11436
+ controller: NclVersionConfigurationLoggingController
11437
+ });
11438
+
11439
+ function NclVersionConfigurationLoggingController(lodash) {
11440
+ var ctrl = this;
11456
11441
 
11457
- lodash.set(ctrl.version, 'spec.env', variables);
11458
- ctrl.onChangeCallback();
11459
- }
11442
+ ctrl.inputValueCallback = inputValueCallback;
11443
+
11444
+ //
11445
+ // Public methods
11446
+ //
11460
11447
 
11461
11448
  /**
11462
- * Determines `uniqueness` validation for `Key` and `ConfigMap key` fields
11463
- * @param {string} path
11464
- * @param {string} value
11449
+ * Update data callback
11450
+ * @param {string} newData
11451
+ * @param {string} field
11465
11452
  */
11466
- function validateUniqueness(path, value) {
11467
- return lodash.filter(ctrl.variables, [path, value]).length === 1;
11453
+ function inputValueCallback(newData, field) {
11454
+ lodash.set(ctrl.version, field, newData);
11455
+
11456
+ ctrl.onChangeCallback();
11468
11457
  }
11469
11458
  }
11470
11459
  })();
@@ -11473,68 +11462,78 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
11473
11462
  (function () {
11474
11463
  'use strict';
11475
11464
 
11476
- NclVersionConfigurationLabelsController.$inject = ['$element', '$i18next', '$rootScope', '$timeout', 'i18next', 'lodash', 'FormValidationService', 'FunctionsService', 'PreventDropdownCutOffService', 'ValidationService', 'VersionHelperService'];
11477
- angular.module('iguazio.dashboard-controls').component('nclVersionConfigurationLabels', {
11465
+ NclVersionConfigurationBuildController.$inject = ['$rootScope', '$scope', '$timeout', '$i18next', 'i18next', 'lodash', 'ngDialog', 'Upload', 'ConfigService', 'FunctionsService', 'ValidationService'];
11466
+ angular.module('iguazio.dashboard-controls').component('nclVersionConfigurationBuild', {
11478
11467
  bindings: {
11479
11468
  version: '<',
11480
11469
  onChangeCallback: '<',
11481
11470
  isFunctionDeploying: '&'
11482
11471
  },
11483
- templateUrl: 'nuclio/functions/version/version-configuration/tabs/version-configuration-labels/version-configuration-labels.tpl.html',
11484
- controller: NclVersionConfigurationLabelsController
11472
+ templateUrl: 'nuclio/functions/version/version-configuration/tabs/version-configuration-build/version-configuration-build.tpl.html',
11473
+ controller: NclVersionConfigurationBuildController
11485
11474
  });
11486
11475
 
11487
- function NclVersionConfigurationLabelsController($element, $i18next, $rootScope, $timeout, i18next, lodash, FormValidationService, FunctionsService, PreventDropdownCutOffService, ValidationService, VersionHelperService) {
11476
+ function NclVersionConfigurationBuildController($rootScope, $scope, $timeout, $i18next, i18next, lodash, ngDialog, Upload, ConfigService, FunctionsService, ValidationService) {
11488
11477
  var ctrl = this;
11489
11478
  var lng = i18next.language;
11479
+ var uploadType = '';
11490
11480
 
11491
- ctrl.igzScrollConfig = {
11492
- maxElementsCount: 10,
11493
- childrenSelector: '.table-body'
11481
+ ctrl.actions = initActions();
11482
+ ctrl.build = {
11483
+ runtimeAttributes: {}
11494
11484
  };
11495
- ctrl.isKubePlatform = false;
11496
- ctrl.labelsForm = null;
11497
- ctrl.scrollConfig = {
11498
- axis: 'y',
11499
- advanced: {
11500
- updateOnContentResize: true
11501
- }
11485
+ ctrl.script = {
11486
+ uploading: false,
11487
+ uploaded: false,
11488
+ progress: '0%',
11489
+ icon: 'ncl-icon-script',
11490
+ name: ''
11502
11491
  };
11503
- ctrl.tooltip = '<a class="link" target="_blank" ' + 'href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/">' + $i18next.t('functions:TOOLTIP.LABELS.HEAD', { lng: lng }) + '</a> ' + $i18next.t('functions:TOOLTIP.LABELS.REST', { lng: lng });
11492
+ ctrl.file = {
11493
+ uploading: false,
11494
+ uploaded: false,
11495
+ progress: '0%',
11496
+ icon: 'ncl-icon-file',
11497
+ name: ''
11498
+ };
11499
+ ctrl.disabled = true;
11500
+ ctrl.platformKindIsKube = false;
11501
+ ctrl.onBuildImageDescription = '';
11504
11502
 
11505
- ctrl.keyTooltip = $i18next.t('functions:TOOLTIP.PREFIXED_NAME', {
11506
- lng: lng,
11507
- name: $i18next.t('common:LABEL', { lng: lng })
11508
- });
11509
- ctrl.validationRules = {
11510
- key: ValidationService.getValidationRules('function.label.key', [{
11511
- name: 'uniqueness',
11512
- label: $i18next.t('functions:UNIQUENESS', { lng: lng }),
11513
- pattern: validateUniqueness
11514
- }]),
11515
- value: ValidationService.getValidationRules('k8s.qualifiedName')
11503
+ ctrl.defaultFunctionConfig = lodash.get(ConfigService, 'nuclio.defaultFunctionConfig.attributes', {});
11504
+ ctrl.imageNameValidationPattern = ValidationService.dockerReference;
11505
+ ctrl.maxLengths = {
11506
+ imageName: ValidationService.getMaxLength('function.imageName')
11516
11507
  };
11508
+ ctrl.imageName = '';
11517
11509
 
11518
- ctrl.$postLink = postLink;
11510
+ ctrl.$onInit = onInit;
11519
11511
  ctrl.$onChanges = onChanges;
11512
+ ctrl.$onDestroy = onDestroy;
11520
11513
 
11521
- ctrl.addNewLabel = addNewLabel;
11522
- ctrl.handleAction = handleAction;
11523
- ctrl.isLabelsDisabled = isLabelsDisabled;
11524
- ctrl.onChangeData = onChangeData;
11514
+ ctrl.deleteFile = deleteFile;
11515
+ ctrl.getFileConfig = getFileConfig;
11516
+ ctrl.inputValueCallback = inputValueCallback;
11517
+ ctrl.isDemoMode = ConfigService.isDemoMode;
11518
+ ctrl.onFireAction = onFireAction;
11519
+ ctrl.uploadFile = uploadFile;
11525
11520
 
11526
11521
  //
11527
11522
  // Hook methods
11528
11523
  //
11529
11524
 
11530
11525
  /**
11531
- * Post linking method
11526
+ * Initialization method
11532
11527
  */
11533
- function postLink() {
11534
- ctrl.isKubePlatform = FunctionsService.isKubePlatform();
11535
-
11536
- // Bind DOM-related preventDropdownCutOff method to component's controller
11537
- PreventDropdownCutOffService.preventDropdownCutOff($element, '.three-dot-menu');
11528
+ function onInit() {
11529
+ ctrl.onBuildImageDescription = $i18next.t('functions:ONBUILD_IMAGE_DESCRIPTION', {
11530
+ interpolation: {
11531
+ prefix: '__',
11532
+ suffix: '__'
11533
+ },
11534
+ lng: lng
11535
+ });
11536
+ ctrl.platformKindIsKube = FunctionsService.isKubePlatform();
11538
11537
  }
11539
11538
 
11540
11539
  /**
@@ -11542,171 +11541,187 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
11542
11541
  * @param {Object} changes
11543
11542
  */
11544
11543
  function onChanges(changes) {
11545
- if (lodash.has(changes, 'version')) {
11546
- ctrl.labels = lodash.chain(ctrl.version).get('metadata.labels', {}).omitBy(function (value, key) {
11547
- return lodash.startsWith(key, 'nuclio.io/');
11548
- }).map(function (value, key) {
11549
- return {
11550
- name: key,
11551
- value: value,
11552
- ui: {
11553
- editModeActive: false,
11554
- isFormValid: false,
11555
- name: 'label'
11556
- }
11557
- };
11558
- }).value();
11559
- ctrl.labels = lodash.compact(ctrl.labels);
11560
- ctrl.addNewLabelTooltip = VersionHelperService.isVersionDeployed(ctrl.version) ? $i18next.t('functions:TOOLTIP.ADD_LABELS', { lng: lng }) : '';
11544
+ if (angular.isDefined(changes.version)) {
11545
+ ctrl.disabled = lodash.get(ctrl.version, 'spec.build.codeEntryType') === 'image';
11546
+ ctrl.build.commands = lodash.get(ctrl.version, 'spec.build.commands', []);
11547
+ ctrl.build.commands = ctrl.build.commands.join('\n').replace(/''/g, '\'');
11548
+
11549
+ ctrl.build.dependencies = lodash.get(ctrl.version, 'spec.build.dependencies', []).join('\n');
11550
+ ctrl.build.runtimeAttributes.repositories = lodash.get(ctrl.version, 'spec.build.runtimeAttributes.repositories', []).join('\n');
11551
+
11552
+ ctrl.imageName = lodash.get(ctrl.version, 'spec.build.image');
11553
+ var imageNamePrefix = ctrl.version.ui.imageNamePrefix;
11554
+ if (!lodash.isEmpty(imageNamePrefix) && lodash.startsWith(ctrl.imageName, imageNamePrefix)) {
11555
+ ctrl.imageName = ctrl.imageName.replace(imageNamePrefix, '');
11556
+ }
11561
11557
 
11562
11558
  $timeout(function () {
11563
- if (ctrl.labelsForm.$invalid) {
11564
- ctrl.labelsForm.$setSubmitted();
11565
- $rootScope.$broadcast('change-state-deploy-button', { component: 'label', isDisabled: true });
11559
+ if (ctrl.buildForm.$invalid) {
11560
+ ctrl.buildForm.$setSubmitted();
11561
+ $rootScope.$broadcast('change-state-deploy-button', { component: 'build', isDisabled: true });
11566
11562
  }
11567
11563
  });
11568
11564
  }
11569
11565
  }
11570
11566
 
11567
+ /**
11568
+ * Destructor method
11569
+ */
11570
+ function onDestroy() {
11571
+ $rootScope.$broadcast('change-state-deploy-button', {
11572
+ component: 'build',
11573
+ isDisabled: lodash.get(ctrl.buildForm, '$invalid', false)
11574
+ });
11575
+ }
11576
+
11571
11577
  //
11572
11578
  // Public methods
11573
11579
  //
11574
11580
 
11575
11581
  /**
11576
- * Adds new label
11582
+ * Update spec.buildCommands value
11583
+ * @param {string} newData
11584
+ * @param {string} field
11577
11585
  */
11578
- function addNewLabel(event) {
11579
- // prevent adding labels for deployed functions
11580
- if (ctrl.isLabelsDisabled() || ctrl.isFunctionDeploying()) {
11581
- return;
11586
+ function inputValueCallback(newData, field) {
11587
+ if (lodash.includes(['commands', 'dependencies', 'runtimeAttributes.repositories'], field)) {
11588
+ if (lodash.isEmpty(newData)) {
11589
+ lodash.unset(ctrl.build, field);
11590
+ lodash.unset(ctrl.version, 'spec.build.' + field);
11591
+ } else {
11592
+ var commands = newData.replace(/\r/g, '\n').split(/\n+/);
11593
+
11594
+ lodash.set(ctrl.build, field, newData);
11595
+ lodash.set(ctrl.version, 'spec.build.' + field, commands);
11596
+ }
11597
+ } else if (field === 'imageName') {
11598
+ var imageNamePrefix = ctrl.version.ui.imageNamePrefix;
11599
+ var prefix = lodash.isEmpty(imageNamePrefix) ? '' : imageNamePrefix;
11600
+ lodash.set(ctrl.version, 'spec.build.image', prefix + newData);
11601
+ ctrl.imageName = newData;
11602
+ } else {
11603
+ if (field === 'readinessTimeoutSeconds' && newData === '') {
11604
+ lodash.unset(ctrl.version, field);
11605
+ } else {
11606
+ lodash.set(ctrl.version, field, newData);
11607
+ }
11582
11608
  }
11583
11609
 
11584
11610
  $timeout(function () {
11585
- if (ctrl.labels.length < 1 || lodash.last(ctrl.labels).ui.isFormValid) {
11586
- ctrl.labels.push({
11587
- name: '',
11588
- value: '',
11589
- ui: {
11590
- editModeActive: true,
11591
- isFormValid: false,
11592
- name: 'label'
11593
- }
11594
- });
11611
+ $rootScope.$broadcast('change-state-deploy-button', {
11612
+ component: 'build',
11613
+ isDisabled: lodash.get(ctrl.buildForm, '$invalid', false)
11614
+ });
11615
+ });
11595
11616
 
11596
- $rootScope.$broadcast('change-state-deploy-button', { component: 'label', isDisabled: true });
11597
- event.stopPropagation();
11598
- }
11599
- }, 50);
11617
+ ctrl.onChangeCallback();
11600
11618
  }
11601
11619
 
11602
11620
  /**
11603
- * Handler on specific action type
11604
- * @param {string} actionType
11605
- * @param {number} index - index of label in array
11621
+ * Returns uploading file config object
11622
+ * @returns {Object}
11606
11623
  */
11607
- function handleAction(actionType, index) {
11608
- if (actionType === 'delete') {
11609
- ctrl.labels.splice(index, 1);
11610
-
11611
- $timeout(function () {
11612
- updateLabels();
11613
- });
11614
- }
11624
+ function getFileConfig() {
11625
+ return ctrl[uploadType];
11615
11626
  }
11616
11627
 
11617
11628
  /**
11618
- * Checks if labels should be disabled
11619
- * @returns {boolean}
11629
+ * According to given action name calls proper action handler
11630
+ * @param {string} fileType - a type of uploading file
11631
+ * @returns {boolean} if file of this fileType already uploaded
11620
11632
  */
11621
- function isLabelsDisabled() {
11622
- return ctrl.isKubePlatform && VersionHelperService.isVersionDeployed(ctrl.version);
11623
- }
11633
+ function onFireAction(fileType) {
11624
11634
 
11625
- /**
11626
- * Changes labels data
11627
- * @param {Object} label
11628
- * @param {number} index
11629
- */
11630
- function onChangeData(label, index) {
11631
- ctrl.labels[index] = lodash.cloneDeep(label);
11635
+ // this if is a temporary solution as at the moment we don't know the maximum quantity of the uploading files
11636
+ if (fileType === 'file' && ctrl.file.uploaded || fileType === 'script' && ctrl.script.uploaded) {
11637
+ return false;
11638
+ }
11632
11639
 
11633
- updateLabels();
11634
- }
11640
+ uploadType = fileType;
11635
11641
 
11636
- //
11637
- // Private methods
11638
- //
11642
+ ngDialog.open({
11643
+ template: '<ncl-version-configuration-build-dialog data-close-dialog="closeThisDialog(file)"></ncl-version-configuration-build-dialog>',
11644
+ plain: true,
11645
+ scope: $scope,
11646
+ className: 'ngdialog-theme-nuclio version-configuration-build-dialog-wrapper'
11647
+ }).closePromise.then(function (data) {
11648
+ if (!lodash.isNil(data.value)) {
11649
+ ctrl.uploadFile(data.value);
11650
+ }
11651
+ });
11652
+ }
11639
11653
 
11640
11654
  /**
11641
- * Updates function`s labels
11655
+ * Upload selected file on server
11656
+ * @param {Object} file - selected file
11642
11657
  */
11643
- function updateLabels() {
11644
- var isFormValid = true;
11645
- var newLabels = {};
11658
+ function uploadFile(file) {
11659
+ var uploadingData = getFileConfig();
11646
11660
 
11647
- lodash.forEach(ctrl.labels, function (label) {
11648
- if (!label.ui.isFormValid) {
11649
- isFormValid = false;
11661
+ Upload.upload({
11662
+ url: '', // TODO
11663
+ data: { file: file }
11664
+ }).then(function (response) {
11665
+ // on success
11666
+ if (!uploadingData.uploaded && !lodash.isNil(response.config.data.file)) {
11667
+ uploadingData.uploading = false;
11668
+ uploadingData.uploaded = true;
11669
+ uploadingData.name = response.config.data.file.name;
11670
+ uploadingData.progress = '100%';
11650
11671
  }
11672
+ }, function (response) {
11673
+ // on error
11674
+ uploadingData.uploading = false;
11675
+ uploadingData.uploaded = false;
11676
+ }, function (load) {
11677
+ // on progress
11678
+ if (!lodash.isNil(load.config.data.file)) {
11679
+ var progressPercentage = parseInt(100.0 * load.loaded / load.total);
11651
11680
 
11652
- newLabels[label.name] = label.value;
11653
- });
11654
-
11655
- // since uniqueness validation rule of some fields is dependent on the entire label list, then whenever
11656
- // the list is modified - the rest of the labels need to be re-validated
11657
- FormValidationService.validateAllFields(ctrl.labelsForm);
11658
-
11659
- $rootScope.$broadcast('change-state-deploy-button', {
11660
- component: 'label',
11661
- isDisabled: !isFormValid
11681
+ uploadingData.uploading = true;
11682
+ uploadingData.progress = progressPercentage + '%';
11683
+ uploadingData.name = load.config.data.file.name;
11684
+ }
11662
11685
  });
11663
11686
 
11664
- lodash.set(ctrl.version, 'metadata.labels', newLabels);
11665
- ctrl.onChangeCallback();
11687
+ uploadingData.uploading = false;
11666
11688
  }
11667
11689
 
11668
11690
  /**
11669
- * Determines `uniqueness` validation for `Key` field
11670
- * @param {string} value - value to validate
11691
+ * Delete file button handler
11692
+ * @param {string} type - type of file
11671
11693
  */
11672
- function validateUniqueness(value) {
11673
- return lodash.filter(ctrl.labels, ['name', value]).length === 1;
11694
+ function deleteFile(type) {
11695
+ ctrl[type] = {
11696
+ uploading: false,
11697
+ uploaded: false,
11698
+ progress: '0%',
11699
+ icon: 'ncl-icon-' + type,
11700
+ name: ''
11701
+ };
11702
+ ctrl.onChangeCallback();
11674
11703
  }
11675
- }
11676
- })();
11677
- 'use strict';
11678
-
11679
- (function () {
11680
- 'use strict';
11681
-
11682
- NclVersionConfigurationLoggingController.$inject = ['lodash'];
11683
- angular.module('iguazio.dashboard-controls').component('nclVersionConfigurationLogging', {
11684
- bindings: {
11685
- version: '<',
11686
- onChangeCallback: '<'
11687
- },
11688
- templateUrl: 'nuclio/functions/version/version-configuration/tabs/version-configuration-logging/version-configuration-logging.tpl.html',
11689
- controller: NclVersionConfigurationLoggingController
11690
- });
11691
-
11692
- function NclVersionConfigurationLoggingController(lodash) {
11693
- var ctrl = this;
11694
-
11695
- ctrl.inputValueCallback = inputValueCallback;
11696
11704
 
11697
11705
  //
11698
- // Public methods
11706
+ // Private methods
11699
11707
  //
11700
11708
 
11701
11709
  /**
11702
- * Update data callback
11703
- * @param {string} newData
11704
- * @param {string} field
11710
+ * Initializes actions
11711
+ * @returns {Object[]} - list of actions
11705
11712
  */
11706
- function inputValueCallback(newData, field) {
11707
- lodash.set(ctrl.version, field, newData);
11708
-
11709
- ctrl.onChangeCallback();
11713
+ function initActions() {
11714
+ return [{
11715
+ id: 'script',
11716
+ label: $i18next.t('functions:SCRIPT', { lng: lng }),
11717
+ icon: 'ncl-icon-script',
11718
+ active: true
11719
+ }, {
11720
+ id: 'file',
11721
+ label: $i18next.t('common:FILE', { lng: lng }),
11722
+ icon: 'ncl-icon-file',
11723
+ active: true
11724
+ }];
11710
11725
  }
11711
11726
  }
11712
11727
  })();
@@ -15831,7 +15846,7 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
15831
15846
  promise.then(function () {
15832
15847
  ctrl.closeDialog({ newApiGateway: apiGateway });
15833
15848
  }).catch(function (error) {
15834
- var errorMessage = lodash.get(error, 'data.errors[0].detail', error.statusText);
15849
+ var errorMessage = lodash.get(error, 'data.error', lodash.get(error, 'data.errors[0].detail', error.statusText));
15835
15850
 
15836
15851
  DialogsService.alert(errorMessage);
15837
15852
  });
@@ -16548,21 +16563,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
16548
16563
  })();
16549
16564
  'use strict';
16550
16565
 
16551
- (function () {
16552
- 'use strict';
16553
-
16554
- angular.module('iguazio.dashboard-controls').component('nclFunction', {
16555
- bindings: {},
16556
- templateUrl: 'nuclio/functions/function/ncl-function.tpl.html',
16557
- controller: NclFunctionController
16558
- });
16559
-
16560
- function NclFunctionController() {
16561
- var ctrl = this;
16562
- }
16563
- })();
16564
- 'use strict';
16565
-
16566
16566
  (function () {
16567
16567
  'use strict';
16568
16568
 
@@ -16661,6 +16661,21 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
16661
16661
  })();
16662
16662
  'use strict';
16663
16663
 
16664
+ (function () {
16665
+ 'use strict';
16666
+
16667
+ angular.module('iguazio.dashboard-controls').component('nclFunction', {
16668
+ bindings: {},
16669
+ templateUrl: 'nuclio/functions/function/ncl-function.tpl.html',
16670
+ controller: NclFunctionController
16671
+ });
16672
+
16673
+ function NclFunctionController() {
16674
+ var ctrl = this;
16675
+ }
16676
+ })();
16677
+ 'use strict';
16678
+
16664
16679
  /*eslint max-statements: ["error", 55]*/
16665
16680
  (function () {
16666
16681
  'use strict';
@@ -20091,67 +20106,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
20091
20106
  })();
20092
20107
  'use strict';
20093
20108
 
20094
- (function () {
20095
- 'use strict';
20096
-
20097
- NclNavigationTabsController.$inject = ['$rootScope', '$state', '$timeout', 'lodash'];
20098
- angular.module('iguazio.dashboard-controls').component('nclNavigationTabs', {
20099
- bindings: {
20100
- tabItems: '<'
20101
- },
20102
- templateUrl: 'nuclio/common/components/navigation-tabs/navigation-tabs.tpl.html',
20103
- controller: NclNavigationTabsController
20104
- });
20105
-
20106
- function NclNavigationTabsController($rootScope, $state, $timeout, lodash) {
20107
- var ctrl = this;
20108
- var isTestPaneToggled = true;
20109
-
20110
- ctrl.isTestPaneClosed = false;
20111
- ctrl.isToggleButtonVisible = isToggleButtonVisible;
20112
- ctrl.toggleTestPane = toggleTestPane;
20113
-
20114
- //
20115
- // Public methods
20116
- //
20117
-
20118
- /**
20119
- * Checks if 'toggle test pane' button should be visible.
20120
- * It should, only when 'code' tab is reached.
20121
- * @returns {boolean}
20122
- */
20123
- function isToggleButtonVisible() {
20124
- var isButtonVisible = lodash.get($state.$current, 'self.url') === '/code';
20125
-
20126
- if (!isButtonVisible) {
20127
- ctrl.isTestPaneClosed = false;
20128
-
20129
- $rootScope.$broadcast('navigation-tabs_toggle-test-pane', { closeTestPane: ctrl.isTestPaneClosed });
20130
- }
20131
-
20132
- return isButtonVisible;
20133
- }
20134
-
20135
- /**
20136
- * Sends broadcast to toggle test pane.
20137
- */
20138
- function toggleTestPane() {
20139
- if (isTestPaneToggled) {
20140
- ctrl.isTestPaneClosed = !ctrl.isTestPaneClosed;
20141
- isTestPaneToggled = false;
20142
-
20143
- $rootScope.$broadcast('navigation-tabs_toggle-test-pane', { closeTestPane: ctrl.isTestPaneClosed });
20144
-
20145
- // wait until toggling animation will be completed
20146
- $timeout(function () {
20147
- isTestPaneToggled = true;
20148
- }, 600);
20149
- }
20150
- }
20151
- }
20152
- })();
20153
- 'use strict';
20154
-
20155
20109
  (function () {
20156
20110
  'use strict';
20157
20111
 
@@ -20218,34 +20172,95 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
20218
20172
  //
20219
20173
 
20220
20174
  /**
20221
- * Calls service method for search
20175
+ * Calls service method for search
20176
+ */
20177
+ function makeSearch() {}
20178
+ // TODO
20179
+
20180
+
20181
+ /**
20182
+ * Tracks input changing and initializes search
20183
+ */
20184
+ function onChangeSearchQuery(newValue, oldValue) {
20185
+ if (angular.isDefined(newValue) && newValue !== oldValue) {
20186
+ makeSearch();
20187
+ }
20188
+ }
20189
+
20190
+ /**
20191
+ * Initializes search when all html has been rendered
20192
+ */
20193
+ function onDataChanged() {
20194
+ $timeout(makeSearch);
20195
+ }
20196
+
20197
+ /**
20198
+ * Resets search query and initializes search
20199
+ */
20200
+ function resetSearch() {
20201
+ ctrl.searchQuery = '';
20202
+ $timeout(makeSearch);
20203
+ }
20204
+ }
20205
+ })();
20206
+ 'use strict';
20207
+
20208
+ (function () {
20209
+ 'use strict';
20210
+
20211
+ NclNavigationTabsController.$inject = ['$rootScope', '$state', '$timeout', 'lodash'];
20212
+ angular.module('iguazio.dashboard-controls').component('nclNavigationTabs', {
20213
+ bindings: {
20214
+ tabItems: '<'
20215
+ },
20216
+ templateUrl: 'nuclio/common/components/navigation-tabs/navigation-tabs.tpl.html',
20217
+ controller: NclNavigationTabsController
20218
+ });
20219
+
20220
+ function NclNavigationTabsController($rootScope, $state, $timeout, lodash) {
20221
+ var ctrl = this;
20222
+ var isTestPaneToggled = true;
20223
+
20224
+ ctrl.isTestPaneClosed = false;
20225
+ ctrl.isToggleButtonVisible = isToggleButtonVisible;
20226
+ ctrl.toggleTestPane = toggleTestPane;
20227
+
20228
+ //
20229
+ // Public methods
20230
+ //
20231
+
20232
+ /**
20233
+ * Checks if 'toggle test pane' button should be visible.
20234
+ * It should, only when 'code' tab is reached.
20235
+ * @returns {boolean}
20222
20236
  */
20223
- function makeSearch() {}
20224
- // TODO
20237
+ function isToggleButtonVisible() {
20238
+ var isButtonVisible = lodash.get($state.$current, 'self.url') === '/code';
20225
20239
 
20240
+ if (!isButtonVisible) {
20241
+ ctrl.isTestPaneClosed = false;
20226
20242
 
20227
- /**
20228
- * Tracks input changing and initializes search
20229
- */
20230
- function onChangeSearchQuery(newValue, oldValue) {
20231
- if (angular.isDefined(newValue) && newValue !== oldValue) {
20232
- makeSearch();
20243
+ $rootScope.$broadcast('navigation-tabs_toggle-test-pane', { closeTestPane: ctrl.isTestPaneClosed });
20233
20244
  }
20234
- }
20235
20245
 
20236
- /**
20237
- * Initializes search when all html has been rendered
20238
- */
20239
- function onDataChanged() {
20240
- $timeout(makeSearch);
20246
+ return isButtonVisible;
20241
20247
  }
20242
20248
 
20243
20249
  /**
20244
- * Resets search query and initializes search
20250
+ * Sends broadcast to toggle test pane.
20245
20251
  */
20246
- function resetSearch() {
20247
- ctrl.searchQuery = '';
20248
- $timeout(makeSearch);
20252
+ function toggleTestPane() {
20253
+ if (isTestPaneToggled) {
20254
+ ctrl.isTestPaneClosed = !ctrl.isTestPaneClosed;
20255
+ isTestPaneToggled = false;
20256
+
20257
+ $rootScope.$broadcast('navigation-tabs_toggle-test-pane', { closeTestPane: ctrl.isTestPaneClosed });
20258
+
20259
+ // wait until toggling animation will be completed
20260
+ $timeout(function () {
20261
+ isTestPaneToggled = true;
20262
+ }, 600);
20263
+ }
20249
20264
  }
20250
20265
  }
20251
20266
  })();
@@ -21020,57 +21035,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
21020
21035
  })();
21021
21036
  'use strict';
21022
21037
 
21023
- (function () {
21024
- 'use strict';
21025
-
21026
- NclVersionConfigurationController.$inject = ['lodash', 'ConfigService', 'VersionHelperService'];
21027
- angular.module('iguazio.dashboard-controls').component('nclVersionConfiguration', {
21028
- bindings: {
21029
- version: '<',
21030
- isFunctionDeploying: '&'
21031
- },
21032
- templateUrl: 'nuclio/functions/version/version-configuration/version-configuration.tpl.html',
21033
- controller: NclVersionConfigurationController
21034
- });
21035
-
21036
- function NclVersionConfigurationController(lodash, ConfigService, VersionHelperService) {
21037
- var ctrl = this;
21038
-
21039
- ctrl.scrollConfig = {
21040
- axis: 'y',
21041
- advanced: {
21042
- autoScrollOnFocus: false,
21043
- updateOnContentResize: true
21044
- }
21045
- };
21046
-
21047
- ctrl.isDemoMode = ConfigService.isDemoMode;
21048
-
21049
- ctrl.isRuntimeBlockVisible = isRuntimeBlockVisible;
21050
- ctrl.onConfigurationChangeCallback = onConfigurationChangeCallback;
21051
-
21052
- //
21053
- // Public methods
21054
- //
21055
-
21056
- /**
21057
- * Checks if `Runtime Attributes` block is visible
21058
- * @returns {boolean}
21059
- */
21060
- function isRuntimeBlockVisible() {
21061
- return lodash.includes(['shell', 'java'], lodash.get(ctrl.version, 'spec.runtime'));
21062
- }
21063
-
21064
- /**
21065
- * Checks if version's configuration was changed
21066
- */
21067
- function onConfigurationChangeCallback() {
21068
- VersionHelperService.updateIsVersionChanged(ctrl.version);
21069
- }
21070
- }
21071
- })();
21072
- 'use strict';
21073
-
21074
21038
  (function () {
21075
21039
  'use strict';
21076
21040
 
@@ -21736,6 +21700,57 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
21736
21700
  })();
21737
21701
  'use strict';
21738
21702
 
21703
+ (function () {
21704
+ 'use strict';
21705
+
21706
+ NclVersionConfigurationController.$inject = ['lodash', 'ConfigService', 'VersionHelperService'];
21707
+ angular.module('iguazio.dashboard-controls').component('nclVersionConfiguration', {
21708
+ bindings: {
21709
+ version: '<',
21710
+ isFunctionDeploying: '&'
21711
+ },
21712
+ templateUrl: 'nuclio/functions/version/version-configuration/version-configuration.tpl.html',
21713
+ controller: NclVersionConfigurationController
21714
+ });
21715
+
21716
+ function NclVersionConfigurationController(lodash, ConfigService, VersionHelperService) {
21717
+ var ctrl = this;
21718
+
21719
+ ctrl.scrollConfig = {
21720
+ axis: 'y',
21721
+ advanced: {
21722
+ autoScrollOnFocus: false,
21723
+ updateOnContentResize: true
21724
+ }
21725
+ };
21726
+
21727
+ ctrl.isDemoMode = ConfigService.isDemoMode;
21728
+
21729
+ ctrl.isRuntimeBlockVisible = isRuntimeBlockVisible;
21730
+ ctrl.onConfigurationChangeCallback = onConfigurationChangeCallback;
21731
+
21732
+ //
21733
+ // Public methods
21734
+ //
21735
+
21736
+ /**
21737
+ * Checks if `Runtime Attributes` block is visible
21738
+ * @returns {boolean}
21739
+ */
21740
+ function isRuntimeBlockVisible() {
21741
+ return lodash.includes(['shell', 'java'], lodash.get(ctrl.version, 'spec.runtime'));
21742
+ }
21743
+
21744
+ /**
21745
+ * Checks if version's configuration was changed
21746
+ */
21747
+ function onConfigurationChangeCallback() {
21748
+ VersionHelperService.updateIsVersionChanged(ctrl.version);
21749
+ }
21750
+ }
21751
+ })();
21752
+ 'use strict';
21753
+
21739
21754
  (function () {
21740
21755
  'use strict';
21741
21756
 
@@ -24300,10 +24315,8 @@ try {
24300
24315
  module = angular.module('iguazio.dashboard-controls.templates', []);
24301
24316
  }
24302
24317
  module.run(['$templateCache', function($templateCache) {
24303
- $templateCache.put('igz_controls/components/action-checkbox-all/action-checkbox-all.tpl.html',
24304
- '<div class="action-checkbox-all"> <div class="check-item" data-ng-class="{\'igz-icon-checkbox-checked\': $ctrl.allItemsChecked,\n' +
24305
- ' \'igz-icon-checkbox-checked-few\': $ctrl.checkedItemsCount > 0 && !$ctrl.allItemsChecked,\n' +
24306
- ' \'igz-icon-checkbox-unchecked\': $ctrl.checkedItemsCount === 0}" data-ng-click="$ctrl.onCheckAll()"></div> </div> ');
24318
+ $templateCache.put('igz_controls/components/action-checkbox/action-checkbox.tpl.html',
24319
+ '<div class="action-checkbox"> <div class="check-item igz-icon-checkbox-unchecked" data-ng-class="{\'igz-icon-checkbox-checked\': $ctrl.item.ui.checked}" data-ng-click="$ctrl.onCheck($event)" data-ng-dblclick="$event.stopPropagation()"></div> </div> ');
24307
24320
  }]);
24308
24321
  })();
24309
24322
 
@@ -24314,8 +24327,10 @@ try {
24314
24327
  module = angular.module('iguazio.dashboard-controls.templates', []);
24315
24328
  }
24316
24329
  module.run(['$templateCache', function($templateCache) {
24317
- $templateCache.put('igz_controls/components/action-checkbox/action-checkbox.tpl.html',
24318
- '<div class="action-checkbox"> <div class="check-item igz-icon-checkbox-unchecked" data-ng-class="{\'igz-icon-checkbox-checked\': $ctrl.item.ui.checked}" data-ng-click="$ctrl.onCheck($event)" data-ng-dblclick="$event.stopPropagation()"></div> </div> ');
24330
+ $templateCache.put('igz_controls/components/action-checkbox-all/action-checkbox-all.tpl.html',
24331
+ '<div class="action-checkbox-all"> <div class="check-item" data-ng-class="{\'igz-icon-checkbox-checked\': $ctrl.allItemsChecked,\n' +
24332
+ ' \'igz-icon-checkbox-checked-few\': $ctrl.checkedItemsCount > 0 && !$ctrl.allItemsChecked,\n' +
24333
+ ' \'igz-icon-checkbox-unchecked\': $ctrl.checkedItemsCount === 0}" data-ng-click="$ctrl.onCheckAll()"></div> </div> ');
24319
24334
  }]);
24320
24335
  })();
24321
24336
 
@@ -24402,8 +24417,13 @@ try {
24402
24417
  module = angular.module('iguazio.dashboard-controls.templates', []);
24403
24418
  }
24404
24419
  module.run(['$templateCache', function($templateCache) {
24405
- $templateCache.put('igz_controls/components/element-loading-status/element-loading-status.tpl.html',
24406
- '<div class="element-loading-status" data-ng-class="\'loading-status-\' + $ctrl.loadingStatusSize"> <div class="loader-wrapper" data-ng-if="$ctrl.isShowSpinner"> <div class="loader-fading-circle" data-ng-if="!$ctrl.textStatus" data-uib-tooltip="{{$ctrl.tooltipLabel}}" data-tooltip-placement="top" data-tooltip-popup-delay="100" data-tooltip-append-to-body="true"> <div class="loader-circle1 loader-circle"></div> <div class="loader-circle2 loader-circle"></div> <div class="loader-circle3 loader-circle"></div> <div class="loader-circle4 loader-circle"></div> <div class="loader-circle5 loader-circle"></div> <div class="loader-circle6 loader-circle"></div> <div class="loader-circle7 loader-circle"></div> <div class="loader-circle8 loader-circle"></div> <div class="loader-circle9 loader-circle"></div> <div class="loader-circle10 loader-circle"></div> <div class="loader-circle11 loader-circle"></div> <div class="loader-circle12 loader-circle"></div> </div> <div data-ng-if="$ctrl.textStatus" class="loader-text">{{ \'common:LOADING_CAPITALIZE_ELLIPSIS\' | i18next }}</div> </div> <div data-ng-if="$ctrl.isShowContent && !$ctrl.isShowError"> <div data-ng-transclude></div> </div> <div class="loading-error" data-ng-if="$ctrl.isShowError && $ctrl.checkSize(\'default\')"> <div class="sad-icon"></div> <div class="loading-error-title">{{$ctrl.title}}</div> <div class="loading-error-message"> <span data-ng-bind="$ctrl.errorMessage"></span> <span data-ng-if="$ctrl.refresh"> <span>{{ \'common:ERROR_MSG.ELEMENT_LOADING_DEFAULT_2\' | i18next }}</span> <span class="refresh-page" data-ng-click="$ctrl.refreshPage($event)"> {{ \'common:ERROR_MSG.ELEMENT_LOADING_DEFAULT_3\' | i18next }} </span>. </span> </div> </div> <div class="loading-error" data-ng-if="$ctrl.isShowError && $ctrl.checkSize(\'small\')"> <div class="loading-error-title"></div> <div class="loading-error-message"> <div> {{ \'common:ERROR_MSG.ELEMENT_LOADING_SMALL_1\' | i18next }} </div> <div class="refresh-page" data-ng-click="$ctrl.refreshPage($event)" title="{{ \'common:ERROR_MSG.ELEMENT_LOADING_SMALL_2\' | i18next }}"> {{ \'common:ERROR_MSG.ELEMENT_LOADING_SMALL_2\' | i18next }} </div> </div> </div> </div> ');
24420
+ $templateCache.put('igz_controls/components/default-dropdown/default-dropdown.tpl.html',
24421
+ '<div class="default-dropdown" data-ng-class="{\'dropdown-input-invalid\': $ctrl.isShowDropdownError($ctrl.formObject, $ctrl.inputName),\n' +
24422
+ ' \'dropdown-input-disabled\': $ctrl.isDisabled}"> <div class="default-dropdown-field" tabindex="0" data-ng-click="$ctrl.readOnly || $ctrl.toggleDropdown($event)" data-ng-keydown="$ctrl.onDropDownKeydown($event)" data-uib-tooltip="{{$ctrl.isDropdownContainerShown ? \'\' : $ctrl.typedValue}}" data-tooltip-append-to-body="true" data-tooltip-placement="top" data-tooltip-popup-delay="300" data-ng-class="{placeholder: $ctrl.isPlaceholderClass(),\n' +
24423
+ ' disabled: $ctrl.isDisabled,\n' +
24424
+ ' readonly: $ctrl.readOnly}"> <div class="dropdown-selected-item"> <div data-ng-if="$ctrl.showSelectedItem().icon.name" data-ng-class="{\'custom-color\': $ctrl.dropdownType === \'priority\'}" class="dropdown-icon {{$ctrl.getIcon($ctrl.showSelectedItem()).name}}"> </div> <div data-ng-if="$ctrl.showSelectedItem().badge" data-ng-class="{\'custom-color\': $ctrl.dropdownType === \'badges-dropdown\'}" class="{{$ctrl.showSelectedItem().badge.class}}"> {{$ctrl.showSelectedItem().badge.value}} </div> <input type="text" class="input-name text-ellipsis" data-ng-class="{\'non-editable\': !$ctrl.isTypingEnabled() && !$ctrl.isDisabled, capitalized: $ctrl.isCapitalized}" data-ng-model="$ctrl.typedValue" data-ng-change="$ctrl.onChangeTypingInput()" data-ng-readonly="!$ctrl.isTypingEnabled()" data-ng-required="$ctrl.checkIsRequired()" data-ng-disabled="$ctrl.isDisabled || !$ctrl.isTypingEnabled()" data-ng-pattern="$ctrl.matchPattern" data-ng-trim="{{$ctrl.trim}}" autocomplete="off" name="{{$ctrl.inputName}}" placeholder="{{$ctrl.placeholder}}"> <span data-ng-if="$ctrl.getDescription($ctrl.showSelectedItem().description)" class="description">{{$ctrl.getDescription($ctrl.showSelectedItem().description)}}</span> </div> <div class="dropdown-arrow" data-ng-if="!$ctrl.readOnly"> <span class="{{$ctrl.iconClass}}" data-ng-class="{\'rotate-arrow\': $ctrl.isDropUp}"></span> </div> </div> <div class="default-dropdown-container {{$ctrl.additionalClass}}" tabindex="-1" data-ng-if="$ctrl.isDropdownContainerShown" data-ng-style="{\'top\': $ctrl.topPosition}" data-ng-class="{\'dropdown-overlap\': $ctrl.enableOverlap}" data-ng-scrollbars> <ul class="list" tabindex="-1"> <li class="list-item" tabindex="0" data-ng-repeat="item in $ctrl.getValuesArray() track by $index" data-ng-click="$ctrl.selectItem(item, $event)" data-ng-keydown="$ctrl.onItemKeydown($event, item)" data-ng-class="{\'list-item-description\': $ctrl.getDescription(item),\n' +
24425
+ ' \'active\': $ctrl.isItemSelected(item),\n' +
24426
+ ' \'disabled\': item.disabled}" data-ng-show="item.visible" data-uib-tooltip="{{$ctrl.getTooltip(item)}}" data-tooltip-placement="{{item.tooltipPlacement || \'left\'}}" data-tooltip-append-to-body="true"> <div class="list-item-block text-ellipsis"> <div data-ng-if="$ctrl.getIcon(item).name" data-ng-class="{\'custom-color\': $ctrl.dropdownType === \'priority\'}" class="dropdown-icon {{$ctrl.getIcon(item).name}}"> </div> <div data-ng-if="item.badge" data-ng-class="{\'custom-color\': $ctrl.dropdownType === \'badges-dropdown\'}" class="{{item.badge.class}}"> {{item.badge.value}} </div> <div class="list-item-label"> <span class="list-item-name" data-ng-class="{\'capitalized\': $ctrl.isCapitalized}" data-ng-bind-html="$ctrl.getNameTemplate(item)"></span> <span data-ng-show="$ctrl.getDescription(item)" class="description">{{$ctrl.getDescription(item)}}</span> </div> </div> <div class="igz-col-20 igz-icon-tick selected-item-icon" data-ng-show="$ctrl.isItemSelected(item) && !$ctrl.isPagination"></div> </li> </ul> <div class="add-button-wrapper" tabindex="0" data-ng-if="$ctrl.bottomButtonCallback"> <a href="#" class="add-button" data-ng-click="$ctrl.bottomButtonCallback()"> {{ $ctrl.bottomButtonText }} </a> </div> <div class="transclude-container align-items-center" data-ng-if="$ctrl.isTranscludePassed" data-ng-transclude> </div> </div> </div> ');
24407
24427
  }]);
24408
24428
  })();
24409
24429
 
@@ -24414,13 +24434,8 @@ try {
24414
24434
  module = angular.module('iguazio.dashboard-controls.templates', []);
24415
24435
  }
24416
24436
  module.run(['$templateCache', function($templateCache) {
24417
- $templateCache.put('igz_controls/components/default-dropdown/default-dropdown.tpl.html',
24418
- '<div class="default-dropdown" data-ng-class="{\'dropdown-input-invalid\': $ctrl.isShowDropdownError($ctrl.formObject, $ctrl.inputName),\n' +
24419
- ' \'dropdown-input-disabled\': $ctrl.isDisabled}"> <div class="default-dropdown-field" tabindex="0" data-ng-click="$ctrl.readOnly || $ctrl.toggleDropdown($event)" data-ng-keydown="$ctrl.onDropDownKeydown($event)" data-uib-tooltip="{{$ctrl.isDropdownContainerShown ? \'\' : $ctrl.typedValue}}" data-tooltip-append-to-body="true" data-tooltip-placement="top" data-tooltip-popup-delay="300" data-ng-class="{placeholder: $ctrl.isPlaceholderClass(),\n' +
24420
- ' disabled: $ctrl.isDisabled,\n' +
24421
- ' readonly: $ctrl.readOnly}"> <div class="dropdown-selected-item"> <div data-ng-if="$ctrl.showSelectedItem().icon.name" data-ng-class="{\'custom-color\': $ctrl.dropdownType === \'priority\'}" class="dropdown-icon {{$ctrl.getIcon($ctrl.showSelectedItem()).name}}"> </div> <div data-ng-if="$ctrl.showSelectedItem().badge" data-ng-class="{\'custom-color\': $ctrl.dropdownType === \'badges-dropdown\'}" class="{{$ctrl.showSelectedItem().badge.class}}"> {{$ctrl.showSelectedItem().badge.value}} </div> <input type="text" class="input-name text-ellipsis" data-ng-class="{\'non-editable\': !$ctrl.isTypingEnabled() && !$ctrl.isDisabled, capitalized: $ctrl.isCapitalized}" data-ng-model="$ctrl.typedValue" data-ng-change="$ctrl.onChangeTypingInput()" data-ng-readonly="!$ctrl.isTypingEnabled()" data-ng-required="$ctrl.checkIsRequired()" data-ng-disabled="$ctrl.isDisabled || !$ctrl.isTypingEnabled()" data-ng-pattern="$ctrl.matchPattern" data-ng-trim="{{$ctrl.trim}}" autocomplete="off" name="{{$ctrl.inputName}}" placeholder="{{$ctrl.placeholder}}"> <span data-ng-if="$ctrl.getDescription($ctrl.showSelectedItem().description)" class="description">{{$ctrl.getDescription($ctrl.showSelectedItem().description)}}</span> </div> <div class="dropdown-arrow" data-ng-if="!$ctrl.readOnly"> <span class="{{$ctrl.iconClass}}" data-ng-class="{\'rotate-arrow\': $ctrl.isDropUp}"></span> </div> </div> <div class="default-dropdown-container {{$ctrl.additionalClass}}" tabindex="-1" data-ng-if="$ctrl.isDropdownContainerShown" data-ng-style="{\'top\': $ctrl.topPosition}" data-ng-class="{\'dropdown-overlap\': $ctrl.enableOverlap}" data-ng-scrollbars> <ul class="list" tabindex="-1"> <li class="list-item" tabindex="0" data-ng-repeat="item in $ctrl.getValuesArray() track by $index" data-ng-click="$ctrl.selectItem(item, $event)" data-ng-keydown="$ctrl.onItemKeydown($event, item)" data-ng-class="{\'list-item-description\': $ctrl.getDescription(item),\n' +
24422
- ' \'active\': $ctrl.isItemSelected(item),\n' +
24423
- ' \'disabled\': item.disabled}" data-ng-show="item.visible" data-uib-tooltip="{{$ctrl.getTooltip(item)}}" data-tooltip-placement="{{item.tooltipPlacement || \'left\'}}" data-tooltip-append-to-body="true"> <div class="list-item-block text-ellipsis"> <div data-ng-if="$ctrl.getIcon(item).name" data-ng-class="{\'custom-color\': $ctrl.dropdownType === \'priority\'}" class="dropdown-icon {{$ctrl.getIcon(item).name}}"> </div> <div data-ng-if="item.badge" data-ng-class="{\'custom-color\': $ctrl.dropdownType === \'badges-dropdown\'}" class="{{item.badge.class}}"> {{item.badge.value}} </div> <div class="list-item-label"> <span class="list-item-name" data-ng-class="{\'capitalized\': $ctrl.isCapitalized}" data-ng-bind-html="$ctrl.getNameTemplate(item)"></span> <span data-ng-show="$ctrl.getDescription(item)" class="description">{{$ctrl.getDescription(item)}}</span> </div> </div> <div class="igz-col-20 igz-icon-tick selected-item-icon" data-ng-show="$ctrl.isItemSelected(item) && !$ctrl.isPagination"></div> </li> </ul> <div class="add-button-wrapper" tabindex="0" data-ng-if="$ctrl.bottomButtonCallback"> <a href="#" class="add-button" data-ng-click="$ctrl.bottomButtonCallback()"> {{ $ctrl.bottomButtonText }} </a> </div> <div class="transclude-container align-items-center" data-ng-if="$ctrl.isTranscludePassed" data-ng-transclude> </div> </div> </div> ');
24437
+ $templateCache.put('igz_controls/components/element-loading-status/element-loading-status.tpl.html',
24438
+ '<div class="element-loading-status" data-ng-class="\'loading-status-\' + $ctrl.loadingStatusSize"> <div class="loader-wrapper" data-ng-if="$ctrl.isShowSpinner"> <div class="loader-fading-circle" data-ng-if="!$ctrl.textStatus" data-uib-tooltip="{{$ctrl.tooltipLabel}}" data-tooltip-placement="top" data-tooltip-popup-delay="100" data-tooltip-append-to-body="true"> <div class="loader-circle1 loader-circle"></div> <div class="loader-circle2 loader-circle"></div> <div class="loader-circle3 loader-circle"></div> <div class="loader-circle4 loader-circle"></div> <div class="loader-circle5 loader-circle"></div> <div class="loader-circle6 loader-circle"></div> <div class="loader-circle7 loader-circle"></div> <div class="loader-circle8 loader-circle"></div> <div class="loader-circle9 loader-circle"></div> <div class="loader-circle10 loader-circle"></div> <div class="loader-circle11 loader-circle"></div> <div class="loader-circle12 loader-circle"></div> </div> <div data-ng-if="$ctrl.textStatus" class="loader-text">{{ \'common:LOADING_CAPITALIZE_ELLIPSIS\' | i18next }}</div> </div> <div data-ng-if="$ctrl.isShowContent && !$ctrl.isShowError"> <div data-ng-transclude></div> </div> <div class="loading-error" data-ng-if="$ctrl.isShowError && $ctrl.checkSize(\'default\')"> <div class="sad-icon"></div> <div class="loading-error-title">{{$ctrl.title}}</div> <div class="loading-error-message"> <span data-ng-bind="$ctrl.errorMessage"></span> <span data-ng-if="$ctrl.refresh"> <span>{{ \'common:ERROR_MSG.ELEMENT_LOADING_DEFAULT_2\' | i18next }}</span> <span class="refresh-page" data-ng-click="$ctrl.refreshPage($event)"> {{ \'common:ERROR_MSG.ELEMENT_LOADING_DEFAULT_3\' | i18next }} </span>. </span> </div> </div> <div class="loading-error" data-ng-if="$ctrl.isShowError && $ctrl.checkSize(\'small\')"> <div class="loading-error-title"></div> <div class="loading-error-message"> <div> {{ \'common:ERROR_MSG.ELEMENT_LOADING_SMALL_1\' | i18next }} </div> <div class="refresh-page" data-ng-click="$ctrl.refreshPage($event)" title="{{ \'common:ERROR_MSG.ELEMENT_LOADING_SMALL_2\' | i18next }}"> {{ \'common:ERROR_MSG.ELEMENT_LOADING_SMALL_2\' | i18next }} </div> </div> </div> </div> ');
24424
24439
  }]);
24425
24440
  })();
24426
24441
 
@@ -24523,8 +24538,8 @@ try {
24523
24538
  module = angular.module('iguazio.dashboard-controls.templates', []);
24524
24539
  }
24525
24540
  module.run(['$templateCache', function($templateCache) {
24526
- $templateCache.put('igz_controls/components/search-input/search-input.tpl.html',
24527
- '<div data-ng-class="{\'search-input\': $ctrl.searchType === \'infoPage\', \'search-input-actions-bar\': $ctrl.searchType === \'actionsBar\'}"> <input type="text" class="container-search-input" placeholder="{{$ctrl.placeholder}}" data-ng-focus="$ctrl.toggleInputFocus()" data-ng-blur="$ctrl.toggleInputFocus()" data-ng-keydown="$ctrl.onPressEnter($event)" data-igz-input-blur-on-enter data-ng-model="$ctrl.searchQuery" data-ng-model-options="{ debounce: { \'default\': 500, \'blur\': 0 } }"> <span class="igz-icon-search"></span> <span class="clear-button igz-icon-close" data-ng-show="$ctrl.searchQuery" data-ng-click="$ctrl.clearInputField()"> </span> </div> ');
24541
+ $templateCache.put('igz_controls/components/size/size.tpl.html',
24542
+ '<div class="igz-size"> <div data-ng-if="$ctrl.justDisplayValue" class="size-value text-ellipsis" data-ng-class="$ctrl.displayValueClasses"> {{$ctrl.getDisplayValue()}} </div> <div data-ng-if="$ctrl.displayValueWithTooltip" class="size-value text-ellipsis"> <span data-uib-tooltip="{{$ctrl.getDisplayValue()}}" data-tooltip-append-to-body="true"> {{$ctrl.getDisplayValue()}} </span> </div> <div data-ng-if="$ctrl.type === \'storage-pools\'" class="size-value text-ellipsis"> <span data-uib-tooltip="{{$ctrl.getDisplayValue()}}" data-tooltip-append-to-body="true"> {{$ctrl.getDisplayValue()}} </span> <div data-ng-if="$ctrl.outOf !== \'\'" class="size-reserved text-ellipsis"> {{ \'common:OF\' | i18next }} {{$ctrl.outOf}} </div> </div> <div data-ng-if="$ctrl.type === \'storage-pools_containers\'" class="size-value"> <div class="text-centered text-ellipsis"> <span data-uib-tooltip="{{$ctrl.getDisplayValue()}}" data-tooltip-append-to-body="true"> {{$ctrl.getDisplayValue()}} </span> <div data-ng-if="$ctrl.type === \'storage-pools_containers\'" class="size-reserved text-ellipsis"> <span data-uib-tooltip="{{$ctrl.reserved}}" data-tooltip-append-to-body="true"> {{$ctrl.reserved}} </span> <span data-ng-if="$ctrl.quota === -1" class="size-quota icon-font-arrow-right"> </span> <span data-ng-if="$ctrl.quota === -1" class="size-quota icon-font-infinity" data-uib-tooltip="{{ \'common:TOOLTIP.INFINITY\' | i18next }}" data-tooltip-append-to-body="true"> </span> <span data-ng-if="$ctrl.quota !== -1" class="size-quota icon-font-arrow-right text-ellipsis" data-uib-tooltip="{{$ctrl.quota}}" data-tooltip-append-to-body="true"> {{$ctrl.quota}} </span> </div> </div> </div> <div class="size-chart" id="size-chart-{{$ctrl.entity.id}}" data-ng-show="$ctrl.defaultTo($ctrl.showChart, true)"> <highchart data-config="$ctrl.entity.ui.lineChartOptions[$ctrl.type]" class="igz-highcharts-wrapper" data-uib-tooltip="{{$ctrl.tooltip}}" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="500"> </highchart> </div> </div> ');
24528
24543
  }]);
24529
24544
  })();
24530
24545
 
@@ -24535,8 +24550,9 @@ try {
24535
24550
  module = angular.module('iguazio.dashboard-controls.templates', []);
24536
24551
  }
24537
24552
  module.run(['$templateCache', function($templateCache) {
24538
- $templateCache.put('igz_controls/components/size/size.tpl.html',
24539
- '<div class="igz-size"> <div data-ng-if="$ctrl.justDisplayValue" class="size-value text-ellipsis" data-ng-class="$ctrl.displayValueClasses"> {{$ctrl.getDisplayValue()}} </div> <div data-ng-if="$ctrl.displayValueWithTooltip" class="size-value text-ellipsis"> <span data-uib-tooltip="{{$ctrl.getDisplayValue()}}" data-tooltip-append-to-body="true"> {{$ctrl.getDisplayValue()}} </span> </div> <div data-ng-if="$ctrl.type === \'storage-pools\'" class="size-value text-ellipsis"> <span data-uib-tooltip="{{$ctrl.getDisplayValue()}}" data-tooltip-append-to-body="true"> {{$ctrl.getDisplayValue()}} </span> <div data-ng-if="$ctrl.outOf !== \'\'" class="size-reserved text-ellipsis"> {{ \'common:OF\' | i18next }} {{$ctrl.outOf}} </div> </div> <div data-ng-if="$ctrl.type === \'storage-pools_containers\'" class="size-value"> <div class="text-centered text-ellipsis"> <span data-uib-tooltip="{{$ctrl.getDisplayValue()}}" data-tooltip-append-to-body="true"> {{$ctrl.getDisplayValue()}} </span> <div data-ng-if="$ctrl.type === \'storage-pools_containers\'" class="size-reserved text-ellipsis"> <span data-uib-tooltip="{{$ctrl.reserved}}" data-tooltip-append-to-body="true"> {{$ctrl.reserved}} </span> <span data-ng-if="$ctrl.quota === -1" class="size-quota icon-font-arrow-right"> </span> <span data-ng-if="$ctrl.quota === -1" class="size-quota icon-font-infinity" data-uib-tooltip="{{ \'common:TOOLTIP.INFINITY\' | i18next }}" data-tooltip-append-to-body="true"> </span> <span data-ng-if="$ctrl.quota !== -1" class="size-quota icon-font-arrow-right text-ellipsis" data-uib-tooltip="{{$ctrl.quota}}" data-tooltip-append-to-body="true"> {{$ctrl.quota}} </span> </div> </div> </div> <div class="size-chart" id="size-chart-{{$ctrl.entity.id}}" data-ng-show="$ctrl.defaultTo($ctrl.showChart, true)"> <highchart data-config="$ctrl.entity.ui.lineChartOptions[$ctrl.type]" class="igz-highcharts-wrapper" data-uib-tooltip="{{$ctrl.tooltip}}" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="500"> </highchart> </div> </div> ');
24553
+ $templateCache.put('igz_controls/components/slider-input-block/slider-input-block.tpl.html',
24554
+ '<div class="igz-slider-input-block clearfix"> <div class="igz-slider-input-title igz-col-50"> <div class="igz-slider-input-title-text"> <i data-ng-if="$ctrl.sliderConfig.iconType" data-ng-class="($ctrl.sliderConfig.iconType | lowercase)"></i> {{$ctrl.sliderConfig.name}}&nbsp; <i data-ng-if="$ctrl.sliderConfig.labelHelpIcon" class="igz-icon-help-round"></i> </div> </div> <div class="igz-col-16"></div> <div class="igz-slider-input-current-value igz-col-34" data-ng-class="{\'with-value-unit\': $ctrl.valueUnit,\n' +
24555
+ ' \'with-measure-units\': $ctrl.measureUnits}"> <div class="igz-slider-input-current-value-text">{{$ctrl.sliderConfig.valueLabel}}</div> </div> <div class="igz-slider-input-unit-label" data-ng-if="!$ctrl.measureUnits"> <div class="igz-slider-input-current-value-text">{{$ctrl.valueUnit}}</div> </div> <div class="igz-slider-input-units-dropdown igz-col-16" data-ng-if="$ctrl.measureUnits"> <igz-default-dropdown data-values-array="$ctrl.measureUnits" data-selected-item="$ctrl.selectedItem" data-item-select-callback="$ctrl.changeTrafficUnit(item)"> </igz-default-dropdown> </div> <div class="igz-slider-input-rz-slider igz-col-100"> <rzslider class="rzslider" data-rz-slider-model="$ctrl.sliderConfig.value" data-rz-slider-options="$ctrl.sliderConfig.options"> </rzslider> </div> </div> ');
24540
24556
  }]);
24541
24557
  })();
24542
24558
 
@@ -24547,9 +24563,8 @@ try {
24547
24563
  module = angular.module('iguazio.dashboard-controls.templates', []);
24548
24564
  }
24549
24565
  module.run(['$templateCache', function($templateCache) {
24550
- $templateCache.put('igz_controls/components/slider-input-block/slider-input-block.tpl.html',
24551
- '<div class="igz-slider-input-block clearfix"> <div class="igz-slider-input-title igz-col-50"> <div class="igz-slider-input-title-text"> <i data-ng-if="$ctrl.sliderConfig.iconType" data-ng-class="($ctrl.sliderConfig.iconType | lowercase)"></i> {{$ctrl.sliderConfig.name}}&nbsp; <i data-ng-if="$ctrl.sliderConfig.labelHelpIcon" class="igz-icon-help-round"></i> </div> </div> <div class="igz-col-16"></div> <div class="igz-slider-input-current-value igz-col-34" data-ng-class="{\'with-value-unit\': $ctrl.valueUnit,\n' +
24552
- ' \'with-measure-units\': $ctrl.measureUnits}"> <div class="igz-slider-input-current-value-text">{{$ctrl.sliderConfig.valueLabel}}</div> </div> <div class="igz-slider-input-unit-label" data-ng-if="!$ctrl.measureUnits"> <div class="igz-slider-input-current-value-text">{{$ctrl.valueUnit}}</div> </div> <div class="igz-slider-input-units-dropdown igz-col-16" data-ng-if="$ctrl.measureUnits"> <igz-default-dropdown data-values-array="$ctrl.measureUnits" data-selected-item="$ctrl.selectedItem" data-item-select-callback="$ctrl.changeTrafficUnit(item)"> </igz-default-dropdown> </div> <div class="igz-slider-input-rz-slider igz-col-100"> <rzslider class="rzslider" data-rz-slider-model="$ctrl.sliderConfig.value" data-rz-slider-options="$ctrl.sliderConfig.options"> </rzslider> </div> </div> ');
24566
+ $templateCache.put('igz_controls/components/search-input/search-input.tpl.html',
24567
+ '<div data-ng-class="{\'search-input\': $ctrl.searchType === \'infoPage\', \'search-input-actions-bar\': $ctrl.searchType === \'actionsBar\'}"> <input type="text" class="container-search-input" placeholder="{{$ctrl.placeholder}}" data-ng-focus="$ctrl.toggleInputFocus()" data-ng-blur="$ctrl.toggleInputFocus()" data-ng-keydown="$ctrl.onPressEnter($event)" data-igz-input-blur-on-enter data-ng-model="$ctrl.searchQuery" data-ng-model-options="{ debounce: { \'default\': 500, \'blur\': 0 } }"> <span class="igz-icon-search"></span> <span class="clear-button igz-icon-close" data-ng-show="$ctrl.searchQuery" data-ng-click="$ctrl.clearInputField()"> </span> </div> ');
24553
24568
  }]);
24554
24569
  })();
24555
24570
 
@@ -24682,8 +24697,8 @@ try {
24682
24697
  module = angular.module('iguazio.dashboard-controls.templates', []);
24683
24698
  }
24684
24699
  module.run(['$templateCache', function($templateCache) {
24685
- $templateCache.put('nuclio/functions/function/ncl-function.tpl.html',
24686
- '<section data-ui-view="function"></section>');
24700
+ $templateCache.put('nuclio/functions/duplicate-function-dialog/duplicate-function-dialog.tpl.html',
24701
+ '<div class="close-button igz-icon-close" data-ng-click="$ctrl.onClose()"></div> <div class="title"> {{ \'functions:DUPLICATE_FUNCTION\' | i18next }} </div> <div class="main-content"> <form name="$ctrl.duplicateFunctionForm" novalidate data-ng-keydown="$ctrl.duplicateFunction($event)"> <div class="field-group function-name-group"> <div class="field-label function-name-label"> {{ \'common:FUNCTION_NAME\' | i18next }} </div> <div class="field-input function-name-input"> <igz-validating-input-field data-field-type="input" data-input-name="new-name" data-input-value="$ctrl.newFunctionName" data-is-focused="true" data-form-object="$ctrl.duplicateFunctionForm" data-update-data-callback="$ctrl.inputValueCallback(newData)" data-validation-is-required="true" data-validation-rules="$ctrl.validationRules.functionName" data-validation-max-length="{{$ctrl.maxLengths.functionName}}" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_FUNCTION_NAME\' | i18next }}"> </igz-validating-input-field> </div> </div> </form> </div> <div class="buttons"> <button class="ncl-secondary-button igz-button-just-text" data-test-id="functions.duplicate_function_cancel.button" tabindex="0" data-ng-click="$ctrl.onClose()" data-ng-keydown="$ctrl.onClose($event)"> {{ \'common:CANCEL\' | i18next }} </button> <button class="ncl-primary-button igz-button-primary" data-test-id="functions.duplicate_function_duplicate.button" tabindex="0" data-ng-click="$ctrl.duplicateFunction()" data-ng-keydown="$ctrl.duplicateFunction($event)" data-ng-hide="$ctrl.isLoadingState"> {{ \'common:DUPLICATE\' | i18next }} </button> <button class="ncl-primary-button igz-button-primary" data-ng-show="$ctrl.isLoadingState"> {{ \'common:LOADING_CAPITALIZE_ELLIPSIS\' | i18next }} </button> </div> ');
24687
24702
  }]);
24688
24703
  })();
24689
24704
 
@@ -24694,8 +24709,8 @@ try {
24694
24709
  module = angular.module('iguazio.dashboard-controls.templates', []);
24695
24710
  }
24696
24711
  module.run(['$templateCache', function($templateCache) {
24697
- $templateCache.put('nuclio/functions/duplicate-function-dialog/duplicate-function-dialog.tpl.html',
24698
- '<div class="close-button igz-icon-close" data-ng-click="$ctrl.onClose()"></div> <div class="title"> {{ \'functions:DUPLICATE_FUNCTION\' | i18next }} </div> <div class="main-content"> <form name="$ctrl.duplicateFunctionForm" novalidate data-ng-keydown="$ctrl.duplicateFunction($event)"> <div class="field-group function-name-group"> <div class="field-label function-name-label"> {{ \'common:FUNCTION_NAME\' | i18next }} </div> <div class="field-input function-name-input"> <igz-validating-input-field data-field-type="input" data-input-name="new-name" data-input-value="$ctrl.newFunctionName" data-is-focused="true" data-form-object="$ctrl.duplicateFunctionForm" data-update-data-callback="$ctrl.inputValueCallback(newData)" data-validation-is-required="true" data-validation-rules="$ctrl.validationRules.functionName" data-validation-max-length="{{$ctrl.maxLengths.functionName}}" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_FUNCTION_NAME\' | i18next }}"> </igz-validating-input-field> </div> </div> </form> </div> <div class="buttons"> <button class="ncl-secondary-button igz-button-just-text" data-test-id="functions.duplicate_function_cancel.button" tabindex="0" data-ng-click="$ctrl.onClose()" data-ng-keydown="$ctrl.onClose($event)"> {{ \'common:CANCEL\' | i18next }} </button> <button class="ncl-primary-button igz-button-primary" data-test-id="functions.duplicate_function_duplicate.button" tabindex="0" data-ng-click="$ctrl.duplicateFunction()" data-ng-keydown="$ctrl.duplicateFunction($event)" data-ng-hide="$ctrl.isLoadingState"> {{ \'common:DUPLICATE\' | i18next }} </button> <button class="ncl-primary-button igz-button-primary" data-ng-show="$ctrl.isLoadingState"> {{ \'common:LOADING_CAPITALIZE_ELLIPSIS\' | i18next }} </button> </div> ');
24712
+ $templateCache.put('nuclio/functions/function/ncl-function.tpl.html',
24713
+ '<section data-ui-view="function"></section>');
24699
24714
  }]);
24700
24715
  })();
24701
24716
 
@@ -24784,8 +24799,8 @@ try {
24784
24799
  module = angular.module('iguazio.dashboard-controls.templates', []);
24785
24800
  }
24786
24801
  module.run(['$templateCache', function($templateCache) {
24787
- $templateCache.put('igz_controls/components/info-page/info-page-content/info-page-content.tpl.html',
24788
- '<div class="igz-info-page-content-wrapper" data-ng-class="{\'info-pane-opened\' : $ctrl.isInfoPaneShowed, \'filters-opened\' : $ctrl.isFiltersShowed, \'upper-pane-opened\' : $ctrl.isUpperPaneShowed}"> <div data-ng-if="$ctrl.scrolled !== false" class="igz-scrollable-container horizontal" data-ng-scrollbars data-ng-scrollbars-config="$ctrl.scrollConfigHorizontal"> <div class="igz-info-page-content"> <div data-ng-transclude></div> </div> </div> <div data-ng-if="$ctrl.scrolled === false"> <div class="igz-info-page-content"> <div data-ng-transclude></div> </div> </div> </div>');
24802
+ $templateCache.put('igz_controls/components/info-page/info-page-filters/info-page-filters.tpl.html',
24803
+ '<div class="info-page-filters-wrapper"> <div class="info-page-filters" data-ng-show="$ctrl.isFiltersShowed" data-ng-keyup="$ctrl.onApplyFilters($event)"> <div class="info-page-filters-title">{{ \'common:FILTER\' | i18next }}</div> <div class="close-button igz-icon-close" data-ng-click="$ctrl.changeStateCallback({newVal: false})" data-ng-show="$ctrl.changeStateCallback"> </div> <div class="info-page-filters-body" data-ng-class="{\'buttons-shown\' : $ctrl.isShowFooterButtons()}" data-ng-scrollbars data-ng-scrollbars-config="$ctrl.scrollbarConfig"> <div data-ng-transclude></div> </div> <div class="info-page-filters-footer" data-ng-if="$ctrl.isShowFooterButtons()"> <button class="igz-button-just-text" tabindex="0" data-ng-click="$ctrl.onResetFilters()" data-ng-keydown="$ctrl.onResetFilters($event)" data-ng-disabled="$ctrl.isDisabled" data-ng-if="$ctrl.resetFilters">{{ \'common:RESET\' | i18next }} </button> <button class="igz-button-primary" tabindex="0" data-ng-click="$ctrl.onApplyFilters()" data-ng-keydown="$ctrl.onApplyFilters($event)" data-ng-disabled="$ctrl.isDisabled" data-ng-if="$ctrl.applyFilters">{{ \'common:APPLY\' | i18next }} </button> </div> </div> </div> ');
24789
24804
  }]);
24790
24805
  })();
24791
24806
 
@@ -24796,8 +24811,8 @@ try {
24796
24811
  module = angular.module('iguazio.dashboard-controls.templates', []);
24797
24812
  }
24798
24813
  module.run(['$templateCache', function($templateCache) {
24799
- $templateCache.put('igz_controls/components/info-page/info-page-filters/info-page-filters.tpl.html',
24800
- '<div class="info-page-filters-wrapper"> <div class="info-page-filters" data-ng-show="$ctrl.isFiltersShowed" data-ng-keyup="$ctrl.onApplyFilters($event)"> <div class="info-page-filters-title">{{ \'common:FILTER\' | i18next }}</div> <div class="close-button igz-icon-close" data-ng-click="$ctrl.changeStateCallback({newVal: false})" data-ng-show="$ctrl.changeStateCallback"> </div> <div class="info-page-filters-body" data-ng-class="{\'buttons-shown\' : $ctrl.isShowFooterButtons()}" data-ng-scrollbars data-ng-scrollbars-config="$ctrl.scrollbarConfig"> <div data-ng-transclude></div> </div> <div class="info-page-filters-footer" data-ng-if="$ctrl.isShowFooterButtons()"> <button class="igz-button-just-text" tabindex="0" data-ng-click="$ctrl.onResetFilters()" data-ng-keydown="$ctrl.onResetFilters($event)" data-ng-disabled="$ctrl.isDisabled" data-ng-if="$ctrl.resetFilters">{{ \'common:RESET\' | i18next }} </button> <button class="igz-button-primary" tabindex="0" data-ng-click="$ctrl.onApplyFilters()" data-ng-keydown="$ctrl.onApplyFilters($event)" data-ng-disabled="$ctrl.isDisabled" data-ng-if="$ctrl.applyFilters">{{ \'common:APPLY\' | i18next }} </button> </div> </div> </div> ');
24814
+ $templateCache.put('igz_controls/components/info-page/info-page-content/info-page-content.tpl.html',
24815
+ '<div class="igz-info-page-content-wrapper" data-ng-class="{\'info-pane-opened\' : $ctrl.isInfoPaneShowed, \'filters-opened\' : $ctrl.isFiltersShowed, \'upper-pane-opened\' : $ctrl.isUpperPaneShowed}"> <div data-ng-if="$ctrl.scrolled !== false" class="igz-scrollable-container horizontal" data-ng-scrollbars data-ng-scrollbars-config="$ctrl.scrollConfigHorizontal"> <div class="igz-info-page-content"> <div data-ng-transclude></div> </div> </div> <div data-ng-if="$ctrl.scrolled === false"> <div class="igz-info-page-content"> <div data-ng-transclude></div> </div> </div> </div>');
24801
24816
  }]);
24802
24817
  })();
24803
24818
 
@@ -24910,8 +24925,8 @@ try {
24910
24925
  module = angular.module('iguazio.dashboard-controls.templates', []);
24911
24926
  }
24912
24927
  module.run(['$templateCache', function($templateCache) {
24913
- $templateCache.put('nuclio/common/components/navigation-tabs/navigation-tabs.tpl.html',
24914
- '<div class="ncl-navigation-tabs-wrapper"> <div class="ncl-navigation-tabs clearfix"> <div class="navigation-tab" data-ng-repeat="item in $ctrl.tabItems track by item.id" data-ui-sref="{{item.uiRoute}}" data-ui-sref-active="active" data-ng-class="{\'ncl-status-indicator\': item.indicator}"> {{item.tabName | uppercase}} <div class="ncl-status-light" data-ng-if="item.indicator" data-ng-class="item.indicator.lightClass"> <div class="ncl-status-tooltip" data-ng-if="item.indicator.tooltipText" data-ng-class="item.indicator.tooltipClass"> <div class="ncl-status-icon" data-ng-if="item.indicator.tooltipIconClass" data-ng-class="item.indicator.tooltipIconClass"> </div> <div class="ncl-status-title"> {{item.indicator.tooltipText}} </div> </div> </div> </div> </div> <div class="test-pane-actions-wrapper"> <div class="igz-action-panel"> <div class="actions-list"> <div class="igz-action-item" data-ng-if="$ctrl.isToggleButtonVisible()" data-ng-class="{\'active\': !$ctrl.isTestPaneClosed}" data-ng-click="$ctrl.toggleTestPane()"> <div class="action-icon igz-icon-test-pane"></div> </div> </div> </div> </div> </div> ');
24928
+ $templateCache.put('nuclio/common/components/nuclio-search-input/search-input.tpl.html',
24929
+ '<div class="ncl-search-input"> <input type="text" class="container-search-input" placeholder="{{$ctrl.placeholder}}" data-ng-keydown="$ctrl.onPressEnter($event)" data-igz-input-blur-on-enter data-ng-model="$ctrl.searchQuery" data-ng-model-options="{ debounce: { \'default\': 500, \'blur\': 0 } }"> <span class="igz-icon-search"></span> </div> ');
24915
24930
  }]);
24916
24931
  })();
24917
24932
 
@@ -24922,8 +24937,8 @@ try {
24922
24937
  module = angular.module('iguazio.dashboard-controls.templates', []);
24923
24938
  }
24924
24939
  module.run(['$templateCache', function($templateCache) {
24925
- $templateCache.put('nuclio/common/components/nuclio-search-input/search-input.tpl.html',
24926
- '<div class="ncl-search-input"> <input type="text" class="container-search-input" placeholder="{{$ctrl.placeholder}}" data-ng-keydown="$ctrl.onPressEnter($event)" data-igz-input-blur-on-enter data-ng-model="$ctrl.searchQuery" data-ng-model-options="{ debounce: { \'default\': 500, \'blur\': 0 } }"> <span class="igz-icon-search"></span> </div> ');
24940
+ $templateCache.put('nuclio/common/components/navigation-tabs/navigation-tabs.tpl.html',
24941
+ '<div class="ncl-navigation-tabs-wrapper"> <div class="ncl-navigation-tabs clearfix"> <div class="navigation-tab" data-ng-repeat="item in $ctrl.tabItems track by item.id" data-ui-sref="{{item.uiRoute}}" data-ui-sref-active="active" data-ng-class="{\'ncl-status-indicator\': item.indicator}"> {{item.tabName | uppercase}} <div class="ncl-status-light" data-ng-if="item.indicator" data-ng-class="item.indicator.lightClass"> <div class="ncl-status-tooltip" data-ng-if="item.indicator.tooltipText" data-ng-class="item.indicator.tooltipClass"> <div class="ncl-status-icon" data-ng-if="item.indicator.tooltipIconClass" data-ng-class="item.indicator.tooltipIconClass"> </div> <div class="ncl-status-title"> {{item.indicator.tooltipText}} </div> </div> </div> </div> </div> <div class="test-pane-actions-wrapper"> <div class="igz-action-panel"> <div class="actions-list"> <div class="igz-action-item" data-ng-if="$ctrl.isToggleButtonVisible()" data-ng-class="{\'active\': !$ctrl.isTestPaneClosed}" data-ng-click="$ctrl.toggleTestPane()"> <div class="action-icon igz-icon-test-pane"></div> </div> </div> </div> </div> </div> ');
24927
24942
  }]);
24928
24943
  })();
24929
24944
 
@@ -24966,18 +24981,6 @@ module.run(['$templateCache', function($templateCache) {
24966
24981
  }]);
24967
24982
  })();
24968
24983
 
24969
- (function(module) {
24970
- try {
24971
- module = angular.module('iguazio.dashboard-controls.templates');
24972
- } catch (e) {
24973
- module = angular.module('iguazio.dashboard-controls.templates', []);
24974
- }
24975
- module.run(['$templateCache', function($templateCache) {
24976
- $templateCache.put('nuclio/functions/version/version-configuration/version-configuration.tpl.html',
24977
- '<div class="ncl-version-configuration ncl-version" data-igz-extend-background> <div class="igz-scrollable-container" data-ng-scrollbars data-ng-scrollbars-config="$ctrl.scrollConfig"> <div class="ncl-version-configuration-wrapper"> <div class="row"> <ncl-version-configuration-basic-settings class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-basic-settings> <ncl-version-configuration-resources class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-resources> </div> <div class="row"> <ncl-version-configuration-environment-variables class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-environment-variables> </div> <div class="row"> <ncl-version-configuration-labels class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-labels> <ncl-version-configuration-annotations class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-annotations> </div> <div class="row"> <ncl-version-configuration-volumes class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback()"> </ncl-version-configuration-volumes> <ncl-version-configuration-build class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-build> </div> <div class="row"> <ncl-version-configuration-logging data-ng-if="false" class="configuration-block" data-version="$ctrl.version" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-logging> <ncl-version-configuration-runtime-attributes data-ng-if="$ctrl.isRuntimeBlockVisible()" class="configuration-block runtime-attributes" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-runtime-attributes> <div data-ng-if="$ctrl.isRuntimeBlockVisible()" class="configuration-block invisible"></div> </div> </div> </div> </div> ');
24978
- }]);
24979
- })();
24980
-
24981
24984
  (function(module) {
24982
24985
  try {
24983
24986
  module = angular.module('iguazio.dashboard-controls.templates');
@@ -25014,6 +25017,18 @@ module.run(['$templateCache', function($templateCache) {
25014
25017
  }]);
25015
25018
  })();
25016
25019
 
25020
+ (function(module) {
25021
+ try {
25022
+ module = angular.module('iguazio.dashboard-controls.templates');
25023
+ } catch (e) {
25024
+ module = angular.module('iguazio.dashboard-controls.templates', []);
25025
+ }
25026
+ module.run(['$templateCache', function($templateCache) {
25027
+ $templateCache.put('nuclio/functions/version/version-configuration/version-configuration.tpl.html',
25028
+ '<div class="ncl-version-configuration ncl-version" data-igz-extend-background> <div class="igz-scrollable-container" data-ng-scrollbars data-ng-scrollbars-config="$ctrl.scrollConfig"> <div class="ncl-version-configuration-wrapper"> <div class="row"> <ncl-version-configuration-basic-settings class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-basic-settings> <ncl-version-configuration-resources class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-resources> </div> <div class="row"> <ncl-version-configuration-environment-variables class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-environment-variables> </div> <div class="row"> <ncl-version-configuration-labels class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-labels> <ncl-version-configuration-annotations class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-annotations> </div> <div class="row"> <ncl-version-configuration-volumes class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback()"> </ncl-version-configuration-volumes> <ncl-version-configuration-build class="configuration-block" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-build> </div> <div class="row"> <ncl-version-configuration-logging data-ng-if="false" class="configuration-block" data-version="$ctrl.version" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-logging> <ncl-version-configuration-runtime-attributes data-ng-if="$ctrl.isRuntimeBlockVisible()" class="configuration-block runtime-attributes" data-version="$ctrl.version" data-is-function-deploying="$ctrl.isFunctionDeploying()" data-on-change-callback="$ctrl.onConfigurationChangeCallback"> </ncl-version-configuration-runtime-attributes> <div data-ng-if="$ctrl.isRuntimeBlockVisible()" class="configuration-block invisible"></div> </div> </div> </div> </div> ');
25029
+ }]);
25030
+ })();
25031
+
25017
25032
  (function(module) {
25018
25033
  try {
25019
25034
  module = angular.module('iguazio.dashboard-controls.templates');
@@ -25120,8 +25135,8 @@ try {
25120
25135
  module = angular.module('iguazio.dashboard-controls.templates', []);
25121
25136
  }
25122
25137
  module.run(['$templateCache', function($templateCache) {
25123
- $templateCache.put('nuclio/functions/version/version-code/function-event-pane/test-events-logs/test-events-logs.tpl.html',
25124
- '<div class="ncl-test-events-logs"> <div class="functional-buttons" data-ng-if="$ctrl.logs.length > 0"> <div class="ncl-icon-expand-all" data-ng-click="$ctrl.expandAllRows(true)" data-uib-tooltip="{{ \'functions:EXPAND_ALL\' | i18next }}" data-tooltip-popup-delay="300" data-tooltip-placement="left" data-tooltip-append-to-body="true"> </div> <div class="ncl-icon-collapse-all" data-ng-click="$ctrl.expandAllRows(false)" data-uib-tooltip="{{ \'functions:COLLAPSE_ALL\' | i18next }}" data-tooltip-popup-delay="300" data-tooltip-placement="left" data-tooltip-append-to-body="true"> </div> </div> <div data-ng-repeat="log in $ctrl.logs track by $index"> <div class="collapsed-row text-ellipsis" data-ng-if="log.ui.collapsed"> <span class="igz-icon-right" data-ng-click="$ctrl.collapseRow(log, false)"></span> <div class="level-icon {{$ctrl.getLevelIconClass(log)}}"></div> <span class="date">{{log.time | date: "EEE, MMM d, yyyy, HH:mm:ss\'GMT\'" : "+0000"}}</span> <div class="message text-ellipsis">{{log.message}}</div> <div class="ncl-icon-parameters" data-ng-if="$ctrl.hasAdditionalParameters(log)"></div> </div> <div class="expanded-row" data-ng-if="!log.ui.collapsed"> <div class="header"> <span class="igz-icon-down" data-ng-click="$ctrl.collapseRow(log, true)"></span> <div class="level-icon {{$ctrl.getLevelIconClass(log)}}"></div> <span class="date">{{log.time | date: "EEE, MMM d, yyyy, HH:mm:ss\'GMT\'" : "+0000"}}</span> <div class="ncl-icon-parameters" data-ng-if="$ctrl.hasAdditionalParameters(log)"></div> </div> <div class="expanded-body"> <div class="message">{{log.message}}</div> <div class="error" data-ng-if="log.err">{{log.err}}</div> <div class="parameters" data-ng-if="$ctrl.hasAdditionalParameters(log)"> <span class="parameters-header"> {{ \'common:PARAMETERS\' | i18next }} </span> <div data-ng-repeat="(key, value) in $ctrl.getParameters(log)"> <div class="text-ellipsis labels">{{key}}:</div> <div class="text-ellipsis values">{{value}}</div> </div> </div> </div> </div> </div> <div class="no-logs" data-ng-if="$ctrl.logs.length === 0"> {{ \'functions:NO_LOGS_HAVE_BEEN_FOUND\' | i18next }} </div> </div> ');
25138
+ $templateCache.put('nuclio/functions/version/version-code/function-event-pane/test-events-navigation-tabs/test-events-navigation-tabs.tpl.html',
25139
+ '<div class="ncl-test-events-navigation-tabs"> <div class="test-events-navigation-tab" data-ng-repeat="item in $ctrl.tabItems" data-ng-click="$ctrl.changeActiveTab(item)" data-ng-class="{\'active\': $ctrl.isActiveTab(item)}"> {{item.tabName | uppercase}} <span class="badge" data-ng-if="item.badge">{{item.badge}}</span> </div> <igz-default-dropdown data-ng-if="$ctrl.selectedLogLevel" data-values-array="$ctrl.logLevelValues" data-select-property-only="id" data-selected-item="$ctrl.selectedLogLevel" data-item-select-callback="$ctrl.onChangeLogLevel({selectedLogLevel: item})" data-enable-overlap="true"> </igz-default-dropdown> </div> ');
25125
25140
  }]);
25126
25141
  })();
25127
25142
 
@@ -25132,8 +25147,8 @@ try {
25132
25147
  module = angular.module('iguazio.dashboard-controls.templates', []);
25133
25148
  }
25134
25149
  module.run(['$templateCache', function($templateCache) {
25135
- $templateCache.put('nuclio/functions/version/version-code/function-event-pane/test-events-navigation-tabs/test-events-navigation-tabs.tpl.html',
25136
- '<div class="ncl-test-events-navigation-tabs"> <div class="test-events-navigation-tab" data-ng-repeat="item in $ctrl.tabItems" data-ng-click="$ctrl.changeActiveTab(item)" data-ng-class="{\'active\': $ctrl.isActiveTab(item)}"> {{item.tabName | uppercase}} <span class="badge" data-ng-if="item.badge">{{item.badge}}</span> </div> <igz-default-dropdown data-ng-if="$ctrl.selectedLogLevel" data-values-array="$ctrl.logLevelValues" data-select-property-only="id" data-selected-item="$ctrl.selectedLogLevel" data-item-select-callback="$ctrl.onChangeLogLevel({selectedLogLevel: item})" data-enable-overlap="true"> </igz-default-dropdown> </div> ');
25150
+ $templateCache.put('nuclio/functions/version/version-code/function-event-pane/test-events-logs/test-events-logs.tpl.html',
25151
+ '<div class="ncl-test-events-logs"> <div class="functional-buttons" data-ng-if="$ctrl.logs.length > 0"> <div class="ncl-icon-expand-all" data-ng-click="$ctrl.expandAllRows(true)" data-uib-tooltip="{{ \'functions:EXPAND_ALL\' | i18next }}" data-tooltip-popup-delay="300" data-tooltip-placement="left" data-tooltip-append-to-body="true"> </div> <div class="ncl-icon-collapse-all" data-ng-click="$ctrl.expandAllRows(false)" data-uib-tooltip="{{ \'functions:COLLAPSE_ALL\' | i18next }}" data-tooltip-popup-delay="300" data-tooltip-placement="left" data-tooltip-append-to-body="true"> </div> </div> <div data-ng-repeat="log in $ctrl.logs track by $index"> <div class="collapsed-row text-ellipsis" data-ng-if="log.ui.collapsed"> <span class="igz-icon-right" data-ng-click="$ctrl.collapseRow(log, false)"></span> <div class="level-icon {{$ctrl.getLevelIconClass(log)}}"></div> <span class="date">{{log.time | date: "EEE, MMM d, yyyy, HH:mm:ss\'GMT\'" : "+0000"}}</span> <div class="message text-ellipsis">{{log.message}}</div> <div class="ncl-icon-parameters" data-ng-if="$ctrl.hasAdditionalParameters(log)"></div> </div> <div class="expanded-row" data-ng-if="!log.ui.collapsed"> <div class="header"> <span class="igz-icon-down" data-ng-click="$ctrl.collapseRow(log, true)"></span> <div class="level-icon {{$ctrl.getLevelIconClass(log)}}"></div> <span class="date">{{log.time | date: "EEE, MMM d, yyyy, HH:mm:ss\'GMT\'" : "+0000"}}</span> <div class="ncl-icon-parameters" data-ng-if="$ctrl.hasAdditionalParameters(log)"></div> </div> <div class="expanded-body"> <div class="message">{{log.message}}</div> <div class="error" data-ng-if="log.err">{{log.err}}</div> <div class="parameters" data-ng-if="$ctrl.hasAdditionalParameters(log)"> <span class="parameters-header"> {{ \'common:PARAMETERS\' | i18next }} </span> <div data-ng-repeat="(key, value) in $ctrl.getParameters(log)"> <div class="text-ellipsis labels">{{key}}:</div> <div class="text-ellipsis values">{{value}}</div> </div> </div> </div> </div> </div> <div class="no-logs" data-ng-if="$ctrl.logs.length === 0"> {{ \'functions:NO_LOGS_HAVE_BEEN_FOUND\' | i18next }} </div> </div> ');
25137
25152
  }]);
25138
25153
  })();
25139
25154
 
@@ -25168,8 +25183,8 @@ try {
25168
25183
  module = angular.module('iguazio.dashboard-controls.templates', []);
25169
25184
  }
25170
25185
  module.run(['$templateCache', function($templateCache) {
25171
- $templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-build/version-configuration-build.tpl.html',
25172
- '<div class="ncl-version-configuration-build" data-ng-class="{ disabled: $ctrl.disabled }"> <div class="configuration-build-title-wrapper"> <div class="title pull-left">{{ \'functions:BUILD\' | i18next }}</div> <igz-action-menu data-ng-if="$ctrl.isDemoMode() && !$ctrl.disabled && !$ctrl.isFunctionDeploying()" data-actions="$ctrl.actions" data-icon-class="ncl-icon-paperclip" data-on-fire-action="$ctrl.onFireAction"> </igz-action-menu> <small class="pull-right" data-ng-if="$ctrl.disabled">{{ \'functions:DISABLED_FOR_IMAGE_CODE_ENTRY_TYPE\' | i18next }}</small> </div> <form name="$ctrl.buildForm" class="build-wrapper" novalidate> <div class="igz-row"> <div class="igz-col-100 build-field build-image-field"> <div class="field-label"> <span>{{ \'functions:IMAGE_NAME\' | i18next }}</span> <igz-more-info data-description="{{ \'functions:IMAGE_NAME_DESCRIPTION\' | i18next:{defaultImageName: $ctrl.version.ui.defaultImageName} }}" data-is-html-enabled="true" data-trigger="click"> </igz-more-info> </div> <div class="align-items-baseline"> <span class="flex-none">{{ $ctrl.version.ui.imageNamePrefix }}</span> <igz-validating-input-field data-field-type="input" data-input-name="imageName" data-input-value="$ctrl.imageName" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_IMAGE_NAME\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-validation-max-length="{{$ctrl.maxLengths.imageName}}" data-validation-pattern="$ctrl.imageNameValidationPattern" data-is-disabled="$ctrl.disabled" class="flex-auto"> </igz-validating-input-field> </div> </div> <div class="igz-col-50 build-field build-base-image-field"> <div class="field-label label-with-tooltip align-items-center"> <span>{{ \'functions:BASE_IMAGE\' | i18next }}</span> <igz-more-info data-description="{{ \'functions:BASE_IMAGE_DESCRIPTION\' | i18next }}" data-trigger="click"> </igz-more-info> </div> <igz-validating-input-field data-field-type="input" data-input-name="baseImage" data-input-value="$ctrl.version.spec.build.baseImage" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_BASE_IMAGE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="spec.build.baseImage" data-is-disabled="$ctrl.disabled"> </igz-validating-input-field> </div> <div class="igz-col-50 build-field build-onbuild-image-field"> <div class="field-label label-with-tooltip align-items-center"> <span>{{ \'functions:ONBUILD_IMAGE\' | i18next }}</span> <igz-more-info data-description="{{$ctrl.onBuildImageDescription}}" data-default-tooltip-placement="left" data-trigger="click"> </igz-more-info> </div> <igz-validating-input-field data-field-type="input" data-input-name="onbuildImage" data-input-value="$ctrl.version.spec.build.onbuildImage" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_ONBUILD_IMAGE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="spec.build.onbuildImage" data-is-disabled="$ctrl.disabled"> </igz-validating-input-field> </div> <div class="igz-col-100 build-field"> <div class="field-label"> <span>{{ \'functions:BUILD_COMMANDS\' | i18next }}</span> <igz-more-info data-description="{{ \'functions:BUILD_COMMANDS_DESCRIPTION\' | i18next }}" data-trigger="click"> </igz-more-info> </div> <igz-validating-input-field data-field-type="textarea" data-input-name="commands" data-input-value="$ctrl.build.commands" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_COMMAND_ON_EACH_LINE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="commands" data-is-disabled="$ctrl.disabled" class="build-textarea-input build-commands-input"> </igz-validating-input-field> </div> <div class="igz-col-100 build-field"> <div class="field-label label-with-tooltip align-items-center"> <span>{{ \'functions:READINESS_TIMEOUT_SECONDS\' | i18next }}</span> <igz-more-info data-description="{{ \'functions:READINESS_TIMEOUT_SECONDS_DESCRIPTION\' | i18next:{default: $ctrl.defaultFunctionConfig.spec.readinessTimeoutSeconds} }}" data-trigger="click"> </igz-more-info> </div> <igz-number-input data-form-object="$ctrl.buildForm" data-input-name="readinessTimeoutSeconds" data-current-value="$ctrl.version.spec.readinessTimeoutSeconds" data-update-number-input-callback="$ctrl.inputValueCallback(newData, field)" data-update-number-input-field="spec.readinessTimeoutSeconds" data-allow-empty-field="true" data-value-step="1" data-validation-is-required="false" data-min-value="1" data-is-disabled="$ctrl.disabled || $ctrl.isFunctionDeploying()"> </igz-number-input> </div> <div class="igz-col-100 build-field" data-ng-if="$ctrl.version.spec.runtime === \'java\'"> <div class="field-label">{{ \'functions:REPOSITORIES\' | i18next }}</div> <igz-validating-input-field data-field-type="textarea" data-input-name="repositories" data-input-value="$ctrl.build.runtimeAttributes.repositories" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_REPOSITORY_ON_EACH_LINE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="runtimeAttributes.repositories" class="build-textarea-input" data-is-disabled="$ctrl.disabled"> </igz-validating-input-field> </div> <div class="igz-col-100 build-field" data-ng-if="$ctrl.version.spec.runtime === \'java\'"> <div class="field-label">{{ \'functions:DEPENDENCIES\' | i18next }}</div> <igz-validating-input-field data-field-type="textarea" data-input-name="dependencies" data-input-value="$ctrl.build.dependencies" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_DEPENDENCY_ON_EACH_LINE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="dependencies" class="build-textarea-input" data-is-disabled="$ctrl.disabled"> </igz-validating-input-field> </div> <div class="igz-col-100 build-field build-checkboxes"> <div class="checkbox-block"> <input type="checkbox" class="small" id="noCache" data-ng-model="$ctrl.version.spec.build.noCache" data-ng-disabled="$ctrl.disabled || $ctrl.isFunctionDeploying()"> <label for="noCache" class="checkbox-inline">{{ \'functions:DISABLE_CACHE\' | i18next }}</label> <igz-more-info data-description="{{ \'functions:TOOLTIP.DISABLE_CACHE\' | i18next }}" data-trigger="click" data-default-tooltip-placement="top"> </igz-more-info> </div> <div class="checkbox-block" data-ng-if="$ctrl.platformKindIsKube"> <input type="checkbox" class="small" id="wait-readiness-timeout-before-failure" data-ng-model="$ctrl.version.spec.waitReadinessTimeoutBeforeFailure" data-ng-disabled="$ctrl.disabled || $ctrl.isFunctionDeploying()"> <label for="wait-readiness-timeout-before-failure" class="checkbox-inline">{{ \'functions:ALWAYS_WAIT_FOR_READINESS_TIMEOUT_EXPIRATION\' | i18next }}</label> <igz-more-info data-description="{{ \'functions:TOOLTIP.ALWAYS_WAIT_FOR_READINESS_TIMEOUT_EXPIRATION\' | i18next }}" data-trigger="click" data-default-tooltip-placement="top-left"> </igz-more-info> </div> </div> <div class="igz-col-100 build-field files-field"> <div class="uploading-files"> <div class="uploading-proccess-wrapper" data-ng-class="{\'one-file-uploaded\': $ctrl.file.uploaded || $ctrl.script.uploaded}" data-ng-if="$ctrl.getFileConfig().uploading && $ctrl.getFileConfig().name"> <div class="file-block uploading text-ellipsis" data-ng-class="{\'uploading-file\': $ctrl.file.uploading}"> <span class="{{$ctrl.getFileConfig().icon}}"></span> <button class="build-close-button"> <span class="ncl-icon-close"></span> </button> <span class="file-name"> {{$ctrl.getFileConfig().name}} </span> <div class="progress"> <div class="progress-bar" role="uib-progressbar" aria-valuemin="0" aria-valuemax="100" data-ng-style="{\'width\': $ctrl.getFileConfig().progress}"> </div> </div> </div> </div> <div class="uploaded-wrapper" data-ng-if="$ctrl.file.uploaded|| $ctrl.script.uploaded"> <div class="file-block uploaded text-ellipsis" data-ng-if="$ctrl.script.uploaded" data-ng-class="{\'one-file-uploaded\': $ctrl.file.uploaded}"> <span class="ncl-icon-script"></span> <span class="file-name"> {{$ctrl.script.name}} <span class="uploaded-file-directory">(/usr/bin/mybinary)</span> </span> <button class="build-close-button" data-ng-click="$ctrl.deleteFile(\'script\')"> <span class="ncl-icon-close"></span> </button> </div> <div class="file-block uploaded text-ellipsis uploaded-file" data-ng-if="$ctrl.file.uploaded"> <span class="ncl-icon-file"></span> <span class="file-name"> {{$ctrl.file.name}} <span class="uploaded-file-directory">(/usr/bin/mybinary)</span> </span> <button class="build-close-button" data-ng-click="$ctrl.deleteFile(\'file\')"> <span class="ncl-icon-close"></span> </button> </div> </div> </div> </div> </div> </form> </div> ');
25186
+ $templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-labels/version-configuration-labels.tpl.html',
25187
+ '<div class="ncl-version-configuration-labels"> <div class="title"> <span>{{ \'common:LABELS\' | i18next }}</span> <igz-more-info data-description="{{$ctrl.tooltip}}" data-trigger="click" data-is-html-enabled="true"> </igz-more-info> </div> <form name="$ctrl.labelsForm" class="labels-wrapper" novalidate> <div data-ng-if="$ctrl.labels.length > 0" class="table-headers"> <div class="key-header"> {{ \'common:KEY\' | i18next }} <igz-more-info data-description="{{$ctrl.keyTooltip}}" data-trigger="click" data-is-html-enabled="true"> </igz-more-info> </div> <div class="value-header"> {{ \'common:VALUE\' | i18next }} </div> </div> <div class="igz-scrollable-container scrollable-labels" data-ng-scrollbars data-igz-ng-scrollbars-config="{{$ctrl.igzScrollConfig}}" data-ng-scrollbars-config="$ctrl.scrollConfig"> <div class="table-body" data-ng-repeat="label in $ctrl.labels"> <ncl-key-value-input class="new-label-input" data-row-data="label" data-item-index="$index" data-use-type="false" data-validation-rules="$ctrl.validationRules" data-is-disabled="$ctrl.isLabelsDisabled() || $ctrl.isFunctionDeploying()" data-action-handler-callback="$ctrl.handleAction(actionType, index)" data-change-data-callback="$ctrl.onChangeData(newData, index)" data-submit-on-fly="true" data-key-tooltip="$ctrl.isLabelsDisabled() ? $ctrl.addNewLabelTooltip : \'\'" data-value-tooltip="$ctrl.isLabelsDisabled() ? $ctrl.addNewLabelTooltip : \'\'"> </ncl-key-value-input> </div> </div> <div class="igz-create-button create-label-button" data-ng-class="{\'disabled\': $ctrl.isLabelsDisabled() || $ctrl.isFunctionDeploying()}" data-ng-click="$ctrl.addNewLabel($event)" data-uib-tooltip="{{$ctrl.isLabelsDisabled() ? $ctrl.addNewLabelTooltip : \'\'}}" data-tooltip-append-to-body="true" data-tooltip-placement="right" data-tooltip-popup-delay="100"> <span class="igz-icon-add-round"></span> {{ \'functions:CREATE_NEW_LABEL\' | i18next }} </div> </form> </div> ');
25173
25188
  }]);
25174
25189
  })();
25175
25190
 
@@ -25192,8 +25207,8 @@ try {
25192
25207
  module = angular.module('iguazio.dashboard-controls.templates', []);
25193
25208
  }
25194
25209
  module.run(['$templateCache', function($templateCache) {
25195
- $templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-labels/version-configuration-labels.tpl.html',
25196
- '<div class="ncl-version-configuration-labels"> <div class="title"> <span>{{ \'common:LABELS\' | i18next }}</span> <igz-more-info data-description="{{$ctrl.tooltip}}" data-trigger="click" data-is-html-enabled="true"> </igz-more-info> </div> <form name="$ctrl.labelsForm" class="labels-wrapper" novalidate> <div data-ng-if="$ctrl.labels.length > 0" class="table-headers"> <div class="key-header"> {{ \'common:KEY\' | i18next }} <igz-more-info data-description="{{$ctrl.keyTooltip}}" data-trigger="click" data-is-html-enabled="true"> </igz-more-info> </div> <div class="value-header"> {{ \'common:VALUE\' | i18next }} </div> </div> <div class="igz-scrollable-container scrollable-labels" data-ng-scrollbars data-igz-ng-scrollbars-config="{{$ctrl.igzScrollConfig}}" data-ng-scrollbars-config="$ctrl.scrollConfig"> <div class="table-body" data-ng-repeat="label in $ctrl.labels"> <ncl-key-value-input class="new-label-input" data-row-data="label" data-item-index="$index" data-use-type="false" data-validation-rules="$ctrl.validationRules" data-is-disabled="$ctrl.isLabelsDisabled() || $ctrl.isFunctionDeploying()" data-action-handler-callback="$ctrl.handleAction(actionType, index)" data-change-data-callback="$ctrl.onChangeData(newData, index)" data-submit-on-fly="true" data-key-tooltip="$ctrl.isLabelsDisabled() ? $ctrl.addNewLabelTooltip : \'\'" data-value-tooltip="$ctrl.isLabelsDisabled() ? $ctrl.addNewLabelTooltip : \'\'"> </ncl-key-value-input> </div> </div> <div class="igz-create-button create-label-button" data-ng-class="{\'disabled\': $ctrl.isLabelsDisabled() || $ctrl.isFunctionDeploying()}" data-ng-click="$ctrl.addNewLabel($event)" data-uib-tooltip="{{$ctrl.isLabelsDisabled() ? $ctrl.addNewLabelTooltip : \'\'}}" data-tooltip-append-to-body="true" data-tooltip-placement="right" data-tooltip-popup-delay="100"> <span class="igz-icon-add-round"></span> {{ \'functions:CREATE_NEW_LABEL\' | i18next }} </div> </form> </div> ');
25210
+ $templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-logging/version-configuration-logging.tpl.html',
25211
+ '<div class="ncl-version-configuration-logging"> <div class="title">{{ \'functions:LOGGING\' | i18next }}</div> <div class="row"> <form name="$ctrl.loggingForm" class="logging-wrapper" novalidate></form> </div> </div> ');
25197
25212
  }]);
25198
25213
  })();
25199
25214
 
@@ -25204,8 +25219,8 @@ try {
25204
25219
  module = angular.module('iguazio.dashboard-controls.templates', []);
25205
25220
  }
25206
25221
  module.run(['$templateCache', function($templateCache) {
25207
- $templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-logging/version-configuration-logging.tpl.html',
25208
- '<div class="ncl-version-configuration-logging"> <div class="title">{{ \'functions:LOGGING\' | i18next }}</div> <div class="row"> <form name="$ctrl.loggingForm" class="logging-wrapper" novalidate></form> </div> </div> ');
25222
+ $templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-build/version-configuration-build.tpl.html',
25223
+ '<div class="ncl-version-configuration-build" data-ng-class="{ disabled: $ctrl.disabled }"> <div class="configuration-build-title-wrapper"> <div class="title pull-left">{{ \'functions:BUILD\' | i18next }}</div> <igz-action-menu data-ng-if="$ctrl.isDemoMode() && !$ctrl.disabled && !$ctrl.isFunctionDeploying()" data-actions="$ctrl.actions" data-icon-class="ncl-icon-paperclip" data-on-fire-action="$ctrl.onFireAction"> </igz-action-menu> <small class="pull-right" data-ng-if="$ctrl.disabled">{{ \'functions:DISABLED_FOR_IMAGE_CODE_ENTRY_TYPE\' | i18next }}</small> </div> <form name="$ctrl.buildForm" class="build-wrapper" novalidate> <div class="igz-row"> <div class="igz-col-100 build-field build-image-field"> <div class="field-label"> <span>{{ \'functions:IMAGE_NAME\' | i18next }}</span> <igz-more-info data-description="{{ \'functions:IMAGE_NAME_DESCRIPTION\' | i18next:{defaultImageName: $ctrl.version.ui.defaultImageName} }}" data-is-html-enabled="true" data-trigger="click"> </igz-more-info> </div> <div class="align-items-baseline"> <span class="flex-none">{{ $ctrl.version.ui.imageNamePrefix }}</span> <igz-validating-input-field data-field-type="input" data-input-name="imageName" data-input-value="$ctrl.imageName" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_IMAGE_NAME\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-validation-max-length="{{$ctrl.maxLengths.imageName}}" data-validation-pattern="$ctrl.imageNameValidationPattern" data-is-disabled="$ctrl.disabled" class="flex-auto"> </igz-validating-input-field> </div> </div> <div class="igz-col-50 build-field build-base-image-field"> <div class="field-label label-with-tooltip align-items-center"> <span>{{ \'functions:BASE_IMAGE\' | i18next }}</span> <igz-more-info data-description="{{ \'functions:BASE_IMAGE_DESCRIPTION\' | i18next }}" data-trigger="click"> </igz-more-info> </div> <igz-validating-input-field data-field-type="input" data-input-name="baseImage" data-input-value="$ctrl.version.spec.build.baseImage" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_BASE_IMAGE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="spec.build.baseImage" data-is-disabled="$ctrl.disabled"> </igz-validating-input-field> </div> <div class="igz-col-50 build-field build-onbuild-image-field"> <div class="field-label label-with-tooltip align-items-center"> <span>{{ \'functions:ONBUILD_IMAGE\' | i18next }}</span> <igz-more-info data-description="{{$ctrl.onBuildImageDescription}}" data-default-tooltip-placement="left" data-trigger="click"> </igz-more-info> </div> <igz-validating-input-field data-field-type="input" data-input-name="onbuildImage" data-input-value="$ctrl.version.spec.build.onbuildImage" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_ONBUILD_IMAGE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="spec.build.onbuildImage" data-is-disabled="$ctrl.disabled"> </igz-validating-input-field> </div> <div class="igz-col-100 build-field"> <div class="field-label"> <span>{{ \'functions:BUILD_COMMANDS\' | i18next }}</span> <igz-more-info data-description="{{ \'functions:BUILD_COMMANDS_DESCRIPTION\' | i18next }}" data-trigger="click"> </igz-more-info> </div> <igz-validating-input-field data-field-type="textarea" data-input-name="commands" data-input-value="$ctrl.build.commands" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_COMMAND_ON_EACH_LINE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="commands" data-is-disabled="$ctrl.disabled" class="build-textarea-input build-commands-input"> </igz-validating-input-field> </div> <div class="igz-col-100 build-field"> <div class="field-label label-with-tooltip align-items-center"> <span>{{ \'functions:READINESS_TIMEOUT_SECONDS\' | i18next }}</span> <igz-more-info data-description="{{ \'functions:READINESS_TIMEOUT_SECONDS_DESCRIPTION\' | i18next:{default: $ctrl.defaultFunctionConfig.spec.readinessTimeoutSeconds} }}" data-trigger="click"> </igz-more-info> </div> <igz-number-input data-form-object="$ctrl.buildForm" data-input-name="readinessTimeoutSeconds" data-current-value="$ctrl.version.spec.readinessTimeoutSeconds" data-update-number-input-callback="$ctrl.inputValueCallback(newData, field)" data-update-number-input-field="spec.readinessTimeoutSeconds" data-allow-empty-field="true" data-value-step="1" data-validation-is-required="false" data-min-value="1" data-is-disabled="$ctrl.disabled || $ctrl.isFunctionDeploying()"> </igz-number-input> </div> <div class="igz-col-100 build-field" data-ng-if="$ctrl.version.spec.runtime === \'java\'"> <div class="field-label">{{ \'functions:REPOSITORIES\' | i18next }}</div> <igz-validating-input-field data-field-type="textarea" data-input-name="repositories" data-input-value="$ctrl.build.runtimeAttributes.repositories" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_REPOSITORY_ON_EACH_LINE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="runtimeAttributes.repositories" class="build-textarea-input" data-is-disabled="$ctrl.disabled"> </igz-validating-input-field> </div> <div class="igz-col-100 build-field" data-ng-if="$ctrl.version.spec.runtime === \'java\'"> <div class="field-label">{{ \'functions:DEPENDENCIES\' | i18next }}</div> <igz-validating-input-field data-field-type="textarea" data-input-name="dependencies" data-input-value="$ctrl.build.dependencies" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.buildForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_DEPENDENCY_ON_EACH_LINE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="dependencies" class="build-textarea-input" data-is-disabled="$ctrl.disabled"> </igz-validating-input-field> </div> <div class="igz-col-100 build-field build-checkboxes"> <div class="checkbox-block"> <input type="checkbox" class="small" id="noCache" data-ng-model="$ctrl.version.spec.build.noCache" data-ng-disabled="$ctrl.disabled || $ctrl.isFunctionDeploying()"> <label for="noCache" class="checkbox-inline">{{ \'functions:DISABLE_CACHE\' | i18next }}</label> <igz-more-info data-description="{{ \'functions:TOOLTIP.DISABLE_CACHE\' | i18next }}" data-trigger="click" data-default-tooltip-placement="top"> </igz-more-info> </div> <div class="checkbox-block" data-ng-if="$ctrl.platformKindIsKube"> <input type="checkbox" class="small" id="wait-readiness-timeout-before-failure" data-ng-model="$ctrl.version.spec.waitReadinessTimeoutBeforeFailure" data-ng-disabled="$ctrl.disabled || $ctrl.isFunctionDeploying()"> <label for="wait-readiness-timeout-before-failure" class="checkbox-inline">{{ \'functions:ALWAYS_WAIT_FOR_READINESS_TIMEOUT_EXPIRATION\' | i18next }}</label> <igz-more-info data-description="{{ \'functions:TOOLTIP.ALWAYS_WAIT_FOR_READINESS_TIMEOUT_EXPIRATION\' | i18next }}" data-trigger="click" data-default-tooltip-placement="top-left"> </igz-more-info> </div> </div> <div class="igz-col-100 build-field files-field"> <div class="uploading-files"> <div class="uploading-proccess-wrapper" data-ng-class="{\'one-file-uploaded\': $ctrl.file.uploaded || $ctrl.script.uploaded}" data-ng-if="$ctrl.getFileConfig().uploading && $ctrl.getFileConfig().name"> <div class="file-block uploading text-ellipsis" data-ng-class="{\'uploading-file\': $ctrl.file.uploading}"> <span class="{{$ctrl.getFileConfig().icon}}"></span> <button class="build-close-button"> <span class="ncl-icon-close"></span> </button> <span class="file-name"> {{$ctrl.getFileConfig().name}} </span> <div class="progress"> <div class="progress-bar" role="uib-progressbar" aria-valuemin="0" aria-valuemax="100" data-ng-style="{\'width\': $ctrl.getFileConfig().progress}"> </div> </div> </div> </div> <div class="uploaded-wrapper" data-ng-if="$ctrl.file.uploaded|| $ctrl.script.uploaded"> <div class="file-block uploaded text-ellipsis" data-ng-if="$ctrl.script.uploaded" data-ng-class="{\'one-file-uploaded\': $ctrl.file.uploaded}"> <span class="ncl-icon-script"></span> <span class="file-name"> {{$ctrl.script.name}} <span class="uploaded-file-directory">(/usr/bin/mybinary)</span> </span> <button class="build-close-button" data-ng-click="$ctrl.deleteFile(\'script\')"> <span class="ncl-icon-close"></span> </button> </div> <div class="file-block uploaded text-ellipsis uploaded-file" data-ng-if="$ctrl.file.uploaded"> <span class="ncl-icon-file"></span> <span class="file-name"> {{$ctrl.file.name}} <span class="uploaded-file-directory">(/usr/bin/mybinary)</span> </span> <button class="build-close-button" data-ng-click="$ctrl.deleteFile(\'file\')"> <span class="ncl-icon-close"></span> </button> </div> </div> </div> </div> </div> </form> </div> ');
25209
25224
  }]);
25210
25225
  })();
25211
25226