iguazio.dashboard-controls 1.0.12 → 1.0.13-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 +1 -1
- package/dist/i18n/en/functions.json +2 -0
- package/dist/images/ic-alert-message.svg +1 -1
- package/dist/images/oops.png +0 -0
- package/dist/images/shape.svg +1 -1
- package/dist/js/iguazio.dashboard-controls.js +3536 -3554
- package/dist/less/iguazio.dashboard-controls.less +862 -858
- package/package.json +2 -2
- package/src/i18n/en/common.json +1 -1
- package/src/i18n/en/functions.json +2 -0
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iguazio.dashboard-controls",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13-1.13.x",
|
|
4
4
|
"main": "dist/js/iguazio.dashboard-controls.js",
|
|
5
5
|
"description": "Collection of resources (such as CSS styles, fonts and images) and AngularJs 1.x components and services to share among different Iguazio repos.",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"bootstrap": "~3.4.1",
|
|
34
34
|
"del": "^6.1.1",
|
|
35
35
|
"eslint-plugin-angular": "^4.0.1",
|
|
36
|
-
"express": "4.
|
|
36
|
+
"express": "4.18.1",
|
|
37
37
|
"gulp": "^4.0.2",
|
|
38
38
|
"gulp-babel": "^8.0.0",
|
|
39
39
|
"gulp-concat": "^2.6.1",
|
package/src/i18n/en/common.json
CHANGED
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
"DISABLING": "Disabling",
|
|
104
104
|
"DISCARD": "Discard",
|
|
105
105
|
"DISCARD_ALL_PENDING_CHANGES_CONFIRM": "Discard all pending changes?",
|
|
106
|
+
"DO_NOT_CREATE_HTTP_TRIGGER_BY_DEFAULT": "Do not create http trigger by default",
|
|
106
107
|
"DO_NOT_SHOW_AGAIN": "Do not show again",
|
|
107
108
|
"DOCS": "Docs",
|
|
108
109
|
"DONE": "Done",
|
|
@@ -523,7 +524,6 @@
|
|
|
523
524
|
"UNDO_EDIT": "Undo edit",
|
|
524
525
|
"UNDO_RESTART": "Undo restart",
|
|
525
526
|
"UNHEALTHY": "Unhealthy",
|
|
526
|
-
"UNIQUENESS": "Uniqueness",
|
|
527
527
|
"UNKNOWN": "Unknown",
|
|
528
528
|
"UNSTABLE": "Unstable",
|
|
529
529
|
"UPDATE": "Update",
|
|
@@ -324,6 +324,7 @@
|
|
|
324
324
|
"DEPLOY_IN_PROGRESS": "Deploy is already in-progress",
|
|
325
325
|
"DISABLE_CACHE": "Build the function's Docker image from scratch without reusing any previously built Docker image layers",
|
|
326
326
|
"DISABLED_FUNCTION": "Only running and scaled-to-zero functions can be tested",
|
|
327
|
+
"DO_NOT_CREATE_HTTP_TRIGGER_BY_DEFAULT": "When not checked, an http trigger will be created for the function by default",
|
|
327
328
|
"GIT": {
|
|
328
329
|
"BRANCH": "The Git repository branch from which to download the function code",
|
|
329
330
|
"BRANCH_TAG_REFERENCE_DISABLED": "Exactly one of Branch, Tag, and Reference fields must be filled. When one is filled, the others are disabled.",
|
|
@@ -388,6 +389,7 @@
|
|
|
388
389
|
"TRIGGER_CRON_INTERVAL_NO_SCHEDULE": "Applicable only when \"Schedule\" is empty",
|
|
389
390
|
"TRIGGER_SECRET_ACCESS_KEY": "\"{{triggerName}}\" trigger secret access key",
|
|
390
391
|
"TRIGGERS_NOT_FOUND": "There are currently no triggers, you can create a trigger by clicking the ‘Create a new trigger’ button",
|
|
392
|
+
"UNIQUENESS": "Uniqueness",
|
|
391
393
|
"UNSPECIFIED_FIELD_NAME": "Unspecified field name",
|
|
392
394
|
"URL_NOT_EXPOSED": "URL not exposed",
|
|
393
395
|
"V3IO": "V3IO",
|
|
@@ -32,7 +32,6 @@ such restriction.
|
|
|
32
32
|
dns1123Subdomain: 253,
|
|
33
33
|
prefixedQualifiedName: 253,
|
|
34
34
|
qualifiedName: 63,
|
|
35
|
-
qualifiedValue: 63,
|
|
36
35
|
secretName: 253,
|
|
37
36
|
wildcardDns1123Subdomain: 253
|
|
38
37
|
},
|
|
@@ -152,12 +151,12 @@ such restriction.
|
|
|
152
151
|
pattern: new RegExp('[^' + convertToPattern(chars) + ']$')
|
|
153
152
|
};
|
|
154
153
|
},
|
|
155
|
-
beginEndWith: function (chars
|
|
154
|
+
beginEndWith: function (chars) {
|
|
156
155
|
var convertedPattern = convertToPattern(chars);
|
|
157
156
|
|
|
158
157
|
return {
|
|
159
158
|
name: 'beginEnd',
|
|
160
|
-
label:
|
|
159
|
+
label: $i18next.t('common:BEGIN_END_WITH', { lng: lng }) + ': ' + convertToLabel(chars),
|
|
161
160
|
pattern: new RegExp('^([' + convertedPattern + '].*)?[' + convertedPattern + ']$')
|
|
162
161
|
};
|
|
163
162
|
},
|
|
@@ -179,10 +178,10 @@ such restriction.
|
|
|
179
178
|
pattern: new RegExp('^([' + convertedPattern + '])?[^' + convertedPattern + ']+$')
|
|
180
179
|
};
|
|
181
180
|
},
|
|
182
|
-
validCharacters: function (chars
|
|
181
|
+
validCharacters: function (chars) {
|
|
183
182
|
return {
|
|
184
183
|
name: 'validCharacters',
|
|
185
|
-
label:
|
|
184
|
+
label: $i18next.t('common:VALID_CHARACTERS', { lng: lng }) + ': ' + convertToLabel(chars),
|
|
186
185
|
pattern: new RegExp('^[' + convertToPattern(chars) + ']+$')
|
|
187
186
|
};
|
|
188
187
|
},
|
|
@@ -239,12 +238,12 @@ such restriction.
|
|
|
239
238
|
}
|
|
240
239
|
};
|
|
241
240
|
},
|
|
242
|
-
length: function (options
|
|
241
|
+
length: function (options) {
|
|
243
242
|
var min = Number.isSafeInteger(options.min) ? options.min : 0;
|
|
244
243
|
var max = Number.isSafeInteger(options.max) ? options.max : '';
|
|
245
244
|
|
|
246
245
|
if (min || max) {
|
|
247
|
-
var label =
|
|
246
|
+
var label = $i18next.t('common:LENGTH', { lng: lng }) + ' – ' +
|
|
248
247
|
(min ? 'min: ' + options.min + '\xa0\xa0' : '') + (max ? 'max: ' + options.max : '');
|
|
249
248
|
|
|
250
249
|
return {
|
|
@@ -295,17 +294,6 @@ such restriction.
|
|
|
295
294
|
generateRule.validCharacters('a-z 0-9 -'),
|
|
296
295
|
generateRule.beginEndWith('a-z 0-9')
|
|
297
296
|
],
|
|
298
|
-
k8s: {
|
|
299
|
-
getValue: function (withPrefix = false) {
|
|
300
|
-
var labelPrefix = withPrefix ? '[' + $i18next.t('common:VALUE', { lng: lng }) + '] ' : '';
|
|
301
|
-
|
|
302
|
-
return [
|
|
303
|
-
generateRule.beginEndWith('a-z A-Z 0-9', labelPrefix),
|
|
304
|
-
generateRule.length({ max: lengths.k8s.qualifiedValue }, labelPrefix),
|
|
305
|
-
generateRule.validCharacters('a-z A-Z 0-9 - _ .', labelPrefix)
|
|
306
|
-
]
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
297
|
prefixedQualifiedName: [
|
|
310
298
|
{
|
|
311
299
|
name: 'nameValidCharacters',
|
|
@@ -502,7 +490,26 @@ such restriction.
|
|
|
502
490
|
$i18next.t('common:NOT_START_WITH_FORBIDDEN_WORDS_K8S', { lng: lng }),
|
|
503
491
|
pattern: /^(?!kubernetes\.io\/)(?!k8s\.io\/)/
|
|
504
492
|
}),
|
|
505
|
-
value:
|
|
493
|
+
value: [
|
|
494
|
+
{
|
|
495
|
+
name: 'valueBeginEnd',
|
|
496
|
+
label: '[' + $i18next.t('common:VALUE', { lng: lng }) + '] ' +
|
|
497
|
+
$i18next.t('common:BEGIN_END_WITH', { lng: lng }) + ': a–z, A–Z, 0–9',
|
|
498
|
+
pattern: /^([^/]+\/)?([A-Za-z0-9][^/]*)?[A-Za-z0-9]$/
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
name: 'valueMaxLength',
|
|
502
|
+
label: '[' + $i18next.t('common:VALUE', { lng: lng }) + '] ' +
|
|
503
|
+
$i18next.t('common:MAX_LENGTH_CHARACTERS', { lng: lng, count: 63 }),
|
|
504
|
+
pattern: /^([^/]+\/)?[^/]{1,63}$/
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
name: 'valueValidCharacters',
|
|
508
|
+
label: '[' + $i18next.t('common:VALUE', { lng: lng }) + '] ' +
|
|
509
|
+
$i18next.t('common:VALID_CHARACTERS', { lng: lng }) + ': a–z, A–Z, 0–9, –, _, .',
|
|
510
|
+
pattern: /^[a-zA-Z0-9\-_.]+$/
|
|
511
|
+
}
|
|
512
|
+
]
|
|
506
513
|
},
|
|
507
514
|
supportLogs: {
|
|
508
515
|
contextId: [
|
|
@@ -599,8 +606,8 @@ such restriction.
|
|
|
599
606
|
address: [
|
|
600
607
|
{
|
|
601
608
|
name: 'begin',
|
|
602
|
-
label: $i18next.t('common:BEGIN_WITH', { lng: lng }) + ': ldap://',
|
|
603
|
-
pattern: /^
|
|
609
|
+
label: $i18next.t('common:BEGIN_WITH', { lng: lng }) + ': ldaps://, ldap://',
|
|
610
|
+
pattern: /^ldaps?:\/\//
|
|
604
611
|
}
|
|
605
612
|
]
|
|
606
613
|
},
|
|
@@ -670,11 +677,7 @@ such restriction.
|
|
|
670
677
|
generateRule.beginWith('0-9 +'),
|
|
671
678
|
generateRule.endWith('0-9'),
|
|
672
679
|
generateRule.length({ min: 4, max: lengths.phone })
|
|
673
|
-
]
|
|
674
|
-
nodeSelectors: {
|
|
675
|
-
key: commonRules.prefixedQualifiedName,
|
|
676
|
-
value: commonRules.k8s.getValue(false)
|
|
677
|
-
}
|
|
680
|
+
]
|
|
678
681
|
};
|
|
679
682
|
|
|
680
683
|
return {
|
|
@@ -218,20 +218,6 @@ such restriction.
|
|
|
218
218
|
'0sIGVycm9yKSB7DQogICAgcmV0dXJuIG5pbCwgbmlsDQp9', // source code in base64
|
|
219
219
|
visible: true
|
|
220
220
|
},
|
|
221
|
-
{
|
|
222
|
-
id: 'python:3.7',
|
|
223
|
-
name: 'Python 3.7 ' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}),
|
|
224
|
-
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
225
|
-
nameTemplate: 'Python 3.7 ' + '<b>' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}) + '</b>',
|
|
226
|
-
visible: true
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
id: 'python:3.8',
|
|
230
|
-
name: 'Python 3.8 ' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}),
|
|
231
|
-
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
232
|
-
nameTemplate: 'Python 3.8 ' + '<b>' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}) + '</b>',
|
|
233
|
-
visible: true
|
|
234
|
-
},
|
|
235
221
|
{
|
|
236
222
|
id: 'python:3.9',
|
|
237
223
|
name: 'Python 3.9',
|
|
@@ -385,20 +385,6 @@ such restriction.
|
|
|
385
385
|
name: 'Go',
|
|
386
386
|
visible: true
|
|
387
387
|
},
|
|
388
|
-
{
|
|
389
|
-
id: 'python:3.7',
|
|
390
|
-
name: 'Python 3.7 ' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}),
|
|
391
|
-
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
392
|
-
nameTemplate: 'Python 3.7 ' + '<b>' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}) + '</b>',
|
|
393
|
-
visible: true
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
id: 'python:3.8',
|
|
397
|
-
name: 'Python 3.8 ' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}),
|
|
398
|
-
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
399
|
-
nameTemplate: 'Python 3.8 ' + '<b>' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}) + '</b>',
|
|
400
|
-
visible: true
|
|
401
|
-
},
|
|
402
388
|
{
|
|
403
389
|
id: 'python:3.9',
|
|
404
390
|
name: 'Python 3.9',
|
|
@@ -58,7 +58,7 @@ such restriction.
|
|
|
58
58
|
key: ValidationService.getValidationRules('function.annotation.key', [
|
|
59
59
|
{
|
|
60
60
|
name: 'uniqueness',
|
|
61
|
-
label: $i18next.t('
|
|
61
|
+
label: $i18next.t('functions:UNIQUENESS', { lng: lng }),
|
|
62
62
|
pattern: validateUniqueness
|
|
63
63
|
}
|
|
64
64
|
])
|
|
@@ -38,19 +38,19 @@ such restriction.
|
|
|
38
38
|
var envVariableFromValidationRules = ValidationService.getValidationRules('k8s.configMapKey', [
|
|
39
39
|
{
|
|
40
40
|
name: 'uniqueness',
|
|
41
|
-
label: $i18next.t('
|
|
41
|
+
label: $i18next.t('functions:UNIQUENESS', {lng: lng}),
|
|
42
42
|
pattern: validateUniqueness.bind(null, ['configMapRef.name', 'secretRef.name'])
|
|
43
43
|
}
|
|
44
44
|
]);
|
|
45
45
|
var envVariableKeyValidationRule = ValidationService.getValidationRules('k8s.envVarName', [{
|
|
46
46
|
name: 'uniqueness',
|
|
47
|
-
label: $i18next.t('
|
|
47
|
+
label: $i18next.t('functions:UNIQUENESS', {lng: lng}),
|
|
48
48
|
pattern: validateUniqueness.bind(null, ['name'])
|
|
49
49
|
}]);
|
|
50
50
|
var envVariableConfigmapKeyValidationRule = ValidationService.getValidationRules('k8s.configMapKey', [
|
|
51
51
|
{
|
|
52
52
|
name: 'uniqueness',
|
|
53
|
-
label: $i18next.t('
|
|
53
|
+
label: $i18next.t('functions:UNIQUENESS', {lng: lng}),
|
|
54
54
|
pattern: validateUniqueness.bind(null, ['valueFrom.configMapKeyRef.key'])
|
|
55
55
|
}
|
|
56
56
|
]);
|
|
@@ -60,7 +60,7 @@ such restriction.
|
|
|
60
60
|
key: ValidationService.getValidationRules('function.label.key', [
|
|
61
61
|
{
|
|
62
62
|
name: 'uniqueness',
|
|
63
|
-
label: $i18next.t('
|
|
63
|
+
label: $i18next.t('functions:UNIQUENESS', { lng: lng }),
|
|
64
64
|
pattern: validateUniqueness
|
|
65
65
|
}
|
|
66
66
|
]),
|
|
@@ -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 }}
|