iguazio.dashboard-controls 0.39.16-3.5.3 → 0.39.17-3.5.3
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.
- package/dist/js/iguazio.dashboard-controls.js +1176 -1176
- package/dist/less/iguazio.dashboard-controls.less +627 -627
- package/gulpfile.js +1 -1
- package/package.json +3 -3
|
@@ -5660,96 +5660,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
5660
5660
|
})();
|
|
5661
5661
|
"use strict";
|
|
5662
5662
|
|
|
5663
|
-
(function () {
|
|
5664
|
-
'use strict';
|
|
5665
|
-
|
|
5666
|
-
IgzImportProjectDialogController.$inject = ["$scope", "$i18next", "i18next", "lodash"];
|
|
5667
|
-
angular.module('iguazio.dashboard-controls').component('igzImportProjectDialog', {
|
|
5668
|
-
bindings: {
|
|
5669
|
-
closeDialog: '&',
|
|
5670
|
-
dialogTitle: '<',
|
|
5671
|
-
displayAllOptions: '<'
|
|
5672
|
-
},
|
|
5673
|
-
templateUrl: 'igz_controls/components/import-project-dialog/import-project-dialog.tpl.html',
|
|
5674
|
-
controller: IgzImportProjectDialogController
|
|
5675
|
-
});
|
|
5676
|
-
function IgzImportProjectDialogController($scope, $i18next, i18next, lodash) {
|
|
5677
|
-
var ctrl = this;
|
|
5678
|
-
var lng = i18next.language;
|
|
5679
|
-
var checkedItem = 'singleFunction';
|
|
5680
|
-
ctrl.option = [];
|
|
5681
|
-
ctrl.optionList = [{
|
|
5682
|
-
label: $i18next.t('common:APPLY_TO_ALL_FUNCTIONS_IN_THIS_PROJECT', {
|
|
5683
|
-
lng: lng
|
|
5684
|
-
}),
|
|
5685
|
-
id: 'singleProject',
|
|
5686
|
-
value: 'singleProject',
|
|
5687
|
-
disabled: false,
|
|
5688
|
-
visibility: true
|
|
5689
|
-
}, {
|
|
5690
|
-
label: $i18next.t('common:APPLY_TO_ALL_FUNCTIONS_IN_ALL_PROJECT', {
|
|
5691
|
-
lng: lng
|
|
5692
|
-
}),
|
|
5693
|
-
id: 'allProjects',
|
|
5694
|
-
value: 'allProjects',
|
|
5695
|
-
disabled: false,
|
|
5696
|
-
visibility: true
|
|
5697
|
-
}];
|
|
5698
|
-
ctrl.$onInit = onInit;
|
|
5699
|
-
ctrl.onClose = onClose;
|
|
5700
|
-
ctrl.onCheckboxChange = onCheckboxChange;
|
|
5701
|
-
|
|
5702
|
-
//
|
|
5703
|
-
// Hook methods
|
|
5704
|
-
//
|
|
5705
|
-
|
|
5706
|
-
/**
|
|
5707
|
-
* Initialization method
|
|
5708
|
-
*/
|
|
5709
|
-
function onInit() {
|
|
5710
|
-
lodash.set(ctrl.optionList, '[1].visibility', ctrl.displayAllOptions);
|
|
5711
|
-
}
|
|
5712
|
-
|
|
5713
|
-
//
|
|
5714
|
-
// Public methods
|
|
5715
|
-
//
|
|
5716
|
-
|
|
5717
|
-
/**
|
|
5718
|
-
* Handles checking/un-checking checkbox
|
|
5719
|
-
*/
|
|
5720
|
-
function onCheckboxChange() {
|
|
5721
|
-
if (!lodash.isNil(ctrl.option)) {
|
|
5722
|
-
if (lodash.includes(ctrl.option, 'allProjects')) {
|
|
5723
|
-
lodash.set(ctrl.optionList, '[0].disabled', true);
|
|
5724
|
-
if (ctrl.option.length === 1) {
|
|
5725
|
-
ctrl.option.unshift('singleProject');
|
|
5726
|
-
}
|
|
5727
|
-
} else {
|
|
5728
|
-
lodash.set(ctrl.optionList, '[0].disabled', false);
|
|
5729
|
-
}
|
|
5730
|
-
ctrl.optionList = angular.copy(ctrl.optionList);
|
|
5731
|
-
ctrl.option = angular.copy(ctrl.option);
|
|
5732
|
-
checkedItem = lodash.get(ctrl.option, [ctrl.option.length - 1]);
|
|
5733
|
-
} else {
|
|
5734
|
-
checkedItem = 'singleFunction';
|
|
5735
|
-
}
|
|
5736
|
-
}
|
|
5737
|
-
|
|
5738
|
-
/**
|
|
5739
|
-
* Closes dialog
|
|
5740
|
-
* @param {string} action
|
|
5741
|
-
*/
|
|
5742
|
-
function onClose(action) {
|
|
5743
|
-
ctrl.closeDialog({
|
|
5744
|
-
action: action,
|
|
5745
|
-
option: checkedItem
|
|
5746
|
-
});
|
|
5747
|
-
ctrl.option = [];
|
|
5748
|
-
}
|
|
5749
|
-
}
|
|
5750
|
-
})();
|
|
5751
|
-
"use strict";
|
|
5752
|
-
|
|
5753
5663
|
(function () {
|
|
5754
5664
|
'use strict';
|
|
5755
5665
|
|
|
@@ -5913,6 +5823,96 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
5913
5823
|
})();
|
|
5914
5824
|
"use strict";
|
|
5915
5825
|
|
|
5826
|
+
(function () {
|
|
5827
|
+
'use strict';
|
|
5828
|
+
|
|
5829
|
+
IgzImportProjectDialogController.$inject = ["$scope", "$i18next", "i18next", "lodash"];
|
|
5830
|
+
angular.module('iguazio.dashboard-controls').component('igzImportProjectDialog', {
|
|
5831
|
+
bindings: {
|
|
5832
|
+
closeDialog: '&',
|
|
5833
|
+
dialogTitle: '<',
|
|
5834
|
+
displayAllOptions: '<'
|
|
5835
|
+
},
|
|
5836
|
+
templateUrl: 'igz_controls/components/import-project-dialog/import-project-dialog.tpl.html',
|
|
5837
|
+
controller: IgzImportProjectDialogController
|
|
5838
|
+
});
|
|
5839
|
+
function IgzImportProjectDialogController($scope, $i18next, i18next, lodash) {
|
|
5840
|
+
var ctrl = this;
|
|
5841
|
+
var lng = i18next.language;
|
|
5842
|
+
var checkedItem = 'singleFunction';
|
|
5843
|
+
ctrl.option = [];
|
|
5844
|
+
ctrl.optionList = [{
|
|
5845
|
+
label: $i18next.t('common:APPLY_TO_ALL_FUNCTIONS_IN_THIS_PROJECT', {
|
|
5846
|
+
lng: lng
|
|
5847
|
+
}),
|
|
5848
|
+
id: 'singleProject',
|
|
5849
|
+
value: 'singleProject',
|
|
5850
|
+
disabled: false,
|
|
5851
|
+
visibility: true
|
|
5852
|
+
}, {
|
|
5853
|
+
label: $i18next.t('common:APPLY_TO_ALL_FUNCTIONS_IN_ALL_PROJECT', {
|
|
5854
|
+
lng: lng
|
|
5855
|
+
}),
|
|
5856
|
+
id: 'allProjects',
|
|
5857
|
+
value: 'allProjects',
|
|
5858
|
+
disabled: false,
|
|
5859
|
+
visibility: true
|
|
5860
|
+
}];
|
|
5861
|
+
ctrl.$onInit = onInit;
|
|
5862
|
+
ctrl.onClose = onClose;
|
|
5863
|
+
ctrl.onCheckboxChange = onCheckboxChange;
|
|
5864
|
+
|
|
5865
|
+
//
|
|
5866
|
+
// Hook methods
|
|
5867
|
+
//
|
|
5868
|
+
|
|
5869
|
+
/**
|
|
5870
|
+
* Initialization method
|
|
5871
|
+
*/
|
|
5872
|
+
function onInit() {
|
|
5873
|
+
lodash.set(ctrl.optionList, '[1].visibility', ctrl.displayAllOptions);
|
|
5874
|
+
}
|
|
5875
|
+
|
|
5876
|
+
//
|
|
5877
|
+
// Public methods
|
|
5878
|
+
//
|
|
5879
|
+
|
|
5880
|
+
/**
|
|
5881
|
+
* Handles checking/un-checking checkbox
|
|
5882
|
+
*/
|
|
5883
|
+
function onCheckboxChange() {
|
|
5884
|
+
if (!lodash.isNil(ctrl.option)) {
|
|
5885
|
+
if (lodash.includes(ctrl.option, 'allProjects')) {
|
|
5886
|
+
lodash.set(ctrl.optionList, '[0].disabled', true);
|
|
5887
|
+
if (ctrl.option.length === 1) {
|
|
5888
|
+
ctrl.option.unshift('singleProject');
|
|
5889
|
+
}
|
|
5890
|
+
} else {
|
|
5891
|
+
lodash.set(ctrl.optionList, '[0].disabled', false);
|
|
5892
|
+
}
|
|
5893
|
+
ctrl.optionList = angular.copy(ctrl.optionList);
|
|
5894
|
+
ctrl.option = angular.copy(ctrl.option);
|
|
5895
|
+
checkedItem = lodash.get(ctrl.option, [ctrl.option.length - 1]);
|
|
5896
|
+
} else {
|
|
5897
|
+
checkedItem = 'singleFunction';
|
|
5898
|
+
}
|
|
5899
|
+
}
|
|
5900
|
+
|
|
5901
|
+
/**
|
|
5902
|
+
* Closes dialog
|
|
5903
|
+
* @param {string} action
|
|
5904
|
+
*/
|
|
5905
|
+
function onClose(action) {
|
|
5906
|
+
ctrl.closeDialog({
|
|
5907
|
+
action: action,
|
|
5908
|
+
option: checkedItem
|
|
5909
|
+
});
|
|
5910
|
+
ctrl.option = [];
|
|
5911
|
+
}
|
|
5912
|
+
}
|
|
5913
|
+
})();
|
|
5914
|
+
"use strict";
|
|
5915
|
+
|
|
5916
5916
|
(function () {
|
|
5917
5917
|
'use strict';
|
|
5918
5918
|
|
|
@@ -7233,388 +7233,57 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
7233
7233
|
(function () {
|
|
7234
7234
|
'use strict';
|
|
7235
7235
|
|
|
7236
|
-
|
|
7237
|
-
angular.module('iguazio.dashboard-controls').
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7236
|
+
IgzPaginationController.$inject = ["$scope", "$timeout", "lodash", "EventHelperService", "LocalStorageService", "PaginationService"];
|
|
7237
|
+
angular.module('iguazio.dashboard-controls').component('igzPagination', {
|
|
7238
|
+
bindings: {
|
|
7239
|
+
allowJumpToPage: '<?',
|
|
7240
|
+
entityName: '@?',
|
|
7241
|
+
pageData: '<',
|
|
7242
|
+
paginationCallback: '&',
|
|
7243
|
+
perPageValues: '<?',
|
|
7244
|
+
isPerPageVisible: '<?',
|
|
7245
|
+
sort: '<'
|
|
7246
|
+
},
|
|
7247
|
+
templateUrl: 'igz_controls/components/pagination/pagination.component.tpl.html',
|
|
7248
|
+
controller: IgzPaginationController
|
|
7249
|
+
});
|
|
7250
|
+
function IgzPaginationController($scope, $timeout, lodash, EventHelperService, LocalStorageService, PaginationService) {
|
|
7251
|
+
var ctrl = this;
|
|
7252
|
+
ctrl.jumpPage = 1;
|
|
7253
|
+
ctrl.maxPagesToDisplay = 9;
|
|
7254
|
+
ctrl.page = 0;
|
|
7255
|
+
ctrl.pages = [];
|
|
7256
|
+
ctrl.perPage = null;
|
|
7257
|
+
ctrl.jumpToPagePattern = new RegExp('^\\d+$');
|
|
7258
|
+
ctrl.$onInit = onInit;
|
|
7259
|
+
ctrl.inputValueCallback = inputValueCallback;
|
|
7260
|
+
ctrl.jumpToPage = jumpToPage;
|
|
7261
|
+
ctrl.onPerPageChanged = onPerPageChanged;
|
|
7262
|
+
ctrl.goToNextPage = goToNextPage;
|
|
7263
|
+
ctrl.goToPage = goToPage;
|
|
7264
|
+
ctrl.goToPrevPage = goToPrevPage;
|
|
7242
7265
|
|
|
7243
7266
|
//
|
|
7244
|
-
//
|
|
7267
|
+
// Hook methods
|
|
7245
7268
|
//
|
|
7246
7269
|
|
|
7247
7270
|
/**
|
|
7248
|
-
*
|
|
7249
|
-
* @param {string} searchQuery - text query entered to a search input
|
|
7250
|
-
* @param {Array.<Object>} data - array of data
|
|
7251
|
-
* @param {Array.<string>} pathsForSearchArray - array of keys in which search will be made
|
|
7252
|
-
* @param {boolean} isHierarchical - flag which indicates if passed data has hierarchical structure
|
|
7253
|
-
* @param {string} ruleType - string representing the type of rule resource
|
|
7254
|
-
* @param {Object} searchStates
|
|
7255
|
-
* @param {string} [multiSearchName] - unique name of the search input
|
|
7271
|
+
* Constructor
|
|
7256
7272
|
*/
|
|
7257
|
-
function
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
ruleType = '';
|
|
7264
|
-
}
|
|
7265
|
-
if (searchQuery === '') {
|
|
7266
|
-
showAllChildren(data, multiSearchName);
|
|
7267
|
-
} else if (angular.isString(searchQuery)) {
|
|
7268
|
-
searchStates.searchNotFound = true;
|
|
7269
|
-
searchStates.searchInProgress = true;
|
|
7270
|
-
findBySearchQuery(searchQuery, data, pathsForSearchArray, isHierarchical, ruleType, searchStates, multiSearchName);
|
|
7273
|
+
function onInit() {
|
|
7274
|
+
lodash.defaults(ctrl, {
|
|
7275
|
+
allowJumpToPage: true
|
|
7276
|
+
});
|
|
7277
|
+
if (angular.isUndefined(ctrl.perPageValues)) {
|
|
7278
|
+
ctrl.perPageValues = PaginationService.perPageDefaults();
|
|
7271
7279
|
}
|
|
7280
|
+
ctrl.perPage = lodash.some(ctrl.perPageValues, 'id', ctrl.pageData.size) ? ctrl.pageData.size : ctrl.perPageValues[0].id;
|
|
7281
|
+
$scope.$watch('$ctrl.pageData.total', initValues);
|
|
7282
|
+
$scope.$watch('$ctrl.pageData.number', updatePage);
|
|
7272
7283
|
}
|
|
7273
7284
|
|
|
7274
7285
|
//
|
|
7275
|
-
//
|
|
7276
|
-
//
|
|
7277
|
-
|
|
7278
|
-
/**
|
|
7279
|
-
* Loop through all given data to show/hide them depending on query match criteria (recursively)
|
|
7280
|
-
* @param {string} searchQuery - text query entered to a search input
|
|
7281
|
-
* @param {Array.<Object>} children - array of child data
|
|
7282
|
-
* @param {Array.<string>} pathsForSearch - array of strings, representing data's properties keys to search from
|
|
7283
|
-
* @param {boolean} isHierarchical - flag which indicates if passed data has hierarchical structure
|
|
7284
|
-
* @param {string} ruleType - string representing the type of rule resource
|
|
7285
|
-
* @param {Object} searchStates
|
|
7286
|
-
* @param {string} [multiSearchName] - unique name of the search input
|
|
7287
|
-
*/
|
|
7288
|
-
function findBySearchQuery(searchQuery, children, pathsForSearch, isHierarchical, ruleType, searchStates, multiSearchName) {
|
|
7289
|
-
angular.forEach(children, function (child) {
|
|
7290
|
-
// Search by text in data without children data only
|
|
7291
|
-
if (angular.isString(child.type) && child.type !== ruleType && isHierarchical) {
|
|
7292
|
-
// Hide all parent data while search among children and proceed recursively
|
|
7293
|
-
child.ui.isFitQuery = false;
|
|
7294
|
-
findBySearchQuery(searchQuery, child.ui.children, pathsForSearch, isHierarchical, ruleType, searchStates, multiSearchName);
|
|
7295
|
-
} else {
|
|
7296
|
-
showRelevantItem(searchQuery, child, pathsForSearch, searchStates, multiSearchName);
|
|
7297
|
-
}
|
|
7298
|
-
});
|
|
7299
|
-
}
|
|
7300
|
-
|
|
7301
|
-
/**
|
|
7302
|
-
* Get all current item's properties string values and push to stringValuesArray (recursively)
|
|
7303
|
-
* @param {string} itemPropertyValue - item's attribute value
|
|
7304
|
-
* @param {Array} stringValuesArray - array to collect current item's all properties string values
|
|
7305
|
-
*/
|
|
7306
|
-
function getStringValuesFromItem(itemPropertyValue, stringValuesArray) {
|
|
7307
|
-
if (angular.isObject(itemPropertyValue)) {
|
|
7308
|
-
angular.forEach(itemPropertyValue, function (value) {
|
|
7309
|
-
getStringValuesFromItem(value, stringValuesArray);
|
|
7310
|
-
});
|
|
7311
|
-
} else if (angular.isString(itemPropertyValue) && itemPropertyValue.length > 0 || angular.isNumber(itemPropertyValue)) {
|
|
7312
|
-
stringValuesArray.push(itemPropertyValue.toString());
|
|
7313
|
-
}
|
|
7314
|
-
return stringValuesArray;
|
|
7315
|
-
}
|
|
7316
|
-
|
|
7317
|
-
/**
|
|
7318
|
-
* Sets isFitQuery value for data item
|
|
7319
|
-
* @param {Object} dataItem - current item
|
|
7320
|
-
* @param {string} [multiSearchName] - unique name of the search input
|
|
7321
|
-
* @param {boolean} isFitQuery - `true` if item is matched with search query
|
|
7322
|
-
*/
|
|
7323
|
-
function setFitQueryValue(dataItem, multiSearchName, isFitQuery) {
|
|
7324
|
-
var filterPath = lodash.isEmpty(multiSearchName) ? 'isFitQuery' : ['filters', multiSearchName, 'isFitQuery'];
|
|
7325
|
-
lodash.set(dataItem.ui, filterPath, isFitQuery);
|
|
7326
|
-
}
|
|
7327
|
-
|
|
7328
|
-
/**
|
|
7329
|
-
* Show all data item's children chain (recursively)
|
|
7330
|
-
* @param {Array.<Object>} data - child items
|
|
7331
|
-
* @param {string} [multiSearchName] - unique name of the search input
|
|
7332
|
-
*/
|
|
7333
|
-
function showAllChildren(data, multiSearchName) {
|
|
7334
|
-
angular.forEach(data, function (value) {
|
|
7335
|
-
var children = value.ui.children;
|
|
7336
|
-
setFitQueryValue(value, multiSearchName, true);
|
|
7337
|
-
if (!lodash.isEmpty(children)) {
|
|
7338
|
-
showAllChildren(children);
|
|
7339
|
-
}
|
|
7340
|
-
});
|
|
7341
|
-
}
|
|
7342
|
-
|
|
7343
|
-
/**
|
|
7344
|
-
* Show item's all direct ancestors chain (recursively)
|
|
7345
|
-
* @param {Object} dataItem - current item
|
|
7346
|
-
*/
|
|
7347
|
-
function showAllParents(dataItem) {
|
|
7348
|
-
var parent = dataItem.ui.parent;
|
|
7349
|
-
if (angular.isDefined(parent)) {
|
|
7350
|
-
parent.ui.isFitQuery = true;
|
|
7351
|
-
showAllParents(parent);
|
|
7352
|
-
}
|
|
7353
|
-
}
|
|
7354
|
-
|
|
7355
|
-
/**
|
|
7356
|
-
* Loop through all given data's properties and show/hide current data depending on query match criteria
|
|
7357
|
-
* @param {string} searchQuery - query entered to a search input
|
|
7358
|
-
* @param {Object} dataItem - current item
|
|
7359
|
-
* @param {Array} pathsForSearch - array of strings, representing paths to item's properties to search from
|
|
7360
|
-
* @param {Object} searchStates
|
|
7361
|
-
* @param {string} [multiSearchName] - unique name of the search input
|
|
7362
|
-
*/
|
|
7363
|
-
function showRelevantItem(searchQuery, dataItem, pathsForSearch, searchStates, multiSearchName) {
|
|
7364
|
-
var isFitQuery;
|
|
7365
|
-
var stringValuesArray = [];
|
|
7366
|
-
angular.forEach(pathsForSearch, function (pathForSearch) {
|
|
7367
|
-
getStringValuesFromItem(lodash.get(dataItem, pathForSearch), stringValuesArray);
|
|
7368
|
-
});
|
|
7369
|
-
|
|
7370
|
-
// If at least one value in item's properties string values matched - show current item and all its direct ancestors chain
|
|
7371
|
-
isFitQuery = stringValuesArray.some(function (value) {
|
|
7372
|
-
return lodash.includes(value.toLowerCase(), searchQuery.toLowerCase());
|
|
7373
|
-
});
|
|
7374
|
-
setFitQueryValue(dataItem, multiSearchName, isFitQuery);
|
|
7375
|
-
if (dataItem.ui.isFitQuery) {
|
|
7376
|
-
searchStates.searchNotFound = false;
|
|
7377
|
-
showAllParents(dataItem);
|
|
7378
|
-
}
|
|
7379
|
-
}
|
|
7380
|
-
}
|
|
7381
|
-
})();
|
|
7382
|
-
"use strict";
|
|
7383
|
-
|
|
7384
|
-
(function () {
|
|
7385
|
-
'use strict';
|
|
7386
|
-
|
|
7387
|
-
IgzSearchInputController.$inject = ["$scope", "$timeout", "lodash", "SearchHelperService"];
|
|
7388
|
-
angular.module('iguazio.dashboard-controls').component('igzSearchInput', {
|
|
7389
|
-
bindings: {
|
|
7390
|
-
dataSet: '<',
|
|
7391
|
-
initSearchQuery: '@?',
|
|
7392
|
-
isSearchHierarchically: '@?',
|
|
7393
|
-
liveSearch: '<?',
|
|
7394
|
-
multiSearchName: '@?',
|
|
7395
|
-
onSearchSubmit: '&?',
|
|
7396
|
-
placeholder: '@',
|
|
7397
|
-
ruleType: '@?',
|
|
7398
|
-
searchCallback: '&?',
|
|
7399
|
-
searchKeys: '<',
|
|
7400
|
-
searchStates: '<',
|
|
7401
|
-
searchType: '@?',
|
|
7402
|
-
type: '@?'
|
|
7403
|
-
},
|
|
7404
|
-
templateUrl: 'igz_controls/components/search-input/search-input.tpl.html',
|
|
7405
|
-
controller: IgzSearchInputController
|
|
7406
|
-
});
|
|
7407
|
-
function IgzSearchInputController($scope, $timeout, lodash, SearchHelperService) {
|
|
7408
|
-
var ctrl = this;
|
|
7409
|
-
ctrl.isInputFocused = false;
|
|
7410
|
-
ctrl.isSearchHierarchically = String(ctrl.isSearchHierarchically) === 'true';
|
|
7411
|
-
ctrl.searchQuery = '';
|
|
7412
|
-
ctrl.$onInit = onInit;
|
|
7413
|
-
ctrl.onPressEnter = onPressEnter;
|
|
7414
|
-
ctrl.clearInputField = clearInputField;
|
|
7415
|
-
ctrl.toggleInputFocus = toggleInputFocus;
|
|
7416
|
-
|
|
7417
|
-
//
|
|
7418
|
-
// Hook method
|
|
7419
|
-
//
|
|
7420
|
-
|
|
7421
|
-
/**
|
|
7422
|
-
* Initialization method
|
|
7423
|
-
*/
|
|
7424
|
-
function onInit() {
|
|
7425
|
-
ctrl.searchStates.searchNotFound = false;
|
|
7426
|
-
ctrl.searchStates.searchInProgress = false;
|
|
7427
|
-
if (!lodash.isUndefined(ctrl.initSearchQuery)) {
|
|
7428
|
-
ctrl.searchQuery = ctrl.initSearchQuery;
|
|
7429
|
-
}
|
|
7430
|
-
if (angular.isUndefined(ctrl.searchType)) {
|
|
7431
|
-
ctrl.searchType = 'infoPage';
|
|
7432
|
-
}
|
|
7433
|
-
if (angular.isUndefined(ctrl.liveSearch) || ctrl.liveSearch) {
|
|
7434
|
-
$scope.$watch('$ctrl.searchQuery', onChangeSearchQuery);
|
|
7435
|
-
}
|
|
7436
|
-
$scope.$on('search-input_refresh-search', onDataChanged);
|
|
7437
|
-
$scope.$on('search-input_reset', resetSearch);
|
|
7438
|
-
}
|
|
7439
|
-
|
|
7440
|
-
//
|
|
7441
|
-
// Public methods
|
|
7442
|
-
//
|
|
7443
|
-
|
|
7444
|
-
/**
|
|
7445
|
-
* Initializes search and apply filters on press enter
|
|
7446
|
-
* @param {Event} e
|
|
7447
|
-
*/
|
|
7448
|
-
function onPressEnter(e) {
|
|
7449
|
-
if (e.keyCode === 13) {
|
|
7450
|
-
makeSearch();
|
|
7451
|
-
if (angular.isFunction(ctrl.onSearchSubmit) && ctrl.isInputFocused) {
|
|
7452
|
-
ctrl.onSearchSubmit();
|
|
7453
|
-
}
|
|
7454
|
-
}
|
|
7455
|
-
}
|
|
7456
|
-
|
|
7457
|
-
/**
|
|
7458
|
-
* Clear search input field
|
|
7459
|
-
*/
|
|
7460
|
-
function clearInputField() {
|
|
7461
|
-
ctrl.searchQuery = '';
|
|
7462
|
-
}
|
|
7463
|
-
|
|
7464
|
-
/**
|
|
7465
|
-
* Toggles input focus
|
|
7466
|
-
*/
|
|
7467
|
-
function toggleInputFocus() {
|
|
7468
|
-
ctrl.isInputFocused = !ctrl.isInputFocused;
|
|
7469
|
-
}
|
|
7470
|
-
|
|
7471
|
-
//
|
|
7472
|
-
// Private methods
|
|
7473
|
-
//
|
|
7474
|
-
|
|
7475
|
-
/**
|
|
7476
|
-
* Calls service method for search
|
|
7477
|
-
*/
|
|
7478
|
-
function makeSearch() {
|
|
7479
|
-
if (angular.isFunction(ctrl.searchCallback)) {
|
|
7480
|
-
// call custom search method
|
|
7481
|
-
ctrl.searchCallback(lodash.pick(ctrl, ['searchQuery', 'dataSet', 'searchKeys', 'isSearchHierarchically', 'ruleType', 'searchStates', 'multiSearchName']));
|
|
7482
|
-
}
|
|
7483
|
-
if (angular.isUndefined(ctrl.type)) {
|
|
7484
|
-
// default search functionality
|
|
7485
|
-
SearchHelperService.makeSearch(ctrl.searchQuery, ctrl.dataSet, ctrl.searchKeys, ctrl.isSearchHierarchically, ctrl.ruleType, ctrl.searchStates, ctrl.multiSearchName);
|
|
7486
|
-
}
|
|
7487
|
-
}
|
|
7488
|
-
|
|
7489
|
-
/**
|
|
7490
|
-
* Tracks input changing and initializes search
|
|
7491
|
-
*/
|
|
7492
|
-
function onChangeSearchQuery(newValue, oldValue) {
|
|
7493
|
-
if (angular.isDefined(newValue) && newValue !== oldValue) {
|
|
7494
|
-
makeSearch();
|
|
7495
|
-
}
|
|
7496
|
-
}
|
|
7497
|
-
|
|
7498
|
-
/**
|
|
7499
|
-
* Initializes search when all html has been rendered
|
|
7500
|
-
*/
|
|
7501
|
-
function onDataChanged() {
|
|
7502
|
-
$timeout(makeSearch);
|
|
7503
|
-
}
|
|
7504
|
-
|
|
7505
|
-
/**
|
|
7506
|
-
* Resets search query and initializes search
|
|
7507
|
-
*/
|
|
7508
|
-
function resetSearch() {
|
|
7509
|
-
ctrl.searchQuery = '';
|
|
7510
|
-
$timeout(makeSearch);
|
|
7511
|
-
}
|
|
7512
|
-
}
|
|
7513
|
-
})();
|
|
7514
|
-
"use strict";
|
|
7515
|
-
|
|
7516
|
-
(function () {
|
|
7517
|
-
'use strict';
|
|
7518
|
-
|
|
7519
|
-
igzShowHideSearchItem.$inject = ["lodash"];
|
|
7520
|
-
angular.module('iguazio.dashboard-controls').directive('igzShowHideSearchItem', igzShowHideSearchItem);
|
|
7521
|
-
function igzShowHideSearchItem(lodash) {
|
|
7522
|
-
return {
|
|
7523
|
-
restrict: 'A',
|
|
7524
|
-
scope: {
|
|
7525
|
-
dataItem: '=igzShowHideSearchItem'
|
|
7526
|
-
},
|
|
7527
|
-
link: link
|
|
7528
|
-
};
|
|
7529
|
-
function link(scope, element) {
|
|
7530
|
-
activate();
|
|
7531
|
-
|
|
7532
|
-
//
|
|
7533
|
-
// Private methods
|
|
7534
|
-
//
|
|
7535
|
-
|
|
7536
|
-
/**
|
|
7537
|
-
* Constructor method
|
|
7538
|
-
*/
|
|
7539
|
-
function activate() {
|
|
7540
|
-
scope.$watch('dataItem.ui.isFitQuery', changeVisibility);
|
|
7541
|
-
scope.$watch('dataItem.ui.filters', changeVisibility, true);
|
|
7542
|
-
}
|
|
7543
|
-
|
|
7544
|
-
/**
|
|
7545
|
-
* Method sets display property of element to false if it doesn't fit the query in search otherwise removes these property
|
|
7546
|
-
* @param {boolean} newValue - value displays if current element fit search query
|
|
7547
|
-
*/
|
|
7548
|
-
function changeVisibility(newValue) {
|
|
7549
|
-
var displayValue = '';
|
|
7550
|
-
if (lodash.isObject(newValue)) {
|
|
7551
|
-
displayValue = lodash.some(newValue, {
|
|
7552
|
-
isFitQuery: false
|
|
7553
|
-
}) ? 'none' : '';
|
|
7554
|
-
} else {
|
|
7555
|
-
displayValue = newValue === false ? 'none' : '';
|
|
7556
|
-
}
|
|
7557
|
-
element.css('display', displayValue);
|
|
7558
|
-
}
|
|
7559
|
-
}
|
|
7560
|
-
}
|
|
7561
|
-
})();
|
|
7562
|
-
"use strict";
|
|
7563
|
-
|
|
7564
|
-
(function () {
|
|
7565
|
-
'use strict';
|
|
7566
|
-
|
|
7567
|
-
IgzPaginationController.$inject = ["$scope", "$timeout", "lodash", "EventHelperService", "LocalStorageService", "PaginationService"];
|
|
7568
|
-
angular.module('iguazio.dashboard-controls').component('igzPagination', {
|
|
7569
|
-
bindings: {
|
|
7570
|
-
allowJumpToPage: '<?',
|
|
7571
|
-
entityName: '@?',
|
|
7572
|
-
pageData: '<',
|
|
7573
|
-
paginationCallback: '&',
|
|
7574
|
-
perPageValues: '<?',
|
|
7575
|
-
isPerPageVisible: '<?',
|
|
7576
|
-
sort: '<'
|
|
7577
|
-
},
|
|
7578
|
-
templateUrl: 'igz_controls/components/pagination/pagination.component.tpl.html',
|
|
7579
|
-
controller: IgzPaginationController
|
|
7580
|
-
});
|
|
7581
|
-
function IgzPaginationController($scope, $timeout, lodash, EventHelperService, LocalStorageService, PaginationService) {
|
|
7582
|
-
var ctrl = this;
|
|
7583
|
-
ctrl.jumpPage = 1;
|
|
7584
|
-
ctrl.maxPagesToDisplay = 9;
|
|
7585
|
-
ctrl.page = 0;
|
|
7586
|
-
ctrl.pages = [];
|
|
7587
|
-
ctrl.perPage = null;
|
|
7588
|
-
ctrl.jumpToPagePattern = new RegExp('^\\d+$');
|
|
7589
|
-
ctrl.$onInit = onInit;
|
|
7590
|
-
ctrl.inputValueCallback = inputValueCallback;
|
|
7591
|
-
ctrl.jumpToPage = jumpToPage;
|
|
7592
|
-
ctrl.onPerPageChanged = onPerPageChanged;
|
|
7593
|
-
ctrl.goToNextPage = goToNextPage;
|
|
7594
|
-
ctrl.goToPage = goToPage;
|
|
7595
|
-
ctrl.goToPrevPage = goToPrevPage;
|
|
7596
|
-
|
|
7597
|
-
//
|
|
7598
|
-
// Hook methods
|
|
7599
|
-
//
|
|
7600
|
-
|
|
7601
|
-
/**
|
|
7602
|
-
* Constructor
|
|
7603
|
-
*/
|
|
7604
|
-
function onInit() {
|
|
7605
|
-
lodash.defaults(ctrl, {
|
|
7606
|
-
allowJumpToPage: true
|
|
7607
|
-
});
|
|
7608
|
-
if (angular.isUndefined(ctrl.perPageValues)) {
|
|
7609
|
-
ctrl.perPageValues = PaginationService.perPageDefaults();
|
|
7610
|
-
}
|
|
7611
|
-
ctrl.perPage = lodash.some(ctrl.perPageValues, 'id', ctrl.pageData.size) ? ctrl.pageData.size : ctrl.perPageValues[0].id;
|
|
7612
|
-
$scope.$watch('$ctrl.pageData.total', initValues);
|
|
7613
|
-
$scope.$watch('$ctrl.pageData.number', updatePage);
|
|
7614
|
-
}
|
|
7615
|
-
|
|
7616
|
-
//
|
|
7617
|
-
// Public methods
|
|
7286
|
+
// Public methods
|
|
7618
7287
|
//
|
|
7619
7288
|
|
|
7620
7289
|
/**
|
|
@@ -8116,72 +7785,239 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
8116
7785
|
(function () {
|
|
8117
7786
|
'use strict';
|
|
8118
7787
|
|
|
8119
|
-
|
|
8120
|
-
angular.module('iguazio.dashboard-controls').
|
|
7788
|
+
SearchHelperService.$inject = ["lodash"];
|
|
7789
|
+
angular.module('iguazio.dashboard-controls').factory('SearchHelperService', SearchHelperService);
|
|
7790
|
+
function SearchHelperService(lodash) {
|
|
7791
|
+
return {
|
|
7792
|
+
makeSearch: makeSearch
|
|
7793
|
+
};
|
|
7794
|
+
|
|
7795
|
+
//
|
|
7796
|
+
// Public methods
|
|
7797
|
+
//
|
|
7798
|
+
|
|
7799
|
+
/**
|
|
7800
|
+
* Perform search of data based on text query
|
|
7801
|
+
* @param {string} searchQuery - text query entered to a search input
|
|
7802
|
+
* @param {Array.<Object>} data - array of data
|
|
7803
|
+
* @param {Array.<string>} pathsForSearchArray - array of keys in which search will be made
|
|
7804
|
+
* @param {boolean} isHierarchical - flag which indicates if passed data has hierarchical structure
|
|
7805
|
+
* @param {string} ruleType - string representing the type of rule resource
|
|
7806
|
+
* @param {Object} searchStates
|
|
7807
|
+
* @param {string} [multiSearchName] - unique name of the search input
|
|
7808
|
+
*/
|
|
7809
|
+
function makeSearch(searchQuery, data, pathsForSearchArray, isHierarchical, ruleType, searchStates, multiSearchName) {
|
|
7810
|
+
searchStates.searchNotFound = false;
|
|
7811
|
+
searchStates.searchInProgress = false;
|
|
7812
|
+
if (isHierarchical) {
|
|
7813
|
+
data = data.ui.children;
|
|
7814
|
+
} else {
|
|
7815
|
+
ruleType = '';
|
|
7816
|
+
}
|
|
7817
|
+
if (searchQuery === '') {
|
|
7818
|
+
showAllChildren(data, multiSearchName);
|
|
7819
|
+
} else if (angular.isString(searchQuery)) {
|
|
7820
|
+
searchStates.searchNotFound = true;
|
|
7821
|
+
searchStates.searchInProgress = true;
|
|
7822
|
+
findBySearchQuery(searchQuery, data, pathsForSearchArray, isHierarchical, ruleType, searchStates, multiSearchName);
|
|
7823
|
+
}
|
|
7824
|
+
}
|
|
7825
|
+
|
|
7826
|
+
//
|
|
7827
|
+
// Private methods
|
|
7828
|
+
//
|
|
7829
|
+
|
|
7830
|
+
/**
|
|
7831
|
+
* Loop through all given data to show/hide them depending on query match criteria (recursively)
|
|
7832
|
+
* @param {string} searchQuery - text query entered to a search input
|
|
7833
|
+
* @param {Array.<Object>} children - array of child data
|
|
7834
|
+
* @param {Array.<string>} pathsForSearch - array of strings, representing data's properties keys to search from
|
|
7835
|
+
* @param {boolean} isHierarchical - flag which indicates if passed data has hierarchical structure
|
|
7836
|
+
* @param {string} ruleType - string representing the type of rule resource
|
|
7837
|
+
* @param {Object} searchStates
|
|
7838
|
+
* @param {string} [multiSearchName] - unique name of the search input
|
|
7839
|
+
*/
|
|
7840
|
+
function findBySearchQuery(searchQuery, children, pathsForSearch, isHierarchical, ruleType, searchStates, multiSearchName) {
|
|
7841
|
+
angular.forEach(children, function (child) {
|
|
7842
|
+
// Search by text in data without children data only
|
|
7843
|
+
if (angular.isString(child.type) && child.type !== ruleType && isHierarchical) {
|
|
7844
|
+
// Hide all parent data while search among children and proceed recursively
|
|
7845
|
+
child.ui.isFitQuery = false;
|
|
7846
|
+
findBySearchQuery(searchQuery, child.ui.children, pathsForSearch, isHierarchical, ruleType, searchStates, multiSearchName);
|
|
7847
|
+
} else {
|
|
7848
|
+
showRelevantItem(searchQuery, child, pathsForSearch, searchStates, multiSearchName);
|
|
7849
|
+
}
|
|
7850
|
+
});
|
|
7851
|
+
}
|
|
7852
|
+
|
|
7853
|
+
/**
|
|
7854
|
+
* Get all current item's properties string values and push to stringValuesArray (recursively)
|
|
7855
|
+
* @param {string} itemPropertyValue - item's attribute value
|
|
7856
|
+
* @param {Array} stringValuesArray - array to collect current item's all properties string values
|
|
7857
|
+
*/
|
|
7858
|
+
function getStringValuesFromItem(itemPropertyValue, stringValuesArray) {
|
|
7859
|
+
if (angular.isObject(itemPropertyValue)) {
|
|
7860
|
+
angular.forEach(itemPropertyValue, function (value) {
|
|
7861
|
+
getStringValuesFromItem(value, stringValuesArray);
|
|
7862
|
+
});
|
|
7863
|
+
} else if (angular.isString(itemPropertyValue) && itemPropertyValue.length > 0 || angular.isNumber(itemPropertyValue)) {
|
|
7864
|
+
stringValuesArray.push(itemPropertyValue.toString());
|
|
7865
|
+
}
|
|
7866
|
+
return stringValuesArray;
|
|
7867
|
+
}
|
|
7868
|
+
|
|
7869
|
+
/**
|
|
7870
|
+
* Sets isFitQuery value for data item
|
|
7871
|
+
* @param {Object} dataItem - current item
|
|
7872
|
+
* @param {string} [multiSearchName] - unique name of the search input
|
|
7873
|
+
* @param {boolean} isFitQuery - `true` if item is matched with search query
|
|
7874
|
+
*/
|
|
7875
|
+
function setFitQueryValue(dataItem, multiSearchName, isFitQuery) {
|
|
7876
|
+
var filterPath = lodash.isEmpty(multiSearchName) ? 'isFitQuery' : ['filters', multiSearchName, 'isFitQuery'];
|
|
7877
|
+
lodash.set(dataItem.ui, filterPath, isFitQuery);
|
|
7878
|
+
}
|
|
7879
|
+
|
|
7880
|
+
/**
|
|
7881
|
+
* Show all data item's children chain (recursively)
|
|
7882
|
+
* @param {Array.<Object>} data - child items
|
|
7883
|
+
* @param {string} [multiSearchName] - unique name of the search input
|
|
7884
|
+
*/
|
|
7885
|
+
function showAllChildren(data, multiSearchName) {
|
|
7886
|
+
angular.forEach(data, function (value) {
|
|
7887
|
+
var children = value.ui.children;
|
|
7888
|
+
setFitQueryValue(value, multiSearchName, true);
|
|
7889
|
+
if (!lodash.isEmpty(children)) {
|
|
7890
|
+
showAllChildren(children);
|
|
7891
|
+
}
|
|
7892
|
+
});
|
|
7893
|
+
}
|
|
7894
|
+
|
|
7895
|
+
/**
|
|
7896
|
+
* Show item's all direct ancestors chain (recursively)
|
|
7897
|
+
* @param {Object} dataItem - current item
|
|
7898
|
+
*/
|
|
7899
|
+
function showAllParents(dataItem) {
|
|
7900
|
+
var parent = dataItem.ui.parent;
|
|
7901
|
+
if (angular.isDefined(parent)) {
|
|
7902
|
+
parent.ui.isFitQuery = true;
|
|
7903
|
+
showAllParents(parent);
|
|
7904
|
+
}
|
|
7905
|
+
}
|
|
7906
|
+
|
|
7907
|
+
/**
|
|
7908
|
+
* Loop through all given data's properties and show/hide current data depending on query match criteria
|
|
7909
|
+
* @param {string} searchQuery - query entered to a search input
|
|
7910
|
+
* @param {Object} dataItem - current item
|
|
7911
|
+
* @param {Array} pathsForSearch - array of strings, representing paths to item's properties to search from
|
|
7912
|
+
* @param {Object} searchStates
|
|
7913
|
+
* @param {string} [multiSearchName] - unique name of the search input
|
|
7914
|
+
*/
|
|
7915
|
+
function showRelevantItem(searchQuery, dataItem, pathsForSearch, searchStates, multiSearchName) {
|
|
7916
|
+
var isFitQuery;
|
|
7917
|
+
var stringValuesArray = [];
|
|
7918
|
+
angular.forEach(pathsForSearch, function (pathForSearch) {
|
|
7919
|
+
getStringValuesFromItem(lodash.get(dataItem, pathForSearch), stringValuesArray);
|
|
7920
|
+
});
|
|
7921
|
+
|
|
7922
|
+
// If at least one value in item's properties string values matched - show current item and all its direct ancestors chain
|
|
7923
|
+
isFitQuery = stringValuesArray.some(function (value) {
|
|
7924
|
+
return lodash.includes(value.toLowerCase(), searchQuery.toLowerCase());
|
|
7925
|
+
});
|
|
7926
|
+
setFitQueryValue(dataItem, multiSearchName, isFitQuery);
|
|
7927
|
+
if (dataItem.ui.isFitQuery) {
|
|
7928
|
+
searchStates.searchNotFound = false;
|
|
7929
|
+
showAllParents(dataItem);
|
|
7930
|
+
}
|
|
7931
|
+
}
|
|
7932
|
+
}
|
|
7933
|
+
})();
|
|
7934
|
+
"use strict";
|
|
7935
|
+
|
|
7936
|
+
(function () {
|
|
7937
|
+
'use strict';
|
|
7938
|
+
|
|
7939
|
+
IgzSearchInputController.$inject = ["$scope", "$timeout", "lodash", "SearchHelperService"];
|
|
7940
|
+
angular.module('iguazio.dashboard-controls').component('igzSearchInput', {
|
|
8121
7941
|
bindings: {
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
7942
|
+
dataSet: '<',
|
|
7943
|
+
initSearchQuery: '@?',
|
|
7944
|
+
isSearchHierarchically: '@?',
|
|
7945
|
+
liveSearch: '<?',
|
|
7946
|
+
multiSearchName: '@?',
|
|
7947
|
+
onSearchSubmit: '&?',
|
|
7948
|
+
placeholder: '@',
|
|
7949
|
+
ruleType: '@?',
|
|
7950
|
+
searchCallback: '&?',
|
|
7951
|
+
searchKeys: '<',
|
|
7952
|
+
searchStates: '<',
|
|
7953
|
+
searchType: '@?',
|
|
7954
|
+
type: '@?'
|
|
8130
7955
|
},
|
|
8131
|
-
templateUrl: 'igz_controls/components/
|
|
8132
|
-
controller:
|
|
7956
|
+
templateUrl: 'igz_controls/components/search-input/search-input.tpl.html',
|
|
7957
|
+
controller: IgzSearchInputController
|
|
8133
7958
|
});
|
|
8134
|
-
function
|
|
7959
|
+
function IgzSearchInputController($scope, $timeout, lodash, SearchHelperService) {
|
|
8135
7960
|
var ctrl = this;
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
}, {
|
|
8140
|
-
pow: 2,
|
|
8141
|
-
name: 'MB/s'
|
|
8142
|
-
}, {
|
|
8143
|
-
pow: 3,
|
|
8144
|
-
name: 'GB/s'
|
|
8145
|
-
}];
|
|
7961
|
+
ctrl.isInputFocused = false;
|
|
7962
|
+
ctrl.isSearchHierarchically = String(ctrl.isSearchHierarchically) === 'true';
|
|
7963
|
+
ctrl.searchQuery = '';
|
|
8146
7964
|
ctrl.$onInit = onInit;
|
|
8147
|
-
ctrl.
|
|
7965
|
+
ctrl.onPressEnter = onPressEnter;
|
|
7966
|
+
ctrl.clearInputField = clearInputField;
|
|
7967
|
+
ctrl.toggleInputFocus = toggleInputFocus;
|
|
8148
7968
|
|
|
8149
7969
|
//
|
|
8150
|
-
// Hook
|
|
7970
|
+
// Hook method
|
|
7971
|
+
//
|
|
7972
|
+
|
|
7973
|
+
/**
|
|
7974
|
+
* Initialization method
|
|
7975
|
+
*/
|
|
7976
|
+
function onInit() {
|
|
7977
|
+
ctrl.searchStates.searchNotFound = false;
|
|
7978
|
+
ctrl.searchStates.searchInProgress = false;
|
|
7979
|
+
if (!lodash.isUndefined(ctrl.initSearchQuery)) {
|
|
7980
|
+
ctrl.searchQuery = ctrl.initSearchQuery;
|
|
7981
|
+
}
|
|
7982
|
+
if (angular.isUndefined(ctrl.searchType)) {
|
|
7983
|
+
ctrl.searchType = 'infoPage';
|
|
7984
|
+
}
|
|
7985
|
+
if (angular.isUndefined(ctrl.liveSearch) || ctrl.liveSearch) {
|
|
7986
|
+
$scope.$watch('$ctrl.searchQuery', onChangeSearchQuery);
|
|
7987
|
+
}
|
|
7988
|
+
$scope.$on('search-input_refresh-search', onDataChanged);
|
|
7989
|
+
$scope.$on('search-input_reset', resetSearch);
|
|
7990
|
+
}
|
|
7991
|
+
|
|
7992
|
+
//
|
|
7993
|
+
// Public methods
|
|
8151
7994
|
//
|
|
8152
7995
|
|
|
8153
7996
|
/**
|
|
8154
|
-
*
|
|
7997
|
+
* Initializes search and apply filters on press enter
|
|
7998
|
+
* @param {Event} e
|
|
8155
7999
|
*/
|
|
8156
|
-
function
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
ctrl.
|
|
8000
|
+
function onPressEnter(e) {
|
|
8001
|
+
if (e.keyCode === 13) {
|
|
8002
|
+
makeSearch();
|
|
8003
|
+
if (angular.isFunction(ctrl.onSearchSubmit) && ctrl.isInputFocused) {
|
|
8004
|
+
ctrl.onSearchSubmit();
|
|
8005
|
+
}
|
|
8160
8006
|
}
|
|
8161
|
-
$scope.$on(ctrl.sliderBlockUpdatingBroadcast, setData);
|
|
8162
|
-
$timeout(function () {
|
|
8163
|
-
// Bind needed callbacks to configuration objects with updated `ctrl.selectedData` values (for rz-slider library usage)
|
|
8164
|
-
ctrl.sliderConfig.options.onEnd = setValue;
|
|
8165
|
-
ctrl.sliderConfig.options.onChange = checkIfUnlimited;
|
|
8166
|
-
});
|
|
8167
|
-
ctrl.selectedItem = lodash.find(ctrl.measureUnits, ['name', ctrl.sliderConfig.unitLabel]);
|
|
8168
|
-
|
|
8169
|
-
// Update data with values from external scope
|
|
8170
|
-
fillRange();
|
|
8171
8007
|
}
|
|
8172
8008
|
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8009
|
+
/**
|
|
8010
|
+
* Clear search input field
|
|
8011
|
+
*/
|
|
8012
|
+
function clearInputField() {
|
|
8013
|
+
ctrl.searchQuery = '';
|
|
8014
|
+
}
|
|
8176
8015
|
|
|
8177
8016
|
/**
|
|
8178
|
-
*
|
|
8179
|
-
* @param {Object} trafficUnit - selected measurement unit value
|
|
8017
|
+
* Toggles input focus
|
|
8180
8018
|
*/
|
|
8181
|
-
function
|
|
8182
|
-
ctrl.
|
|
8183
|
-
ctrl.sliderConfig.pow = trafficUnit.pow;
|
|
8184
|
-
setValue();
|
|
8019
|
+
function toggleInputFocus() {
|
|
8020
|
+
ctrl.isInputFocused = !ctrl.isInputFocused;
|
|
8185
8021
|
}
|
|
8186
8022
|
|
|
8187
8023
|
//
|
|
@@ -8189,55 +8025,88 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
8189
8025
|
//
|
|
8190
8026
|
|
|
8191
8027
|
/**
|
|
8192
|
-
*
|
|
8193
|
-
* If it's not maximum - label sets with new value.
|
|
8194
|
-
* Calls onSliderChanging method if it was defined
|
|
8028
|
+
* Calls service method for search
|
|
8195
8029
|
*/
|
|
8196
|
-
function
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
ctrl.
|
|
8030
|
+
function makeSearch() {
|
|
8031
|
+
if (angular.isFunction(ctrl.searchCallback)) {
|
|
8032
|
+
// call custom search method
|
|
8033
|
+
ctrl.searchCallback(lodash.pick(ctrl, ['searchQuery', 'dataSet', 'searchKeys', 'isSearchHierarchically', 'ruleType', 'searchStates', 'multiSearchName']));
|
|
8034
|
+
}
|
|
8035
|
+
if (angular.isUndefined(ctrl.type)) {
|
|
8036
|
+
// default search functionality
|
|
8037
|
+
SearchHelperService.makeSearch(ctrl.searchQuery, ctrl.dataSet, ctrl.searchKeys, ctrl.isSearchHierarchically, ctrl.ruleType, ctrl.searchStates, ctrl.multiSearchName);
|
|
8200
8038
|
}
|
|
8201
|
-
$timeout(function () {
|
|
8202
|
-
$rootScope.$broadcast('rzSliderForceRender');
|
|
8203
|
-
});
|
|
8204
8039
|
}
|
|
8205
8040
|
|
|
8206
8041
|
/**
|
|
8207
|
-
*
|
|
8042
|
+
* Tracks input changing and initializes search
|
|
8208
8043
|
*/
|
|
8209
|
-
function
|
|
8210
|
-
if (
|
|
8211
|
-
|
|
8212
|
-
ctrl.sliderConfig.value = result.value;
|
|
8213
|
-
ctrl.sliderConfig.valueLabel = result.value;
|
|
8214
|
-
ctrl.sliderConfig.unitLabel = result.label;
|
|
8215
|
-
ctrl.sliderConfig.pow = result.pow;
|
|
8216
|
-
ctrl.selectedItem = lodash.find(defaultMeasureUnits, ['name', ctrl.sliderConfig.unitLabel]);
|
|
8217
|
-
checkIfUnlimited();
|
|
8044
|
+
function onChangeSearchQuery(newValue, oldValue) {
|
|
8045
|
+
if (angular.isDefined(newValue) && newValue !== oldValue) {
|
|
8046
|
+
makeSearch();
|
|
8218
8047
|
}
|
|
8219
8048
|
}
|
|
8220
8049
|
|
|
8221
8050
|
/**
|
|
8222
|
-
*
|
|
8223
|
-
* Set current selected rule to bind data properly.
|
|
8224
|
-
* @param {Object} event - triggering event
|
|
8225
|
-
* @param {Object} data - passed data
|
|
8051
|
+
* Initializes search when all html has been rendered
|
|
8226
8052
|
*/
|
|
8227
|
-
function
|
|
8228
|
-
|
|
8229
|
-
fillRange();
|
|
8053
|
+
function onDataChanged() {
|
|
8054
|
+
$timeout(makeSearch);
|
|
8230
8055
|
}
|
|
8231
8056
|
|
|
8232
8057
|
/**
|
|
8233
|
-
*
|
|
8058
|
+
* Resets search query and initializes search
|
|
8234
8059
|
*/
|
|
8235
|
-
function
|
|
8236
|
-
|
|
8237
|
-
|
|
8060
|
+
function resetSearch() {
|
|
8061
|
+
ctrl.searchQuery = '';
|
|
8062
|
+
$timeout(makeSearch);
|
|
8063
|
+
}
|
|
8064
|
+
}
|
|
8065
|
+
})();
|
|
8066
|
+
"use strict";
|
|
8067
|
+
|
|
8068
|
+
(function () {
|
|
8069
|
+
'use strict';
|
|
8070
|
+
|
|
8071
|
+
igzShowHideSearchItem.$inject = ["lodash"];
|
|
8072
|
+
angular.module('iguazio.dashboard-controls').directive('igzShowHideSearchItem', igzShowHideSearchItem);
|
|
8073
|
+
function igzShowHideSearchItem(lodash) {
|
|
8074
|
+
return {
|
|
8075
|
+
restrict: 'A',
|
|
8076
|
+
scope: {
|
|
8077
|
+
dataItem: '=igzShowHideSearchItem'
|
|
8078
|
+
},
|
|
8079
|
+
link: link
|
|
8080
|
+
};
|
|
8081
|
+
function link(scope, element) {
|
|
8082
|
+
activate();
|
|
8083
|
+
|
|
8084
|
+
//
|
|
8085
|
+
// Private methods
|
|
8086
|
+
//
|
|
8087
|
+
|
|
8088
|
+
/**
|
|
8089
|
+
* Constructor method
|
|
8090
|
+
*/
|
|
8091
|
+
function activate() {
|
|
8092
|
+
scope.$watch('dataItem.ui.isFitQuery', changeVisibility);
|
|
8093
|
+
scope.$watch('dataItem.ui.filters', changeVisibility, true);
|
|
8238
8094
|
}
|
|
8239
|
-
|
|
8240
|
-
|
|
8095
|
+
|
|
8096
|
+
/**
|
|
8097
|
+
* Method sets display property of element to false if it doesn't fit the query in search otherwise removes these property
|
|
8098
|
+
* @param {boolean} newValue - value displays if current element fit search query
|
|
8099
|
+
*/
|
|
8100
|
+
function changeVisibility(newValue) {
|
|
8101
|
+
var displayValue = '';
|
|
8102
|
+
if (lodash.isObject(newValue)) {
|
|
8103
|
+
displayValue = lodash.some(newValue, {
|
|
8104
|
+
isFitQuery: false
|
|
8105
|
+
}) ? 'none' : '';
|
|
8106
|
+
} else {
|
|
8107
|
+
displayValue = newValue === false ? 'none' : '';
|
|
8108
|
+
}
|
|
8109
|
+
element.css('display', displayValue);
|
|
8241
8110
|
}
|
|
8242
8111
|
}
|
|
8243
8112
|
}
|
|
@@ -8720,17 +8589,148 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
8720
8589
|
}
|
|
8721
8590
|
|
|
8722
8591
|
/**
|
|
8723
|
-
* Updates chart on broadcasted event
|
|
8592
|
+
* Updates chart on broadcasted event
|
|
8593
|
+
*/
|
|
8594
|
+
function updateChart() {
|
|
8595
|
+
var reflow = lodash.get(ctrl.entity.ui, ctrl.chartObjName + '.reflow');
|
|
8596
|
+
if (angular.isFunction(reflow)) {
|
|
8597
|
+
ctrl.entity.ui[ctrl.chartObjName].reflow();
|
|
8598
|
+
}
|
|
8599
|
+
}
|
|
8600
|
+
function updateOutOf() {
|
|
8601
|
+
var usableCapacity = ctrl.entity.attr.usable_capacity;
|
|
8602
|
+
ctrl.outOf = lodash.isNil(usableCapacity) ? '-' : $filter('bytes')(usableCapacity, 2);
|
|
8603
|
+
}
|
|
8604
|
+
}
|
|
8605
|
+
})();
|
|
8606
|
+
"use strict";
|
|
8607
|
+
|
|
8608
|
+
(function () {
|
|
8609
|
+
'use strict';
|
|
8610
|
+
|
|
8611
|
+
IgzSliderInputBlockController.$inject = ["$rootScope", "$scope", "$timeout", "lodash", "ConverterService"];
|
|
8612
|
+
angular.module('iguazio.dashboard-controls').component('igzSliderInputBlock', {
|
|
8613
|
+
bindings: {
|
|
8614
|
+
allowFullRange: '<',
|
|
8615
|
+
onChangeCallback: '<',
|
|
8616
|
+
onSliderChanging: '<?',
|
|
8617
|
+
sliderConfig: '<',
|
|
8618
|
+
sliderBlockUpdatingBroadcast: '@',
|
|
8619
|
+
measureUnits: '<?',
|
|
8620
|
+
valueUnit: '<?',
|
|
8621
|
+
updateSliderInput: '@?'
|
|
8622
|
+
},
|
|
8623
|
+
templateUrl: 'igz_controls/components/slider-input-block/slider-input-block.tpl.html',
|
|
8624
|
+
controller: IgzSliderInputBlockController
|
|
8625
|
+
});
|
|
8626
|
+
function IgzSliderInputBlockController($rootScope, $scope, $timeout, lodash, ConverterService) {
|
|
8627
|
+
var ctrl = this;
|
|
8628
|
+
var defaultMeasureUnits = [{
|
|
8629
|
+
pow: 1,
|
|
8630
|
+
name: 'KB/s'
|
|
8631
|
+
}, {
|
|
8632
|
+
pow: 2,
|
|
8633
|
+
name: 'MB/s'
|
|
8634
|
+
}, {
|
|
8635
|
+
pow: 3,
|
|
8636
|
+
name: 'GB/s'
|
|
8637
|
+
}];
|
|
8638
|
+
ctrl.$onInit = onInit;
|
|
8639
|
+
ctrl.changeTrafficUnit = changeTrafficUnit;
|
|
8640
|
+
|
|
8641
|
+
//
|
|
8642
|
+
// Hook methods
|
|
8643
|
+
//
|
|
8644
|
+
|
|
8645
|
+
/**
|
|
8646
|
+
* Initialization method
|
|
8647
|
+
*/
|
|
8648
|
+
function onInit() {
|
|
8649
|
+
// Set default measureUnits if undefined
|
|
8650
|
+
if (angular.isUndefined(ctrl.measureUnits)) {
|
|
8651
|
+
ctrl.measureUnits = defaultMeasureUnits;
|
|
8652
|
+
}
|
|
8653
|
+
$scope.$on(ctrl.sliderBlockUpdatingBroadcast, setData);
|
|
8654
|
+
$timeout(function () {
|
|
8655
|
+
// Bind needed callbacks to configuration objects with updated `ctrl.selectedData` values (for rz-slider library usage)
|
|
8656
|
+
ctrl.sliderConfig.options.onEnd = setValue;
|
|
8657
|
+
ctrl.sliderConfig.options.onChange = checkIfUnlimited;
|
|
8658
|
+
});
|
|
8659
|
+
ctrl.selectedItem = lodash.find(ctrl.measureUnits, ['name', ctrl.sliderConfig.unitLabel]);
|
|
8660
|
+
|
|
8661
|
+
// Update data with values from external scope
|
|
8662
|
+
fillRange();
|
|
8663
|
+
}
|
|
8664
|
+
|
|
8665
|
+
//
|
|
8666
|
+
// Public methods
|
|
8667
|
+
//
|
|
8668
|
+
|
|
8669
|
+
/**
|
|
8670
|
+
* Method changes measurement unit
|
|
8671
|
+
* @param {Object} trafficUnit - selected measurement unit value
|
|
8672
|
+
*/
|
|
8673
|
+
function changeTrafficUnit(trafficUnit) {
|
|
8674
|
+
ctrl.sliderConfig.unitLabel = trafficUnit.name;
|
|
8675
|
+
ctrl.sliderConfig.pow = trafficUnit.pow;
|
|
8676
|
+
setValue();
|
|
8677
|
+
}
|
|
8678
|
+
|
|
8679
|
+
//
|
|
8680
|
+
// Private methods
|
|
8681
|
+
//
|
|
8682
|
+
|
|
8683
|
+
/**
|
|
8684
|
+
* Method checks current value in slider. If it's maximum available then 'U/L'(unlimited) sets in label which displays data.
|
|
8685
|
+
* If it's not maximum - label sets with new value.
|
|
8686
|
+
* Calls onSliderChanging method if it was defined
|
|
8687
|
+
*/
|
|
8688
|
+
function checkIfUnlimited() {
|
|
8689
|
+
ctrl.sliderConfig.valueLabel = ctrl.sliderConfig.value === ctrl.sliderConfig.options.ceil && !ctrl.allowFullRange ? 'U/L' : ctrl.sliderConfig.value;
|
|
8690
|
+
if (angular.isFunction(ctrl.onSliderChanging) && ctrl.sliderConfig.value !== ctrl.sliderConfig.options.ceil) {
|
|
8691
|
+
ctrl.onSliderChanging(ctrl.sliderConfig.value, ctrl.updateSliderInput);
|
|
8692
|
+
}
|
|
8693
|
+
$timeout(function () {
|
|
8694
|
+
$rootScope.$broadcast('rzSliderForceRender');
|
|
8695
|
+
});
|
|
8696
|
+
}
|
|
8697
|
+
|
|
8698
|
+
/**
|
|
8699
|
+
* Update slider data with values from external scope
|
|
8700
|
+
*/
|
|
8701
|
+
function fillRange() {
|
|
8702
|
+
if (ctrl.selectedData) {
|
|
8703
|
+
var result = ConverterService.getConvertedBytes(ctrl.selectedData[ctrl.sliderConfig.options.id]);
|
|
8704
|
+
ctrl.sliderConfig.value = result.value;
|
|
8705
|
+
ctrl.sliderConfig.valueLabel = result.value;
|
|
8706
|
+
ctrl.sliderConfig.unitLabel = result.label;
|
|
8707
|
+
ctrl.sliderConfig.pow = result.pow;
|
|
8708
|
+
ctrl.selectedItem = lodash.find(defaultMeasureUnits, ['name', ctrl.sliderConfig.unitLabel]);
|
|
8709
|
+
checkIfUnlimited();
|
|
8710
|
+
}
|
|
8711
|
+
}
|
|
8712
|
+
|
|
8713
|
+
/**
|
|
8714
|
+
* Set slider data with a value passed through broadcast.
|
|
8715
|
+
* Set current selected rule to bind data properly.
|
|
8716
|
+
* @param {Object} event - triggering event
|
|
8717
|
+
* @param {Object} data - passed data
|
|
8724
8718
|
*/
|
|
8725
|
-
function
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
ctrl.entity.ui[ctrl.chartObjName].reflow();
|
|
8729
|
-
}
|
|
8719
|
+
function setData(event, data) {
|
|
8720
|
+
ctrl.selectedData = data.item.attr;
|
|
8721
|
+
fillRange();
|
|
8730
8722
|
}
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8723
|
+
|
|
8724
|
+
/**
|
|
8725
|
+
* Method sets new value in bytes
|
|
8726
|
+
*/
|
|
8727
|
+
function setValue() {
|
|
8728
|
+
if (!lodash.isNil(ctrl.onChangeCallback)) {
|
|
8729
|
+
ctrl.onChangeCallback(ctrl.sliderConfig.value === ctrl.sliderConfig.options.ceil ? null : ctrl.sliderConfig.value * Math.pow(1024, ctrl.sliderConfig.pow), ctrl.updateSliderInput);
|
|
8730
|
+
}
|
|
8731
|
+
if (!lodash.isNil(ctrl.selectedData)) {
|
|
8732
|
+
ctrl.selectedData[ctrl.sliderConfig.options.id] = ctrl.sliderConfig.value === ctrl.sliderConfig.options.ceil ? 0 : ctrl.sliderConfig.value * Math.pow(1024, ctrl.sliderConfig.pow);
|
|
8733
|
+
}
|
|
8734
8734
|
}
|
|
8735
8735
|
}
|
|
8736
8736
|
})();
|
|
@@ -9821,119 +9821,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
9821
9821
|
})();
|
|
9822
9822
|
"use strict";
|
|
9823
9823
|
|
|
9824
|
-
(function () {
|
|
9825
|
-
'use strict';
|
|
9826
|
-
|
|
9827
|
-
IgzInfoPageContentController.$inject = ["$scope", "$timeout", "$window", "$element"];
|
|
9828
|
-
angular.module('iguazio.dashboard-controls').component('igzInfoPageContent', {
|
|
9829
|
-
bindings: {
|
|
9830
|
-
scrolled: '<',
|
|
9831
|
-
watchId: '@?'
|
|
9832
|
-
},
|
|
9833
|
-
templateUrl: 'igz_controls/components/info-page/info-page-content/info-page-content.tpl.html',
|
|
9834
|
-
transclude: true,
|
|
9835
|
-
controller: IgzInfoPageContentController
|
|
9836
|
-
});
|
|
9837
|
-
function IgzInfoPageContentController($scope, $timeout, $window, $element) {
|
|
9838
|
-
var ctrl = this;
|
|
9839
|
-
ctrl.isFiltersShowed = false;
|
|
9840
|
-
ctrl.isInfoPaneShowed = false;
|
|
9841
|
-
|
|
9842
|
-
// Config for horizontal scrollbar on containers view
|
|
9843
|
-
ctrl.scrollConfigHorizontal = {
|
|
9844
|
-
axis: 'x',
|
|
9845
|
-
scrollInertia: 0
|
|
9846
|
-
};
|
|
9847
|
-
ctrl.$onInit = onInit;
|
|
9848
|
-
ctrl.$postLink = postLink;
|
|
9849
|
-
|
|
9850
|
-
//
|
|
9851
|
-
// Hook methods
|
|
9852
|
-
//
|
|
9853
|
-
|
|
9854
|
-
/**
|
|
9855
|
-
* Init method
|
|
9856
|
-
*/
|
|
9857
|
-
function onInit() {
|
|
9858
|
-
var watchId = angular.isDefined(ctrl.watchId) ? '-' + ctrl.watchId : '';
|
|
9859
|
-
$scope.$on('info-page-upper-pane_toggle-start' + watchId, onUpperPaneToggleStart);
|
|
9860
|
-
$scope.$on('info-page-filters_toggle-start' + watchId, onFiltersPaneToggleStart);
|
|
9861
|
-
$scope.$on('info-page-pane_toggle-start' + watchId, onInfoPaneToggleStart);
|
|
9862
|
-
$scope.$on('info-page-pane_toggled', dispatchResize);
|
|
9863
|
-
}
|
|
9864
|
-
|
|
9865
|
-
/**
|
|
9866
|
-
* Post linking method
|
|
9867
|
-
*/
|
|
9868
|
-
function postLink() {
|
|
9869
|
-
$timeout(function () {
|
|
9870
|
-
manageHorizontalScroll();
|
|
9871
|
-
$scope.$on('info-page-filters_toggled', manageHorizontalScroll);
|
|
9872
|
-
$scope.$on('info-page-pane_toggled', manageHorizontalScroll);
|
|
9873
|
-
$scope.$on('igzWatchWindowResize::resize', manageHorizontalScroll);
|
|
9874
|
-
});
|
|
9875
|
-
}
|
|
9876
|
-
|
|
9877
|
-
//
|
|
9878
|
-
// Private methods
|
|
9879
|
-
//
|
|
9880
|
-
|
|
9881
|
-
/**
|
|
9882
|
-
* Manages x-scrollbar behavior
|
|
9883
|
-
* Needed to get rid of accidental wrong content width calculations made by 'ng-scrollbars' library
|
|
9884
|
-
* We just control x-scrollbar with lib's native enable/disable methods
|
|
9885
|
-
*/
|
|
9886
|
-
function manageHorizontalScroll() {
|
|
9887
|
-
var $scrollXContainer = $element.find('.igz-scrollable-container.horizontal').first();
|
|
9888
|
-
var contentWrapperWidth = $element.find('.igz-info-page-content-wrapper').first().width();
|
|
9889
|
-
var contentMinWidth = parseInt($element.find('.igz-info-page-content').css('min-width'));
|
|
9890
|
-
if ($scrollXContainer.length && contentWrapperWidth < (contentMinWidth || 946)) {
|
|
9891
|
-
$scrollXContainer.mCustomScrollbar('update');
|
|
9892
|
-
} else if ($scrollXContainer.length) {
|
|
9893
|
-
$scrollXContainer.mCustomScrollbar('disable', true);
|
|
9894
|
-
$element.find('.mCSB_container').first().width('100%');
|
|
9895
|
-
}
|
|
9896
|
-
}
|
|
9897
|
-
|
|
9898
|
-
/**
|
|
9899
|
-
* Upper pane toggle start $broadcast listener
|
|
9900
|
-
* @param {Object} e - broadcast event
|
|
9901
|
-
* @param {boolean} isShown - represents upper pane state
|
|
9902
|
-
*/
|
|
9903
|
-
function onUpperPaneToggleStart(e, isShown) {
|
|
9904
|
-
ctrl.isUpperPaneShowed = isShown;
|
|
9905
|
-
}
|
|
9906
|
-
|
|
9907
|
-
/**
|
|
9908
|
-
* Filters pane toggle start $broadcast listener
|
|
9909
|
-
* @param {Object} e - broadcast event
|
|
9910
|
-
* @param {boolean} isShown - represents filters pane state
|
|
9911
|
-
*/
|
|
9912
|
-
function onFiltersPaneToggleStart(e, isShown) {
|
|
9913
|
-
ctrl.isFiltersShowed = isShown;
|
|
9914
|
-
}
|
|
9915
|
-
|
|
9916
|
-
/**
|
|
9917
|
-
* Info pane toggle start $broadcast listener
|
|
9918
|
-
* @param {Object} e - broadcast event
|
|
9919
|
-
* @param {boolean} isShown - represents info pane state
|
|
9920
|
-
*/
|
|
9921
|
-
function onInfoPaneToggleStart(e, isShown) {
|
|
9922
|
-
ctrl.isInfoPaneShowed = isShown;
|
|
9923
|
-
}
|
|
9924
|
-
|
|
9925
|
-
/**
|
|
9926
|
-
* Updates Ui-Layout library's containers size
|
|
9927
|
-
*/
|
|
9928
|
-
function dispatchResize() {
|
|
9929
|
-
$timeout(function () {
|
|
9930
|
-
$window.dispatchEvent(new Event('resize'));
|
|
9931
|
-
}, 0);
|
|
9932
|
-
}
|
|
9933
|
-
}
|
|
9934
|
-
})();
|
|
9935
|
-
"use strict";
|
|
9936
|
-
|
|
9937
9824
|
(function () {
|
|
9938
9825
|
'use strict';
|
|
9939
9826
|
|
|
@@ -10098,19 +9985,132 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
10098
9985
|
(function () {
|
|
10099
9986
|
'use strict';
|
|
10100
9987
|
|
|
10101
|
-
InfoPageFiltersService.$inject = ["$rootScope"];
|
|
10102
|
-
angular.module('iguazio.dashboard-controls').factory('InfoPageFiltersService', InfoPageFiltersService);
|
|
10103
|
-
function InfoPageFiltersService($rootScope) {
|
|
10104
|
-
return {
|
|
10105
|
-
changeBadge: changeBadge
|
|
10106
|
-
};
|
|
9988
|
+
InfoPageFiltersService.$inject = ["$rootScope"];
|
|
9989
|
+
angular.module('iguazio.dashboard-controls').factory('InfoPageFiltersService', InfoPageFiltersService);
|
|
9990
|
+
function InfoPageFiltersService($rootScope) {
|
|
9991
|
+
return {
|
|
9992
|
+
changeBadge: changeBadge
|
|
9993
|
+
};
|
|
9994
|
+
|
|
9995
|
+
/**
|
|
9996
|
+
* Changes a quantity of applied filters on the badge of filters pane
|
|
9997
|
+
* @param {number} delta
|
|
9998
|
+
*/
|
|
9999
|
+
function changeBadge(delta) {
|
|
10000
|
+
$rootScope.$broadcast('info-page-filters_change-badge', delta);
|
|
10001
|
+
}
|
|
10002
|
+
}
|
|
10003
|
+
})();
|
|
10004
|
+
"use strict";
|
|
10005
|
+
|
|
10006
|
+
(function () {
|
|
10007
|
+
'use strict';
|
|
10008
|
+
|
|
10009
|
+
IgzInfoPageContentController.$inject = ["$scope", "$timeout", "$window", "$element"];
|
|
10010
|
+
angular.module('iguazio.dashboard-controls').component('igzInfoPageContent', {
|
|
10011
|
+
bindings: {
|
|
10012
|
+
scrolled: '<',
|
|
10013
|
+
watchId: '@?'
|
|
10014
|
+
},
|
|
10015
|
+
templateUrl: 'igz_controls/components/info-page/info-page-content/info-page-content.tpl.html',
|
|
10016
|
+
transclude: true,
|
|
10017
|
+
controller: IgzInfoPageContentController
|
|
10018
|
+
});
|
|
10019
|
+
function IgzInfoPageContentController($scope, $timeout, $window, $element) {
|
|
10020
|
+
var ctrl = this;
|
|
10021
|
+
ctrl.isFiltersShowed = false;
|
|
10022
|
+
ctrl.isInfoPaneShowed = false;
|
|
10023
|
+
|
|
10024
|
+
// Config for horizontal scrollbar on containers view
|
|
10025
|
+
ctrl.scrollConfigHorizontal = {
|
|
10026
|
+
axis: 'x',
|
|
10027
|
+
scrollInertia: 0
|
|
10028
|
+
};
|
|
10029
|
+
ctrl.$onInit = onInit;
|
|
10030
|
+
ctrl.$postLink = postLink;
|
|
10031
|
+
|
|
10032
|
+
//
|
|
10033
|
+
// Hook methods
|
|
10034
|
+
//
|
|
10035
|
+
|
|
10036
|
+
/**
|
|
10037
|
+
* Init method
|
|
10038
|
+
*/
|
|
10039
|
+
function onInit() {
|
|
10040
|
+
var watchId = angular.isDefined(ctrl.watchId) ? '-' + ctrl.watchId : '';
|
|
10041
|
+
$scope.$on('info-page-upper-pane_toggle-start' + watchId, onUpperPaneToggleStart);
|
|
10042
|
+
$scope.$on('info-page-filters_toggle-start' + watchId, onFiltersPaneToggleStart);
|
|
10043
|
+
$scope.$on('info-page-pane_toggle-start' + watchId, onInfoPaneToggleStart);
|
|
10044
|
+
$scope.$on('info-page-pane_toggled', dispatchResize);
|
|
10045
|
+
}
|
|
10046
|
+
|
|
10047
|
+
/**
|
|
10048
|
+
* Post linking method
|
|
10049
|
+
*/
|
|
10050
|
+
function postLink() {
|
|
10051
|
+
$timeout(function () {
|
|
10052
|
+
manageHorizontalScroll();
|
|
10053
|
+
$scope.$on('info-page-filters_toggled', manageHorizontalScroll);
|
|
10054
|
+
$scope.$on('info-page-pane_toggled', manageHorizontalScroll);
|
|
10055
|
+
$scope.$on('igzWatchWindowResize::resize', manageHorizontalScroll);
|
|
10056
|
+
});
|
|
10057
|
+
}
|
|
10058
|
+
|
|
10059
|
+
//
|
|
10060
|
+
// Private methods
|
|
10061
|
+
//
|
|
10062
|
+
|
|
10063
|
+
/**
|
|
10064
|
+
* Manages x-scrollbar behavior
|
|
10065
|
+
* Needed to get rid of accidental wrong content width calculations made by 'ng-scrollbars' library
|
|
10066
|
+
* We just control x-scrollbar with lib's native enable/disable methods
|
|
10067
|
+
*/
|
|
10068
|
+
function manageHorizontalScroll() {
|
|
10069
|
+
var $scrollXContainer = $element.find('.igz-scrollable-container.horizontal').first();
|
|
10070
|
+
var contentWrapperWidth = $element.find('.igz-info-page-content-wrapper').first().width();
|
|
10071
|
+
var contentMinWidth = parseInt($element.find('.igz-info-page-content').css('min-width'));
|
|
10072
|
+
if ($scrollXContainer.length && contentWrapperWidth < (contentMinWidth || 946)) {
|
|
10073
|
+
$scrollXContainer.mCustomScrollbar('update');
|
|
10074
|
+
} else if ($scrollXContainer.length) {
|
|
10075
|
+
$scrollXContainer.mCustomScrollbar('disable', true);
|
|
10076
|
+
$element.find('.mCSB_container').first().width('100%');
|
|
10077
|
+
}
|
|
10078
|
+
}
|
|
10079
|
+
|
|
10080
|
+
/**
|
|
10081
|
+
* Upper pane toggle start $broadcast listener
|
|
10082
|
+
* @param {Object} e - broadcast event
|
|
10083
|
+
* @param {boolean} isShown - represents upper pane state
|
|
10084
|
+
*/
|
|
10085
|
+
function onUpperPaneToggleStart(e, isShown) {
|
|
10086
|
+
ctrl.isUpperPaneShowed = isShown;
|
|
10087
|
+
}
|
|
10088
|
+
|
|
10089
|
+
/**
|
|
10090
|
+
* Filters pane toggle start $broadcast listener
|
|
10091
|
+
* @param {Object} e - broadcast event
|
|
10092
|
+
* @param {boolean} isShown - represents filters pane state
|
|
10093
|
+
*/
|
|
10094
|
+
function onFiltersPaneToggleStart(e, isShown) {
|
|
10095
|
+
ctrl.isFiltersShowed = isShown;
|
|
10096
|
+
}
|
|
10097
|
+
|
|
10098
|
+
/**
|
|
10099
|
+
* Info pane toggle start $broadcast listener
|
|
10100
|
+
* @param {Object} e - broadcast event
|
|
10101
|
+
* @param {boolean} isShown - represents info pane state
|
|
10102
|
+
*/
|
|
10103
|
+
function onInfoPaneToggleStart(e, isShown) {
|
|
10104
|
+
ctrl.isInfoPaneShowed = isShown;
|
|
10105
|
+
}
|
|
10107
10106
|
|
|
10108
10107
|
/**
|
|
10109
|
-
*
|
|
10110
|
-
* @param {number} delta
|
|
10108
|
+
* Updates Ui-Layout library's containers size
|
|
10111
10109
|
*/
|
|
10112
|
-
function
|
|
10113
|
-
$
|
|
10110
|
+
function dispatchResize() {
|
|
10111
|
+
$timeout(function () {
|
|
10112
|
+
$window.dispatchEvent(new Event('resize'));
|
|
10113
|
+
}, 0);
|
|
10114
10114
|
}
|
|
10115
10115
|
}
|
|
10116
10116
|
})();
|
|
@@ -11505,6 +11505,39 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
11505
11505
|
})();
|
|
11506
11506
|
"use strict";
|
|
11507
11507
|
|
|
11508
|
+
(function () {
|
|
11509
|
+
'use strict';
|
|
11510
|
+
|
|
11511
|
+
NclVersionConfigurationLoggingController.$inject = ["lodash"];
|
|
11512
|
+
angular.module('iguazio.dashboard-controls').component('nclVersionConfigurationLogging', {
|
|
11513
|
+
bindings: {
|
|
11514
|
+
version: '<',
|
|
11515
|
+
onChangeCallback: '<'
|
|
11516
|
+
},
|
|
11517
|
+
templateUrl: 'nuclio/functions/version/version-configuration/tabs/version-configuration-logging/version-configuration-logging.tpl.html',
|
|
11518
|
+
controller: NclVersionConfigurationLoggingController
|
|
11519
|
+
});
|
|
11520
|
+
function NclVersionConfigurationLoggingController(lodash) {
|
|
11521
|
+
var ctrl = this;
|
|
11522
|
+
ctrl.inputValueCallback = inputValueCallback;
|
|
11523
|
+
|
|
11524
|
+
//
|
|
11525
|
+
// Public methods
|
|
11526
|
+
//
|
|
11527
|
+
|
|
11528
|
+
/**
|
|
11529
|
+
* Update data callback
|
|
11530
|
+
* @param {string} newData
|
|
11531
|
+
* @param {string} field
|
|
11532
|
+
*/
|
|
11533
|
+
function inputValueCallback(newData, field) {
|
|
11534
|
+
lodash.set(ctrl.version, field, newData);
|
|
11535
|
+
ctrl.onChangeCallback();
|
|
11536
|
+
}
|
|
11537
|
+
}
|
|
11538
|
+
})();
|
|
11539
|
+
"use strict";
|
|
11540
|
+
|
|
11508
11541
|
/* eslint max-statements: ["error", 80] */
|
|
11509
11542
|
(function () {
|
|
11510
11543
|
'use strict';
|
|
@@ -12536,39 +12569,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
12536
12569
|
})();
|
|
12537
12570
|
"use strict";
|
|
12538
12571
|
|
|
12539
|
-
(function () {
|
|
12540
|
-
'use strict';
|
|
12541
|
-
|
|
12542
|
-
NclVersionConfigurationLoggingController.$inject = ["lodash"];
|
|
12543
|
-
angular.module('iguazio.dashboard-controls').component('nclVersionConfigurationLogging', {
|
|
12544
|
-
bindings: {
|
|
12545
|
-
version: '<',
|
|
12546
|
-
onChangeCallback: '<'
|
|
12547
|
-
},
|
|
12548
|
-
templateUrl: 'nuclio/functions/version/version-configuration/tabs/version-configuration-logging/version-configuration-logging.tpl.html',
|
|
12549
|
-
controller: NclVersionConfigurationLoggingController
|
|
12550
|
-
});
|
|
12551
|
-
function NclVersionConfigurationLoggingController(lodash) {
|
|
12552
|
-
var ctrl = this;
|
|
12553
|
-
ctrl.inputValueCallback = inputValueCallback;
|
|
12554
|
-
|
|
12555
|
-
//
|
|
12556
|
-
// Public methods
|
|
12557
|
-
//
|
|
12558
|
-
|
|
12559
|
-
/**
|
|
12560
|
-
* Update data callback
|
|
12561
|
-
* @param {string} newData
|
|
12562
|
-
* @param {string} field
|
|
12563
|
-
*/
|
|
12564
|
-
function inputValueCallback(newData, field) {
|
|
12565
|
-
lodash.set(ctrl.version, field, newData);
|
|
12566
|
-
ctrl.onChangeCallback();
|
|
12567
|
-
}
|
|
12568
|
-
}
|
|
12569
|
-
})();
|
|
12570
|
-
"use strict";
|
|
12571
|
-
|
|
12572
12572
|
(function () {
|
|
12573
12573
|
'use strict';
|
|
12574
12574
|
|
|
@@ -15967,6 +15967,59 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
15967
15967
|
})();
|
|
15968
15968
|
"use strict";
|
|
15969
15969
|
|
|
15970
|
+
(function () {
|
|
15971
|
+
'use strict';
|
|
15972
|
+
|
|
15973
|
+
DeployDeletedFunctionDialogController.$inject = ["$state", "$rootScope", "EventHelperService"];
|
|
15974
|
+
angular.module('iguazio.dashboard-controls').component('nclDeployDeletedFunctionDialog', {
|
|
15975
|
+
bindings: {
|
|
15976
|
+
closeDialog: '&',
|
|
15977
|
+
deploy: '&',
|
|
15978
|
+
version: '<'
|
|
15979
|
+
},
|
|
15980
|
+
templateUrl: 'nuclio/functions/deploy-deleted-function-dialog/deploy-deleted-function-dialog.tpl.html',
|
|
15981
|
+
controller: DeployDeletedFunctionDialogController
|
|
15982
|
+
});
|
|
15983
|
+
function DeployDeletedFunctionDialogController($state, $rootScope, EventHelperService) {
|
|
15984
|
+
var ctrl = this;
|
|
15985
|
+
ctrl.deployFunction = deployFunction;
|
|
15986
|
+
ctrl.goToFunctions = goToFunctions;
|
|
15987
|
+
ctrl.onClose = onClose;
|
|
15988
|
+
|
|
15989
|
+
//
|
|
15990
|
+
// Public methods
|
|
15991
|
+
//
|
|
15992
|
+
|
|
15993
|
+
/**
|
|
15994
|
+
* Closes dialog
|
|
15995
|
+
* @param {Event} [event]
|
|
15996
|
+
*/
|
|
15997
|
+
function onClose(event) {
|
|
15998
|
+
if (angular.isUndefined(event) || event.keyCode === EventHelperService.ENTER) {
|
|
15999
|
+
ctrl.closeDialog();
|
|
16000
|
+
}
|
|
16001
|
+
}
|
|
16002
|
+
|
|
16003
|
+
/**
|
|
16004
|
+
* Redirect to functions panel
|
|
16005
|
+
*/
|
|
16006
|
+
function goToFunctions() {
|
|
16007
|
+
$state.go('app.project.functions');
|
|
16008
|
+
ctrl.closeDialog();
|
|
16009
|
+
}
|
|
16010
|
+
|
|
16011
|
+
/**
|
|
16012
|
+
* Deploy function
|
|
16013
|
+
* @param {Event} [event]
|
|
16014
|
+
*/
|
|
16015
|
+
function deployFunction(event) {
|
|
16016
|
+
ctrl.deploy(event, ctrl.version);
|
|
16017
|
+
ctrl.closeDialog();
|
|
16018
|
+
}
|
|
16019
|
+
}
|
|
16020
|
+
})();
|
|
16021
|
+
"use strict";
|
|
16022
|
+
|
|
15970
16023
|
/* eslint-disable */
|
|
15971
16024
|
|
|
15972
16025
|
(function () {
|
|
@@ -16422,59 +16475,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
16422
16475
|
})();
|
|
16423
16476
|
"use strict";
|
|
16424
16477
|
|
|
16425
|
-
(function () {
|
|
16426
|
-
'use strict';
|
|
16427
|
-
|
|
16428
|
-
DeployDeletedFunctionDialogController.$inject = ["$state", "$rootScope", "EventHelperService"];
|
|
16429
|
-
angular.module('iguazio.dashboard-controls').component('nclDeployDeletedFunctionDialog', {
|
|
16430
|
-
bindings: {
|
|
16431
|
-
closeDialog: '&',
|
|
16432
|
-
deploy: '&',
|
|
16433
|
-
version: '<'
|
|
16434
|
-
},
|
|
16435
|
-
templateUrl: 'nuclio/functions/deploy-deleted-function-dialog/deploy-deleted-function-dialog.tpl.html',
|
|
16436
|
-
controller: DeployDeletedFunctionDialogController
|
|
16437
|
-
});
|
|
16438
|
-
function DeployDeletedFunctionDialogController($state, $rootScope, EventHelperService) {
|
|
16439
|
-
var ctrl = this;
|
|
16440
|
-
ctrl.deployFunction = deployFunction;
|
|
16441
|
-
ctrl.goToFunctions = goToFunctions;
|
|
16442
|
-
ctrl.onClose = onClose;
|
|
16443
|
-
|
|
16444
|
-
//
|
|
16445
|
-
// Public methods
|
|
16446
|
-
//
|
|
16447
|
-
|
|
16448
|
-
/**
|
|
16449
|
-
* Closes dialog
|
|
16450
|
-
* @param {Event} [event]
|
|
16451
|
-
*/
|
|
16452
|
-
function onClose(event) {
|
|
16453
|
-
if (angular.isUndefined(event) || event.keyCode === EventHelperService.ENTER) {
|
|
16454
|
-
ctrl.closeDialog();
|
|
16455
|
-
}
|
|
16456
|
-
}
|
|
16457
|
-
|
|
16458
|
-
/**
|
|
16459
|
-
* Redirect to functions panel
|
|
16460
|
-
*/
|
|
16461
|
-
function goToFunctions() {
|
|
16462
|
-
$state.go('app.project.functions');
|
|
16463
|
-
ctrl.closeDialog();
|
|
16464
|
-
}
|
|
16465
|
-
|
|
16466
|
-
/**
|
|
16467
|
-
* Deploy function
|
|
16468
|
-
* @param {Event} [event]
|
|
16469
|
-
*/
|
|
16470
|
-
function deployFunction(event) {
|
|
16471
|
-
ctrl.deploy(event, ctrl.version);
|
|
16472
|
-
ctrl.closeDialog();
|
|
16473
|
-
}
|
|
16474
|
-
}
|
|
16475
|
-
})();
|
|
16476
|
-
"use strict";
|
|
16477
|
-
|
|
16478
16478
|
(function () {
|
|
16479
16479
|
'use strict';
|
|
16480
16480
|
|
|
@@ -19333,38 +19333,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
19333
19333
|
})();
|
|
19334
19334
|
"use strict";
|
|
19335
19335
|
|
|
19336
|
-
(function () {
|
|
19337
|
-
'use strict';
|
|
19338
|
-
|
|
19339
|
-
NclFunctionConfigDialogController.$inject = ["ExportService", "MaskService"];
|
|
19340
|
-
angular.module('iguazio.dashboard-controls').component('nclFunctionConfigDialog', {
|
|
19341
|
-
bindings: {
|
|
19342
|
-
closeDialog: '&',
|
|
19343
|
-
function: '<'
|
|
19344
|
-
},
|
|
19345
|
-
templateUrl: 'nuclio/common/components/function-config-dialog/function-config-dialog.tpl.html',
|
|
19346
|
-
controller: NclFunctionConfigDialogController
|
|
19347
|
-
});
|
|
19348
|
-
function NclFunctionConfigDialogController(ExportService, MaskService) {
|
|
19349
|
-
var ctrl = this;
|
|
19350
|
-
ctrl.$onInit = onInit;
|
|
19351
|
-
|
|
19352
|
-
//
|
|
19353
|
-
// Hook methods
|
|
19354
|
-
//
|
|
19355
|
-
|
|
19356
|
-
/**
|
|
19357
|
-
* Initialization method
|
|
19358
|
-
*/
|
|
19359
|
-
function onInit() {
|
|
19360
|
-
var functionWithMask = MaskService.getObjectWithMask(ctrl.function);
|
|
19361
|
-
ctrl.title = ctrl.function.metadata.name + ' - configuration';
|
|
19362
|
-
ctrl.sourceCode = ExportService.getFunctionConfig(functionWithMask);
|
|
19363
|
-
}
|
|
19364
|
-
}
|
|
19365
|
-
})();
|
|
19366
|
-
"use strict";
|
|
19367
|
-
|
|
19368
19336
|
(function () {
|
|
19369
19337
|
'use strict';
|
|
19370
19338
|
|
|
@@ -19795,6 +19763,38 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
19795
19763
|
})();
|
|
19796
19764
|
"use strict";
|
|
19797
19765
|
|
|
19766
|
+
(function () {
|
|
19767
|
+
'use strict';
|
|
19768
|
+
|
|
19769
|
+
NclFunctionConfigDialogController.$inject = ["ExportService", "MaskService"];
|
|
19770
|
+
angular.module('iguazio.dashboard-controls').component('nclFunctionConfigDialog', {
|
|
19771
|
+
bindings: {
|
|
19772
|
+
closeDialog: '&',
|
|
19773
|
+
function: '<'
|
|
19774
|
+
},
|
|
19775
|
+
templateUrl: 'nuclio/common/components/function-config-dialog/function-config-dialog.tpl.html',
|
|
19776
|
+
controller: NclFunctionConfigDialogController
|
|
19777
|
+
});
|
|
19778
|
+
function NclFunctionConfigDialogController(ExportService, MaskService) {
|
|
19779
|
+
var ctrl = this;
|
|
19780
|
+
ctrl.$onInit = onInit;
|
|
19781
|
+
|
|
19782
|
+
//
|
|
19783
|
+
// Hook methods
|
|
19784
|
+
//
|
|
19785
|
+
|
|
19786
|
+
/**
|
|
19787
|
+
* Initialization method
|
|
19788
|
+
*/
|
|
19789
|
+
function onInit() {
|
|
19790
|
+
var functionWithMask = MaskService.getObjectWithMask(ctrl.function);
|
|
19791
|
+
ctrl.title = ctrl.function.metadata.name + ' - configuration';
|
|
19792
|
+
ctrl.sourceCode = ExportService.getFunctionConfig(functionWithMask);
|
|
19793
|
+
}
|
|
19794
|
+
}
|
|
19795
|
+
})();
|
|
19796
|
+
"use strict";
|
|
19797
|
+
|
|
19798
19798
|
(function () {
|
|
19799
19799
|
'use strict';
|
|
19800
19800
|
|
|
@@ -20537,29 +20537,281 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
20537
20537
|
}
|
|
20538
20538
|
|
|
20539
20539
|
/**
|
|
20540
|
-
* Opens `Edit project` dialog
|
|
20540
|
+
* Opens `Edit project` dialog
|
|
20541
|
+
*/
|
|
20542
|
+
function editVersion() {
|
|
20543
|
+
$state.go('app.project.function.edit.code', {
|
|
20544
|
+
projectId: ctrl.project.metadata.name,
|
|
20545
|
+
functionId: ctrl.function.metadata.name,
|
|
20546
|
+
projectNamespace: ctrl.project.metadata.namespace
|
|
20547
|
+
});
|
|
20548
|
+
}
|
|
20549
|
+
|
|
20550
|
+
/**
|
|
20551
|
+
* Initializes version actions
|
|
20552
|
+
*/
|
|
20553
|
+
function initVersionActions() {
|
|
20554
|
+
ctrl.versionActions = angular.copy(FunctionsService.initVersionActions());
|
|
20555
|
+
var deleteAction = lodash.find(ctrl.versionActions, {
|
|
20556
|
+
id: 'delete'
|
|
20557
|
+
});
|
|
20558
|
+
if (!lodash.isNil(deleteAction)) {
|
|
20559
|
+
deleteAction.confirm.message = $i18next.t('functions:DELETE_VERSION', {
|
|
20560
|
+
lng: lng
|
|
20561
|
+
}) + ' “' + ctrl.version.name + '”?';
|
|
20562
|
+
}
|
|
20563
|
+
}
|
|
20564
|
+
}
|
|
20565
|
+
})();
|
|
20566
|
+
"use strict";
|
|
20567
|
+
|
|
20568
|
+
(function () {
|
|
20569
|
+
'use strict';
|
|
20570
|
+
|
|
20571
|
+
NclFunctionEventDialogController.$inject = ["$timeout", "$i18next", "i18next", "lodash", "EventHelperService"];
|
|
20572
|
+
angular.module('iguazio.dashboard-controls').component('nclFunctionEventDialog', {
|
|
20573
|
+
bindings: {
|
|
20574
|
+
closeDialog: '&',
|
|
20575
|
+
createEvent: '<',
|
|
20576
|
+
selectedEvent: '<',
|
|
20577
|
+
version: '<',
|
|
20578
|
+
createFunctionEvent: '&'
|
|
20579
|
+
},
|
|
20580
|
+
templateUrl: 'nuclio/functions/version/function-event-dialog/function-event-dialog.tpl.html',
|
|
20581
|
+
controller: NclFunctionEventDialogController
|
|
20582
|
+
});
|
|
20583
|
+
function NclFunctionEventDialogController($timeout, $i18next, i18next, lodash, EventHelperService) {
|
|
20584
|
+
var ctrl = this;
|
|
20585
|
+
var lng = i18next.language;
|
|
20586
|
+
ctrl.inputModelOptions = {
|
|
20587
|
+
debounce: {
|
|
20588
|
+
'default': 0
|
|
20589
|
+
}
|
|
20590
|
+
};
|
|
20591
|
+
ctrl.buttonText = $i18next.t('common:CREATE', {
|
|
20592
|
+
lng: lng
|
|
20593
|
+
});
|
|
20594
|
+
ctrl.errorText = $i18next.t('functions:ERROR_MSG.CREATE_FUNCTION_EVENT', {
|
|
20595
|
+
lng: lng
|
|
20596
|
+
});
|
|
20597
|
+
ctrl.titleText = $i18next.t('functions:CREATE_FUNCTION_EVENT', {
|
|
20598
|
+
lng: lng
|
|
20599
|
+
});
|
|
20600
|
+
ctrl.contentType = 'application/json';
|
|
20601
|
+
ctrl.bodyTheme = 'vs-light';
|
|
20602
|
+
ctrl.isLoadingState = false;
|
|
20603
|
+
ctrl.isDeployFailed = false;
|
|
20604
|
+
ctrl.isFormChanged = false;
|
|
20605
|
+
ctrl.methods = [{
|
|
20606
|
+
id: 'POST',
|
|
20607
|
+
visible: true,
|
|
20608
|
+
name: 'POST'
|
|
20609
|
+
}, {
|
|
20610
|
+
id: 'GET',
|
|
20611
|
+
visible: true,
|
|
20612
|
+
name: 'GET'
|
|
20613
|
+
}, {
|
|
20614
|
+
id: 'PUT',
|
|
20615
|
+
visible: true,
|
|
20616
|
+
name: 'PUT'
|
|
20617
|
+
}, {
|
|
20618
|
+
id: 'PATCH',
|
|
20619
|
+
visible: true,
|
|
20620
|
+
name: 'PATCH'
|
|
20621
|
+
}, {
|
|
20622
|
+
id: 'DELETE',
|
|
20623
|
+
visible: true,
|
|
20624
|
+
name: 'DELETE'
|
|
20625
|
+
}];
|
|
20626
|
+
ctrl.headers = [{
|
|
20627
|
+
id: 'application/json',
|
|
20628
|
+
visible: true,
|
|
20629
|
+
name: 'JSON'
|
|
20630
|
+
}, {
|
|
20631
|
+
id: 'text/plain',
|
|
20632
|
+
visible: true,
|
|
20633
|
+
name: 'Plain text'
|
|
20634
|
+
}];
|
|
20635
|
+
ctrl.selectedMethod = null;
|
|
20636
|
+
ctrl.selectedHeader = null;
|
|
20637
|
+
ctrl.workingCopy = null;
|
|
20638
|
+
ctrl.$onInit = onInit;
|
|
20639
|
+
ctrl.applyChanges = applyChanges;
|
|
20640
|
+
ctrl.closeEventDialog = closeEventDialog;
|
|
20641
|
+
ctrl.inputValueCallback = inputValueCallback;
|
|
20642
|
+
ctrl.onChangeBody = onChangeBody;
|
|
20643
|
+
ctrl.onChangeSourceCode = onChangeSourceCode;
|
|
20644
|
+
ctrl.onSelectHeader = onSelectHeader;
|
|
20645
|
+
ctrl.onSelectMethod = onSelectMethod;
|
|
20646
|
+
|
|
20647
|
+
//
|
|
20648
|
+
// Hooks method
|
|
20649
|
+
//
|
|
20650
|
+
|
|
20651
|
+
/**
|
|
20652
|
+
* Init method
|
|
20653
|
+
*/
|
|
20654
|
+
function onInit() {
|
|
20655
|
+
// check if dialog was opened to create event, or edit existing event.
|
|
20656
|
+
// if ctrl.createEvent is 'true', that mean dialog was open to create new event.
|
|
20657
|
+
// otherwise, for edit existing event, so need to change all corresponding labels.
|
|
20658
|
+
if (!ctrl.createEvent) {
|
|
20659
|
+
ctrl.titleText = $i18next.t('functions:EDIT_FUNCTION_EVENT', {
|
|
20660
|
+
lng: lng
|
|
20661
|
+
});
|
|
20662
|
+
ctrl.buttonText = $i18next.t('common:APPLY', {
|
|
20663
|
+
lng: lng
|
|
20664
|
+
});
|
|
20665
|
+
ctrl.errorText = $i18next.t('functions:ERROR_MSG.UPDATE_FUNCTION_EVENT', {
|
|
20666
|
+
lng: lng
|
|
20667
|
+
});
|
|
20668
|
+
}
|
|
20669
|
+
|
|
20670
|
+
// if ctrl.selectedEvent hasn't specific fields, that means event was not deployed before, so fill it with default data
|
|
20671
|
+
lodash.defaultsDeep(ctrl.selectedEvent, {
|
|
20672
|
+
metadata: {
|
|
20673
|
+
namespace: lodash.get(ctrl.version, 'metadata.namespace'),
|
|
20674
|
+
labels: {
|
|
20675
|
+
'nuclio.io/function-name': lodash.get(ctrl.version, 'metadata.name')
|
|
20676
|
+
}
|
|
20677
|
+
},
|
|
20678
|
+
spec: {
|
|
20679
|
+
displayName: '',
|
|
20680
|
+
triggerKind: 'http',
|
|
20681
|
+
attributes: {
|
|
20682
|
+
method: 'POST',
|
|
20683
|
+
headers: {
|
|
20684
|
+
'Content-Type': 'application/json'
|
|
20685
|
+
},
|
|
20686
|
+
path: ''
|
|
20687
|
+
},
|
|
20688
|
+
body: ''
|
|
20689
|
+
}
|
|
20690
|
+
});
|
|
20691
|
+
|
|
20692
|
+
// copy event to prevent modifying the original object
|
|
20693
|
+
ctrl.workingCopy = angular.copy(ctrl.selectedEvent);
|
|
20694
|
+
|
|
20695
|
+
// get method from event.
|
|
20696
|
+
ctrl.selectedMethod = lodash.find(ctrl.methods, ['id', lodash.get(ctrl.selectedEvent, 'spec.attributes.method')]);
|
|
20697
|
+
|
|
20698
|
+
// get content type from event.
|
|
20699
|
+
ctrl.contentType = lodash.get(ctrl.selectedEvent, 'spec.attributes.headers.Content-Type');
|
|
20700
|
+
|
|
20701
|
+
// get header from event.
|
|
20702
|
+
ctrl.selectedHeader = lodash.find(ctrl.headers, ['id', ctrl.contentType]);
|
|
20703
|
+
}
|
|
20704
|
+
|
|
20705
|
+
//
|
|
20706
|
+
// Public methods
|
|
20707
|
+
//
|
|
20708
|
+
|
|
20709
|
+
/**
|
|
20710
|
+
* Saves newly created event on beck-end.
|
|
20711
|
+
* If error occurs while saving event, then dialog remains open.
|
|
20712
|
+
* @param {Event} event - JS event object
|
|
20713
|
+
*/
|
|
20714
|
+
function applyChanges(event) {
|
|
20715
|
+
ctrl.functionEventForm.$setSubmitted();
|
|
20716
|
+
if ((angular.isUndefined(event) || event.keyCode === EventHelperService.ENTER) && ctrl.functionEventForm.$valid && ctrl.isFormChanged) {
|
|
20717
|
+
// show 'Loading...' button
|
|
20718
|
+
ctrl.isLoadingState = true;
|
|
20719
|
+
|
|
20720
|
+
// save created event on beck-end
|
|
20721
|
+
ctrl.createFunctionEvent({
|
|
20722
|
+
eventData: ctrl.workingCopy,
|
|
20723
|
+
isNewEvent: ctrl.createEvent
|
|
20724
|
+
}).then(function () {
|
|
20725
|
+
ctrl.isDeployFailed = false;
|
|
20726
|
+
|
|
20727
|
+
// close dialog with newly created or updated event data, and state of event.
|
|
20728
|
+
ctrl.closeDialog({
|
|
20729
|
+
result: {
|
|
20730
|
+
isEventDeployed: true,
|
|
20731
|
+
// If isEventDeployed is 'true' that mean - dialog was closed after creating event, not by pressing 'X' button.
|
|
20732
|
+
selectedEvent: ctrl.workingCopy
|
|
20733
|
+
}
|
|
20734
|
+
});
|
|
20735
|
+
}).catch(function () {
|
|
20736
|
+
// dialog remains open.
|
|
20737
|
+
// show error text
|
|
20738
|
+
ctrl.isDeployFailed = true;
|
|
20739
|
+
|
|
20740
|
+
// hide 'Loading...' button
|
|
20741
|
+
ctrl.isLoadingState = false;
|
|
20742
|
+
});
|
|
20743
|
+
}
|
|
20744
|
+
}
|
|
20745
|
+
|
|
20746
|
+
/**
|
|
20747
|
+
* Closes dialog
|
|
20748
|
+
*/
|
|
20749
|
+
function closeEventDialog() {
|
|
20750
|
+
// close dialog only if event is not deploying. Means event was deployed / failed / not changed
|
|
20751
|
+
if (!ctrl.isLoadingState) {
|
|
20752
|
+
ctrl.closeDialog({
|
|
20753
|
+
result: {
|
|
20754
|
+
isEventDeployed: false,
|
|
20755
|
+
selectedEvent: ctrl.selectedEvent
|
|
20756
|
+
}
|
|
20757
|
+
});
|
|
20758
|
+
}
|
|
20759
|
+
}
|
|
20760
|
+
|
|
20761
|
+
/**
|
|
20762
|
+
* Sets new data from "Name" field to event object
|
|
20763
|
+
* @param {string} newData - data to be set
|
|
20764
|
+
* @param {string} field - field which was changed
|
|
20765
|
+
*/
|
|
20766
|
+
function inputValueCallback(newData, field) {
|
|
20767
|
+
lodash.set(ctrl.workingCopy.spec, field === 'path' ? 'attributes.path' : field, newData);
|
|
20768
|
+
isFormChanged();
|
|
20769
|
+
}
|
|
20770
|
+
|
|
20771
|
+
/**
|
|
20772
|
+
* Callback from method drop-down
|
|
20773
|
+
* Sets new selected method
|
|
20774
|
+
* @param {Object} item - new selected item
|
|
20775
|
+
*/
|
|
20776
|
+
function onSelectMethod(item) {
|
|
20777
|
+
lodash.set(ctrl.workingCopy, 'spec.attributes.method', item.id);
|
|
20778
|
+
isFormChanged();
|
|
20779
|
+
}
|
|
20780
|
+
|
|
20781
|
+
/**
|
|
20782
|
+
* Callback from Content Type drop-down
|
|
20783
|
+
* Sets new selected header
|
|
20784
|
+
* @param {Object} item - new selected item
|
|
20785
|
+
*/
|
|
20786
|
+
function onSelectHeader(item) {
|
|
20787
|
+
lodash.set(ctrl.workingCopy, 'spec.attributes.headers.Content-Type', item.id);
|
|
20788
|
+
ctrl.contentType = item.id;
|
|
20789
|
+
isFormChanged();
|
|
20790
|
+
}
|
|
20791
|
+
|
|
20792
|
+
/**
|
|
20793
|
+
* Callback from body field.
|
|
20541
20794
|
*/
|
|
20542
|
-
function
|
|
20543
|
-
|
|
20544
|
-
|
|
20545
|
-
|
|
20546
|
-
|
|
20547
|
-
|
|
20795
|
+
function onChangeBody() {
|
|
20796
|
+
isFormChanged();
|
|
20797
|
+
}
|
|
20798
|
+
function onChangeSourceCode(sourceCode) {
|
|
20799
|
+
lodash.set(ctrl.workingCopy, 'spec.body', sourceCode);
|
|
20800
|
+
isFormChanged();
|
|
20548
20801
|
}
|
|
20549
20802
|
|
|
20803
|
+
//
|
|
20804
|
+
// Private methods
|
|
20805
|
+
//
|
|
20806
|
+
|
|
20550
20807
|
/**
|
|
20551
|
-
*
|
|
20808
|
+
* Compares original object and working object to get know if fields was changed
|
|
20809
|
+
* Also check if form valid and set result to corresponding variable
|
|
20552
20810
|
*/
|
|
20553
|
-
function
|
|
20554
|
-
|
|
20555
|
-
|
|
20556
|
-
id: 'delete'
|
|
20811
|
+
function isFormChanged() {
|
|
20812
|
+
$timeout(function () {
|
|
20813
|
+
ctrl.isFormChanged = !lodash.isEqual(ctrl.workingCopy, ctrl.selectedEvent) && lodash.isEmpty(ctrl.functionEventForm.$error);
|
|
20557
20814
|
});
|
|
20558
|
-
if (!lodash.isNil(deleteAction)) {
|
|
20559
|
-
deleteAction.confirm.message = $i18next.t('functions:DELETE_VERSION', {
|
|
20560
|
-
lng: lng
|
|
20561
|
-
}) + ' “' + ctrl.version.name + '”?';
|
|
20562
|
-
}
|
|
20563
20815
|
}
|
|
20564
20816
|
}
|
|
20565
20817
|
})();
|
|
@@ -21129,271 +21381,88 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
21129
21381
|
}
|
|
21130
21382
|
|
|
21131
21383
|
/**
|
|
21132
|
-
* Broadcast's callback to toggle test pane
|
|
21133
|
-
* @param {Event} event - native broadcast event object
|
|
21134
|
-
* @param {Object} data - contains data of test pane state (closed/opened)
|
|
21135
|
-
*/
|
|
21136
|
-
function toggleTestPane(event, data) {
|
|
21137
|
-
if (data.closeTestPane) {
|
|
21138
|
-
ctrl.layout.collapsed = true;
|
|
21139
|
-
angular.element(angular.element('.ui-splitbar')[0]).css('display', 'none');
|
|
21140
|
-
} else {
|
|
21141
|
-
ctrl.layout.collapsed = false;
|
|
21142
|
-
angular.element(angular.element('.ui-splitbar')[0]).css('display', 'block');
|
|
21143
|
-
}
|
|
21144
|
-
resizeScrollBar(null, 300);
|
|
21145
|
-
}
|
|
21146
|
-
}
|
|
21147
|
-
})();
|
|
21148
|
-
"use strict";
|
|
21149
|
-
|
|
21150
|
-
(function () {
|
|
21151
|
-
'use strict';
|
|
21152
|
-
|
|
21153
|
-
NclFunctionEventDialogController.$inject = ["$timeout", "$i18next", "i18next", "lodash", "EventHelperService"];
|
|
21154
|
-
angular.module('iguazio.dashboard-controls').component('nclFunctionEventDialog', {
|
|
21155
|
-
bindings: {
|
|
21156
|
-
closeDialog: '&',
|
|
21157
|
-
createEvent: '<',
|
|
21158
|
-
selectedEvent: '<',
|
|
21159
|
-
version: '<',
|
|
21160
|
-
createFunctionEvent: '&'
|
|
21161
|
-
},
|
|
21162
|
-
templateUrl: 'nuclio/functions/version/function-event-dialog/function-event-dialog.tpl.html',
|
|
21163
|
-
controller: NclFunctionEventDialogController
|
|
21164
|
-
});
|
|
21165
|
-
function NclFunctionEventDialogController($timeout, $i18next, i18next, lodash, EventHelperService) {
|
|
21166
|
-
var ctrl = this;
|
|
21167
|
-
var lng = i18next.language;
|
|
21168
|
-
ctrl.inputModelOptions = {
|
|
21169
|
-
debounce: {
|
|
21170
|
-
'default': 0
|
|
21171
|
-
}
|
|
21172
|
-
};
|
|
21173
|
-
ctrl.buttonText = $i18next.t('common:CREATE', {
|
|
21174
|
-
lng: lng
|
|
21175
|
-
});
|
|
21176
|
-
ctrl.errorText = $i18next.t('functions:ERROR_MSG.CREATE_FUNCTION_EVENT', {
|
|
21177
|
-
lng: lng
|
|
21178
|
-
});
|
|
21179
|
-
ctrl.titleText = $i18next.t('functions:CREATE_FUNCTION_EVENT', {
|
|
21180
|
-
lng: lng
|
|
21181
|
-
});
|
|
21182
|
-
ctrl.contentType = 'application/json';
|
|
21183
|
-
ctrl.bodyTheme = 'vs-light';
|
|
21184
|
-
ctrl.isLoadingState = false;
|
|
21185
|
-
ctrl.isDeployFailed = false;
|
|
21186
|
-
ctrl.isFormChanged = false;
|
|
21187
|
-
ctrl.methods = [{
|
|
21188
|
-
id: 'POST',
|
|
21189
|
-
visible: true,
|
|
21190
|
-
name: 'POST'
|
|
21191
|
-
}, {
|
|
21192
|
-
id: 'GET',
|
|
21193
|
-
visible: true,
|
|
21194
|
-
name: 'GET'
|
|
21195
|
-
}, {
|
|
21196
|
-
id: 'PUT',
|
|
21197
|
-
visible: true,
|
|
21198
|
-
name: 'PUT'
|
|
21199
|
-
}, {
|
|
21200
|
-
id: 'PATCH',
|
|
21201
|
-
visible: true,
|
|
21202
|
-
name: 'PATCH'
|
|
21203
|
-
}, {
|
|
21204
|
-
id: 'DELETE',
|
|
21205
|
-
visible: true,
|
|
21206
|
-
name: 'DELETE'
|
|
21207
|
-
}];
|
|
21208
|
-
ctrl.headers = [{
|
|
21209
|
-
id: 'application/json',
|
|
21210
|
-
visible: true,
|
|
21211
|
-
name: 'JSON'
|
|
21212
|
-
}, {
|
|
21213
|
-
id: 'text/plain',
|
|
21214
|
-
visible: true,
|
|
21215
|
-
name: 'Plain text'
|
|
21216
|
-
}];
|
|
21217
|
-
ctrl.selectedMethod = null;
|
|
21218
|
-
ctrl.selectedHeader = null;
|
|
21219
|
-
ctrl.workingCopy = null;
|
|
21220
|
-
ctrl.$onInit = onInit;
|
|
21221
|
-
ctrl.applyChanges = applyChanges;
|
|
21222
|
-
ctrl.closeEventDialog = closeEventDialog;
|
|
21223
|
-
ctrl.inputValueCallback = inputValueCallback;
|
|
21224
|
-
ctrl.onChangeBody = onChangeBody;
|
|
21225
|
-
ctrl.onChangeSourceCode = onChangeSourceCode;
|
|
21226
|
-
ctrl.onSelectHeader = onSelectHeader;
|
|
21227
|
-
ctrl.onSelectMethod = onSelectMethod;
|
|
21228
|
-
|
|
21229
|
-
//
|
|
21230
|
-
// Hooks method
|
|
21231
|
-
//
|
|
21232
|
-
|
|
21233
|
-
/**
|
|
21234
|
-
* Init method
|
|
21235
|
-
*/
|
|
21236
|
-
function onInit() {
|
|
21237
|
-
// check if dialog was opened to create event, or edit existing event.
|
|
21238
|
-
// if ctrl.createEvent is 'true', that mean dialog was open to create new event.
|
|
21239
|
-
// otherwise, for edit existing event, so need to change all corresponding labels.
|
|
21240
|
-
if (!ctrl.createEvent) {
|
|
21241
|
-
ctrl.titleText = $i18next.t('functions:EDIT_FUNCTION_EVENT', {
|
|
21242
|
-
lng: lng
|
|
21243
|
-
});
|
|
21244
|
-
ctrl.buttonText = $i18next.t('common:APPLY', {
|
|
21245
|
-
lng: lng
|
|
21246
|
-
});
|
|
21247
|
-
ctrl.errorText = $i18next.t('functions:ERROR_MSG.UPDATE_FUNCTION_EVENT', {
|
|
21248
|
-
lng: lng
|
|
21249
|
-
});
|
|
21250
|
-
}
|
|
21251
|
-
|
|
21252
|
-
// if ctrl.selectedEvent hasn't specific fields, that means event was not deployed before, so fill it with default data
|
|
21253
|
-
lodash.defaultsDeep(ctrl.selectedEvent, {
|
|
21254
|
-
metadata: {
|
|
21255
|
-
namespace: lodash.get(ctrl.version, 'metadata.namespace'),
|
|
21256
|
-
labels: {
|
|
21257
|
-
'nuclio.io/function-name': lodash.get(ctrl.version, 'metadata.name')
|
|
21258
|
-
}
|
|
21259
|
-
},
|
|
21260
|
-
spec: {
|
|
21261
|
-
displayName: '',
|
|
21262
|
-
triggerKind: 'http',
|
|
21263
|
-
attributes: {
|
|
21264
|
-
method: 'POST',
|
|
21265
|
-
headers: {
|
|
21266
|
-
'Content-Type': 'application/json'
|
|
21267
|
-
},
|
|
21268
|
-
path: ''
|
|
21269
|
-
},
|
|
21270
|
-
body: ''
|
|
21271
|
-
}
|
|
21272
|
-
});
|
|
21273
|
-
|
|
21274
|
-
// copy event to prevent modifying the original object
|
|
21275
|
-
ctrl.workingCopy = angular.copy(ctrl.selectedEvent);
|
|
21276
|
-
|
|
21277
|
-
// get method from event.
|
|
21278
|
-
ctrl.selectedMethod = lodash.find(ctrl.methods, ['id', lodash.get(ctrl.selectedEvent, 'spec.attributes.method')]);
|
|
21279
|
-
|
|
21280
|
-
// get content type from event.
|
|
21281
|
-
ctrl.contentType = lodash.get(ctrl.selectedEvent, 'spec.attributes.headers.Content-Type');
|
|
21282
|
-
|
|
21283
|
-
// get header from event.
|
|
21284
|
-
ctrl.selectedHeader = lodash.find(ctrl.headers, ['id', ctrl.contentType]);
|
|
21285
|
-
}
|
|
21286
|
-
|
|
21287
|
-
//
|
|
21288
|
-
// Public methods
|
|
21289
|
-
//
|
|
21290
|
-
|
|
21291
|
-
/**
|
|
21292
|
-
* Saves newly created event on beck-end.
|
|
21293
|
-
* If error occurs while saving event, then dialog remains open.
|
|
21294
|
-
* @param {Event} event - JS event object
|
|
21295
|
-
*/
|
|
21296
|
-
function applyChanges(event) {
|
|
21297
|
-
ctrl.functionEventForm.$setSubmitted();
|
|
21298
|
-
if ((angular.isUndefined(event) || event.keyCode === EventHelperService.ENTER) && ctrl.functionEventForm.$valid && ctrl.isFormChanged) {
|
|
21299
|
-
// show 'Loading...' button
|
|
21300
|
-
ctrl.isLoadingState = true;
|
|
21301
|
-
|
|
21302
|
-
// save created event on beck-end
|
|
21303
|
-
ctrl.createFunctionEvent({
|
|
21304
|
-
eventData: ctrl.workingCopy,
|
|
21305
|
-
isNewEvent: ctrl.createEvent
|
|
21306
|
-
}).then(function () {
|
|
21307
|
-
ctrl.isDeployFailed = false;
|
|
21308
|
-
|
|
21309
|
-
// close dialog with newly created or updated event data, and state of event.
|
|
21310
|
-
ctrl.closeDialog({
|
|
21311
|
-
result: {
|
|
21312
|
-
isEventDeployed: true,
|
|
21313
|
-
// If isEventDeployed is 'true' that mean - dialog was closed after creating event, not by pressing 'X' button.
|
|
21314
|
-
selectedEvent: ctrl.workingCopy
|
|
21315
|
-
}
|
|
21316
|
-
});
|
|
21317
|
-
}).catch(function () {
|
|
21318
|
-
// dialog remains open.
|
|
21319
|
-
// show error text
|
|
21320
|
-
ctrl.isDeployFailed = true;
|
|
21321
|
-
|
|
21322
|
-
// hide 'Loading...' button
|
|
21323
|
-
ctrl.isLoadingState = false;
|
|
21324
|
-
});
|
|
21325
|
-
}
|
|
21326
|
-
}
|
|
21327
|
-
|
|
21328
|
-
/**
|
|
21329
|
-
* Closes dialog
|
|
21330
|
-
*/
|
|
21331
|
-
function closeEventDialog() {
|
|
21332
|
-
// close dialog only if event is not deploying. Means event was deployed / failed / not changed
|
|
21333
|
-
if (!ctrl.isLoadingState) {
|
|
21334
|
-
ctrl.closeDialog({
|
|
21335
|
-
result: {
|
|
21336
|
-
isEventDeployed: false,
|
|
21337
|
-
selectedEvent: ctrl.selectedEvent
|
|
21338
|
-
}
|
|
21339
|
-
});
|
|
21340
|
-
}
|
|
21341
|
-
}
|
|
21342
|
-
|
|
21343
|
-
/**
|
|
21344
|
-
* Sets new data from "Name" field to event object
|
|
21345
|
-
* @param {string} newData - data to be set
|
|
21346
|
-
* @param {string} field - field which was changed
|
|
21347
|
-
*/
|
|
21348
|
-
function inputValueCallback(newData, field) {
|
|
21349
|
-
lodash.set(ctrl.workingCopy.spec, field === 'path' ? 'attributes.path' : field, newData);
|
|
21350
|
-
isFormChanged();
|
|
21351
|
-
}
|
|
21352
|
-
|
|
21353
|
-
/**
|
|
21354
|
-
* Callback from method drop-down
|
|
21355
|
-
* Sets new selected method
|
|
21356
|
-
* @param {Object} item - new selected item
|
|
21384
|
+
* Broadcast's callback to toggle test pane
|
|
21385
|
+
* @param {Event} event - native broadcast event object
|
|
21386
|
+
* @param {Object} data - contains data of test pane state (closed/opened)
|
|
21357
21387
|
*/
|
|
21358
|
-
function
|
|
21359
|
-
|
|
21360
|
-
|
|
21388
|
+
function toggleTestPane(event, data) {
|
|
21389
|
+
if (data.closeTestPane) {
|
|
21390
|
+
ctrl.layout.collapsed = true;
|
|
21391
|
+
angular.element(angular.element('.ui-splitbar')[0]).css('display', 'none');
|
|
21392
|
+
} else {
|
|
21393
|
+
ctrl.layout.collapsed = false;
|
|
21394
|
+
angular.element(angular.element('.ui-splitbar')[0]).css('display', 'block');
|
|
21395
|
+
}
|
|
21396
|
+
resizeScrollBar(null, 300);
|
|
21361
21397
|
}
|
|
21398
|
+
}
|
|
21399
|
+
})();
|
|
21400
|
+
"use strict";
|
|
21362
21401
|
|
|
21363
|
-
|
|
21364
|
-
|
|
21365
|
-
|
|
21366
|
-
|
|
21367
|
-
|
|
21368
|
-
|
|
21369
|
-
|
|
21370
|
-
|
|
21371
|
-
|
|
21372
|
-
|
|
21402
|
+
(function () {
|
|
21403
|
+
'use strict';
|
|
21404
|
+
|
|
21405
|
+
NclVersionMonitoringController.$inject = ["$rootScope", "$timeout", "lodash", "FunctionsService"];
|
|
21406
|
+
angular.module('iguazio.dashboard-controls').component('nclVersionMonitoring', {
|
|
21407
|
+
bindings: {
|
|
21408
|
+
version: '<'
|
|
21409
|
+
},
|
|
21410
|
+
templateUrl: 'nuclio/functions/version/version-monitoring/version-monitoring.tpl.html',
|
|
21411
|
+
controller: NclVersionMonitoringController
|
|
21412
|
+
});
|
|
21413
|
+
function NclVersionMonitoringController($rootScope, $timeout, lodash, FunctionsService) {
|
|
21414
|
+
var ctrl = this;
|
|
21415
|
+
ctrl.scrollConfig = {
|
|
21416
|
+
advanced: {
|
|
21417
|
+
updateOnContentResize: true
|
|
21418
|
+
}
|
|
21419
|
+
};
|
|
21420
|
+
ctrl.loggerScrollConfig = {
|
|
21421
|
+
advanced: {
|
|
21422
|
+
updateOnContentResize: true
|
|
21423
|
+
},
|
|
21424
|
+
theme: 'light-thin'
|
|
21425
|
+
};
|
|
21426
|
+
ctrl.rowIsCollapsed = {
|
|
21427
|
+
buildLog: false,
|
|
21428
|
+
errorLog: false
|
|
21429
|
+
};
|
|
21430
|
+
ctrl.$onInit = onInit;
|
|
21431
|
+
ctrl.checkIsErrorState = checkIsErrorState;
|
|
21432
|
+
ctrl.onRowCollapse = onRowCollapse;
|
|
21433
|
+
|
|
21434
|
+
//
|
|
21435
|
+
// Hook methods
|
|
21436
|
+
//
|
|
21373
21437
|
|
|
21374
21438
|
/**
|
|
21375
|
-
*
|
|
21439
|
+
* Initialization method
|
|
21376
21440
|
*/
|
|
21377
|
-
function
|
|
21378
|
-
|
|
21379
|
-
}
|
|
21380
|
-
function onChangeSourceCode(sourceCode) {
|
|
21381
|
-
lodash.set(ctrl.workingCopy, 'spec.body', sourceCode);
|
|
21382
|
-
isFormChanged();
|
|
21441
|
+
function onInit() {
|
|
21442
|
+
ctrl.isFunctionDeploying = lodash.partial(FunctionsService.isFunctionDeploying, ctrl.version);
|
|
21383
21443
|
}
|
|
21384
21444
|
|
|
21385
21445
|
//
|
|
21386
|
-
//
|
|
21446
|
+
// Public methods
|
|
21387
21447
|
//
|
|
21388
21448
|
|
|
21389
21449
|
/**
|
|
21390
|
-
*
|
|
21391
|
-
*
|
|
21450
|
+
* Checks if current version status is `error`
|
|
21451
|
+
* @returns {boolean}
|
|
21392
21452
|
*/
|
|
21393
|
-
function
|
|
21453
|
+
function checkIsErrorState() {
|
|
21454
|
+
return lodash.includes(['error', 'unhealthy'], lodash.get(ctrl.version.status, 'state'));
|
|
21455
|
+
}
|
|
21456
|
+
|
|
21457
|
+
/**
|
|
21458
|
+
* Called when row is collapsed/expanded
|
|
21459
|
+
* @param {string} row - name of expanded/collapsed row
|
|
21460
|
+
*/
|
|
21461
|
+
function onRowCollapse(row) {
|
|
21462
|
+
ctrl.rowIsCollapsed[row] = !ctrl.rowIsCollapsed[row];
|
|
21394
21463
|
$timeout(function () {
|
|
21395
|
-
|
|
21396
|
-
});
|
|
21464
|
+
$rootScope.$broadcast('igzWatchWindowResize::resize');
|
|
21465
|
+
}, 350);
|
|
21397
21466
|
}
|
|
21398
21467
|
}
|
|
21399
21468
|
})();
|
|
@@ -21862,75 +21931,6 @@ angular.module('angular-i18next', []).provider('i18next', [function () {
|
|
|
21862
21931
|
})();
|
|
21863
21932
|
"use strict";
|
|
21864
21933
|
|
|
21865
|
-
(function () {
|
|
21866
|
-
'use strict';
|
|
21867
|
-
|
|
21868
|
-
NclVersionMonitoringController.$inject = ["$rootScope", "$timeout", "lodash", "FunctionsService"];
|
|
21869
|
-
angular.module('iguazio.dashboard-controls').component('nclVersionMonitoring', {
|
|
21870
|
-
bindings: {
|
|
21871
|
-
version: '<'
|
|
21872
|
-
},
|
|
21873
|
-
templateUrl: 'nuclio/functions/version/version-monitoring/version-monitoring.tpl.html',
|
|
21874
|
-
controller: NclVersionMonitoringController
|
|
21875
|
-
});
|
|
21876
|
-
function NclVersionMonitoringController($rootScope, $timeout, lodash, FunctionsService) {
|
|
21877
|
-
var ctrl = this;
|
|
21878
|
-
ctrl.scrollConfig = {
|
|
21879
|
-
advanced: {
|
|
21880
|
-
updateOnContentResize: true
|
|
21881
|
-
}
|
|
21882
|
-
};
|
|
21883
|
-
ctrl.loggerScrollConfig = {
|
|
21884
|
-
advanced: {
|
|
21885
|
-
updateOnContentResize: true
|
|
21886
|
-
},
|
|
21887
|
-
theme: 'light-thin'
|
|
21888
|
-
};
|
|
21889
|
-
ctrl.rowIsCollapsed = {
|
|
21890
|
-
buildLog: false,
|
|
21891
|
-
errorLog: false
|
|
21892
|
-
};
|
|
21893
|
-
ctrl.$onInit = onInit;
|
|
21894
|
-
ctrl.checkIsErrorState = checkIsErrorState;
|
|
21895
|
-
ctrl.onRowCollapse = onRowCollapse;
|
|
21896
|
-
|
|
21897
|
-
//
|
|
21898
|
-
// Hook methods
|
|
21899
|
-
//
|
|
21900
|
-
|
|
21901
|
-
/**
|
|
21902
|
-
* Initialization method
|
|
21903
|
-
*/
|
|
21904
|
-
function onInit() {
|
|
21905
|
-
ctrl.isFunctionDeploying = lodash.partial(FunctionsService.isFunctionDeploying, ctrl.version);
|
|
21906
|
-
}
|
|
21907
|
-
|
|
21908
|
-
//
|
|
21909
|
-
// Public methods
|
|
21910
|
-
//
|
|
21911
|
-
|
|
21912
|
-
/**
|
|
21913
|
-
* Checks if current version status is `error`
|
|
21914
|
-
* @returns {boolean}
|
|
21915
|
-
*/
|
|
21916
|
-
function checkIsErrorState() {
|
|
21917
|
-
return lodash.includes(['error', 'unhealthy'], lodash.get(ctrl.version.status, 'state'));
|
|
21918
|
-
}
|
|
21919
|
-
|
|
21920
|
-
/**
|
|
21921
|
-
* Called when row is collapsed/expanded
|
|
21922
|
-
* @param {string} row - name of expanded/collapsed row
|
|
21923
|
-
*/
|
|
21924
|
-
function onRowCollapse(row) {
|
|
21925
|
-
ctrl.rowIsCollapsed[row] = !ctrl.rowIsCollapsed[row];
|
|
21926
|
-
$timeout(function () {
|
|
21927
|
-
$rootScope.$broadcast('igzWatchWindowResize::resize');
|
|
21928
|
-
}, 350);
|
|
21929
|
-
}
|
|
21930
|
-
}
|
|
21931
|
-
})();
|
|
21932
|
-
"use strict";
|
|
21933
|
-
|
|
21934
21934
|
(function () {
|
|
21935
21935
|
'use strict';
|
|
21936
21936
|
|
|
@@ -24155,8 +24155,8 @@ try {
|
|
|
24155
24155
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24156
24156
|
}
|
|
24157
24157
|
module.run(['$templateCache', function($templateCache) {
|
|
24158
|
-
$templateCache.put('igz_controls/components/
|
|
24159
|
-
'<div class="
|
|
24158
|
+
$templateCache.put('igz_controls/components/element-loading-status/element-loading-status.tpl.html',
|
|
24159
|
+
'<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> ');
|
|
24160
24160
|
}]);
|
|
24161
24161
|
})();
|
|
24162
24162
|
|
|
@@ -24167,8 +24167,8 @@ try {
|
|
|
24167
24167
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24168
24168
|
}
|
|
24169
24169
|
module.run(['$templateCache', function($templateCache) {
|
|
24170
|
-
$templateCache.put('igz_controls/components/
|
|
24171
|
-
'<div class="
|
|
24170
|
+
$templateCache.put('igz_controls/components/import-project-dialog/import-project-dialog.tpl.html',
|
|
24171
|
+
'<div class="import-project-dialog">{{$ctrl.dialogTitle}}</div> <igz-multiple-checkboxes data-ng-model="$ctrl.option" data-options="$ctrl.optionList" data-ng-change="$ctrl.onCheckboxChange($event)" data-ng-required="true" data-base-id="import-project-option_"> </igz-multiple-checkboxes> <div class="buttons"> <button class="igz-button-just-text" data-ng-click="$ctrl.onClose(\'skip\')"> {{ \'functions:SKIP\' | i18next }} </button> <button class="igz-button-primary" data-ng-click="$ctrl.onClose(\'replace\')"> {{ \'functions:REPLACE\' | i18next }} </button> </div>');
|
|
24172
24172
|
}]);
|
|
24173
24173
|
})();
|
|
24174
24174
|
|
|
@@ -24247,8 +24247,8 @@ try {
|
|
|
24247
24247
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24248
24248
|
}
|
|
24249
24249
|
module.run(['$templateCache', function($templateCache) {
|
|
24250
|
-
$templateCache.put('igz_controls/components/
|
|
24251
|
-
'<div data-ng-
|
|
24250
|
+
$templateCache.put('igz_controls/components/pagination/pagination.component.tpl.html',
|
|
24251
|
+
'<div class="igz-pagination"> <div class="rows-title" data-ng-if="!$ctrl.isPerPageVisible"> {{ \'common:ROWS_PER_PAGE\' | i18next }}: </div> <div class="per-page" data-ng-if="!$ctrl.isPerPageVisible"> <igz-default-dropdown data-values-array="$ctrl.perPageValues" data-selected-item="$ctrl.perPage" data-select-property-only="id" data-item-select-callback="$ctrl.onPerPageChanged(item, isItemChanged)" class="per-page-dropdown" data-is-pagination="true"> </igz-default-dropdown> </div> <div class="jump-to-page" data-ng-form="jumpToPageForm" data-ng-if="$ctrl.pageData.total > 1"> <button class="to-page-prev igz-button-basic igz-icon-left" tabindex="0" data-uib-tooltip="{{$ctrl.page <= 0 ? \'\' : (\'common:PREVIOUS_PAGE\' | i18next)}}" data-tooltip-placement="top" data-ng-class="{\'disabled\' : $ctrl.page <= 0}" data-ng-click="$ctrl.page <= 0 || $ctrl.goToPrevPage()" data-ng-keydown="$ctrl.goToPrevPage($event)"> </button> <igz-validating-input-field data-ng-if="$ctrl.allowJumpToPage" data-field-type="input" data-input-name="jumpToPage" data-input-value="$ctrl.page + 1" data-is-data-revert="true" data-form-object="jumpToPageForm" data-validation-pattern="$ctrl.jumpToPagePattern" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-item-blur-callback="$ctrl.jumpToPage()" data-validation-is-required="true" data-hide-counter="true" class="jump-to-page-input"> </igz-validating-input-field> <div class="page-number rows-title" data-ng-if="!$ctrl.allowJumpToPage"> {{$ctrl.page + 1}} </div> <button class="to-page-next igz-button-basic igz-icon-right" tabindex="0" data-uib-tooltip="{{$ctrl.pageData.total <= $ctrl.page + 1 ? \'\' : (\'common:NEXT_PAGE\' | i18next)}}" data-tooltip-placement="top" data-ng-class="{\'disabled\' : $ctrl.pageData.total <= $ctrl.page + 1}" data-ng-click="($ctrl.pageData.total <= $ctrl.page + 1) || $ctrl.goToNextPage()" data-ng-keydown="$ctrl.goToNextPage($event)"> </button> <div class="rows-title title"> {{ \'common:OF_PAGES\' | i18next:{pagesTotal: $ctrl.pageData.total} }}</div> </div> </div> ');
|
|
24252
24252
|
}]);
|
|
24253
24253
|
})();
|
|
24254
24254
|
|
|
@@ -24259,8 +24259,8 @@ try {
|
|
|
24259
24259
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24260
24260
|
}
|
|
24261
24261
|
module.run(['$templateCache', function($templateCache) {
|
|
24262
|
-
$templateCache.put('igz_controls/components/
|
|
24263
|
-
'<div
|
|
24262
|
+
$templateCache.put('igz_controls/components/search-input/search-input.tpl.html',
|
|
24263
|
+
'<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> ');
|
|
24264
24264
|
}]);
|
|
24265
24265
|
})();
|
|
24266
24266
|
|
|
@@ -24271,9 +24271,8 @@ try {
|
|
|
24271
24271
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24272
24272
|
}
|
|
24273
24273
|
module.run(['$templateCache', function($templateCache) {
|
|
24274
|
-
$templateCache.put('igz_controls/components/
|
|
24275
|
-
'<div class="igz-
|
|
24276
|
-
' \'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> ');
|
|
24274
|
+
$templateCache.put('igz_controls/components/size/size.tpl.html',
|
|
24275
|
+
'<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> ');
|
|
24277
24276
|
}]);
|
|
24278
24277
|
})();
|
|
24279
24278
|
|
|
@@ -24284,8 +24283,9 @@ try {
|
|
|
24284
24283
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24285
24284
|
}
|
|
24286
24285
|
module.run(['$templateCache', function($templateCache) {
|
|
24287
|
-
$templateCache.put('igz_controls/components/
|
|
24288
|
-
'<div class="igz-
|
|
24286
|
+
$templateCache.put('igz_controls/components/slider-input-block/slider-input-block.tpl.html',
|
|
24287
|
+
'<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}} <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' +
|
|
24288
|
+
' \'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> ');
|
|
24289
24289
|
}]);
|
|
24290
24290
|
})();
|
|
24291
24291
|
|
|
@@ -24520,8 +24520,8 @@ try {
|
|
|
24520
24520
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24521
24521
|
}
|
|
24522
24522
|
module.run(['$templateCache', function($templateCache) {
|
|
24523
|
-
$templateCache.put('igz_controls/components/info-page/info-page-
|
|
24524
|
-
'<div class="
|
|
24523
|
+
$templateCache.put('igz_controls/components/info-page/info-page-filters/info-page-filters.tpl.html',
|
|
24524
|
+
'<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> ');
|
|
24525
24525
|
}]);
|
|
24526
24526
|
})();
|
|
24527
24527
|
|
|
@@ -24532,8 +24532,8 @@ try {
|
|
|
24532
24532
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24533
24533
|
}
|
|
24534
24534
|
module.run(['$templateCache', function($templateCache) {
|
|
24535
|
-
$templateCache.put('igz_controls/components/info-page/info-page-
|
|
24536
|
-
'<div class="info-page-
|
|
24535
|
+
$templateCache.put('igz_controls/components/info-page/info-page-content/info-page-content.tpl.html',
|
|
24536
|
+
'<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>');
|
|
24537
24537
|
}]);
|
|
24538
24538
|
})();
|
|
24539
24539
|
|
|
@@ -24606,8 +24606,11 @@ try {
|
|
|
24606
24606
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24607
24607
|
}
|
|
24608
24608
|
module.run(['$templateCache', function($templateCache) {
|
|
24609
|
-
$templateCache.put('nuclio/common/components/
|
|
24610
|
-
'<div class="
|
|
24609
|
+
$templateCache.put('nuclio/common/components/key-value-input/key-value-input.tpl.html',
|
|
24610
|
+
'<div class="ncl-key-value-input"> <form name="$ctrl.keyValueInputForm" class="input-wrapper" data-ng-mousedown="$ctrl.onEditInput()" novalidate> <div class="check-row" data-ng-if="$ctrl.allowSelection"> <igz-action-checkbox data-item="$ctrl.data"></igz-action-checkbox> </div> <div class="inputs-container" data-ng-class="{\'use-type\': $ctrl.useType, \'use-checkbox\': $ctrl.allowSelection}"> <div class="input-container input-key-wrapper" data-ng-if="!$ctrl.onlyValueInput" data-ng-class="{\'use-type\': $ctrl.useType, \'all-value-types\': $ctrl.allValueTypes}"> <label class="key-label asterisk" data-ng-if="$ctrl.useLabels"> {{ \'common:KEY\' | i18next }}: </label> <igz-validating-input-field class="input-key" data-ng-if="!$ctrl.keyList" data-field-type="input" data-input-name="key" data-is-disabled="$ctrl.isDisabled" data-input-value="$ctrl.data.name" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="name" data-form-object="$ctrl.keyValueInputForm" data-validation-is-required="!$ctrl.keyOptional" data-validation-pattern="$ctrl.keyValidationPattern" data-validation-rules="$ctrl.validationRules[\'key\']" data-placeholder-text="{{$ctrl.keyPlaceholder}}" data-uib-tooltip="{{$ctrl.keyTooltip}}" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="100"> </igz-validating-input-field> <igz-default-dropdown class="input-key" data-ng-if="$ctrl.keyList" data-form-object="$ctrl.keyValueInputForm" data-prevent-drop-up="true" data-input-name="key" data-is-disabled="$ctrl.isDisabled" data-values-array="$ctrl.keyList" data-selected-item="$ctrl.getSelectedItem()" data-item-select-callback="$ctrl.onKeyChanged(item)" data-enable-overlap="$ctrl.dropdownOverlap"> </igz-default-dropdown> </div> <div class="input-container input-type-wrapper" data-ng-if="$ctrl.useType" data-ng-class="{\'use-type\': $ctrl.useType, \'all-value-types\': $ctrl.allValueTypes}"> <label data-ng-if="$ctrl.useLabels" class="type-label"> {{ \'common:TYPE\' | i18next }}: </label> <igz-default-dropdown class="input-type" data-form-object="$ctrl.keyValueInputForm" data-select-property-only="id" data-prevent-drop-up="true" data-input-name="type" data-is-disabled="$ctrl.isDisabled" data-values-array="$ctrl.typesList" data-selected-item="$ctrl.getType()" data-placeholder="{{ \'common:PLACEHOLDER.SELECT_TYPE\' | i18next }}" data-item-select-callback="$ctrl.onTypeChanged(item, isItemChanged)" data-enable-overlap="$ctrl.dropdownOverlap"> </igz-default-dropdown> </div> <div class="input-container input-value-key-wrapper" data-ng-if="!$ctrl.isVisibleByType(\'value\')" data-ng-class="{\'use-type\': $ctrl.useType}"> <label data-ng-if="$ctrl.useLabels"> <span data-ng-if="$ctrl.isVisibleByType(\'secret\')"> {{ \'functions:SECRET_KEY\' | i18next }}: </span> <span data-ng-if="$ctrl.isVisibleByType(\'configmap\')"> {{ \'functions:CONFIGMAP_KEY\' | i18next }}: </span> </label> <igz-validating-input-field class="input-value-key" data-field-type="input" data-input-name="value-key" data-input-value="$ctrl.getInputKey()" data-update-data-callback="$ctrl.inputKeyCallback(newData)" data-update-data-field="value-key" data-is-disabled="$ctrl.isDisabled" data-form-object="$ctrl.keyValueInputForm" data-validation-is-required="!$ctrl.valueOptional" data-validation-rules="$ctrl.validationRules[$ctrl.getType() + \'Key\']" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_KEY\' | i18next }}"> </igz-validating-input-field> </div> <div class="input-container input-value-wrapper" data-ng-class="{\'use-type\': $ctrl.useType,\n' +
|
|
24611
|
+
' \'only-value-input\': $ctrl.onlyValueInput,\n' +
|
|
24612
|
+
' \'only-key-value-input\': $ctrl.isVisibleByType(\'value\'),\n' +
|
|
24613
|
+
' \'all-value-types\': $ctrl.allValueTypes}"> <label data-ng-if="$ctrl.useLabels" class="asterisk"> <span data-ng-if="$ctrl.isVisibleByType(\'value\')"> {{ \'common:VALUE\' | i18next }}: </span> <span data-ng-if="$ctrl.isVisibleByType(\'secret\')"> {{ \'functions:SECRET_NAME\' | i18next }}: </span> <span data-ng-if="$ctrl.isVisibleByType(\'configmap\')"> {{ \'functions:CONFIGMAP_NAME\' | i18next }}: </span> </label> <igz-validating-input-field class="input-value" data-field-type="input" data-input-name="value" data-input-value="$ctrl.getInputValue()" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="value" data-is-disabled="$ctrl.isDisabled" data-form-object="$ctrl.keyValueInputForm" data-validation-is-required="!$ctrl.valueOptional" data-validation-pattern="$ctrl.valueValidationPattern" data-validation-rules="$ctrl.validationRules[$ctrl.getType()]" data-placeholder-text="{{$ctrl.valuePlaceholder}}" data-uib-tooltip="{{$ctrl.valueTooltip}}" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="100"> </igz-validating-input-field> <igz-validating-input-field class="input-additional-value" data-ng-if="$ctrl.useAdditionalValue && $ctrl.isVisibleByType(\'value\')" data-field-type="input" data-input-name="additionalValue" data-is-disabled="$ctrl.isDisabled" data-input-value="$ctrl.data.additionalValue" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="additionalValue" data-form-object="$ctrl.keyValueInputForm" data-validation-is-required="!$ctrl.additionalValueOptional"> </igz-validating-input-field> </div> </div> <div class="three-dot-menu" data-ng-if="$ctrl.actions.length > 1 && !$ctrl.isDisabled"> <igz-action-menu data-actions="$ctrl.actions" data-on-fire-action="$ctrl.onFireAction"> </igz-action-menu> </div> <div class="igz-action-panel" data-ng-if="$ctrl.actions.length === 1 && !$ctrl.isDisabled"> <div class="actions-list"> <div class="igz-action-item" data-ng-click="$ctrl.onClickAction($ctrl.actions[0])"> <span class="action-icon" data-ng-class="$ctrl.actions[0].icon"> </span> </div> </div> </div> </form> </div> ');
|
|
24611
24614
|
}]);
|
|
24612
24615
|
})();
|
|
24613
24616
|
|
|
@@ -24618,11 +24621,8 @@ try {
|
|
|
24618
24621
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24619
24622
|
}
|
|
24620
24623
|
module.run(['$templateCache', function($templateCache) {
|
|
24621
|
-
$templateCache.put('nuclio/common/components/
|
|
24622
|
-
'<div class="
|
|
24623
|
-
' \'only-value-input\': $ctrl.onlyValueInput,\n' +
|
|
24624
|
-
' \'only-key-value-input\': $ctrl.isVisibleByType(\'value\'),\n' +
|
|
24625
|
-
' \'all-value-types\': $ctrl.allValueTypes}"> <label data-ng-if="$ctrl.useLabels" class="asterisk"> <span data-ng-if="$ctrl.isVisibleByType(\'value\')"> {{ \'common:VALUE\' | i18next }}: </span> <span data-ng-if="$ctrl.isVisibleByType(\'secret\')"> {{ \'functions:SECRET_NAME\' | i18next }}: </span> <span data-ng-if="$ctrl.isVisibleByType(\'configmap\')"> {{ \'functions:CONFIGMAP_NAME\' | i18next }}: </span> </label> <igz-validating-input-field class="input-value" data-field-type="input" data-input-name="value" data-input-value="$ctrl.getInputValue()" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="value" data-is-disabled="$ctrl.isDisabled" data-form-object="$ctrl.keyValueInputForm" data-validation-is-required="!$ctrl.valueOptional" data-validation-pattern="$ctrl.valueValidationPattern" data-validation-rules="$ctrl.validationRules[$ctrl.getType()]" data-placeholder-text="{{$ctrl.valuePlaceholder}}" data-uib-tooltip="{{$ctrl.valueTooltip}}" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="100"> </igz-validating-input-field> <igz-validating-input-field class="input-additional-value" data-ng-if="$ctrl.useAdditionalValue && $ctrl.isVisibleByType(\'value\')" data-field-type="input" data-input-name="additionalValue" data-is-disabled="$ctrl.isDisabled" data-input-value="$ctrl.data.additionalValue" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="additionalValue" data-form-object="$ctrl.keyValueInputForm" data-validation-is-required="!$ctrl.additionalValueOptional"> </igz-validating-input-field> </div> </div> <div class="three-dot-menu" data-ng-if="$ctrl.actions.length > 1 && !$ctrl.isDisabled"> <igz-action-menu data-actions="$ctrl.actions" data-on-fire-action="$ctrl.onFireAction"> </igz-action-menu> </div> <div class="igz-action-panel" data-ng-if="$ctrl.actions.length === 1 && !$ctrl.isDisabled"> <div class="actions-list"> <div class="igz-action-item" data-ng-click="$ctrl.onClickAction($ctrl.actions[0])"> <span class="action-icon" data-ng-class="$ctrl.actions[0].icon"> </span> </div> </div> </div> </form> </div> ');
|
|
24624
|
+
$templateCache.put('nuclio/common/components/function-config-dialog/function-config-dialog.tpl.html',
|
|
24625
|
+
'<div class="view-yaml-dialog-container"> <div class="view-yaml-dialog-header"> <div class="title">{{ $ctrl.title }}</div> <igz-copy-to-clipboard data-value="$ctrl.sourceCode"></igz-copy-to-clipboard> <div class="close-button igz-icon-close" data-ng-click="$ctrl.closeDialog()"></div> </div> <div class="main-content"> <ncl-monaco class="monaco-code-editor" data-function-source-code="$ctrl.sourceCode" data-mini-monaco="false" data-selected-theme="\'vs-light\'" data-language="\'yaml\'" data-read-only="true"> </ncl-monaco> </div> <div class="buttons"> <button class="igz-button-primary" tabindex="0" data-ng-click="$ctrl.closeDialog()"> {{ \'common:CLOSE\' | i18next }} </button> </div> </div> ');
|
|
24626
24626
|
}]);
|
|
24627
24627
|
})();
|
|
24628
24628
|
|
|
@@ -24689,6 +24689,19 @@ module.run(['$templateCache', function($templateCache) {
|
|
|
24689
24689
|
}]);
|
|
24690
24690
|
})();
|
|
24691
24691
|
|
|
24692
|
+
(function(module) {
|
|
24693
|
+
try {
|
|
24694
|
+
module = angular.module('iguazio.dashboard-controls.templates');
|
|
24695
|
+
} catch (e) {
|
|
24696
|
+
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24697
|
+
}
|
|
24698
|
+
module.run(['$templateCache', function($templateCache) {
|
|
24699
|
+
$templateCache.put('nuclio/functions/version/function-event-dialog/function-event-dialog.tpl.html',
|
|
24700
|
+
'<div class="function-event-wrapper"> <div class="header"> <div class="title">{{$ctrl.titleText}}</div> <div class="close-button igz-icon-close" data-ng-click="$ctrl.closeEventDialog()"></div> </div> <div class="content"> <form name="$ctrl.functionEventForm" class="event-form" novalidate> <div class="field-wrapper"> <div class="field-label"> {{ \'common:NAME\' | i18next }} </div> <div class="field-content"> <igz-validating-input-field data-field-type="input" data-input-name="displayName" data-input-model-options="$ctrl.inputModelOptions" data-input-value="$ctrl.workingCopy.spec.displayName" data-validation-is-required="true" data-form-object="$ctrl.functionEventForm" data-update-data-callback="$ctrl.inputValueCallback(newData, \'displayName\')" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_NAME_OF_EVENT\' | i18next }}"> </igz-validating-input-field> </div> </div> <div class="field-wrapper"> <div class="field-label"> {{ \'functions:METHOD\' | i18next }} </div> <div class="field-content"> <igz-default-dropdown data-values-array="$ctrl.methods" data-selected-item="$ctrl.selectedMethod" data-item-select-callback="$ctrl.onSelectMethod(item, isItemChanged, field)" data-is-required="true" data-form-object="$ctrl.functionEventForm"> </igz-default-dropdown> </div> </div> <div class="field-wrapper"> <div class="field-label"> {{ \'common:PATH\' | i18next }} </div> <div class="field-content"> <igz-validating-input-field data-field-type="input" data-input-name="path" data-input-model-options="$ctrl.inputModelOptions" data-input-value="$ctrl.workingCopy.spec.attributes.path" data-form-object="$ctrl.functionEventForm" data-update-data-callback="$ctrl.inputValueCallback(newData, \'path\')" data-placeholder-text="{{ \'common:PLACEHOLDER.ENTER_PATH\' | i18next }}"> </igz-validating-input-field> </div> </div> <div class="field-wrapper"> <div class="field-label"> {{ \'functions:CONTENT_TYPE\' | i18next }} </div> <div class="field-content"> <igz-default-dropdown data-values-array="$ctrl.headers" data-selected-item="$ctrl.selectedHeader" data-item-select-callback="$ctrl.onSelectHeader(item, isItemChanged, field)" data-is-required="true" data-form-object="$ctrl.functionEventForm"> </igz-default-dropdown> </div> </div> <div class="field-wrapper"> <div class="field-label"> {{ \'functions:BODY\' | i18next }} </div> <div data-ng-if="$ctrl.contentType === \'application/json\'" class="field-content code-edit-section"> <ncl-monaco data-function-source-code="$ctrl.workingCopy.spec.body" data-selected-theme="$ctrl.bodyTheme" data-language="\'json\'" data-mini-monaco="true" data-on-change-source-code-callback="$ctrl.onChangeSourceCode(sourceCode)" data-read-only="false"> </ncl-monaco> </div> <div data-ng-if="$ctrl.contentType === \'text/plain\'" class="field-content"> <textarea class="event-body" data-ng-model="$ctrl.workingCopy.spec.body" data-ng-change="$ctrl.onChangeBody()" data-form-object="$ctrl.functionEventForm" placeholder="{{ \'functions:PLACEHOLDER.ENTER_BODY_OF_EVENT\' | i18next }}">\n' +
|
|
24701
|
+
' </textarea> </div> </div> </form> <div class="event-error" data-ng-if="$ctrl.isDeployFailed"> {{$ctrl.errorText}} </div> </div> <div class="bottom-bar"> <button class="ncl-secondary-button igz-button-secondary" data-ng-click="$ctrl.closeEventDialog()"> {{ \'common:CANCEL\' | i18next }} </button> <button class="ncl-primary-button igz-button-primary" tabindex="0" data-ng-class="{\'disabled\' : !$ctrl.isFormChanged}" data-ng-disabled="!$ctrl.isFormChanged" data-ng-click="$ctrl.applyChanges()" data-ng-keydown="$ctrl.applyChanges($event)" data-ng-hide="$ctrl.isLoadingState"> {{$ctrl.buttonText}} </button> <div class="ncl-primary-button igz-button-primary" data-ng-show="$ctrl.isLoadingState"> {{ \'common:LOADING_CAPITALIZE_ELLIPSIS\' | i18next }} </div> </div> </div> ');
|
|
24702
|
+
}]);
|
|
24703
|
+
})();
|
|
24704
|
+
|
|
24692
24705
|
(function(module) {
|
|
24693
24706
|
try {
|
|
24694
24707
|
module = angular.module('iguazio.dashboard-controls.templates');
|
|
@@ -24720,9 +24733,8 @@ try {
|
|
|
24720
24733
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24721
24734
|
}
|
|
24722
24735
|
module.run(['$templateCache', function($templateCache) {
|
|
24723
|
-
$templateCache.put('nuclio/functions/version/
|
|
24724
|
-
'<div class="
|
|
24725
|
-
' </textarea> </div> </div> </form> <div class="event-error" data-ng-if="$ctrl.isDeployFailed"> {{$ctrl.errorText}} </div> </div> <div class="bottom-bar"> <button class="ncl-secondary-button igz-button-secondary" data-ng-click="$ctrl.closeEventDialog()"> {{ \'common:CANCEL\' | i18next }} </button> <button class="ncl-primary-button igz-button-primary" tabindex="0" data-ng-class="{\'disabled\' : !$ctrl.isFormChanged}" data-ng-disabled="!$ctrl.isFormChanged" data-ng-click="$ctrl.applyChanges()" data-ng-keydown="$ctrl.applyChanges($event)" data-ng-hide="$ctrl.isLoadingState"> {{$ctrl.buttonText}} </button> <div class="ncl-primary-button igz-button-primary" data-ng-show="$ctrl.isLoadingState"> {{ \'common:LOADING_CAPITALIZE_ELLIPSIS\' | i18next }} </div> </div> </div> ');
|
|
24736
|
+
$templateCache.put('nuclio/functions/version/version-monitoring/version-monitoring.tpl.html',
|
|
24737
|
+
'<div class="ncl-version-monitoring ncl-version" data-igz-extend-background> <div class="igz-scrollable-container" data-ng-scrollbars data-ng-scrollbars-config="$ctrl.scrollConfig"> <div class="ncl-version-monitoring-wrapper"> <div class="row"> <div class="monitoring-block invocation-block"> <div class="internal-invocation-urls"> <span class="monitoring-block-title">{{ \'functions:INTERNAL_INVOCATION_URLS\' | i18next }}: </span> <ul class="invocation-url-list" ng-if="!$ctrl.isFunctionDeploying()"> <li class="monitoring-invocation-url-wrapper" data-ng-repeat="url in $ctrl.version.status.internalInvocationUrls"> <span>{{url}}</span> <div class="igz-action-panel"> <div class="actions-list"> <igz-copy-to-clipboard data-value="url"></igz-copy-to-clipboard> </div> </div> </li> </ul> <p data-ng-if="!$ctrl.version.status.internalInvocationUrls.length || $ctrl.isFunctionDeploying()" data-ng-i18next="common:N_A"></p> </div> <div class="external-invocation-urls"> <span class="monitoring-block-title">{{ \'functions:EXTERNAL_INVOCATION_URLS\' | i18next }}: </span> <igz-more-info data-description="{{ \'functions:TOOLTIP.TO_MAKE_FUNCTION_ACCESSIBLE\' | i18next:{functionId: $ctrl.version.metadata.name} }}" data-trigger="click" data-is-html-enabled="true"> </igz-more-info> <ul class="invocation-url-list" data-ng-if="$ctrl.version.status.externalInvocationUrls.length > 0 && !$ctrl.isFunctionDeploying()"> <li class="monitoring-invocation-url-wrapper" data-ng-repeat="url in $ctrl.version.status.externalInvocationUrls"> <span>{{url}}</span> <div class="igz-action-panel"> <div class="actions-list"> <igz-copy-to-clipboard data-value="url"></igz-copy-to-clipboard> </div> </div> </li> </ul> <p data-ng-if="!$ctrl.version.status.externalInvocationUrls || $ctrl.version.status.externalInvocationUrls.length === 0 || $ctrl.isFunctionDeploying()" data-ng-i18next="common:N_A"></p> </div> </div> </div> <div class="row"> <div class="monitoring-block ncl-monitoring-build-logger"> <span class="icon-collapsed general-content" data-ng-class="$ctrl.rowIsCollapsed.buildLog ? \'igz-icon-right\' : \'igz-icon-down\'" data-ng-click="$ctrl.onRowCollapse(\'buildLog\')"></span> <span class="monitoring-block-title"> {{ \'functions:BUILD_LOG\' | i18next }} </span> <div class="ncl-monitoring-build-logs collapsed-block-content-wrapper" data-uib-collapse="$ctrl.rowIsCollapsed.buildLog"> <ncl-deploy-log data-log-entries="$ctrl.version.status.logs"></ncl-deploy-log> </div> </div> </div> <div class="row" data-ng-if="$ctrl.checkIsErrorState()"> <div class="monitoring-block ncl-monitoring-error-logger"> <span class="icon-collapsed general-content" data-ng-class="$ctrl.rowIsCollapsed.errorLog ? \'igz-icon-right\' : \'igz-icon-down\'" data-ng-click="$ctrl.onRowCollapse(\'errorLog\')"> </span> <span class="monitoring-block-title"> {{ \'common:ERROR\' | i18next }} </span> <div class="ncl-monitoring-error-logs collapsed-block-content-wrapper" data-uib-collapse="$ctrl.rowIsCollapsed.errorLog"> <div class="error-panel igz-scrollable-container" data-ng-scrollbars data-ng-scrollbars-config="$ctrl.scrollConfig"> <div class="log-entry"> <span class="log-entry-error"> {{$ctrl.version.status.message}} </span> </div> </div> </div> </div> </div> </div> </div> </div> ');
|
|
24726
24738
|
}]);
|
|
24727
24739
|
})();
|
|
24728
24740
|
|
|
@@ -24750,18 +24762,6 @@ module.run(['$templateCache', function($templateCache) {
|
|
|
24750
24762
|
}]);
|
|
24751
24763
|
})();
|
|
24752
24764
|
|
|
24753
|
-
(function(module) {
|
|
24754
|
-
try {
|
|
24755
|
-
module = angular.module('iguazio.dashboard-controls.templates');
|
|
24756
|
-
} catch (e) {
|
|
24757
|
-
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24758
|
-
}
|
|
24759
|
-
module.run(['$templateCache', function($templateCache) {
|
|
24760
|
-
$templateCache.put('nuclio/functions/version/version-monitoring/version-monitoring.tpl.html',
|
|
24761
|
-
'<div class="ncl-version-monitoring ncl-version" data-igz-extend-background> <div class="igz-scrollable-container" data-ng-scrollbars data-ng-scrollbars-config="$ctrl.scrollConfig"> <div class="ncl-version-monitoring-wrapper"> <div class="row"> <div class="monitoring-block invocation-block"> <div class="internal-invocation-urls"> <span class="monitoring-block-title">{{ \'functions:INTERNAL_INVOCATION_URLS\' | i18next }}: </span> <ul class="invocation-url-list" ng-if="!$ctrl.isFunctionDeploying()"> <li class="monitoring-invocation-url-wrapper" data-ng-repeat="url in $ctrl.version.status.internalInvocationUrls"> <span>{{url}}</span> <div class="igz-action-panel"> <div class="actions-list"> <igz-copy-to-clipboard data-value="url"></igz-copy-to-clipboard> </div> </div> </li> </ul> <p data-ng-if="!$ctrl.version.status.internalInvocationUrls.length || $ctrl.isFunctionDeploying()" data-ng-i18next="common:N_A"></p> </div> <div class="external-invocation-urls"> <span class="monitoring-block-title">{{ \'functions:EXTERNAL_INVOCATION_URLS\' | i18next }}: </span> <igz-more-info data-description="{{ \'functions:TOOLTIP.TO_MAKE_FUNCTION_ACCESSIBLE\' | i18next:{functionId: $ctrl.version.metadata.name} }}" data-trigger="click" data-is-html-enabled="true"> </igz-more-info> <ul class="invocation-url-list" data-ng-if="$ctrl.version.status.externalInvocationUrls.length > 0 && !$ctrl.isFunctionDeploying()"> <li class="monitoring-invocation-url-wrapper" data-ng-repeat="url in $ctrl.version.status.externalInvocationUrls"> <span>{{url}}</span> <div class="igz-action-panel"> <div class="actions-list"> <igz-copy-to-clipboard data-value="url"></igz-copy-to-clipboard> </div> </div> </li> </ul> <p data-ng-if="!$ctrl.version.status.externalInvocationUrls || $ctrl.version.status.externalInvocationUrls.length === 0 || $ctrl.isFunctionDeploying()" data-ng-i18next="common:N_A"></p> </div> </div> </div> <div class="row"> <div class="monitoring-block ncl-monitoring-build-logger"> <span class="icon-collapsed general-content" data-ng-class="$ctrl.rowIsCollapsed.buildLog ? \'igz-icon-right\' : \'igz-icon-down\'" data-ng-click="$ctrl.onRowCollapse(\'buildLog\')"></span> <span class="monitoring-block-title"> {{ \'functions:BUILD_LOG\' | i18next }} </span> <div class="ncl-monitoring-build-logs collapsed-block-content-wrapper" data-uib-collapse="$ctrl.rowIsCollapsed.buildLog"> <ncl-deploy-log data-log-entries="$ctrl.version.status.logs"></ncl-deploy-log> </div> </div> </div> <div class="row" data-ng-if="$ctrl.checkIsErrorState()"> <div class="monitoring-block ncl-monitoring-error-logger"> <span class="icon-collapsed general-content" data-ng-class="$ctrl.rowIsCollapsed.errorLog ? \'igz-icon-right\' : \'igz-icon-down\'" data-ng-click="$ctrl.onRowCollapse(\'errorLog\')"> </span> <span class="monitoring-block-title"> {{ \'common:ERROR\' | i18next }} </span> <div class="ncl-monitoring-error-logs collapsed-block-content-wrapper" data-uib-collapse="$ctrl.rowIsCollapsed.errorLog"> <div class="error-panel igz-scrollable-container" data-ng-scrollbars data-ng-scrollbars-config="$ctrl.scrollConfig"> <div class="log-entry"> <span class="log-entry-error"> {{$ctrl.version.status.message}} </span> </div> </div> </div> </div> </div> </div> </div> </div> ');
|
|
24762
|
-
}]);
|
|
24763
|
-
})();
|
|
24764
|
-
|
|
24765
24765
|
(function(module) {
|
|
24766
24766
|
try {
|
|
24767
24767
|
module = angular.module('iguazio.dashboard-controls.templates');
|
|
@@ -24940,8 +24940,8 @@ try {
|
|
|
24940
24940
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24941
24941
|
}
|
|
24942
24942
|
module.run(['$templateCache', function($templateCache) {
|
|
24943
|
-
$templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-
|
|
24944
|
-
'<div class="ncl-version-configuration-resources"> <form name="$ctrl.resourcesForm" class="resources-wrapper" novalidate> <div class="title">{{ \'common:RESOURCES\' | i18next }}</div> <div class="row"> <div class="igz-row form-row" data-ng-if="$ctrl.selectedPodTolerationOption"> <div class="igz-col-40 row-title">{{ \'functions:RUN_ON_SPOT_NODES\' | i18next }} <igz-more-info data-description="{{$ctrl.selectedPodTolerationOption.tooltip}}"></igz-more-info> </div> <div class="igz-col-20 input-wrapper"></div> <div class="igz-col-40 input-wrapper"> <div class="row-input preemtion-mode-input"> <igz-default-dropdown data-values-array="$ctrl.podTolerationsOptions" data-selected-item="$ctrl.selectedPodTolerationOption" data-is-disabled="$ctrl.isFunctionDeploying()" data-item-select-callback="$ctrl.podTolerationDropdownCallback(item, isItemChanged, field)" data-item-select-field="spec.preemptionMode"> </igz-default-dropdown> </div> </div> </div> <div class="igz-row form-row"> <div class="igz-col-40 row-title">{{ \'functions:PODS_PRIORITY\' | i18next }}</div> <div class="igz-col-20 input-wrapper"></div> <div class="igz-col-40 input-wrapper"> <div class="row-input priority-class-input"> <igz-default-dropdown data-values-array="$ctrl.podsPriorityOptions" data-selected-item="$ctrl.selectedPodsPriority" data-is-disabled="$ctrl.isFunctionDeploying()" data-item-select-callback="$ctrl.podsPriorityDropdownCallback(item, isItemChanged, field)" data-item-select-field="spec.priorityClassName"> </igz-default-dropdown> </div> </div> </div> <div class="igz-row form-row range-inputs-row"> <div class="igz-col-20 row-title">{{ \'common:MEMORY\' | i18next }} <igz-more-info data-trigger="click" data-is-html-enabled="true" data-is-open="$ctrl.memoryWarningOpen" data-icon-type="{{$ctrl.memoryWarningOpen ? \'warn\' : \'info\'}}" data-description="{{ \'common:RESOURCES_WARNING_LIMIT_FILLED_REQUEST_EMPTY\' | i18next:{ when: \'the function is deployed\' } }}"> </igz-more-info> </div> <div class="igz-col-40 input-wrapper"> <div class="input-title">{{ \'common:REQUEST\' | i18next }}</div> <div class="row-input memory-input memory-number-input"> <igz-number-input data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.resourcesForm" data-input-name="requestMemory" data-update-number-input-callback="$ctrl.memoryInputCallback(newData, field)" data-update-number-input-field="resources.requests.memory" data-min-value="1" data-current-value="$ctrl.resources.requests.memory" data-value-step="1"> </igz-number-input> </div> <div class="row-input memory-input memory-size-dropdown"> <igz-default-dropdown data-read-only="$ctrl.isFunctionDeploying()" data-values-array="$ctrl.dropdownOptions" data-selected-item="$ctrl.selectedRequestUnit" data-item-select-callback="$ctrl.memoryDropdownCallback(item, isItemChanges, field)" data-item-select-field="spec.resources.requests.memory"> </igz-default-dropdown> </div> </div> <div class="igz-col-40 input-wrapper"> <div class="input-title">{{ \'common:LIMIT\' | i18next }}</div> <div class="row-input memory-input memory-number-input"> <igz-number-input data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.resourcesForm" data-input-name="limitsMemory" data-min-value="1" data-update-number-input-callback="$ctrl.memoryInputCallback(newData, field)" data-update-number-input-field="resources.limits.memory" data-current-value="$ctrl.resources.limits.memory" data-value-step="1"> </igz-number-input> </div> <div class="row-input memory-input memory-size-dropdown"> <igz-default-dropdown data-read-only="$ctrl.isFunctionDeploying()" data-values-array="$ctrl.dropdownOptions" data-selected-item="$ctrl.selectedLimitUnit" data-item-select-callback="$ctrl.memoryDropdownCallback(item, isItemChanges, field)" data-item-select-field="spec.resources.limits.memory"> </igz-default-dropdown> </div> </div> </div> <div class="igz-row form-row range-inputs-row"> <div class="igz-col-20 row-title">{{ \'common:CPU\' | i18next }}</div> <div class="igz-col-40 input-wrapper"> <div class="input-title">{{ \'common:REQUEST\' | i18next }}</div> <div class="row-input cpu-number-input"> <igz-number-input data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.resourcesForm" data-input-name="requestCpu" data-placeholder="{{ $ctrl.selectedCpuRequestItem.placeholder }}" data-update-number-input-callback="$ctrl.cpuInputCallback(newData, field)" data-update-number-input-field="resources.requests.cpu" data-min-value="$ctrl.selectedCpuRequestItem.minValue" data-precision="{{ $ctrl.selectedCpuRequestItem.precision }}" data-value-step="{{ $ctrl.selectedCpuRequestItem.step }}" data-current-value="$ctrl.resources.requests.cpu"> </igz-number-input> </div> <div class="row-input cpu-dropdown"> <igz-default-dropdown data-read-only="$ctrl.isFunctionDeploying()" data-values-array="$ctrl.cpuDropdownOptions" data-selected-item="$ctrl.selectedCpuRequestItem" data-item-select-callback="$ctrl.cpuDropdownCallback(item, isItemChanged, field)" data-item-select-field="selectedCpuRequestItem"> </igz-default-dropdown> </div> </div> <div class="igz-col-40 input-wrapper"> <div class="input-title">{{ \'common:LIMIT\' | i18next }}</div> <div class="row-input cpu-number-input"> <igz-number-input data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.resourcesForm" data-input-name="limitsCpu" data-placeholder="{{ $ctrl.selectedCpuLimitItem.placeholder }}" data-update-number-input-callback="$ctrl.cpuInputCallback(newData, field)" data-update-number-input-field="resources.limits.cpu" data-min-value="$ctrl.selectedCpuLimitItem.minValue" data-precision="{{ $ctrl.selectedCpuLimitItem.precision }}" data-value-step="{{ $ctrl.selectedCpuLimitItem.step }}" data-current-value="$ctrl.resources.limits.cpu"> </igz-number-input> </div> <div class="row-input cpu-dropdown"> <igz-default-dropdown data-read-only="$ctrl.isFunctionDeploying()" data-values-array="$ctrl.cpuDropdownOptions" data-selected-item="$ctrl.selectedCpuLimitItem" data-item-select-callback="$ctrl.cpuDropdownCallback(item, isItemChanged, field)" data-item-select-field="selectedCpuLimitItem"> </igz-default-dropdown> </div> </div> </div> <div class="igz-row form-row range-inputs-row"> <div class="igz-col-20 row-title">{{ \'common:GPU\' | i18next }}</div> <div class="igz-col-40 input-wrapper"></div> <div class="igz-col-40 input-wrapper" data-uib-tooltip="{{ \'functions:TOOLTIP.GPU_LIMIT\' | i18next }}" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="500"> <div class="input-title">{{ \'common:LIMIT\' | i18next }}</div> <div class="row-input gpu-number-input"> <igz-number-input data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.resourcesForm" data-input-name="limitsGpu" data-update-number-input-callback="$ctrl.gpuInputCallback(newData, field)" data-update-number-input-field="limits" data-min-value="1" data-max-value="4" data-value-step="1" data-current-value="$ctrl.resources.limits.gpu"> </igz-number-input> </div> </div> </div> <div class="igz-row form-row range-inputs-row"> <div class="igz-col-20 row-title"> {{ \'common:REPLICAS\' | i18next }} </div> <div class="igz-col-40 input-wrapper"> <div class="input-title"> {{ \'common:MIN\' | i18next }} <igz-more-info data-description="{{ \'functions:MIN_REPLICAS\' | i18next:{default: $ctrl.defaultFunctionConfig.spec.minReplicas} }}" data-default-tooltip-placement="top" data-trigger="click"> </igz-more-info> </div> <div class="row-input replicas-number-input"> <igz-number-input data-form-object="$ctrl.resourcesForm" data-input-name="minReplicas" data-current-value="$ctrl.minReplicas" data-update-number-input-callback="$ctrl.replicasInputCallback(newData, field)" data-update-number-input-field="minReplicas" data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-placeholder="" data-precision="0" data-value-step="1" data-min-value="0" data-max-value="$ctrl.maxReplicas || Infinity"> </igz-number-input> </div> </div> <div class="igz-col-40 input-wrapper"> <div class="input-title" data-ng-class="{ asterisk: $ctrl.minReplicas === 0 }"> {{ \'functions:MAX\' | i18next }} <igz-more-info data-description="{{ \'functions:MAX_REPLICAS\' | i18next:{default: $ctrl.defaultFunctionConfig.spec.maxReplicas} }}" data-default-tooltip-placement="top" data-trigger="click"> </igz-more-info> </div> <div class="row-input replicas-number-input"> <igz-number-input data-form-object="$ctrl.resourcesForm" data-input-name="maxReplicas" data-current-value="$ctrl.maxReplicas" data-update-number-input-callback="$ctrl.replicasInputCallback(newData, field)" data-update-number-input-field="maxReplicas" data-allow-empty-field="true" data-is-disabled="$ctrl.isFunctionDeploying()" data-placeholder="{{ $ctrl.minReplicas === 0 ? (\'functions:PLACEHOLDER.MAX_REQUIRED\' | i18next) : \'\' }}" data-precision="0" data-value-step="1" data-validation-is-required="$ctrl.minReplicas === 0" data-min-value="$ctrl.minReplicas || 1"> </igz-number-input> </div> </div> </div> <div class="igz-row form-row align-items-center slider-block" data-ng-if="$ctrl.isInactivityWindowShown()"> <div class="igz-col-25 row-title no-margin"> <span>{{ \'common:INACTIVITY_WINDOW\' | i18next }}</span> <igz-more-info data-description="{{ \'common:INACTIVITY_WINDOW_DESCRIPTION\' | i18next }}" data-trigger="click"> </igz-more-info> </div> <div class="igz-col-75 row-input slider" data-uib-tooltip="{{ \'functions:TOOLTIP.INACTIVITY_WINDOW\' | i18next }}" data-tooltip-enable="$ctrl.windowSizeSlider.options.disabled" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="500"> <rzslider class="rzslider" data-rz-slider-model="$ctrl.windowSizeSlider.value" data-rz-slider-options="$ctrl.windowSizeSlider.options"> </rzslider> </div> </div> <div class="igz-row form-row range-inputs-row slider-block"> <div class="igz-col-25 row-title no-margin target-cpu-title"> <span>{{ \'common:TARGET_CPU\' | i18next }}</span> <igz-more-info data-description="{{ \'functions:TARGET_CPU_DESCRIPTION\' | i18next:{default: $ctrl.defaultFunctionConfig.spec.targetCPU} }}" data-trigger="click" data-is-html-enabled="true"> </igz-more-info> </div> <div class="igz-col-75 row-input slider"> <igz-slider-input-block data-slider-config="$ctrl.targetCpuSliderConfig" data-measure-units="null" data-value-unit="$ctrl.targetCpuValueUnit" data-slider-block-updating-broadcast="" data-on-change-callback="$ctrl.sliderInputCallback" data-update-slider-input="spec.targetCPU" data-allow-full-range="true" data-uib-tooltip="{{ \'functions:TOOLTIP.TARGET_CPU\' | i18next }}" data-tooltip-enable="$ctrl.targetCpuSliderConfig.options.disabled" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="500"> </igz-slider-input-block> </div> </div> </div> </form> <form name="$ctrl.nodeSelectorsForm" novalidate> <div class="igz-row-flex"> <div class="title">{{ \'functions:NODE_SELECTORS\' | i18next }}</div> <a class="link" data-ng-class="{ \'disabled\': $ctrl.isFunctionDeploying() }" data-ng-click="$ctrl.handleRevertToDefaultsClick()" data-ng-hide="$ctrl.revertToDefaultsBtnIsHidden"> {{ \'functions:REVERT_TO_DEFAULTS\' | i18next }} </a> </div> <div class="row"> <div class="igz-row form-row"> <div class="table-body" data-ng-repeat="nodeSelector in $ctrl.nodeSelectors"> <ncl-key-value-input class="node-selectors" data-row-data="nodeSelector" data-item-index="$index" data-use-type="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-validation-rules="$ctrl.nodeSelectorsValidationRules" data-action-handler-callback="$ctrl.handleNodeSelectorsAction(actionType, index)" data-change-data-callback="$ctrl.onChangeNodeSelectorsData(newData, index)" data-submit-on-fly="true"> </ncl-key-value-input> </div> <div class="igz-create-button" data-ng-class="{ \'disabled\': $ctrl.isFunctionDeploying() }" data-ng-click="$ctrl.addNewNodeSelector($event)"> <span class="igz-icon-add-round"></span> {{ \'common:CREATE_NEW_ENTRY\' | i18next }} </div> </div> </div> </form> </div> ');
|
|
24943
|
+
$templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-logging/version-configuration-logging.tpl.html',
|
|
24944
|
+
'<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> ');
|
|
24945
24945
|
}]);
|
|
24946
24946
|
})();
|
|
24947
24947
|
|
|
@@ -24952,8 +24952,8 @@ try {
|
|
|
24952
24952
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24953
24953
|
}
|
|
24954
24954
|
module.run(['$templateCache', function($templateCache) {
|
|
24955
|
-
$templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-
|
|
24956
|
-
'<div class="ncl-version-configuration-runtime-attributes"> <div class="title">{{ \'functions:RUNTIME_ATTRIBUTES\' | i18next }}</div> <form name="$ctrl.runtimeAttributesForm" class="runtime-attributes-wrapper" novalidate> <div class="row" data-ng-class="{\'info-row\': $ctrl.version.spec.runtime !== \'shell\'}" data-ng-if="$ctrl.version.spec.runtime !== \'java\'"> <div class="runtime-title"> <span class="label">{{ \'functions:RUNTIME\' | i18next }}</span> <div class="runtime"> {{$ctrl.version.spec.runtime}} </div> </div> <div class="arguments-input" data-ng-if="$ctrl.version.spec.runtime === \'shell\'"> <span class="label">{{ \'common:ARGUMENTS\' | i18next }}</span> <igz-validating-input-field data-field-type="input" data-input-name="arguments" data-input-value="$ctrl.runtimeAttributes.arguments" data-read-only="$ctrl.isFunctionDeploying()" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="arguments" data-form-object="$ctrl.runtimeAttributesForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_ARGUMENTS\' | i18next }}"> </igz-validating-input-field> </div> </div> <div class="row igz-col-100 info-row" data-ng-if="$ctrl.version.spec.runtime === \'java\'"> <div class="row igz-col-100 info-row"> <span class="field-label">{{ \'functions:JVM_OPTIONS\' | i18next }}</span> <igz-validating-input-field data-field-type="textarea" data-input-name="jvmOptions" data-input-value="$ctrl.runtimeAttributes.jvmOptions" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.runtimeAttributesForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_OPTION_ON_EACH_LINE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="jvmOptions" class="build-command-field java-attribute"> </igz-validating-input-field> </div> </div> <div class="row info-row" data-ng-if="$ctrl.version.spec.runtime === \'shell\'"> <span class="label">{{ \'functions:RESPONSE_HEADERS\' | i18next }}</span> <div data-ng-if="$ctrl.attributes.length > 0" class="table-headers"> <div class="key-header">{{ \'common:KEY\' | i18next }}</div> <div class="value-header">{{ \'common:VALUE\' | i18next }}</div> </div> <div class="igz-scrollable-container" data-ng-scrollbars data-igz-ng-scrollbars-config="{{$ctrl.igzScrollConfig}}" data-ng-scrollbars-config="$ctrl.scrollConfig"> <div class="table-body" data-ng-repeat="attribute in $ctrl.attributes"> <ncl-key-value-input class="new-label-input" data-row-data="attribute" data-use-type="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-item-index="$index" data-action-handler-callback="$ctrl.handleAction(actionType, index)" data-change-data-callback="$ctrl.onChangeData(newData, index)" data-submit-on-fly="true"> </ncl-key-value-input> </div> </div> <div class="igz-create-button create-label-button" data-ng-class="{\'disabled\': $ctrl.isFunctionDeploying()}" data-ng-click="$ctrl.addNewAttribute($event)"> <span class="igz-icon-add-round"></span> {{ \'functions:CREATE_NEW_RUNTIME_ATTRIBUTE\' | i18next }} </div> </div> </form> </div> ');
|
|
24955
|
+
$templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-resources/version-configuration-resources.tpl.html',
|
|
24956
|
+
'<div class="ncl-version-configuration-resources"> <form name="$ctrl.resourcesForm" class="resources-wrapper" novalidate> <div class="title">{{ \'common:RESOURCES\' | i18next }}</div> <div class="row"> <div class="igz-row form-row" data-ng-if="$ctrl.selectedPodTolerationOption"> <div class="igz-col-40 row-title">{{ \'functions:RUN_ON_SPOT_NODES\' | i18next }} <igz-more-info data-description="{{$ctrl.selectedPodTolerationOption.tooltip}}"></igz-more-info> </div> <div class="igz-col-20 input-wrapper"></div> <div class="igz-col-40 input-wrapper"> <div class="row-input preemtion-mode-input"> <igz-default-dropdown data-values-array="$ctrl.podTolerationsOptions" data-selected-item="$ctrl.selectedPodTolerationOption" data-is-disabled="$ctrl.isFunctionDeploying()" data-item-select-callback="$ctrl.podTolerationDropdownCallback(item, isItemChanged, field)" data-item-select-field="spec.preemptionMode"> </igz-default-dropdown> </div> </div> </div> <div class="igz-row form-row"> <div class="igz-col-40 row-title">{{ \'functions:PODS_PRIORITY\' | i18next }}</div> <div class="igz-col-20 input-wrapper"></div> <div class="igz-col-40 input-wrapper"> <div class="row-input priority-class-input"> <igz-default-dropdown data-values-array="$ctrl.podsPriorityOptions" data-selected-item="$ctrl.selectedPodsPriority" data-is-disabled="$ctrl.isFunctionDeploying()" data-item-select-callback="$ctrl.podsPriorityDropdownCallback(item, isItemChanged, field)" data-item-select-field="spec.priorityClassName"> </igz-default-dropdown> </div> </div> </div> <div class="igz-row form-row range-inputs-row"> <div class="igz-col-20 row-title">{{ \'common:MEMORY\' | i18next }} <igz-more-info data-trigger="click" data-is-html-enabled="true" data-is-open="$ctrl.memoryWarningOpen" data-icon-type="{{$ctrl.memoryWarningOpen ? \'warn\' : \'info\'}}" data-description="{{ \'common:RESOURCES_WARNING_LIMIT_FILLED_REQUEST_EMPTY\' | i18next:{ when: \'the function is deployed\' } }}"> </igz-more-info> </div> <div class="igz-col-40 input-wrapper"> <div class="input-title">{{ \'common:REQUEST\' | i18next }}</div> <div class="row-input memory-input memory-number-input"> <igz-number-input data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.resourcesForm" data-input-name="requestMemory" data-update-number-input-callback="$ctrl.memoryInputCallback(newData, field)" data-update-number-input-field="resources.requests.memory" data-min-value="1" data-current-value="$ctrl.resources.requests.memory" data-value-step="1"> </igz-number-input> </div> <div class="row-input memory-input memory-size-dropdown"> <igz-default-dropdown data-read-only="$ctrl.isFunctionDeploying()" data-values-array="$ctrl.dropdownOptions" data-selected-item="$ctrl.selectedRequestUnit" data-item-select-callback="$ctrl.memoryDropdownCallback(item, isItemChanges, field)" data-item-select-field="spec.resources.requests.memory"> </igz-default-dropdown> </div> </div> <div class="igz-col-40 input-wrapper"> <div class="input-title">{{ \'common:LIMIT\' | i18next }}</div> <div class="row-input memory-input memory-number-input"> <igz-number-input data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.resourcesForm" data-input-name="limitsMemory" data-min-value="1" data-update-number-input-callback="$ctrl.memoryInputCallback(newData, field)" data-update-number-input-field="resources.limits.memory" data-current-value="$ctrl.resources.limits.memory" data-value-step="1"> </igz-number-input> </div> <div class="row-input memory-input memory-size-dropdown"> <igz-default-dropdown data-read-only="$ctrl.isFunctionDeploying()" data-values-array="$ctrl.dropdownOptions" data-selected-item="$ctrl.selectedLimitUnit" data-item-select-callback="$ctrl.memoryDropdownCallback(item, isItemChanges, field)" data-item-select-field="spec.resources.limits.memory"> </igz-default-dropdown> </div> </div> </div> <div class="igz-row form-row range-inputs-row"> <div class="igz-col-20 row-title">{{ \'common:CPU\' | i18next }}</div> <div class="igz-col-40 input-wrapper"> <div class="input-title">{{ \'common:REQUEST\' | i18next }}</div> <div class="row-input cpu-number-input"> <igz-number-input data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.resourcesForm" data-input-name="requestCpu" data-placeholder="{{ $ctrl.selectedCpuRequestItem.placeholder }}" data-update-number-input-callback="$ctrl.cpuInputCallback(newData, field)" data-update-number-input-field="resources.requests.cpu" data-min-value="$ctrl.selectedCpuRequestItem.minValue" data-precision="{{ $ctrl.selectedCpuRequestItem.precision }}" data-value-step="{{ $ctrl.selectedCpuRequestItem.step }}" data-current-value="$ctrl.resources.requests.cpu"> </igz-number-input> </div> <div class="row-input cpu-dropdown"> <igz-default-dropdown data-read-only="$ctrl.isFunctionDeploying()" data-values-array="$ctrl.cpuDropdownOptions" data-selected-item="$ctrl.selectedCpuRequestItem" data-item-select-callback="$ctrl.cpuDropdownCallback(item, isItemChanged, field)" data-item-select-field="selectedCpuRequestItem"> </igz-default-dropdown> </div> </div> <div class="igz-col-40 input-wrapper"> <div class="input-title">{{ \'common:LIMIT\' | i18next }}</div> <div class="row-input cpu-number-input"> <igz-number-input data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.resourcesForm" data-input-name="limitsCpu" data-placeholder="{{ $ctrl.selectedCpuLimitItem.placeholder }}" data-update-number-input-callback="$ctrl.cpuInputCallback(newData, field)" data-update-number-input-field="resources.limits.cpu" data-min-value="$ctrl.selectedCpuLimitItem.minValue" data-precision="{{ $ctrl.selectedCpuLimitItem.precision }}" data-value-step="{{ $ctrl.selectedCpuLimitItem.step }}" data-current-value="$ctrl.resources.limits.cpu"> </igz-number-input> </div> <div class="row-input cpu-dropdown"> <igz-default-dropdown data-read-only="$ctrl.isFunctionDeploying()" data-values-array="$ctrl.cpuDropdownOptions" data-selected-item="$ctrl.selectedCpuLimitItem" data-item-select-callback="$ctrl.cpuDropdownCallback(item, isItemChanged, field)" data-item-select-field="selectedCpuLimitItem"> </igz-default-dropdown> </div> </div> </div> <div class="igz-row form-row range-inputs-row"> <div class="igz-col-20 row-title">{{ \'common:GPU\' | i18next }}</div> <div class="igz-col-40 input-wrapper"></div> <div class="igz-col-40 input-wrapper" data-uib-tooltip="{{ \'functions:TOOLTIP.GPU_LIMIT\' | i18next }}" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="500"> <div class="input-title">{{ \'common:LIMIT\' | i18next }}</div> <div class="row-input gpu-number-input"> <igz-number-input data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.resourcesForm" data-input-name="limitsGpu" data-update-number-input-callback="$ctrl.gpuInputCallback(newData, field)" data-update-number-input-field="limits" data-min-value="1" data-max-value="4" data-value-step="1" data-current-value="$ctrl.resources.limits.gpu"> </igz-number-input> </div> </div> </div> <div class="igz-row form-row range-inputs-row"> <div class="igz-col-20 row-title"> {{ \'common:REPLICAS\' | i18next }} </div> <div class="igz-col-40 input-wrapper"> <div class="input-title"> {{ \'common:MIN\' | i18next }} <igz-more-info data-description="{{ \'functions:MIN_REPLICAS\' | i18next:{default: $ctrl.defaultFunctionConfig.spec.minReplicas} }}" data-default-tooltip-placement="top" data-trigger="click"> </igz-more-info> </div> <div class="row-input replicas-number-input"> <igz-number-input data-form-object="$ctrl.resourcesForm" data-input-name="minReplicas" data-current-value="$ctrl.minReplicas" data-update-number-input-callback="$ctrl.replicasInputCallback(newData, field)" data-update-number-input-field="minReplicas" data-allow-empty-field="true" data-validation-is-required="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-placeholder="" data-precision="0" data-value-step="1" data-min-value="0" data-max-value="$ctrl.maxReplicas || Infinity"> </igz-number-input> </div> </div> <div class="igz-col-40 input-wrapper"> <div class="input-title" data-ng-class="{ asterisk: $ctrl.minReplicas === 0 }"> {{ \'functions:MAX\' | i18next }} <igz-more-info data-description="{{ \'functions:MAX_REPLICAS\' | i18next:{default: $ctrl.defaultFunctionConfig.spec.maxReplicas} }}" data-default-tooltip-placement="top" data-trigger="click"> </igz-more-info> </div> <div class="row-input replicas-number-input"> <igz-number-input data-form-object="$ctrl.resourcesForm" data-input-name="maxReplicas" data-current-value="$ctrl.maxReplicas" data-update-number-input-callback="$ctrl.replicasInputCallback(newData, field)" data-update-number-input-field="maxReplicas" data-allow-empty-field="true" data-is-disabled="$ctrl.isFunctionDeploying()" data-placeholder="{{ $ctrl.minReplicas === 0 ? (\'functions:PLACEHOLDER.MAX_REQUIRED\' | i18next) : \'\' }}" data-precision="0" data-value-step="1" data-validation-is-required="$ctrl.minReplicas === 0" data-min-value="$ctrl.minReplicas || 1"> </igz-number-input> </div> </div> </div> <div class="igz-row form-row align-items-center slider-block" data-ng-if="$ctrl.isInactivityWindowShown()"> <div class="igz-col-25 row-title no-margin"> <span>{{ \'common:INACTIVITY_WINDOW\' | i18next }}</span> <igz-more-info data-description="{{ \'common:INACTIVITY_WINDOW_DESCRIPTION\' | i18next }}" data-trigger="click"> </igz-more-info> </div> <div class="igz-col-75 row-input slider" data-uib-tooltip="{{ \'functions:TOOLTIP.INACTIVITY_WINDOW\' | i18next }}" data-tooltip-enable="$ctrl.windowSizeSlider.options.disabled" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="500"> <rzslider class="rzslider" data-rz-slider-model="$ctrl.windowSizeSlider.value" data-rz-slider-options="$ctrl.windowSizeSlider.options"> </rzslider> </div> </div> <div class="igz-row form-row range-inputs-row slider-block"> <div class="igz-col-25 row-title no-margin target-cpu-title"> <span>{{ \'common:TARGET_CPU\' | i18next }}</span> <igz-more-info data-description="{{ \'functions:TARGET_CPU_DESCRIPTION\' | i18next:{default: $ctrl.defaultFunctionConfig.spec.targetCPU} }}" data-trigger="click" data-is-html-enabled="true"> </igz-more-info> </div> <div class="igz-col-75 row-input slider"> <igz-slider-input-block data-slider-config="$ctrl.targetCpuSliderConfig" data-measure-units="null" data-value-unit="$ctrl.targetCpuValueUnit" data-slider-block-updating-broadcast="" data-on-change-callback="$ctrl.sliderInputCallback" data-update-slider-input="spec.targetCPU" data-allow-full-range="true" data-uib-tooltip="{{ \'functions:TOOLTIP.TARGET_CPU\' | i18next }}" data-tooltip-enable="$ctrl.targetCpuSliderConfig.options.disabled" data-tooltip-append-to-body="true" data-tooltip-placement="bottom" data-tooltip-popup-delay="500"> </igz-slider-input-block> </div> </div> </div> </form> <form name="$ctrl.nodeSelectorsForm" novalidate> <div class="igz-row-flex"> <div class="title">{{ \'functions:NODE_SELECTORS\' | i18next }}</div> <a class="link" data-ng-class="{ \'disabled\': $ctrl.isFunctionDeploying() }" data-ng-click="$ctrl.handleRevertToDefaultsClick()" data-ng-hide="$ctrl.revertToDefaultsBtnIsHidden"> {{ \'functions:REVERT_TO_DEFAULTS\' | i18next }} </a> </div> <div class="row"> <div class="igz-row form-row"> <div class="table-body" data-ng-repeat="nodeSelector in $ctrl.nodeSelectors"> <ncl-key-value-input class="node-selectors" data-row-data="nodeSelector" data-item-index="$index" data-use-type="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-validation-rules="$ctrl.nodeSelectorsValidationRules" data-action-handler-callback="$ctrl.handleNodeSelectorsAction(actionType, index)" data-change-data-callback="$ctrl.onChangeNodeSelectorsData(newData, index)" data-submit-on-fly="true"> </ncl-key-value-input> </div> <div class="igz-create-button" data-ng-class="{ \'disabled\': $ctrl.isFunctionDeploying() }" data-ng-click="$ctrl.addNewNodeSelector($event)"> <span class="igz-icon-add-round"></span> {{ \'common:CREATE_NEW_ENTRY\' | i18next }} </div> </div> </div> </form> </div> ');
|
|
24957
24957
|
}]);
|
|
24958
24958
|
})();
|
|
24959
24959
|
|
|
@@ -24964,8 +24964,8 @@ try {
|
|
|
24964
24964
|
module = angular.module('iguazio.dashboard-controls.templates', []);
|
|
24965
24965
|
}
|
|
24966
24966
|
module.run(['$templateCache', function($templateCache) {
|
|
24967
|
-
$templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-
|
|
24968
|
-
'<div class="ncl-version-configuration-
|
|
24967
|
+
$templateCache.put('nuclio/functions/version/version-configuration/tabs/version-configuration-runtime-attributes/version-configuration-runtime-attributes.tpl.html',
|
|
24968
|
+
'<div class="ncl-version-configuration-runtime-attributes"> <div class="title">{{ \'functions:RUNTIME_ATTRIBUTES\' | i18next }}</div> <form name="$ctrl.runtimeAttributesForm" class="runtime-attributes-wrapper" novalidate> <div class="row" data-ng-class="{\'info-row\': $ctrl.version.spec.runtime !== \'shell\'}" data-ng-if="$ctrl.version.spec.runtime !== \'java\'"> <div class="runtime-title"> <span class="label">{{ \'functions:RUNTIME\' | i18next }}</span> <div class="runtime"> {{$ctrl.version.spec.runtime}} </div> </div> <div class="arguments-input" data-ng-if="$ctrl.version.spec.runtime === \'shell\'"> <span class="label">{{ \'common:ARGUMENTS\' | i18next }}</span> <igz-validating-input-field data-field-type="input" data-input-name="arguments" data-input-value="$ctrl.runtimeAttributes.arguments" data-read-only="$ctrl.isFunctionDeploying()" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="arguments" data-form-object="$ctrl.runtimeAttributesForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_ARGUMENTS\' | i18next }}"> </igz-validating-input-field> </div> </div> <div class="row igz-col-100 info-row" data-ng-if="$ctrl.version.spec.runtime === \'java\'"> <div class="row igz-col-100 info-row"> <span class="field-label">{{ \'functions:JVM_OPTIONS\' | i18next }}</span> <igz-validating-input-field data-field-type="textarea" data-input-name="jvmOptions" data-input-value="$ctrl.runtimeAttributes.jvmOptions" data-is-focused="false" data-read-only="$ctrl.isFunctionDeploying()" data-form-object="$ctrl.runtimeAttributesForm" data-placeholder-text="{{ \'functions:PLACEHOLDER.ENTER_OPTION_ON_EACH_LINE\' | i18next }}" data-update-data-callback="$ctrl.inputValueCallback(newData, field)" data-update-data-field="jvmOptions" class="build-command-field java-attribute"> </igz-validating-input-field> </div> </div> <div class="row info-row" data-ng-if="$ctrl.version.spec.runtime === \'shell\'"> <span class="label">{{ \'functions:RESPONSE_HEADERS\' | i18next }}</span> <div data-ng-if="$ctrl.attributes.length > 0" class="table-headers"> <div class="key-header">{{ \'common:KEY\' | i18next }}</div> <div class="value-header">{{ \'common:VALUE\' | i18next }}</div> </div> <div class="igz-scrollable-container" data-ng-scrollbars data-igz-ng-scrollbars-config="{{$ctrl.igzScrollConfig}}" data-ng-scrollbars-config="$ctrl.scrollConfig"> <div class="table-body" data-ng-repeat="attribute in $ctrl.attributes"> <ncl-key-value-input class="new-label-input" data-row-data="attribute" data-use-type="false" data-is-disabled="$ctrl.isFunctionDeploying()" data-item-index="$index" data-action-handler-callback="$ctrl.handleAction(actionType, index)" data-change-data-callback="$ctrl.onChangeData(newData, index)" data-submit-on-fly="true"> </ncl-key-value-input> </div> </div> <div class="igz-create-button create-label-button" data-ng-class="{\'disabled\': $ctrl.isFunctionDeploying()}" data-ng-click="$ctrl.addNewAttribute($event)"> <span class="igz-icon-add-round"></span> {{ \'functions:CREATE_NEW_RUNTIME_ATTRIBUTE\' | i18next }} </div> </div> </form> </div> ');
|
|
24969
24969
|
}]);
|
|
24970
24970
|
})();
|
|
24971
24971
|
|