iguazio.dashboard-controls 1.2.12 → 1.2.13

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.2.12",
3
+ "version": "1.2.13",
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": {
@@ -140,7 +140,7 @@
140
140
  "EXTERNAL_INVOCATION_URLS": "External invocation URLs",
141
141
  "EXECUTION_LOG": "Execution log",
142
142
  "FAILED_TO_DEPLOY": "Failed to deploy",
143
- "FUNCTION_NAME_IS_USED_WARNING": "The specified function name is already used by a function in another project. To use it for a new function you must first delete the existing function.",
143
+ "FUNCTION_NAME_IS_USED_WARNING": "The function name you specified is already in use. Function names must be unique across projects. Choose a different name.",
144
144
  "FUNCTIONS_NOT_FOUND": "There are currently no functions, you can create a function by pressing ‘New Function’",
145
145
  "GET_STARTED_WITH_YOUR_PROJECT": "Get started with your project.",
146
146
  "GO_TO_EXISTING_FUNCTION": "Go to existing function",
@@ -225,8 +225,22 @@ such restriction.
225
225
  function onChanges(changes) {
226
226
  if (angular.isDefined(changes.version)) {
227
227
  ctrl.runtimeArray = getRuntimes();
228
- ctrl.selectedRuntime = lodash.defaultTo(lodash.find(ctrl.runtimeArray, ['id', ctrl.version.spec.runtime]),
229
- lodash.find(ctrl.runtimeArray, ['id', 'python']));
228
+ ctrl.selectedRuntime = lodash.find(ctrl.runtimeArray, ['id', ctrl.version.spec.runtime]);
229
+
230
+ if (!ctrl.selectedRuntime) {
231
+ var customRuntime = {
232
+ id: ctrl.version.spec.runtime,
233
+ ext: 'py',
234
+ name: lodash.capitalize(ctrl.version.spec.runtime),
235
+ language: 'python',
236
+ sourceCode: 'ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOg0KICAgIHJldHVybiAiIg==', // source code in base64
237
+ visible: true
238
+ };
239
+
240
+ ctrl.runtimeArray.push(customRuntime);
241
+ ctrl.selectedRuntime = customRuntime;
242
+ }
243
+
230
244
  ctrl.editorLanguage = ctrl.selectedRuntime.language;
231
245
 
232
246
  var sourceCode = lodash.get(ctrl.version, 'spec.build.functionSourceCode', '');