iguazio.dashboard-controls 0.38.8 → 0.38.10-patch2

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/package.json CHANGED
@@ -1,89 +1,89 @@
1
1
  {
2
- "name": "iguazio.dashboard-controls",
3
- "version": "0.38.8",
4
- "main": "dist/js/iguazio.dashboard-controls.js",
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
- "repository": {
7
- "type": "git",
8
- "url": "git@github.com:iguazio/dashboard-controls.git"
9
- },
10
- "bugs": {
11
- "url": "https://github.com/iguazio/dashboard-controls/issues"
12
- },
13
- "keywords": [
14
- "Iguazio",
15
- "iguazio"
16
- ],
17
- "license": "Apache-2.0",
18
- "homepage": "https://github.com/iguazio/dashboard-controls",
19
- "author": {
20
- "name": "Eran Nussbaum",
21
- "email": "erann@iguazio.com"
22
- },
23
- "dependencies": {
24
- "@uirouter/angularjs": "^1.0.20",
25
- "angular": "^1.7.9",
26
- "angular-download": "0.0.5",
27
- "angular-mocks": "^1.7.9",
28
- "angular-sanitize": "^1.7.9",
29
- "angular-ui-bootstrap": "~2.5.6",
30
- "babel-core": "^6.26.0",
31
- "babel-plugin-angularjs-annotate": "^0.8.2",
32
- "babel-polyfill": "^6.26.0",
33
- "babel-preset-env": "^1.6.1",
34
- "bootstrap": "~3.4.1",
35
- "del": "^2.2.0",
36
- "eslint-plugin-angular": "^4.0.1",
37
- "express": "4.12.3",
38
- "gulp": "^3.9.1",
39
- "gulp-babel": "^7.0.0",
40
- "gulp-concat": "~2.5.2",
41
- "gulp-eslint": "^6.0.0",
42
- "gulp-file-transform-cache": ">=1.0.6",
43
- "gulp-htmlmin": "^5.0.1",
44
- "gulp-if": "^1.2.5",
45
- "gulp-imagemin": "^7.1.0",
46
- "gulp-less": "4.0.1",
47
- "gulp-less-import": "^1.0.0",
48
- "gulp-ng-html2js": "^0.2.0",
49
- "gulp-preprocess": "^2.0.0",
50
- "gulp-rename": "~1.2.2",
51
- "gulp-rev": "^6.0.1",
52
- "gulp-rev-collector": "^1.0.2",
53
- "gulp-uglify": "^3.0.2",
54
- "i18next": "^15.1.3",
55
- "jquery": "*",
56
- "jquery-ui": "1.12.0",
57
- "js-base64": "^2.4.8",
58
- "lodash": "^4.17.11",
59
- "merge2": "^0.3.6",
60
- "moment": "^2.24.0",
61
- "monaco-editor": "^0.11.1",
62
- "natives": "^1.1.6",
63
- "ng-dialog": "~0.6.4",
64
- "ng-file-upload": "~12.2.13",
65
- "ng-i18next": "^1.0.5",
66
- "nodejs-fs-utils": "~1.0.26",
67
- "run-sequence": "~1.1.0",
68
- "vinyl-paths": "^2.1.0",
69
- "yargs": "3.10.0"
70
- },
71
- "devDependencies": {
72
- "eslint": "^6.8.0",
73
- "jasmine-core": "~3.2.1",
74
- "jasmine-reporters": "^2.4.0",
75
- "jstoxml": "~0.2.3",
76
- "karma": "^6.3.1",
77
- "karma-chrome-launcher": "^3.1.0",
78
- "karma-jasmine": "^3.1.1"
79
- },
80
- "autoupdate": {
81
- "source": "git",
82
- "target": "https://github.com/iguazio/dashboard-controls.git",
83
- "basePath": "",
84
- "files": [
85
- "dist/js/iguazio.dashboard-controls.js",
86
- "dist/less/iguazio.dashboard-controls.less"
87
- ]
88
- }
2
+ "name": "iguazio.dashboard-controls",
3
+ "version": "0.38.10-patch2",
4
+ "main": "dist/js/iguazio.dashboard-controls.js",
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
+ "repository": {
7
+ "type": "git",
8
+ "url": "git@github.com:iguazio/dashboard-controls.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/iguazio/dashboard-controls/issues"
12
+ },
13
+ "keywords": [
14
+ "Iguazio",
15
+ "iguazio"
16
+ ],
17
+ "license": "Apache-2.0",
18
+ "homepage": "https://github.com/iguazio/dashboard-controls",
19
+ "author": {
20
+ "name": "Eran Nussbaum",
21
+ "email": "erann@iguazio.com"
22
+ },
23
+ "dependencies": {
24
+ "@uirouter/angularjs": "^1.0.20",
25
+ "angular": "^1.7.9",
26
+ "angular-download": "0.0.5",
27
+ "angular-mocks": "^1.7.9",
28
+ "angular-sanitize": "^1.7.9",
29
+ "angular-ui-bootstrap": "~2.5.6",
30
+ "babel-core": "^6.26.0",
31
+ "babel-plugin-angularjs-annotate": "^0.8.2",
32
+ "babel-polyfill": "^6.26.0",
33
+ "babel-preset-env": "^1.6.1",
34
+ "bootstrap": "~3.4.1",
35
+ "del": "^2.2.0",
36
+ "eslint-plugin-angular": "^4.0.1",
37
+ "express": "4.12.3",
38
+ "gulp": "^3.9.1",
39
+ "gulp-babel": "^7.0.0",
40
+ "gulp-concat": "~2.5.2",
41
+ "gulp-eslint": "^6.0.0",
42
+ "gulp-file-transform-cache": ">=1.0.6",
43
+ "gulp-htmlmin": "^5.0.1",
44
+ "gulp-if": "^1.2.5",
45
+ "gulp-imagemin": "^7.1.0",
46
+ "gulp-less": "4.0.1",
47
+ "gulp-less-import": "^1.0.0",
48
+ "gulp-ng-html2js": "^0.2.0",
49
+ "gulp-preprocess": "^2.0.0",
50
+ "gulp-rename": "~1.2.2",
51
+ "gulp-rev": "^6.0.1",
52
+ "gulp-rev-collector": "^1.0.2",
53
+ "gulp-uglify": "^3.0.2",
54
+ "i18next": "^15.1.3",
55
+ "jquery": "*",
56
+ "jquery-ui": "1.12.0",
57
+ "js-base64": "^2.4.8",
58
+ "lodash": "^4.17.11",
59
+ "merge2": "^0.3.6",
60
+ "moment": "^2.24.0",
61
+ "monaco-editor": "^0.11.1",
62
+ "natives": "^1.1.6",
63
+ "ng-dialog": "~0.6.4",
64
+ "ng-file-upload": "~12.2.13",
65
+ "ng-i18next": "^1.0.5",
66
+ "nodejs-fs-utils": "~1.0.26",
67
+ "run-sequence": "~1.1.0",
68
+ "vinyl-paths": "^2.1.0",
69
+ "yargs": "3.10.0"
70
+ },
71
+ "devDependencies": {
72
+ "eslint": "^6.8.0",
73
+ "jasmine-core": "~3.2.1",
74
+ "jasmine-reporters": "^2.4.0",
75
+ "jstoxml": "~0.2.3",
76
+ "karma": "^6.3.1",
77
+ "karma-chrome-launcher": "^3.1.0",
78
+ "karma-jasmine": "^3.1.1"
79
+ },
80
+ "autoupdate": {
81
+ "source": "git",
82
+ "target": "https://github.com/iguazio/dashboard-controls.git",
83
+ "basePath": "",
84
+ "files": [
85
+ "dist/js/iguazio.dashboard-controls.js",
86
+ "dist/less/iguazio.dashboard-controls.less"
87
+ ]
88
+ }
89
89
  }
@@ -397,6 +397,7 @@
397
397
  "PROTECTION": "Protection",
398
398
  "QUIT_AND_DISCARD": "Quit and Discard",
399
399
  "QUOTA": "Quota",
400
+ "READ_MORE": "Read more",
400
401
  "READ_ONLY": "Read only",
401
402
  "READ_WRITE": "Read/write",
402
403
  "REAL_TIME": "Real-time",
@@ -77,6 +77,7 @@
77
77
  "DELETE_VERSIONS_CONFIRM": "Are you sure you want to delete selected versions?",
78
78
  "DELETED_FUNCTION_WHILE_DEPLOYING_MSG": "The function was deleted by someone else before it completed its deployment. You can deploy it again to recreate it, or go to the functions list.",
79
79
  "DEPENDENCIES": "Dependencies",
80
+ "DEPRECATED_SOON_LABEL": "- deprecated soon",
80
81
  "DEPLOY": "Deploy",
81
82
  "DEPLOYING": "Deploying...",
82
83
  "DISABLE_CACHE": "Disable cache",
@@ -258,7 +259,6 @@
258
259
  "PROMOTE_CANARY_CONFIRM": "Are you sure you want to promote canary to primary?",
259
260
  "PVC": "PVC",
260
261
  "QOS": "QoS",
261
- "READ_MORE": "Read more",
262
262
  "READINESS_TIMEOUT_SECONDS": "Readiness timeout (seconds)",
263
263
  "READINESS_TIMEOUT_SECONDS_DESCRIPTION": "The time, in seconds, that the controller will wait for the function to become ready before declaring failure (default: {{default}})",
264
264
  "REBALANCING_GRACE_PERIOD": "Rebalancing grace period",
@@ -299,6 +299,7 @@
299
299
  "SUBSCRIPTIONS": "Subscriptions",
300
300
  "SUCCESSFULLY_DEPLOYED": "Successfully deployed",
301
301
  "TARGET_CPU_DESCRIPTION": "Exceeding this threshold will increase the number of replicas (default: {{default}}). Note that the percentage of utilization is based on the resource request. <a class=\"link\" href=\"https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-resource-metrics\" target=\"_blank\">more info</a>",
302
+ "TECH_PREVIEW_LABEL": "(tech preview)",
302
303
  "TEMPLATE_PARAMETERS": "Template parameters",
303
304
  "TEMPLATES": "Templates",
304
305
  "THEME": "Theme",
@@ -115,8 +115,8 @@
115
115
 
116
116
  ctrl.checkIsRequired = checkIsRequired;
117
117
  ctrl.getDescription = getDescription;
118
- ctrl.getName = getName;
119
118
  ctrl.getIcon = getIcon;
119
+ ctrl.getNameTemplate = getNameTemplate;
120
120
  ctrl.getTooltip = getTooltip;
121
121
  ctrl.getValuesArray = getValuesArray;
122
122
  ctrl.isItemSelected = isItemSelected;
@@ -281,13 +281,12 @@
281
281
  }
282
282
 
283
283
  /**
284
- * Returns the name of the provided item. Searches for a direct `name` property, or searches `name` property by
285
- * `nameKey`
284
+ * Returns the name of the provided item. Searches for a direct `nameTemplate` property
286
285
  * @param {Object} item - the item whose name should be returned
287
286
  * @returns {string}
288
287
  */
289
- function getName(item) {
290
- return lodash.get(item, 'name', lodash.get(item, ctrl.nameKey, ''));
288
+ function getNameTemplate(item) {
289
+ return lodash.get(item, 'nameTemplate', getName(item));
291
290
  }
292
291
 
293
292
  /**
@@ -486,7 +485,7 @@
486
485
  } else {
487
486
  ctrl.selectedItem = item;
488
487
  }
489
- ctrl.typedValue = ctrl.getName(item);
488
+ ctrl.typedValue = getName(item);
490
489
  }
491
490
 
492
491
  if (angular.isFunction(ctrl.itemSelectCallback)) {
@@ -608,12 +607,22 @@
608
607
  // Private methods
609
608
  //
610
609
 
610
+ /**
611
+ * Returns the name of the provided item. Searches for a direct `name` property, or searches `name` property by
612
+ * `nameKey`
613
+ * @param {Object} item - the item whose name should be returned
614
+ * @returns {string}
615
+ */
616
+ function getName(item) {
617
+ return lodash.get(item, 'name', lodash.get(item, ctrl.nameKey, ''));
618
+ }
619
+
611
620
  /**
612
621
  * Sets default input value
613
622
  */
614
623
  function setDefaultInputValue() {
615
624
  if (!lodash.isNil(ctrl.selectedItem)) {
616
- ctrl.typedValue = ctrl.getName(angular.isDefined(ctrl.selectPropertyOnly) ?
625
+ ctrl.typedValue = getName(angular.isDefined(ctrl.selectPropertyOnly) ?
617
626
  lodash.find(ctrl.valuesArray, [ctrl.selectPropertyOnly, ctrl.selectedItem]) : ctrl.selectedItem);
618
627
 
619
628
  if (ctrl.typedValue === '' && ctrl.enableTyping) {
@@ -653,6 +662,22 @@
653
662
  });
654
663
  }
655
664
 
665
+ /**
666
+ * Takes the largest element and sets him width as min-width to all elements (needed to style drop-down list)
667
+ */
668
+ function setWidth() {
669
+ var labels = $element.find('.default-dropdown-container ul li').find('.list-item-label');
670
+ var minWidth = lodash(labels)
671
+ .map(function (label) {
672
+ return angular.element(label)[0].clientWidth;
673
+ })
674
+ .min();
675
+
676
+ lodash.forEach(labels, function (label) {
677
+ angular.element(label).css('min-width', minWidth);
678
+ });
679
+ }
680
+
656
681
  /**
657
682
  * Handle click on the document and not on the dropdown field and close the dropdown
658
683
  * @param {Object} e - event
@@ -669,21 +694,5 @@
669
694
  });
670
695
  }
671
696
  }
672
-
673
- /**
674
- * Takes the largest element and sets him width as min-width to all elements (needed to style drop-down list)
675
- */
676
- function setWidth() {
677
- var labels = $element.find('.default-dropdown-container ul li').find('.list-item-label');
678
- var minWidth = lodash(labels)
679
- .map(function (label) {
680
- return angular.element(label)[0].clientWidth;
681
- })
682
- .min();
683
-
684
- lodash.forEach(labels, function (label) {
685
- angular.element(label).css('min-width', minWidth);
686
- });
687
- }
688
697
  }
689
698
  }());
@@ -72,8 +72,7 @@
72
72
 
73
73
  <div class="list-item-label">
74
74
  <span class="list-item-name"
75
- data-ng-class="{'capitalized': $ctrl.isCapitalized}">
76
- {{$ctrl.getName(item)}}</span>
75
+ data-ng-class="{'capitalized': $ctrl.isCapitalized}" data-ng-bind-html="$ctrl.getNameTemplate(item)"></span>
77
76
  <span data-ng-show="$ctrl.getDescription(item)"
78
77
  class="description">{{$ctrl.getDescription(item)}}</span>
79
78
  </div>
@@ -371,7 +371,8 @@
371
371
  },
372
372
  {
373
373
  id: 'python:3.6',
374
- name: 'Python 3.6',
374
+ name: 'Python 3.6 ' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}),
375
+ nameTemplate: 'Python 3.6 ' + '<b>' + $i18next.t('functions:DEPRECATED_SOON_LABEL', {lng: lng}) + '</b>',
375
376
  visible: true
376
377
  },
377
378
  {
@@ -391,27 +392,22 @@
391
392
  },
392
393
  {
393
394
  id: 'dotnetcore',
394
- name: '.NET Core',
395
+ name: '.NET Core ' + $i18next.t('functions:TECH_PREVIEW_LABEL', {lng: lng}),
395
396
  visible: true
396
397
  },
397
398
  {
398
399
  id: 'java',
399
- name: 'Java',
400
+ name: 'Java ' + $i18next.t('functions:TECH_PREVIEW_LABEL', {lng: lng}),
400
401
  visible: true
401
402
  },
402
403
  {
403
404
  id: 'nodejs',
404
- name: 'NodeJS',
405
+ name: 'NodeJS ' + $i18next.t('functions:TECH_PREVIEW_LABEL', {lng: lng}),
405
406
  visible: true
406
407
  },
407
408
  {
408
409
  id: 'shell',
409
- name: 'Shell',
410
- visible: true
411
- },
412
- {
413
- id: 'ruby',
414
- name: 'Ruby',
410
+ name: 'Shell ' + $i18next.t('functions:TECH_PREVIEW_LABEL', {lng: lng}),
415
411
  visible: true
416
412
  }
417
413
  ];
@@ -97,7 +97,7 @@
97
97
  }
98
98
 
99
99
  .templates-runtime-drop-down {
100
- width: 13%;
100
+ width: 25%;
101
101
 
102
102
  .input-label {
103
103
  font-size: 14px;
@@ -119,7 +119,7 @@
119
119
  }
120
120
 
121
121
  .templates-pagination {
122
- min-width: 241px;
122
+ min-width: 255px;
123
123
  display: flex;
124
124
  align-items: flex-end;
125
125
  justify-content: flex-end;
@@ -44,7 +44,7 @@
44
44
  <div class="template-description">{{value.rendered.spec.description}}</div>
45
45
  <div data-ng-if="value.ui.readMore"
46
46
  class="template-read-more">
47
- {{ 'functions:READ_MORE' | i18next }}...
47
+ {{ 'common:READ_MORE' | i18next }}...
48
48
  </div>
49
49
  </div>
50
50
 
@@ -695,11 +695,12 @@
695
695
  var now = Date.now();
696
696
  var from = new Date(now - MILLIS_IN_AN_HOUR).toISOString();
697
697
  var until = new Date(now).toISOString();
698
- var projectName = '{project="' + ctrl.project.metadata.name + '"}';
699
- var gpuUtilizationMetric = ' * on (pod) group_left(function_name)(nuclio_function_pod_labels{project="' +
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="' +
700
701
  ctrl.project.metadata.name + '"})';
701
702
  var args = {
702
- metric: ctrl.functionEventsMetric + projectName,
703
+ metric: ctrl.functionEventsMetric + functionEventsProjectName,
703
704
  from: from,
704
705
  until: until,
705
706
  interval: '5m'
@@ -537,12 +537,12 @@
537
537
  defaultValue: lodash.get(
538
538
  ConfigService,
539
539
  'nuclio.defaultFunctionConfig.attributes.spec.triggers.v3ioStream.url',
540
- ''
540
+ 'http://v3io-webapi:8081'
541
541
  ),
542
542
  placeholder: $i18next.t('common:PLACEHOLDER.ENTER_URL', { lng: lng }),
543
543
  moreInfoDescription: $i18next.t('functions:TOOLTIP.V3IO_STREAM_URL', { lng: lng }),
544
544
  moreInfoHtml: true,
545
- isAdvanced: !lodash.isEmpty(lodash.get(additionalData, 'containers')),
545
+ isAdvanced: false,
546
546
  allowEmpty: false
547
547
  },
548
548
  {
@@ -187,7 +187,8 @@
187
187
  runtimeAttributes: {
188
188
  repositories: []
189
189
  }
190
- }
190
+ },
191
+ resources: $stateParams.isNewFunction ? lodash.get(ConfigService, 'nuclio.defaultFunctionPodResources', {}) : {}
191
192
  },
192
193
  ui: {
193
194
  versionCode: '',