iguazio.dashboard-controls 1.0.6 → 1.0.8

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.6",
3
+ "version": "1.0.8",
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": {
@@ -106,7 +106,6 @@
106
106
  "DO_NOT_SHOW_AGAIN": "Do not show again",
107
107
  "DOCS": "Docs",
108
108
  "DONE": "Done",
109
- "DO_NOT_CREATE_HTTP_TRIGGER_BY_DEFAULT": "Do not create http trigger by default",
110
109
  "DONT_LEAVE": "Don't leave",
111
110
  "DONT_REFRESH": "Don't refresh",
112
111
  "DONT_SAVE": "Don't save",
@@ -323,7 +323,6 @@
323
323
  "DEPLOY_IN_PROGRESS": "Deploy is already in-progress",
324
324
  "DISABLE_CACHE": "Build the function's Docker image from scratch without reusing any previously built Docker image layers",
325
325
  "DISABLED_FUNCTION": "Only running and scaled-to-zero functions can be tested",
326
- "DO_NOT_CREATE_HTTP_TRIGGER_BY_DEFAULT": "When not checked, an http trigger will be created for the function by default",
327
326
  "GIT": {
328
327
  "BRANCH": "The Git repository branch from which to download the function code",
329
328
  "BRANCH_TAG_REFERENCE_DISABLED": "Exactly one of Branch, Tag, and Reference fields must be filled. When one is filled, the others are disabled.",
@@ -200,9 +200,16 @@ such restriction.
200
200
  },
201
201
  notContainCharacters: function (chars) {
202
202
  return {
203
- name: 'notContain',
203
+ name: 'notContainCharacters',
204
204
  label: $i18next.t('common:NOT_CONTAIN', { lng: lng }) + ': ' + convertToLabel(chars),
205
- pattern: new RegExp('^[^' + convertToLabel(chars) + ']+$')
205
+ pattern: new RegExp('^[^' + convertToPattern(chars) + ']+$')
206
+ }
207
+ },
208
+ notContainString: function (string) {
209
+ return {
210
+ name: 'notContainString',
211
+ label: $i18next.t('common:NOT_CONTAIN', { lng: lng }) + ': ' + convertToLabel(string),
212
+ pattern: new RegExp('^(?!.*' + convertToPattern(string) + ').+$')
206
213
  }
207
214
  },
208
215
  maxLengthBetweenDelimiters: function (delimiter, maxLength, delimiterDescription) {
@@ -465,10 +472,9 @@ such restriction.
465
472
  dockerRegistryUrl: [
466
473
  {
467
474
  name: 'beginNot',
468
- label: $i18next.t('common:BEGIN_NOT_WITH', { lng: lng }) + ': https://',
469
- pattern: /^(?!https:\/\/)/
470
- },
471
- generateRule.notContainCharacters('/ :')
475
+ label: $i18next.t('common:BEGIN_NOT_WITH', { lng: lng }) + ': <schema>:/',
476
+ pattern: /^(?![^:/]+:\/).*/
477
+ }
472
478
  ]
473
479
  },
474
480
  clusters: {
@@ -83,7 +83,6 @@ such restriction.
83
83
  ctrl.editTriggerCallback = editTriggerCallback;
84
84
  ctrl.handleAction = handleAction;
85
85
  ctrl.isCreateNewTriggerEnabled = isCreateNewTriggerEnabled;
86
- ctrl.isHttpTriggerCheckboxShown = isHttpTriggerCheckboxShown;
87
86
  ctrl.isHttpTriggerMsgShown = isHttpTriggerMsgShown;
88
87
 
89
88
  //
@@ -254,21 +253,14 @@ such restriction.
254
253
  });
255
254
  }
256
255
 
257
- /**
258
- * Tests whether the `Do not create http trigger by default` checkbox is shown
259
- * @returns {boolean}
260
- */
261
- function isHttpTriggerCheckboxShown() {
262
- return !lodash.get(ConfigService, 'nuclio.disableDefaultHttpTrigger', false) &&
263
- !lodash.some(ctrl.version.spec.triggers, ['kind', 'http']);
264
- }
265
-
266
256
  /**
267
257
  * Tests whether the `HTTP trigger message` is shown
268
258
  * @returns {boolean} `true` in case "HTTP trigger message" is shown, or `false` otherwise.
269
259
  */
270
260
  function isHttpTriggerMsgShown() {
271
- return isHttpTriggerCheckboxShown() && !ctrl.version.spec.disableDefaultHTTPTrigger;
261
+ const disableDefaultHttpTrigger = lodash.get(ConfigService, 'nuclio.disableDefaultHttpTrigger', false);
262
+
263
+ return !disableDefaultHttpTrigger && !lodash.some(ctrl.version.spec.triggers, ['kind', 'http']);
272
264
  }
273
265
 
274
266
  //
@@ -28,10 +28,6 @@
28
28
  }
29
29
  }
30
30
 
31
- .http-trigger-checkbox {
32
- display: flex;
33
- }
34
-
35
31
  .item-row .item-name, .item-row .item-class, .item-row .item-info {
36
32
  padding-left: 0;
37
33
  }
@@ -3,22 +3,6 @@
3
3
  <div class="content-message-pane"
4
4
  data-ng-if="$ctrl.isHttpTriggerMsgShown()" data-ng-i18next="[html]functions:HTTP_TRIGGER_MSG">
5
5
  </div>
6
- <div class="http-trigger-checkbox" data-ng-if="$ctrl.isHttpTriggerCheckboxShown()">
7
- <input type="checkbox"
8
- class="small"
9
- id="disable-default-http-trigger"
10
- name="disableDefaultHTTPTrigger"
11
- data-ng-model="$ctrl.version.spec.disableDefaultHTTPTrigger"
12
- data-ng-disabled="$ctrl.isFunctionDeploying()"
13
- >
14
- <label for="disable-default-http-trigger"
15
- class="checkbox-inline">{{ 'common:DO_NOT_CREATE_HTTP_TRIGGER_BY_DEFAULT' | i18next }}</label>
16
- <igz-more-info
17
- data-description="{{ 'functions:TOOLTIP.DO_NOT_CREATE_HTTP_TRIGGER_BY_DEFAULT' | i18next }}"
18
- data-trigger="click"
19
- data-default-tooltip-placement="right">
20
- </igz-more-info>
21
- </div>
22
6
  <div class="common-table-header header-row">
23
7
  <div class="common-table-cell header-name">
24
8
  {{ 'common:NAME' | i18next }}