iguazio.dashboard-controls 1.2.14 → 1.2.16
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/SECURITY.md +21 -0
- package/dist/i18n/en/functions.json +7 -2
- package/dist/js/iguazio.dashboard-controls.js +4209 -4166
- package/dist/less/iguazio.dashboard-controls.less +4297 -4288
- package/package.json +1 -1
- package/src/i18n/en/functions.json +7 -2
- package/src/igz_controls/services/execution-logs-data.service.js +2 -2
- package/src/nuclio/functions/version/version-code/function-event-pane/test-events-logs/test-events-logs.tpl.html +1 -1
- package/src/nuclio/functions/version/version-execution-log/version-execution-log.component.js +54 -8
- package/src/nuclio/functions/version/version-execution-log/version-execution-log.less +9 -0
- package/src/nuclio/functions/version/version-execution-log/version-execution-log.tpl.html +12 -1
- package/src/nuclio/functions/version/version-monitoring/version-monitoring.component.js +6 -4
- package/src/nuclio/functions/version/version-monitoring/version-monitoring.tpl.html +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iguazio.dashboard-controls",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16",
|
|
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": {
|
|
@@ -93,6 +93,7 @@
|
|
|
93
93
|
"EDIT_FUNCTION_EVENT": "Edit the function event",
|
|
94
94
|
"EDIT_PROJECT": "Edit the project",
|
|
95
95
|
"ENDPOINT": "Endpoint",
|
|
96
|
+
"ENRICHED_SERVICE_ACCOUNT": "Enriched service account",
|
|
96
97
|
"ENTER_HOST_TO_SEE_ENDPOINT": "Enter host to see endpoint",
|
|
97
98
|
"ERROR_MSG": {
|
|
98
99
|
"COULD_NOT_READ_FILE": "Could not read file",
|
|
@@ -169,7 +170,7 @@
|
|
|
169
170
|
"LOGGER_DESTINATION": "Logger destination",
|
|
170
171
|
"LOGGER_LEVEL": "Logger level",
|
|
171
172
|
"LOGGING": "Logging",
|
|
172
|
-
"LOGS_LINES_LIMITATION": "Note: Only the last 10,000 rows are displayed. <br> To download up to 100,000 rows, click
|
|
173
|
+
"LOGS_LINES_LIMITATION": "Note: Only the last 10,000 rows are displayed. <br> To download up to 100,000 rows, click the 'Download' button.",
|
|
173
174
|
"MAX": "Max",
|
|
174
175
|
"MAX_REPLICAS": "Maximum number of replicas (default: {{default}})",
|
|
175
176
|
"MAX_WORKERS": "Max Workers",
|
|
@@ -185,7 +186,7 @@
|
|
|
185
186
|
"NEW_PROJECT": "New project",
|
|
186
187
|
"NO_FUNCTIONS_AVAILABLE": "No functions available",
|
|
187
188
|
"NO_INTERNET_ACCESS": "No internet access",
|
|
188
|
-
"
|
|
189
|
+
"NO_LOGS_WERE_FOUND": "No logs were found...",
|
|
189
190
|
"NODE_SELECTORS": "Node selector",
|
|
190
191
|
"NODE_SELECTORS_MORE_INFO": "If there is a conflict with the function node selector you defined or if the pod cannot be scheduled for some reason, check the project/platform configuration Key:Value combinations to see if there is a node selection causing the issue. If, after consulting with the project/general admin, you want to delete a global setting, enter the Key here, but leave the Value empty.",
|
|
191
192
|
"NORMAL": "Normal",
|
|
@@ -251,6 +252,7 @@
|
|
|
251
252
|
"SEARCH_TEMPLATE": "Search by text, tags and keywords",
|
|
252
253
|
"SEC": "Sec",
|
|
253
254
|
"SELECT_CLASS": "Select class",
|
|
255
|
+
"SELECT_REPLICA": "Select a replica",
|
|
254
256
|
"SELECT_TYPE": "Select type"
|
|
255
257
|
},
|
|
256
258
|
"PODS_PRIORITY": "Pods priority",
|
|
@@ -292,6 +294,7 @@
|
|
|
292
294
|
"SELECT_FUNCTION_CONFIRM": "The function you selected is currently not running. Are you sure you want to use it?",
|
|
293
295
|
"SERVICE_ACCOUNT": "Service Account",
|
|
294
296
|
"SESSION_TOKEN": "Session token",
|
|
297
|
+
"SHOWN_ONLINE_ONLY": "Show online replicas only",
|
|
295
298
|
"SKIP": "Skip",
|
|
296
299
|
"SKIP_TLS_VERIFICATION": "Skip TLS verification",
|
|
297
300
|
"SMALL": "Small",
|
|
@@ -327,6 +330,7 @@
|
|
|
327
330
|
"DISABLE_CACHE": "Build the function's Docker image from scratch without reusing any previously built Docker image layers.",
|
|
328
331
|
"DISABLED_FUNCTION": "Only running and scaled-to-zero functions can be tested.",
|
|
329
332
|
"DO_NOT_CREATE_HTTP_TRIGGER_BY_DEFAULT": "When not checked, an http trigger will be created for the function by default.",
|
|
333
|
+
"ENRICHED_SERVICE_ACCOUNT": "The service account is enriched from the platform, project, and function specifications, where the project takes precedence over the platform specification, and the function specification takes precedence over the projects specification.",
|
|
330
334
|
"GIT": {
|
|
331
335
|
"BRANCH": "The Git repository branch from which to download the function code.",
|
|
332
336
|
"BRANCH_TAG_REFERENCE_DISABLED": "Exactly one of Branch, Tag, and Reference fields must be filled. When one is filled, the others are disabled.",
|
|
@@ -349,6 +353,7 @@
|
|
|
349
353
|
},
|
|
350
354
|
"NEW_TEST": "New test",
|
|
351
355
|
"NO_INTERNET_ACCESS": "Use local Docker images rather than pulling from remote",
|
|
356
|
+
"NO_OFFLINE_REPLICAS": "Only online replicas found",
|
|
352
357
|
"ENRICHED_NODE_SELECTOR": "The node selector of the function, enriched with the project’s and the service’s default node selectors",
|
|
353
358
|
"POD_TOLERATIONS": {
|
|
354
359
|
"ALLOW": "Allow function pods to run on spot nodes. Spot nodes might be tainted, using this option will make sure function pods tolerate these taints.",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
'Content-Type': 'application/json',
|
|
109
109
|
'x-nuclio-project-name': projectId
|
|
110
110
|
};
|
|
111
|
-
var requestParams = Object.assign(queryParams, {includeOffline:
|
|
111
|
+
var requestParams = Object.assign(queryParams, {includeOffline: queryParams.includeOffline});
|
|
112
112
|
|
|
113
113
|
if (queryParams.timeFilter) {
|
|
114
114
|
queryParams.timeFilter = {
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
.one('replicas')
|
|
123
123
|
.get(requestParams, headers)
|
|
124
124
|
.then(function (response) {
|
|
125
|
-
return response.
|
|
125
|
+
return response.plain();
|
|
126
126
|
})
|
|
127
127
|
.catch(function (error) {
|
|
128
128
|
var errorMessages = {
|
package/src/nuclio/functions/version/version-execution-log/version-execution-log.component.js
CHANGED
|
@@ -33,6 +33,7 @@ such restriction.
|
|
|
33
33
|
var ctrl = this;
|
|
34
34
|
var lng = i18next.language;
|
|
35
35
|
|
|
36
|
+
var allReplicas = [];
|
|
36
37
|
var refreshInterval = null;
|
|
37
38
|
var initialDatePreset = '7d';
|
|
38
39
|
var initialReplicas = [];
|
|
@@ -47,7 +48,10 @@ such restriction.
|
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
var projectName = '';
|
|
51
|
+
var groupedReplicas = {};
|
|
50
52
|
|
|
53
|
+
ctrl.excludeOffline = false;
|
|
54
|
+
ctrl.excludeOfflineIsDisabled = false;
|
|
51
55
|
ctrl.downloadButtonIsDisabled = false;
|
|
52
56
|
ctrl.isSplashShowed = {
|
|
53
57
|
value: false
|
|
@@ -168,6 +172,7 @@ such restriction.
|
|
|
168
172
|
ctrl.applyFilters = applyFilters;
|
|
169
173
|
ctrl.downloadLogFiles = downloadLogFiles;
|
|
170
174
|
ctrl.onCheckboxChange = onCheckboxChange;
|
|
175
|
+
ctrl.onExcludeOfflineChange = onExcludeOfflineChange;
|
|
171
176
|
ctrl.onRefreshRateChange = onRefreshRateChange;
|
|
172
177
|
ctrl.onTimeRangeChange = onTimeRangeChange;
|
|
173
178
|
ctrl.onQueryChanged = onQueryChanged;
|
|
@@ -194,8 +199,16 @@ such restriction.
|
|
|
194
199
|
ctrl.timeRange = getInitialTimeRange();
|
|
195
200
|
|
|
196
201
|
ctrl.isSplashShowed.value = true;
|
|
197
|
-
ExecutionLogsDataService.getReplicasList(projectName, ctrl.version.metadata.name, {
|
|
198
|
-
ctrl.
|
|
202
|
+
ExecutionLogsDataService.getReplicasList(projectName, ctrl.version.metadata.name, {
|
|
203
|
+
timeFilter: ctrl.timeRange,
|
|
204
|
+
includeOffline: true
|
|
205
|
+
}).then(function (replicas) {
|
|
206
|
+
groupedReplicas = replicas;
|
|
207
|
+
allReplicas = lodash.get(groupedReplicas, 'replicas.names') ?
|
|
208
|
+
groupedReplicas.replicas.names.concat(replicas.offlineReplicas.names) :
|
|
209
|
+
lodash.get(groupedReplicas, 'names', []);
|
|
210
|
+
ctrl.excludeOfflineIsDisabled = lodash.get(groupedReplicas, 'offlineReplicas.names', []).length === 0;
|
|
211
|
+
ctrl.replicasList = allReplicas.map(function (replica) {
|
|
199
212
|
return {
|
|
200
213
|
label: replica,
|
|
201
214
|
id: replica,
|
|
@@ -203,8 +216,8 @@ such restriction.
|
|
|
203
216
|
checked: true
|
|
204
217
|
}
|
|
205
218
|
});
|
|
206
|
-
|
|
207
|
-
|
|
219
|
+
initialReplicas = allReplicas;
|
|
220
|
+
ctrl.selectedReplicas = angular.copy(allReplicas);
|
|
208
221
|
|
|
209
222
|
applyFilters();
|
|
210
223
|
});
|
|
@@ -264,6 +277,33 @@ such restriction.
|
|
|
264
277
|
ctrl.applyIsDisabled = !ctrl.selectedReplicas;
|
|
265
278
|
}
|
|
266
279
|
|
|
280
|
+
/**
|
|
281
|
+
* Triggered when exclude offline checkbox was changed
|
|
282
|
+
*/
|
|
283
|
+
function onExcludeOfflineChange() {
|
|
284
|
+
if (ctrl.excludeOffline) {
|
|
285
|
+
ctrl.replicasList = groupedReplicas.replicas.names.map(function (replica) {
|
|
286
|
+
return {
|
|
287
|
+
label: replica,
|
|
288
|
+
id: replica,
|
|
289
|
+
value: replica,
|
|
290
|
+
checked: true
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
ctrl.selectedReplicas = angular.copy(groupedReplicas.replicas.names);
|
|
294
|
+
} else {
|
|
295
|
+
ctrl.replicasList = allReplicas.map(function (replica) {
|
|
296
|
+
return {
|
|
297
|
+
label: replica,
|
|
298
|
+
id: replica,
|
|
299
|
+
value: replica,
|
|
300
|
+
checked: true
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
ctrl.selectedReplicas = angular.copy(allReplicas);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
267
307
|
/**
|
|
268
308
|
* Handles Refresh Rate dropdown change
|
|
269
309
|
* @param {Object} item - new item
|
|
@@ -302,7 +342,12 @@ such restriction.
|
|
|
302
342
|
|
|
303
343
|
ExecutionLogsDataService.getReplicasList(projectName, ctrl.version.metadata.name, {timeFilter: ctrl.timeRange})
|
|
304
344
|
.then(function (replicas) {
|
|
305
|
-
|
|
345
|
+
groupedReplicas = replicas;
|
|
346
|
+
allReplicas = lodash.get(groupedReplicas, 'replicas.names') ?
|
|
347
|
+
groupedReplicas.replicas.names.concat(replicas.offlineReplicas.names) :
|
|
348
|
+
lodash.get(groupedReplicas, 'names', []);
|
|
349
|
+
ctrl.excludeOfflineIsDisabled = lodash.get(groupedReplicas, 'offlineReplicas.names', []).length === 0;
|
|
350
|
+
ctrl.replicasList = allReplicas.map(function (replica) {
|
|
306
351
|
return {
|
|
307
352
|
label: replica,
|
|
308
353
|
id: replica,
|
|
@@ -310,8 +355,7 @@ such restriction.
|
|
|
310
355
|
checked: true
|
|
311
356
|
}
|
|
312
357
|
});
|
|
313
|
-
|
|
314
|
-
initialReplicas = replicas;
|
|
358
|
+
initialReplicas = allReplicas;
|
|
315
359
|
|
|
316
360
|
return ExecutionLogsDataService.logsPaginated(ctrl.page.number, ctrl.page.size, queryParams())
|
|
317
361
|
.then(function (logs) {
|
|
@@ -333,6 +377,7 @@ such restriction.
|
|
|
333
377
|
ctrl.timeRange = getInitialTimeRange();
|
|
334
378
|
ctrl.datePreset = initialDatePreset;
|
|
335
379
|
ctrl.selectedReplicas = initialReplicas;
|
|
380
|
+
ctrl.excludeOffline = false;
|
|
336
381
|
|
|
337
382
|
lodash.merge(ctrl.filter, defaultFilter);
|
|
338
383
|
$rootScope.$broadcast('search-input_reset');
|
|
@@ -415,7 +460,8 @@ such restriction.
|
|
|
415
460
|
.replace(/<|>/g, ''),
|
|
416
461
|
logLevels: lodash.chain(ctrl.filter.level).pickBy().keys().value(),
|
|
417
462
|
replicaNames: ctrl.selectedReplicas,
|
|
418
|
-
timeFilter: ctrl.timeRange
|
|
463
|
+
timeFilter: ctrl.timeRange,
|
|
464
|
+
includeOffline: !ctrl.excludeOffline
|
|
419
465
|
}
|
|
420
466
|
};
|
|
421
467
|
}
|
|
@@ -103,9 +103,18 @@
|
|
|
103
103
|
padding-left: 15px;
|
|
104
104
|
padding-right: 15px;
|
|
105
105
|
}
|
|
106
|
+
|
|
107
|
+
.checkboxes-dropdown-title {
|
|
108
|
+
text-transform: initial;
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
}
|
|
106
111
|
}
|
|
107
112
|
}
|
|
108
113
|
|
|
114
|
+
.online-replicas__checkbox {
|
|
115
|
+
margin: 5px 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
109
118
|
.igz-multiple-checkboxes {
|
|
110
119
|
.checkboxes-dropdown-container {
|
|
111
120
|
position: unset;
|
|
@@ -94,9 +94,20 @@
|
|
|
94
94
|
<span class="filter-label asterisk">
|
|
95
95
|
{{ 'common:REPLICAS' | i18next }}
|
|
96
96
|
</span>
|
|
97
|
+
<div class="online-replicas__checkbox">
|
|
98
|
+
<input type="checkbox"
|
|
99
|
+
id="onlineOnly"
|
|
100
|
+
data-ng-change="$ctrl.onExcludeOfflineChange()"
|
|
101
|
+
data-ng-disabled="$ctrl.excludeOfflineIsDisabled"
|
|
102
|
+
data-ng-model="$ctrl.excludeOffline">
|
|
103
|
+
<label for="onlineOnly" data-uib-tooltip="{{ $ctrl.excludeOfflineIsDisabled ? 'functions:TOOLTIP.NO_OFFLINE_REPLICAS' : '' | i18next }}">
|
|
104
|
+
{{ 'functions:SHOWN_ONLINE_ONLY' | i18next }}
|
|
105
|
+
</label>
|
|
106
|
+
</div>
|
|
97
107
|
<igz-multiple-checkboxes data-ng-model="$ctrl.selectedReplicas"
|
|
98
108
|
data-options="$ctrl.replicasList"
|
|
99
109
|
data-dropdown="true"
|
|
110
|
+
data-title="{{ 'functions:PLACEHOLDER.SELECT_REPLICA' | i18next }}"
|
|
100
111
|
data-select-all-none="true"
|
|
101
112
|
data-ng-change="$ctrl.onCheckboxChange($event)"
|
|
102
113
|
data-ng-required="true"
|
|
@@ -152,7 +163,7 @@
|
|
|
152
163
|
<div class="control-panel-log-table common-table">
|
|
153
164
|
<div class="search-input-not-found"
|
|
154
165
|
data-ng-if="$ctrl.logs.length === 0">
|
|
155
|
-
{{ 'functions:
|
|
166
|
+
{{ 'functions:NO_LOGS_WERE_FOUND' | i18next }}
|
|
156
167
|
</div>
|
|
157
168
|
|
|
158
169
|
<div data-igz-extend-background
|
|
@@ -30,6 +30,7 @@ such restriction.
|
|
|
30
30
|
var ctrl = this;
|
|
31
31
|
|
|
32
32
|
ctrl.enrichedNodeSelectors = [];
|
|
33
|
+
ctrl.enrichedServiceAccount = '';
|
|
33
34
|
ctrl.scrollConfig = {
|
|
34
35
|
advanced: {
|
|
35
36
|
updateOnContentResize: true
|
|
@@ -62,7 +63,7 @@ such restriction.
|
|
|
62
63
|
function onInit() {
|
|
63
64
|
ctrl.isFunctionDeploying = lodash.partial(FunctionsService.isFunctionDeploying, ctrl.version);
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
initEnrichedData();
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
/**
|
|
@@ -71,7 +72,7 @@ such restriction.
|
|
|
71
72
|
*/
|
|
72
73
|
function onChanges(changes) {
|
|
73
74
|
if (lodash.has(changes, 'version')) {
|
|
74
|
-
|
|
75
|
+
initEnrichedData();
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
|
|
@@ -88,9 +89,10 @@ such restriction.
|
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
/**
|
|
91
|
-
* Generates
|
|
92
|
+
* Generates enriched content
|
|
92
93
|
*/
|
|
93
|
-
function
|
|
94
|
+
function initEnrichedData() {
|
|
95
|
+
ctrl.enrichedServiceAccount = lodash.get(ctrl.version, 'status.enrichedServiceAccount', '');
|
|
94
96
|
ctrl.enrichedNodeSelectors = lodash.chain(ctrl.version)
|
|
95
97
|
.get('status.enrichedNodeSelector', {})
|
|
96
98
|
.map(function (key, value) {
|
|
@@ -60,6 +60,15 @@
|
|
|
60
60
|
</ncl-key-value-input>
|
|
61
61
|
</div>
|
|
62
62
|
</div>
|
|
63
|
+
<div data-ng-if="$ctrl.enrichedServiceAccount">
|
|
64
|
+
<span class="title">{{ 'functions:ENRICHED_SERVICE_ACCOUNT' | i18next }}: </span>
|
|
65
|
+
<igz-more-info
|
|
66
|
+
data-description="{{ 'functions:TOOLTIP.ENRICHED_SERVICE_ACCOUNT' | i18next }}"
|
|
67
|
+
data-trigger="click"
|
|
68
|
+
data-is-html-enabled="true">
|
|
69
|
+
</igz-more-info>
|
|
70
|
+
<p>{{$ctrl.enrichedServiceAccount}}</p>
|
|
71
|
+
</div>
|
|
63
72
|
</div>
|
|
64
73
|
</div>
|
|
65
74
|
<div class="row">
|