iguazio.dashboard-controls 0.38.7 → 0.38.10-patch1
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 +2 -0
- package/dist/js/iguazio.dashboard-controls.js +4138 -4120
- package/dist/less/iguazio.dashboard-controls.less +670 -670
- package/package.json +87 -87
- package/src/i18n/en/functions.json +2 -0
- package/src/igz_controls/components/default-dropdown/default-dropdown.component.js +32 -23
- package/src/igz_controls/components/default-dropdown/default-dropdown.tpl.html +1 -2
- package/src/igz_controls/services/validation.service.js +7 -0
- package/src/nuclio/common/screens/create-function/function-from-template/function-from-template.component.js +6 -10
- package/src/nuclio/common/screens/create-function/function-from-template/function-from-template.less +2 -2
- package/src/nuclio/functions/function-collapsing-row/function-collapsing-row.component.js +1 -1
- package/src/nuclio/functions/function-collapsing-row/function-collapsing-row.tpl.html +16 -16
- package/src/nuclio/functions/function-collapsing-row/function-version-row/function-version-row.component.js +1 -1
- package/src/nuclio/functions/function-collapsing-row/function-version-row/function-version-row.tpl.html +16 -16
- package/src/nuclio/functions/functions.component.js +33 -23
- package/src/nuclio/functions/functions.service.js +3 -5
- package/src/nuclio/functions/version/version-configuration/tabs/version-configuration-environment-variables/version-configuration-environment-variables.component.js +1 -1
- package/src/nuclio/functions/version/version.component.js +2 -1
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
var UPDATING_STATISTICS_INTERVAL_TIME = 30000;
|
|
33
33
|
|
|
34
34
|
ctrl.filtersCounter = 0;
|
|
35
|
+
ctrl.functionCPUMetric = FunctionsService.functionMetrics.FUNCTION_CPU;
|
|
36
|
+
ctrl.functionEventsMetric = FunctionsService.functionMetrics.FUNCTION_EVENTS;
|
|
37
|
+
ctrl.functionGPUMetric = FunctionsService.functionMetrics.FUNCTION_GPU;
|
|
38
|
+
ctrl.functionMemoryMetric = FunctionsService.functionMetrics.FUNCTION_MEMORY;
|
|
35
39
|
ctrl.functions = [];
|
|
36
40
|
ctrl.originalSortedFunctions = [];
|
|
37
41
|
ctrl.isFiltersShowed = {
|
|
@@ -505,10 +509,10 @@
|
|
|
505
509
|
|
|
506
510
|
if (!isRefresh) {
|
|
507
511
|
$timeout(function () {
|
|
508
|
-
hideSpinners(
|
|
509
|
-
hideSpinners(
|
|
510
|
-
hideSpinners(
|
|
511
|
-
hideSpinners(
|
|
512
|
+
hideSpinners(ctrl.functionCPUMetric);
|
|
513
|
+
hideSpinners(ctrl.functionGPUMetric);
|
|
514
|
+
hideSpinners(ctrl.functionMemoryMetric);
|
|
515
|
+
hideSpinners(ctrl.functionEventsMetric);
|
|
512
516
|
});
|
|
513
517
|
}
|
|
514
518
|
}
|
|
@@ -691,31 +695,37 @@
|
|
|
691
695
|
var now = Date.now();
|
|
692
696
|
var from = new Date(now - MILLIS_IN_AN_HOUR).toISOString();
|
|
693
697
|
var until = new Date(now).toISOString();
|
|
698
|
+
var functionEventsProjectName = '{project="' + ctrl.project.metadata.name + '"}';
|
|
699
|
+
var projectName = '{project_name="' + ctrl.project.metadata.name + '"}';
|
|
700
|
+
var gpuUtilizationMetric = ' * on (pod) group_left(function_name)(nuclio_function_pod_labels{project_name="' +
|
|
701
|
+
ctrl.project.metadata.name + '"})';
|
|
694
702
|
var args = {
|
|
695
|
-
metric:
|
|
703
|
+
metric: ctrl.functionEventsMetric + functionEventsProjectName,
|
|
696
704
|
from: from,
|
|
697
705
|
until: until,
|
|
698
706
|
interval: '5m'
|
|
699
707
|
};
|
|
700
708
|
|
|
701
709
|
ctrl.getStatistics(args)
|
|
702
|
-
.then(parseData.bind(null,
|
|
703
|
-
.catch(handleError.bind(null,
|
|
710
|
+
.then(parseData.bind(null, ctrl.functionEventsMetric))
|
|
711
|
+
.catch(handleError.bind(null, ctrl.functionEventsMetric));
|
|
704
712
|
|
|
705
|
-
args.metric =
|
|
713
|
+
args.metric = ctrl.functionCPUMetric + projectName;
|
|
706
714
|
ctrl.getStatistics(args)
|
|
707
|
-
.then(parseData.bind(null,
|
|
708
|
-
.catch(handleError.bind(null,
|
|
715
|
+
.then(parseData.bind(null, ctrl.functionCPUMetric))
|
|
716
|
+
.catch(handleError.bind(null, ctrl.functionCPUMetric));
|
|
709
717
|
|
|
710
|
-
args.metric =
|
|
718
|
+
args.metric = ctrl.functionGPUMetric + gpuUtilizationMetric;
|
|
719
|
+
args.appendQueryParamsToUrlPath = true;
|
|
711
720
|
ctrl.getStatistics(args)
|
|
712
|
-
.then(parseData.bind(null,
|
|
713
|
-
.catch(handleError.bind(null,
|
|
721
|
+
.then(parseData.bind(null, ctrl.functionGPUMetric))
|
|
722
|
+
.catch(handleError.bind(null, ctrl.functionGPUMetric));
|
|
723
|
+
delete args.appendQueryParamsToUrlPath;
|
|
714
724
|
|
|
715
|
-
args.metric =
|
|
725
|
+
args.metric = ctrl.functionMemoryMetric + projectName;
|
|
716
726
|
ctrl.getStatistics(args)
|
|
717
|
-
.then(parseData.bind(null,
|
|
718
|
-
.catch(handleError.bind(null,
|
|
727
|
+
.then(parseData.bind(null, ctrl.functionMemoryMetric))
|
|
728
|
+
.catch(handleError.bind(null, ctrl.functionMemoryMetric));
|
|
719
729
|
|
|
720
730
|
/**
|
|
721
731
|
* Sets error message to the relevant function
|
|
@@ -810,7 +820,7 @@
|
|
|
810
820
|
.value();
|
|
811
821
|
}
|
|
812
822
|
|
|
813
|
-
if (type ===
|
|
823
|
+
if (type === ctrl.functionCPUMetric) {
|
|
814
824
|
lodash.merge(aFunction.ui, {
|
|
815
825
|
metrics: {
|
|
816
826
|
'cpu.cores': latestValue,
|
|
@@ -819,7 +829,7 @@
|
|
|
819
829
|
})
|
|
820
830
|
}
|
|
821
831
|
});
|
|
822
|
-
} else if (type ===
|
|
832
|
+
} else if (type === ctrl.functionMemoryMetric) {
|
|
823
833
|
lodash.merge(aFunction.ui, {
|
|
824
834
|
metrics: {
|
|
825
835
|
size: Number(latestValue),
|
|
@@ -828,7 +838,7 @@
|
|
|
828
838
|
})
|
|
829
839
|
}
|
|
830
840
|
});
|
|
831
|
-
} else if (type ===
|
|
841
|
+
} else if (type === ctrl.functionGPUMetric) {
|
|
832
842
|
lodash.merge(aFunction.ui, {
|
|
833
843
|
metrics: {
|
|
834
844
|
'gpu.cores': latestValue,
|
|
@@ -853,10 +863,10 @@
|
|
|
853
863
|
});
|
|
854
864
|
|
|
855
865
|
// if the column values have just been updated, and the table is sorted by this column - update sort
|
|
856
|
-
if (type ===
|
|
857
|
-
type ===
|
|
858
|
-
type ===
|
|
859
|
-
type ===
|
|
866
|
+
if (type === ctrl.functionCPUMetric && ctrl.sortedColumnName === 'ui.metrics[\'cpu.cores\']' ||
|
|
867
|
+
type === ctrl.functionGPUMetric && ctrl.sortedColumnName === 'ui.metrics[\'gpu.cores\']' ||
|
|
868
|
+
type === ctrl.functionMemoryMetric && ctrl.sortedColumnName === 'ui.metrics.size' ||
|
|
869
|
+
type === ctrl.functionEventsMetric &&
|
|
860
870
|
lodash.includes(['ui.metrics.invocationPerSec', 'ui.metrics.count'], ctrl.sortedColumnName)) {
|
|
861
871
|
sortTable();
|
|
862
872
|
}
|
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
checkedItem: '',
|
|
10
10
|
functionMetrics: {
|
|
11
11
|
FUNCTION_CPU: 'nuclio_function_cpu',
|
|
12
|
-
FUNCTION_GPU:
|
|
13
|
-
'kube_metrics_server_pods_gpu_utilization * on (pod) group_left(function_name)(nuclio_function_pod_labels)'
|
|
14
|
-
),
|
|
12
|
+
FUNCTION_GPU: 'kube_metrics_server_pods_gpu_utilization',
|
|
15
13
|
FUNCTION_MEMORY: 'nuclio_function_mem',
|
|
16
14
|
FUNCTION_EVENTS: 'nuclio_processor_handled_events_total'
|
|
17
15
|
},
|
|
@@ -539,12 +537,12 @@
|
|
|
539
537
|
defaultValue: lodash.get(
|
|
540
538
|
ConfigService,
|
|
541
539
|
'nuclio.defaultFunctionConfig.attributes.spec.triggers.v3ioStream.url',
|
|
542
|
-
''
|
|
540
|
+
'http://v3io-webapi:8081'
|
|
543
541
|
),
|
|
544
542
|
placeholder: $i18next.t('common:PLACEHOLDER.ENTER_URL', { lng: lng }),
|
|
545
543
|
moreInfoDescription: $i18next.t('functions:TOOLTIP.V3IO_STREAM_URL', { lng: lng }),
|
|
546
544
|
moreInfoHtml: true,
|
|
547
|
-
isAdvanced:
|
|
545
|
+
isAdvanced: false,
|
|
548
546
|
allowEmpty: false
|
|
549
547
|
},
|
|
550
548
|
{
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
pattern: validateUniqueness.bind(null, 'name')
|
|
32
32
|
}]),
|
|
33
33
|
secretKey: ValidationService.getValidationRules('k8s.configMapKey'),
|
|
34
|
-
secret: ValidationService.getValidationRules('k8s.
|
|
34
|
+
secret: ValidationService.getValidationRules('k8s.secretName'),
|
|
35
35
|
configmapKey: ValidationService.getValidationRules('k8s.configMapKey', [
|
|
36
36
|
{
|
|
37
37
|
name: 'uniqueness',
|