iguazio.dashboard-controls 1.0.1 → 1.0.3

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,6 +1,6 @@
1
1
  {
2
2
  "name": "iguazio.dashboard-controls",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
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": {
@@ -4,8 +4,8 @@
4
4
  "ACTIVE": "Active",
5
5
  "ADD": "Add",
6
6
  "ADD_DESCRIPTION": "Add a description...",
7
- "ADD_NEW_ENTRY": "Add a new entry",
8
- "ADD_NEW_ENVIRONMENT_VARIABLE": "Add a new environment variable",
7
+ "ADD_ENTRY": "Add an entry",
8
+ "ADD_ENVIRONMENT_VARIABLE": "Add an environment variable",
9
9
  "ADDED": "Added",
10
10
  "ADDRESS": "Address",
11
11
  "ADVANCED": "Advanced",
@@ -4,12 +4,12 @@
4
4
  "ACCESS_KEY_ID": "Access key ID",
5
5
  "ACCESS_KEY_V3IO_ONLY": "Access key (required for an Iguazio Data Science Platform download)",
6
6
  "ADD_BROKER": "Add broker",
7
- "ADD_NEW_ANNOTATION": "Add a new annotation",
8
- "ADD_NEW_EVENT_HEADER": "Add a new event header",
9
- "ADD_NEW_LABEL": "Add a new label",
10
- "ADD_NEW_SUBSCRIPTION": "Add a new subscription",
11
- "ADD_NEW_TRIGGER": "Add a new trigger",
12
- "ADD_NEW_VOLUME": "Add a new volume",
7
+ "ADD_ANNOTATION": "Add an annotation",
8
+ "ADD_EVENT_HEADER": "Add an event header",
9
+ "ADD_LABEL": "Add a label",
10
+ "ADD_SUBSCRIPTION": "Add a subscription",
11
+ "ADD_TRIGGER": "Add a trigger",
12
+ "ADD_VOLUME": "Add a volume",
13
13
  "ADD_TOPIC": "Add topic",
14
14
  "ALWAYS_WAIT_FOR_READINESS_TIMEOUT_EXPIRATION": "Always wait for readiness-timeout expiration",
15
15
  "ANNOTATIONS": "Annotations",
@@ -58,7 +58,6 @@
58
58
  "CREATE_FUNCTION_EVENT": "Create function event",
59
59
  "CREATE_NEW_API_GATEWAY": "Create a new API Gateway",
60
60
  "CREATE_NEW_BINDING": "Create a new binding",
61
- "CREATE_NEW_ENVIRONMENT_VARIABLE": "Create a new environment variable",
62
61
  "CREATE_NEW_HEADER": "Create a new header",
63
62
  "CREATE_NEW_HOST": "Create a new host",
64
63
  "CREATE_NEW_RUNTIME_ATTRIBUTE": "Create a new runtime attribute",
@@ -22,7 +22,7 @@ such restriction.
22
22
  /*eslint no-shadow: 0*/
23
23
  function PaginationController($i18next, $injector , $location, $q, $rootScope, $stateParams, $timeout,
24
24
  i18next, lodash, ActionCheckboxAllService, GeneralDataService, PaginationService,
25
- entitiesType, onChangePageCallback, dataServiceName, vm, emptyOnPageChange) {
25
+ entitiesType, onChangePageCallback, dataServiceName, vm, emptyOnPageChange, customErrors) {
26
26
 
27
27
  // entityId - id of nested entity
28
28
  var entityId = lodash.defaultTo($location.search().entityId, $stateParams.id);
@@ -151,11 +151,16 @@ such restriction.
151
151
  '500': $i18next.t('common:ERROR_MSG.ERROR_ON_SERVER_SIDE', { lng: lng }),
152
152
  'default': $i18next.t('common:ERROR_MSG.UNKNOWN_ERROR', { lng: lng })
153
153
  };
154
- var message = lodash.get(errorMessages, String(error.status), errorMessages.default);
154
+ var errorMessage = lodash.get(errorMessages, String(error.status), errorMessages.default) +
155
+ ' ' + $i18next.t('common:ERROR_MSG.YOU_CAN_TRY_TO_REFRESH_PAGE', { lng: lng });
155
156
 
156
- $rootScope.$broadcast('splash-screen_show-error', {
157
- alertText: message + ' ' + $i18next.t('common:ERROR_MSG.YOU_CAN_TRY_TO_REFRESH_PAGE', { lng: lng })
158
- });
157
+ $q.when(customErrors).then(function (customErrorMessages) {
158
+ var message = lodash.get(customErrorMessages, String(error.status), errorMessage);
159
+
160
+ $rootScope.$broadcast('splash-screen_show-error', {
161
+ alertText: message
162
+ });
163
+ })
159
164
  }
160
165
  });
161
166
  }
@@ -38,14 +38,16 @@ such restriction.
38
38
  * @param {string} [dataServiceName] Name of DataService
39
39
  * @param {function} [onChangePageCallback] Additional code that should be executed after page changed
40
40
  * @param {boolean} [emptyOnPageChange=true] Set to `false` to prevent list from emptying before repopulating
41
+ * @param {Promise.<Object> | Object} [customErrors] List of custom errors messages
41
42
  */
42
- function addPagination(controller, entitiesType, dataServiceName, onChangePageCallback, emptyOnPageChange) {
43
+ function addPagination(controller, entitiesType, dataServiceName, onChangePageCallback, emptyOnPageChange, customErrors) {
43
44
  $controller('PaginationController', {
44
45
  entitiesType: entitiesType,
45
46
  onChangePageCallback: onChangePageCallback,
46
47
  dataServiceName: dataServiceName,
47
48
  vm: controller,
48
- emptyOnPageChange: emptyOnPageChange
49
+ emptyOnPageChange: emptyOnPageChange,
50
+ customErrors: customErrors
49
51
  });
50
52
  }
51
53
 
@@ -337,7 +337,7 @@
337
337
  data-ng-class="{'disabled': $ctrl.readOnly}"
338
338
  data-ng-click="$ctrl.addNewAnnotation($event)">
339
339
  <span class="igz-icon-add-round"></span>
340
- {{ 'functions:ADD_NEW_ANNOTATION' | i18next }}
340
+ {{ 'functions:ADD_ANNOTATION' | i18next }}
341
341
  </div>
342
342
  </div>
343
343
 
@@ -368,7 +368,7 @@
368
368
  data-ng-class="{'disabled': $ctrl.readOnly}"
369
369
  data-ng-click="$ctrl.addNewEventHeader($event)">
370
370
  <span class="igz-icon-add-round"></span>
371
- {{ 'functions:ADD_NEW_EVENT_HEADER' | i18next }}
371
+ {{ 'functions:ADD_EVENT_HEADER' | i18next }}
372
372
  </div>
373
373
  </div>
374
374
 
@@ -399,7 +399,7 @@
399
399
  data-ng-class="{'disabled': $ctrl.readOnly}"
400
400
  data-ng-click="$ctrl.addNewSubscription($event)">
401
401
  <span class="igz-icon-add-round"></span>
402
- {{ 'functions:ADD_NEW_SUBSCRIPTION' | i18next }}
402
+ {{ 'functions:ADD_SUBSCRIPTION' | i18next }}
403
403
  </div>
404
404
  </div>
405
405
 
@@ -42,7 +42,7 @@
42
42
  data-ng-class="{'disabled': $ctrl.isFunctionDeploying()}"
43
43
  data-ng-click="$ctrl.addNewAnnotation($event)">
44
44
  <span class="igz-icon-add-round"></span>
45
- {{ 'functions:ADD_NEW_ANNOTATION' | i18next }}
45
+ {{ 'functions:ADD_ANNOTATION' | i18next }}
46
46
  </div>
47
47
  </form>
48
48
  </div>
@@ -26,7 +26,7 @@
26
26
  data-ng-class="{ 'disabled': $ctrl.isFunctionDeploying() }"
27
27
  data-ng-click="$ctrl.addNewVariable($event)">
28
28
  <span class="igz-icon-add-round"></span>
29
- {{ 'functions:ADD_NEW_ENVIRONMENT_VARIABLE' | i18next }}
29
+ {{ 'common:ADD_ENVIRONMENT_VARIABLE' | i18next }}
30
30
  </div>
31
31
  </form>
32
32
  </div>
@@ -48,7 +48,7 @@
48
48
  data-tooltip-placement="right"
49
49
  data-tooltip-popup-delay="100">
50
50
  <span class="igz-icon-add-round"></span>
51
- {{ 'functions:ADD_NEW_LABEL' | i18next }}
51
+ {{ 'functions:ADD_LABEL' | i18next }}
52
52
  </div>
53
53
  </form>
54
54
  </div>
@@ -315,7 +315,7 @@
315
315
  data-ng-class="{ 'disabled': $ctrl.isFunctionDeploying() }"
316
316
  data-ng-click="$ctrl.addNewNodeSelector($event)">
317
317
  <span class="igz-icon-add-round"></span>
318
- {{ 'common:ADD_NEW_ENTRY' | i18next }}
318
+ {{ 'common:ADD_ENTRY' | i18next }}
319
319
  </div>
320
320
  </div>
321
321
  </div>
@@ -52,7 +52,7 @@
52
52
  data-ng-class="{'disabled': $ctrl.isFunctionDeploying()}"
53
53
  data-ng-click="$ctrl.createVolume($event)">
54
54
  <span class="igz-icon-add-round"></span>
55
- {{ 'functions:ADD_NEW_VOLUME' | i18next }}
55
+ {{ 'functions:ADD_VOLUME' | i18next }}
56
56
  </div>
57
57
  </form>
58
58
  </div>
@@ -45,7 +45,7 @@
45
45
  data-ng-if="$ctrl.isCreateNewTriggerEnabled()"
46
46
  data-ng-click="$ctrl.createTrigger($event)">
47
47
  <span class="igz-icon-add-round"></span>
48
- {{ 'functions:ADD_NEW_TRIGGER' | i18next }}
48
+ {{ 'functions:ADD_TRIGGER' | i18next }}
49
49
  </div>
50
50
  </div>
51
51
  </div>
@@ -404,6 +404,7 @@ such restriction.
404
404
  setVersion(aFunction);
405
405
  setImageNamePrefixTemplate();
406
406
  setIngressHost();
407
+ updateStatusTabIndicator();
407
408
  })
408
409
  .catch(function (error) {
409
410
  if (!GeneralDataService.isDisconnectionError(error.status)) {