Explorar o código

HUE-2668 [notebook] Switch session kind alias from python to pyspark, scala to spark

Romain Rigaux %!s(int64=10) %!d(string=hai) anos
pai
achega
5a061b4b37

+ 2 - 2
apps/spark/src/spark/conf.py

@@ -38,8 +38,8 @@ LANGUAGES = Config(
   help=_t("List of available types of snippets."),
   type=coerce_json,
   default="""[
-      {"name": "Scala", "type": "scala"},
-      {"name": "PySpark", "type": "python"},
+      {"name": "Scala", "type": "spark"},
+      {"name": "PySpark", "type": "pyspark"},
       {"name": "R", "type": "r"},
       {"name": "Impala", "type": "impala"},
       {"name": "Hive", "type": "hive"},

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
apps/spark/src/spark/fixtures/initial_spark_examples.json


+ 2 - 2
apps/spark/src/spark/static/spark/js/spark.ko.js

@@ -108,8 +108,8 @@ var Result = function (snippet, result) {
 var TYPE_ACE_EDITOR_MAP = {
   'hive': 'ace/mode/hive',
   'impala': 'ace/mode/impala',
-  'python': 'ace/mode/python',
-  'scala': 'ace/mode/scala',
+  'pyspark': 'ace/mode/python',
+  'spark': 'ace/mode/scala',
   'pig': 'ace/mode/pig',
   'r': 'ace/mode/r',
 };

+ 4 - 4
apps/spark/src/spark/templates/editor_components.mako

@@ -298,12 +298,12 @@ from django.utils.translation import ugettext as _
   <img src="${ static('impala/art/icon_impala_48.png') }" class="snippet-icon"><sup style="color: #338bb8; margin-left: -2px">impala</sup>
   <!-- /ko -->
 
-  <!-- ko if: type() == 'scala' -->
+  <!-- ko if: type() == 'spark' -->
   <img src="${ static('spark/art/icon_spark_48.png') }" class="snippet-icon"><sup style="color: #338bb8; margin-left: -2px">scala</sup>
   <!-- /ko -->
 
-  <!-- ko if: type() == 'python' -->
-  <img src="${ static('spark/art/icon_spark_48.png') }" class="snippet-icon"><sup style="color: #338bb8; margin-left: -2px">python</sup>
+  <!-- ko if: type() == 'pyspark' -->
+  <img src="${ static('spark/art/icon_spark_48.png') }" class="snippet-icon"><sup style="color: #338bb8; margin-left: -2px">pyspark</sup>
   <!-- /ko -->
 
   <!-- ko if: type() == 'sql' -->
@@ -803,7 +803,7 @@ from django.utils.translation import ugettext as _
             <p>${ _('There are currently no active sessions.') }</p>
             <!-- /ko -->
             <!-- ko foreach: sessions -->
-              <!-- ko if: ['pyspark', 'scala'].indexOf(type()) != -1 && typeof properties != 'undefined' -->
+              <!-- ko if: ['pyspark', 'spark'].indexOf(type()) != -1 && typeof properties != 'undefined' -->
               <h4 data-bind="text: $root.getSnippetName(type())" style="clear:left;"></h4>
               <div style="display:block; width:100%;">
                 <!-- ko foreach: properties -->

+ 1 - 1
desktop/conf.dist/hue.ini

@@ -1070,7 +1070,7 @@
   ## livy_impersonation_enabled=true
 
   # List of available types of snippets
-  ## languages='[{"name": "Scala Shell", "type": "scala"},{"name": "PySpark Shell", "type": "python"},{"name": "R Shell", "type": "r"},{"name": "Jar", "type": "Jar"},{"name": "Python", "type": "py"},{"name": "Impala SQL", "type": "impala"},{"name": "Hive SQL", "type": "hive"},{"name": "Text", "type": "text"}]'
+  ## languages='[{"name": "Scala Shell", "type": "spark"},{"name": "PySpark Shell", "type": "pyspark"},{"name": "R Shell", "type": "r"},{"name": "Jar", "type": "Jar"},{"name": "Python", "type": "py"},{"name": "Impala SQL", "type": "impala"},{"name": "Hive SQL", "type": "hive"},{"name": "Text", "type": "text"}]'
 
 
 ###########################################################################

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio