iguazio.dashboard-controls 1.2.14 → 1.2.15
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 +5 -2
- package/dist/js/iguazio.dashboard-controls.js +2890 -2849
- package/dist/less/iguazio.dashboard-controls.less +4424 -4415
- package/package.json +1 -1
- package/src/i18n/en/functions.json +5 -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iguazio.dashboard-controls",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.15",
|
|
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": {
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"LOGGER_DESTINATION": "Logger destination",
|
|
170
170
|
"LOGGER_LEVEL": "Logger level",
|
|
171
171
|
"LOGGING": "Logging",
|
|
172
|
-
"LOGS_LINES_LIMITATION": "Note: Only the last 10,000 rows are displayed. <br> To download up to 100,000 rows, click
|
|
172
|
+
"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
173
|
"MAX": "Max",
|
|
174
174
|
"MAX_REPLICAS": "Maximum number of replicas (default: {{default}})",
|
|
175
175
|
"MAX_WORKERS": "Max Workers",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"NEW_PROJECT": "New project",
|
|
186
186
|
"NO_FUNCTIONS_AVAILABLE": "No functions available",
|
|
187
187
|
"NO_INTERNET_ACCESS": "No internet access",
|
|
188
|
-
"
|
|
188
|
+
"NO_LOGS_WERE_FOUND": "No logs were found...",
|
|
189
189
|
"NODE_SELECTORS": "Node selector",
|
|
190
190
|
"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
191
|
"NORMAL": "Normal",
|
|
@@ -251,6 +251,7 @@
|
|
|
251
251
|
"SEARCH_TEMPLATE": "Search by text, tags and keywords",
|
|
252
252
|
"SEC": "Sec",
|
|
253
253
|
"SELECT_CLASS": "Select class",
|
|
254
|
+
"SELECT_REPLICA": "Select a replica",
|
|
254
255
|
"SELECT_TYPE": "Select type"
|
|
255
256
|
},
|
|
256
257
|
"PODS_PRIORITY": "Pods priority",
|
|
@@ -292,6 +293,7 @@
|
|
|
292
293
|
"SELECT_FUNCTION_CONFIRM": "The function you selected is currently not running. Are you sure you want to use it?",
|
|
293
294
|
"SERVICE_ACCOUNT": "Service Account",
|
|
294
295
|
"SESSION_TOKEN": "Session token",
|
|
296
|
+
"SHOWN_ONLINE_ONLY": "Show online replicas only",
|
|
295
297
|
"SKIP": "Skip",
|
|
296
298
|
"SKIP_TLS_VERIFICATION": "Skip TLS verification",
|
|
297
299
|
"SMALL": "Small",
|
|
@@ -349,6 +351,7 @@
|
|
|
349
351
|
},
|
|
350
352
|
"NEW_TEST": "New test",
|
|
351
353
|
"NO_INTERNET_ACCESS": "Use local Docker images rather than pulling from remote",
|
|
354
|
+
"NO_OFFLINE_REPLICAS": "Only online replicas found",
|
|
352
355
|
"ENRICHED_NODE_SELECTOR": "The node selector of the function, enriched with the project’s and the service’s default node selectors",
|
|
353
356
|
"POD_TOLERATIONS": {
|
|
354
357
|
"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
|