iguazio.dashboard-controls 1.0.15-3.6.2 → 1.0.16-1.13.x
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/i18n/en/common.json +82 -82
- package/dist/i18n/en/functions.json +112 -110
- package/dist/js/iguazio.dashboard-controls.js +6813 -6831
- package/dist/less/iguazio.dashboard-controls.less +1265 -1261
- package/package.json +4 -4
- package/src/i18n/en/common.json +82 -82
- package/src/i18n/en/functions.json +112 -110
- package/src/igz_controls/services/validation.service.js +29 -26
- package/src/nuclio/common/screens/create-function/function-from-scratch/function-from-scratch.component.js +0 -14
- package/src/nuclio/common/screens/create-function/function-from-template/function-from-template.component.js +0 -14
- package/src/nuclio/functions/version/version-configuration/tabs/version-configuration-annotations/version-configuration-annotations.component.js +1 -1
- package/src/nuclio/functions/version/version-configuration/tabs/version-configuration-environment-variables/version-configuration-environment-variables.component.js +3 -3
- package/src/nuclio/functions/version/version-configuration/tabs/version-configuration-labels/version-configuration-labels.component.js +1 -1
- package/src/nuclio/functions/version/version-configuration/tabs/version-configuration-resources/version-configuration-resources.component.js +18 -22
- package/src/nuclio/functions/version/version-configuration/tabs/version-configuration-volumes/version-configuration-volumes.component.js +1 -1
- package/src/nuclio/functions/version/version-monitoring/version-monitoring.component.js +11 -0
- package/src/nuclio/functions/version/version-triggers/version-triggers.component.js +11 -1
- package/src/nuclio/functions/version/version-triggers/version-triggers.less +4 -0
- package/src/nuclio/functions/version/version-triggers/version-triggers.tpl.html +16 -0
|
@@ -99,14 +99,14 @@ such restriction.
|
|
|
99
99
|
];
|
|
100
100
|
ctrl.nodeSelectors = [];
|
|
101
101
|
ctrl.nodeSelectorsValidationRules = {
|
|
102
|
-
key:
|
|
102
|
+
key: [
|
|
103
103
|
{
|
|
104
104
|
name: 'uniqueness',
|
|
105
|
-
label: $i18next.t('
|
|
105
|
+
label: $i18next.t('functions:UNIQUENESS', {lng: lng}),
|
|
106
106
|
pattern: validateNodeSelectorUniqueness
|
|
107
107
|
}
|
|
108
|
-
]
|
|
109
|
-
value: ValidationService.getValidationRules('
|
|
108
|
+
],
|
|
109
|
+
value: ValidationService.getValidationRules('k8s.qualifiedName')
|
|
110
110
|
};
|
|
111
111
|
ctrl.podsPriorityOptions = [
|
|
112
112
|
{
|
|
@@ -210,7 +210,7 @@ such restriction.
|
|
|
210
210
|
ctrl.maxReplicas = lodash.get(ctrl.version, 'spec.maxReplicas');
|
|
211
211
|
|
|
212
212
|
initScaleToZeroData();
|
|
213
|
-
initNodeSelectors();
|
|
213
|
+
initNodeSelectors(changes.version.isFirstChange());
|
|
214
214
|
|
|
215
215
|
$timeout(function () {
|
|
216
216
|
setFormValidity();
|
|
@@ -346,11 +346,10 @@ such restriction.
|
|
|
346
346
|
*/
|
|
347
347
|
function handleRevertToDefaultsClick() {
|
|
348
348
|
DialogsService.confirm($i18next.t('functions:REVERT_NODE_SELECTORS_TO_DEFAULTS_CONFIRM', {lng: lng}),
|
|
349
|
-
$i18next.t('functions:YES_REVERT_CONFIRM', {lng: lng})
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
});
|
|
349
|
+
$i18next.t('functions:YES_REVERT_CONFIRM', {lng: lng}),
|
|
350
|
+
$i18next.t('common:CANCEL', {lng: lng})).then(function () {
|
|
351
|
+
setNodeSelectorsDefaultValue();
|
|
352
|
+
});
|
|
354
353
|
}
|
|
355
354
|
|
|
356
355
|
/**
|
|
@@ -560,14 +559,15 @@ such restriction.
|
|
|
560
559
|
* Checks whether the `Revert to defaults` button must be hidden
|
|
561
560
|
*/
|
|
562
561
|
function checkNodeSelectorsIdentity() {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
562
|
+
const nodeSelectors = lodash.map(ctrl.nodeSelectors, function (selector) {
|
|
563
|
+
return {
|
|
564
|
+
key: selector.name,
|
|
565
|
+
value: selector.value
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
568
|
|
|
569
569
|
ctrl.revertToDefaultsBtnIsHidden = lodash.isEqual(
|
|
570
|
-
lodash.get(ConfigService,'nuclio.defaultFunctionConfig.attributes.spec.nodeSelector',
|
|
570
|
+
lodash.get(ConfigService,'nuclio.defaultFunctionConfig.attributes.spec.nodeSelector', []), nodeSelectors);
|
|
571
571
|
}
|
|
572
572
|
|
|
573
573
|
/**
|
|
@@ -611,7 +611,7 @@ such restriction.
|
|
|
611
611
|
/**
|
|
612
612
|
* Initializes data for Node selectors section
|
|
613
613
|
*/
|
|
614
|
-
function initNodeSelectors() {
|
|
614
|
+
function initNodeSelectors(isFirstInit) {
|
|
615
615
|
ctrl.nodeSelectors = lodash.chain(ctrl.version)
|
|
616
616
|
.get('spec.nodeSelector', {})
|
|
617
617
|
.map(function (value, key) {
|
|
@@ -627,7 +627,7 @@ such restriction.
|
|
|
627
627
|
})
|
|
628
628
|
.value();
|
|
629
629
|
|
|
630
|
-
if ($stateParams.isNewFunction &&
|
|
630
|
+
if ($stateParams.isNewFunction && isFirstInit) {
|
|
631
631
|
setNodeSelectorsDefaultValue();
|
|
632
632
|
} else {
|
|
633
633
|
checkNodeSelectorsIdentity();
|
|
@@ -798,10 +798,6 @@ such restriction.
|
|
|
798
798
|
};
|
|
799
799
|
})
|
|
800
800
|
.value();
|
|
801
|
-
|
|
802
|
-
$timeout(function () {
|
|
803
|
-
updateNodeSelectors();
|
|
804
|
-
}, 0);
|
|
805
801
|
}
|
|
806
802
|
|
|
807
803
|
/**
|
|
@@ -50,7 +50,7 @@ such restriction.
|
|
|
50
50
|
ctrl.validationRules = {
|
|
51
51
|
itemName: [],
|
|
52
52
|
itemPath: ValidationService.getValidationRules('function.itemPath', [{
|
|
53
|
-
label: $i18next.t('
|
|
53
|
+
label: $i18next.t('functions:UNIQUENESS', { lng: lng }),
|
|
54
54
|
pattern: validateUniqueness.bind(null, 'volumeMount.mountPath')
|
|
55
55
|
}]),
|
|
56
56
|
containerName: ValidationService.getValidationRules('container.name')
|
|
@@ -47,6 +47,7 @@ such restriction.
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
ctrl.$onInit = onInit;
|
|
50
|
+
ctrl.$onChanges = onChanges;
|
|
50
51
|
|
|
51
52
|
ctrl.checkIsErrorState = checkIsErrorState;
|
|
52
53
|
ctrl.onRowCollapse = onRowCollapse;
|
|
@@ -64,6 +65,16 @@ such restriction.
|
|
|
64
65
|
initEnrichedNodeSelectors();
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
/**
|
|
69
|
+
* On changes hook method
|
|
70
|
+
* @param {Object} changes
|
|
71
|
+
*/
|
|
72
|
+
function onChanges(changes) {
|
|
73
|
+
if (lodash.has(changes, 'version')) {
|
|
74
|
+
initEnrichedNodeSelectors();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
67
78
|
//
|
|
68
79
|
// Public methods
|
|
69
80
|
//
|
|
@@ -52,7 +52,7 @@ such restriction.
|
|
|
52
52
|
},
|
|
53
53
|
itemName: ValidationService.getValidationRules('function.triggerName', [{
|
|
54
54
|
name: 'uniqueness',
|
|
55
|
-
label: $i18next.t('
|
|
55
|
+
label: $i18next.t('functions:UNIQUENESS', { lng: lng }),
|
|
56
56
|
pattern: function (value) {
|
|
57
57
|
return lodash.filter(ctrl.triggers, ['name', value]).length <= 1;
|
|
58
58
|
}
|
|
@@ -83,6 +83,7 @@ such restriction.
|
|
|
83
83
|
ctrl.editTriggerCallback = editTriggerCallback;
|
|
84
84
|
ctrl.handleAction = handleAction;
|
|
85
85
|
ctrl.isCreateNewTriggerEnabled = isCreateNewTriggerEnabled;
|
|
86
|
+
ctrl.isHttpTriggerCheckboxShown = isHttpTriggerCheckboxShown;
|
|
86
87
|
ctrl.isHttpTriggerMsgShown = isHttpTriggerMsgShown;
|
|
87
88
|
|
|
88
89
|
//
|
|
@@ -253,6 +254,15 @@ such restriction.
|
|
|
253
254
|
});
|
|
254
255
|
}
|
|
255
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Tests whether the `Do not create http trigger by default` checkbox is shown
|
|
259
|
+
* @returns {boolean}
|
|
260
|
+
*/
|
|
261
|
+
function isHttpTriggerCheckboxShown() {
|
|
262
|
+
return !lodash.get(ConfigService, 'nuclio.disableDefaultHttpTrigger', false) &&
|
|
263
|
+
!lodash.some(ctrl.version.spec.triggers, ['kind', 'http']);
|
|
264
|
+
}
|
|
265
|
+
|
|
256
266
|
/**
|
|
257
267
|
* Tests whether the `HTTP trigger message` is shown
|
|
258
268
|
* @returns {boolean} `true` in case "HTTP trigger message" is shown, or `false` otherwise.
|
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
<div class="content-message-pane"
|
|
4
4
|
data-ng-if="$ctrl.isHttpTriggerMsgShown()" data-ng-i18next="[html]functions:HTTP_TRIGGER_MSG">
|
|
5
5
|
</div>
|
|
6
|
+
<div class="http-trigger-checkbox" data-ng-if="$ctrl.isHttpTriggerCheckboxShown()">
|
|
7
|
+
<input type="checkbox"
|
|
8
|
+
class="small"
|
|
9
|
+
id="disable-default-http-trigger"
|
|
10
|
+
name="disableDefaultHTTPTrigger"
|
|
11
|
+
data-ng-model="$ctrl.version.spec.disableDefaultHTTPTrigger"
|
|
12
|
+
data-ng-disabled="$ctrl.isFunctionDeploying()"
|
|
13
|
+
>
|
|
14
|
+
<label for="disable-default-http-trigger"
|
|
15
|
+
class="checkbox-inline">{{ 'common:DO_NOT_CREATE_HTTP_TRIGGER_BY_DEFAULT' | i18next }}</label>
|
|
16
|
+
<igz-more-info
|
|
17
|
+
data-description="{{ 'functions:TOOLTIP.DO_NOT_CREATE_HTTP_TRIGGER_BY_DEFAULT' | i18next }}"
|
|
18
|
+
data-trigger="click"
|
|
19
|
+
data-default-tooltip-placement="right">
|
|
20
|
+
</igz-more-info>
|
|
21
|
+
</div>
|
|
6
22
|
<div class="common-table-header header-row">
|
|
7
23
|
<div class="common-table-cell header-name">
|
|
8
24
|
{{ 'common:NAME' | i18next }}
|