iguazio.dashboard-controls 1.2.19-vistra-logs → 1.3.1
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/functions.json +1 -0
- package/dist/js/iguazio.dashboard-controls.js +4823 -4814
- package/dist/less/iguazio.dashboard-controls.less +2463 -2463
- package/package.json +1 -1
- package/src/i18n/en/functions.json +1 -0
- package/src/igz_controls/components/log-table-row/log-table-row.component.spec.js +28 -5
- package/src/igz_controls/components/toast-status-panel/toast-status-panel.component.spec.js +1 -1
- package/src/nuclio/api-gateways/api-gateways.service.js +5 -0
- package/src/nuclio/common/screens/create-function/function-from-scratch/function-from-scratch.component.js +0 -6
- package/src/nuclio/common/screens/create-function/function-from-scratch/function-from-scratch.component.spec.js +6 -14
- package/src/nuclio/common/screens/create-function/function-from-template/function-from-template.component.js +0 -6
- package/src/nuclio/functions/functions.component.js +19 -3
- package/src/nuclio/functions/functions.service.js +3 -1
- package/src/nuclio/functions/version/version-code/version-code.component.js +9 -0
- package/src/nuclio/functions/version/version-code/version-code.tpl.html +16 -15
- package/src/nuclio/functions/version/version-triggers/version-triggers.component.js +2 -1
- package/src/nuclio/functions/version/version.component.js +6 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iguazio.dashboard-controls",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
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": {
|
|
@@ -153,6 +153,7 @@
|
|
|
153
153
|
"HUGE": "Huge",
|
|
154
154
|
"HTTP_TRIGGER_MSG": "A Nuclio function must have a single HTTP trigger. You can define such a trigger <a class=\"link\" data-ng-click=\"$ctrl.addDefaultHttpTrigger($event)\">here</a>. Otherwise, when deploying the function a default HTTP trigger named \"default-http\" is defined and deployed automatically unless there is a custom HTTP trigger configuration in the <a class=\"link\" data-ui-sref=\"app.project.function.edit.code\">external source code</a>.",
|
|
155
155
|
"HTTP_TRIGGER_NAME_DESCRIPTION": "If the name of the HTTP trigger is <b>default-http</b> it might get overridden by a remote function specification configured in <b>Code Entry Type.</b>",
|
|
156
|
+
"IGUAZIO":"Iguazio",
|
|
156
157
|
"IMAGE_NAME": "Image name",
|
|
157
158
|
"IMAGE_NAME_DESCRIPTION": "The name of the built container image (default for this function: <b>{{defaultImageName}}</b>)",
|
|
158
159
|
"IMPORT": "Import",
|
|
@@ -37,13 +37,36 @@ describe('igzElasticLogTableRow component: ', function () {
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
describe('getLogName():', function () {
|
|
40
|
-
it('should return the log name display value
|
|
41
|
-
|
|
40
|
+
it('should return the full log name display value', function () {
|
|
41
|
+
ctrl.entryItem.name = '012345678901234567890123456789';
|
|
42
|
+
expect(ctrl.getLogName()).toBe('012345678901234567890123456789');
|
|
42
43
|
});
|
|
43
44
|
|
|
44
|
-
it('should return the
|
|
45
|
-
ctrl.entryItem.
|
|
46
|
-
expect(ctrl.getLogName()).toBe('
|
|
45
|
+
it('should return the kubernetes pod name', function () {
|
|
46
|
+
ctrl.entryItem.kubernetes = { pod: { name: 'kubName' } }
|
|
47
|
+
expect(ctrl.getLogName()).toBe('kubName');
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('should return the empty string', function () {
|
|
51
|
+
ctrl.entryItem.name = undefined
|
|
52
|
+
expect(ctrl.getLogName()).toBe('');
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('should return the empty sting', function () {
|
|
56
|
+
ctrl.entryItem.kubernetes = { pod: {} }
|
|
57
|
+
ctrl.entryItem.name = undefined
|
|
58
|
+
expect(ctrl.getLogName()).toBe('');
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
describe('getLogTrimmedName():', function () {
|
|
63
|
+
it('should return the log name display value with free space in the end, 25 symbols in total', function () {
|
|
64
|
+
expect(ctrl.getLogTrimmedName()).toBe('cron ');
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('should return the cropped log name display value to 25 symbols', function () {
|
|
68
|
+
ctrl.entryItem.name = '012345678901234567890123456789123456789';
|
|
69
|
+
expect(ctrl.getLogTrimmedName()).toBe('0123456789012345678901234');
|
|
47
70
|
});
|
|
48
71
|
});
|
|
49
72
|
});
|
|
@@ -39,7 +39,7 @@ describe('igzToastStatusPanel component:', function () {
|
|
|
39
39
|
panelStatus: null
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
ctrl = $componentController('igzToastStatusPanel', {$element: element}, bindings);
|
|
42
|
+
ctrl = $componentController('igzToastStatusPanel', {$element: element, $transclude: angular.noop}, bindings);
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
afterEach(function () {
|
|
@@ -40,6 +40,11 @@ such restriction.
|
|
|
40
40
|
id: 'oauth2',
|
|
41
41
|
name: $i18next.t('functions:OAUTH2', { lng: lng }),
|
|
42
42
|
tooltip: $i18next.t('functions:OAUTH2', { lng: lng })
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'iguazio',
|
|
46
|
+
name: $i18next.t('functions:IGUAZIO', { lng: lng }),
|
|
47
|
+
tooltip: $i18next.t('functions:IGUAZIO', { lng: lng })
|
|
43
48
|
}
|
|
44
49
|
];
|
|
45
50
|
|
|
@@ -218,12 +218,6 @@ such restriction.
|
|
|
218
218
|
'0sIGVycm9yKSB7DQogICAgcmV0dXJuIG5pbCwgbmlsDQp9', // source code in base64
|
|
219
219
|
visible: true
|
|
220
220
|
},
|
|
221
|
-
{
|
|
222
|
-
id: 'python:3.9',
|
|
223
|
-
name: 'Python 3.9',
|
|
224
|
-
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
225
|
-
visible: true
|
|
226
|
-
},
|
|
227
221
|
{
|
|
228
222
|
id: 'python:3.10',
|
|
229
223
|
name: 'Python 3.10',
|
|
@@ -46,20 +46,6 @@ describe('nclFunctionFromScratch Component:', function () {
|
|
|
46
46
|
'0sIGVycm9yKSB7DQogICAgcmV0dXJuIG5pbCwgbmlsDQp9', // source code in base64
|
|
47
47
|
visible: true
|
|
48
48
|
},
|
|
49
|
-
{
|
|
50
|
-
id: 'python:3.7',
|
|
51
|
-
name: 'Python 3.7 ' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}),
|
|
52
|
-
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
53
|
-
nameTemplate: 'Python 3.7 ' + '<b>' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}) + '</b>',
|
|
54
|
-
visible: true
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 'python:3.8',
|
|
58
|
-
name: 'Python 3.8 ' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}),
|
|
59
|
-
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
60
|
-
nameTemplate: 'Python 3.8 ' + '<b>' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}) + '</b>',
|
|
61
|
-
visible: true
|
|
62
|
-
},
|
|
63
49
|
{
|
|
64
50
|
id: 'python:3.9',
|
|
65
51
|
name: 'Python 3.9',
|
|
@@ -78,6 +64,12 @@ describe('nclFunctionFromScratch Component:', function () {
|
|
|
78
64
|
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
79
65
|
visible: true
|
|
80
66
|
},
|
|
67
|
+
{
|
|
68
|
+
id: 'python:3.12',
|
|
69
|
+
name: 'Python 3.12',
|
|
70
|
+
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
71
|
+
visible: true
|
|
72
|
+
},
|
|
81
73
|
{
|
|
82
74
|
id: 'dotnetcore',
|
|
83
75
|
name: '.NET Core ' + $i18next.t('functions:TECH_PREVIEW_LABEL', { lng: lng }),
|
|
@@ -385,12 +385,6 @@ such restriction.
|
|
|
385
385
|
name: 'Go',
|
|
386
386
|
visible: true
|
|
387
387
|
},
|
|
388
|
-
{
|
|
389
|
-
id: 'python:3.9',
|
|
390
|
-
name: 'Python 3.9',
|
|
391
|
-
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
392
|
-
visible: true
|
|
393
|
-
},
|
|
394
388
|
{
|
|
395
389
|
id: 'python:3.10',
|
|
396
390
|
name: 'Python 3.10',
|
|
@@ -781,9 +781,25 @@ such restriction.
|
|
|
781
781
|
});
|
|
782
782
|
|
|
783
783
|
if (lodash.isObject(funcStats)) {
|
|
784
|
-
var latestValue
|
|
785
|
-
|
|
786
|
-
|
|
784
|
+
var latestValue
|
|
785
|
+
|
|
786
|
+
if ([ctrl.functionCPUMetric, ctrl.functionMemoryMetric, ctrl.functionGPUMetric].includes(type)) {
|
|
787
|
+
latestValue = lodash.sum(lodash.map(funcStats, function (stat) {
|
|
788
|
+
return Number(lodash.last(stat.values)[1]);
|
|
789
|
+
}));
|
|
790
|
+
} else {
|
|
791
|
+
latestValue = lodash.sum(lodash.map(funcStats, function (stat) {
|
|
792
|
+
if (!stat.values || stat.values.length === 0) {
|
|
793
|
+
return 0;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
var first = lodash.head(stat.values);
|
|
797
|
+
var last = lodash.last(stat.values);
|
|
798
|
+
|
|
799
|
+
return Number(last[1]) - Number(first[1]);
|
|
800
|
+
}));
|
|
801
|
+
}
|
|
802
|
+
|
|
787
803
|
|
|
788
804
|
// calculating of invocation per second regarding last timestamps
|
|
789
805
|
var invocationPerSec = lodash.chain(funcStats)
|
|
@@ -53,9 +53,10 @@ such restriction.
|
|
|
53
53
|
* Returns classes list by type.
|
|
54
54
|
* @param {string} type - Determines which class list to return (e.g. `'volume'`, `'trigger'`).
|
|
55
55
|
* @param {Object} [additionalData] - May include additional data for populating the list.
|
|
56
|
+
* @param {boolean} isEnterpriseVersion - Determines if Nuclio is part of dashboard
|
|
56
57
|
* @returns {Object[]} - array of classes
|
|
57
58
|
*/
|
|
58
|
-
function getClassesList(type, additionalData) {
|
|
59
|
+
function getClassesList(type, additionalData, isEnterpriseVersion) {
|
|
59
60
|
var lng = i18next.language;
|
|
60
61
|
var defaultFunctionConfig = lodash.get(ConfigService, 'nuclio.defaultFunctionConfig.attributes', {});
|
|
61
62
|
var classesList = {
|
|
@@ -527,6 +528,7 @@ such restriction.
|
|
|
527
528
|
},
|
|
528
529
|
{
|
|
529
530
|
id: 'v3ioStream',
|
|
531
|
+
visible: lodash.defaultTo(isEnterpriseVersion, false),
|
|
530
532
|
name: 'V3IO stream',
|
|
531
533
|
tooltip: 'V3IO stream',
|
|
532
534
|
tooltipOriginal: 'V3IO stream',
|
|
@@ -44,6 +44,7 @@ such restriction.
|
|
|
44
44
|
autoScrollOnFocus: false
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
+
ctrl.isEnterpriseVersion = false;
|
|
47
48
|
ctrl.scrollConfigHorizontal = {
|
|
48
49
|
axis: 'x',
|
|
49
50
|
advanced: {
|
|
@@ -209,6 +210,8 @@ such restriction.
|
|
|
209
210
|
$scope.$on('ui.layout.loaded', resizeScrollBar);
|
|
210
211
|
|
|
211
212
|
angular.element($window).bind('resize', resizeScrollBar);
|
|
213
|
+
|
|
214
|
+
ctrl.isEnterpriseVersion = ConfigService.nuclio.isEnterpriseVersion;
|
|
212
215
|
}
|
|
213
216
|
|
|
214
217
|
/**
|
|
@@ -501,19 +504,25 @@ such restriction.
|
|
|
501
504
|
},
|
|
502
505
|
{
|
|
503
506
|
id: 'python:3.10',
|
|
507
|
+
ext: 'py',
|
|
504
508
|
name: 'Python 3.10',
|
|
509
|
+
language: 'python',
|
|
505
510
|
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
506
511
|
visible: true
|
|
507
512
|
},
|
|
508
513
|
{
|
|
509
514
|
id: 'python:3.11',
|
|
515
|
+
ext: 'py',
|
|
510
516
|
name: 'Python 3.11',
|
|
517
|
+
language: 'python',
|
|
511
518
|
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
512
519
|
visible: true
|
|
513
520
|
},
|
|
514
521
|
{
|
|
515
522
|
id: 'python:3.12',
|
|
523
|
+
ext: 'py',
|
|
516
524
|
name: 'Python 3.12',
|
|
525
|
+
language: 'python',
|
|
517
526
|
sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
|
|
518
527
|
visible: true
|
|
519
528
|
},
|
|
@@ -148,22 +148,23 @@
|
|
|
148
148
|
|
|
149
149
|
<div data-ng-if="$ctrl.selectedEntryType.id === 'archive'"
|
|
150
150
|
class="ncl-code-entry-url">
|
|
151
|
-
<div
|
|
152
|
-
<
|
|
153
|
-
|
|
151
|
+
<div data-ng-if="$ctrl.isEnterpriseVersion">
|
|
152
|
+
<div class="field-label">
|
|
153
|
+
<span>{{ 'functions:ACCESS_KEY_V3IO_ONLY' | i18next }}</span>
|
|
154
|
+
<igz-more-info data-description="{{ 'functions:TOOLTIP.V3IO_ACCESS_KEY' | i18next }}"></igz-more-info>
|
|
155
|
+
</div>
|
|
156
|
+
<igz-validating-input-field data-field-type="password"
|
|
157
|
+
data-input-name="sessionKey"
|
|
158
|
+
data-input-value="$ctrl.version.spec.build.codeEntryAttributes.headers['X-V3io-Session-Key']"
|
|
159
|
+
data-is-focused="false"
|
|
160
|
+
data-form-object="$ctrl.versionCodeForm"
|
|
161
|
+
data-validation-is-required="false"
|
|
162
|
+
data-read-only="$ctrl.isFunctionDeploying()"
|
|
163
|
+
data-placeholder-text="{{ 'functions:PLACEHOLDER.ENTER_ACCESS_KEY' | i18next }}"
|
|
164
|
+
data-update-data-callback="$ctrl.inputValueCallback(newData, field)"
|
|
165
|
+
data-update-data-field="spec.build.codeEntryAttributes.headers['X-V3io-Session-Key']">
|
|
166
|
+
</igz-validating-input-field>
|
|
154
167
|
</div>
|
|
155
|
-
<igz-validating-input-field data-field-type="password"
|
|
156
|
-
data-input-name="sessionKey"
|
|
157
|
-
data-input-value="$ctrl.version.spec.build.codeEntryAttributes.headers['X-V3io-Session-Key']"
|
|
158
|
-
data-is-focused="false"
|
|
159
|
-
data-form-object="$ctrl.versionCodeForm"
|
|
160
|
-
data-validation-is-required="false"
|
|
161
|
-
data-read-only="$ctrl.isFunctionDeploying()"
|
|
162
|
-
data-placeholder-text="{{ 'functions:PLACEHOLDER.ENTER_ACCESS_KEY' | i18next }}"
|
|
163
|
-
data-update-data-callback="$ctrl.inputValueCallback(newData, field)"
|
|
164
|
-
data-update-data-field="spec.build.codeEntryAttributes.headers['X-V3io-Session-Key']">
|
|
165
|
-
</igz-validating-input-field>
|
|
166
|
-
|
|
167
168
|
<div class="field-label">
|
|
168
169
|
<span>{{ 'functions:WORK_DIRECTORY' | i18next }}</span>
|
|
169
170
|
<igz-more-info data-description="{{ 'functions:TOOLTIP.WORK_DIR' | i18next }}"></igz-more-info>
|
|
@@ -95,6 +95,7 @@ such restriction.
|
|
|
95
95
|
*/
|
|
96
96
|
function onInit() {
|
|
97
97
|
var additionalData = {};
|
|
98
|
+
var isEnterpriseVersion = ConfigService.nuclio.isEnterpriseVersion;
|
|
98
99
|
if (lodash.isArray(ctrl.containers) && !lodash.isEmpty(ctrl.containers)) {
|
|
99
100
|
additionalData.containers = lodash.chain(ctrl.containers)
|
|
100
101
|
.cloneDeep()
|
|
@@ -102,7 +103,7 @@ such restriction.
|
|
|
102
103
|
.value();
|
|
103
104
|
}
|
|
104
105
|
|
|
105
|
-
ctrl.classList = FunctionsService.getClassesList('trigger', additionalData);
|
|
106
|
+
ctrl.classList = FunctionsService.getClassesList('trigger', additionalData, isEnterpriseVersion);
|
|
106
107
|
|
|
107
108
|
$scope.$on('edit-item-has-been-changed', updateTriggersChangesState);
|
|
108
109
|
|
|
@@ -35,13 +35,12 @@ such restriction.
|
|
|
35
35
|
controller: NclVersionController
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
function NclVersionController($i18next, $interval, $
|
|
38
|
+
function NclVersionController($i18next, $interval, $rootScope, $scope, $state, $stateParams, $transitions, $timeout,
|
|
39
39
|
i18next, lodash, ngDialog, ConfigService, DialogsService, ExportService,
|
|
40
40
|
FunctionsService, GeneralDataService, NuclioHeaderService,
|
|
41
41
|
VersionHelperService) {
|
|
42
42
|
var ctrl = this;
|
|
43
43
|
var deregisterFunction = null;
|
|
44
|
-
var servicesService = null;
|
|
45
44
|
var interval = null;
|
|
46
45
|
var lng = i18next.language;
|
|
47
46
|
|
|
@@ -228,10 +227,6 @@ such restriction.
|
|
|
228
227
|
}
|
|
229
228
|
});
|
|
230
229
|
|
|
231
|
-
if ($injector.has('ServicesService')) {
|
|
232
|
-
servicesService = $injector.get('ServicesService')
|
|
233
|
-
}
|
|
234
|
-
|
|
235
230
|
setImageNamePrefixTemplate();
|
|
236
231
|
setIngressHost();
|
|
237
232
|
initLogTabs();
|
|
@@ -687,18 +682,11 @@ such restriction.
|
|
|
687
682
|
* Checks if the "Execution log" tab should be shown
|
|
688
683
|
*/
|
|
689
684
|
function initLogTabs() {
|
|
690
|
-
if (lodash.get(ConfigService, '
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
if (servicesService.isEnabled(logForwarderService)) {
|
|
696
|
-
ctrl.navigationTabsConfig.push({
|
|
697
|
-
tabName: $i18next.t('functions:EXECUTION_LOG', { lng: lng }),
|
|
698
|
-
id: 'execution-log',
|
|
699
|
-
uiRoute: 'app.project.function.edit.execution-log'
|
|
700
|
-
});
|
|
701
|
-
}
|
|
685
|
+
if (lodash.get(ConfigService, 'nuclio.defaultProxyLogsSource', '') === 'elasticsearch') {
|
|
686
|
+
ctrl.navigationTabsConfig.push({
|
|
687
|
+
tabName: $i18next.t('functions:EXECUTION_LOG', { lng: lng }),
|
|
688
|
+
id: 'execution-log',
|
|
689
|
+
uiRoute: 'app.project.function.edit.execution-log'
|
|
702
690
|
});
|
|
703
691
|
}
|
|
704
692
|
}
|