Преглед на файлове

[spark] Integrate AceEditor

Centralized Ace editor autocompleters
Restyled Ace autocomplete and snippet tooltip
Added mapping ignore on notebook serialization
Added placeholders support for AceEditor
Added AceEditor source to tools, with hue-ace.sh build script
Moved custom completers and highlighters to Ace source folder
Fixed snippets loading for Hive and Impala
Hive and Impala Ace highlighters are not case insensitive
Added table magic autocomplete to Hive/Impala
Enrico Berti преди 10 години
родител
ревизия
7f67480e9a
променени са 100 файла, в които са добавени 258 реда и са изтрити 769 реда
  1. 3 0
      .gitignore
  2. 14 1
      apps/spark/src/spark/static/spark/css/spark.css
  3. 183 189
      apps/spark/src/spark/static/spark/js/ace.autocomplete.js
  4. 22 3
      apps/spark/src/spark/static/spark/js/spark.ko.js
  5. 0 301
      apps/spark/src/spark/templates/ace.mako
  6. 30 3
      apps/spark/src/spark/templates/editor.mako
  7. 4 7
      apps/spark/src/spark/views.py
  8. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ace.js
  9. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-elastic_tabstops_lite.js
  10. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-language_tools.js
  11. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-modelist.js
  12. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-settings_menu.js
  13. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-static_highlight.js
  14. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-textarea.js
  15. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-whitespace.js
  16. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/keybinding-vim.js
  17. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-html.js
  18. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-markdown.js
  19. 0 125
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-pig.js
  20. 0 1
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-sql.js
  21. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-clouds.js
  22. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-clouds_midnight.js
  23. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-cobalt.js
  24. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-dawn.js
  25. 0 138
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-hue.js
  26. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-idle_fingers.js
  27. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-katzenmilch.js
  28. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-kr_theme.js
  29. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-merbivore.js
  30. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-merbivore_soft.js
  31. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-mono_industrial.js
  32. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-monokai.js
  33. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-pastel_on_dark.js
  34. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-solarized_dark.js
  35. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-solarized_light.js
  36. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-sqlserver.js
  37. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-terminal.js
  38. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow.js
  39. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night.js
  40. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night_blue.js
  41. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night_bright.js
  42. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night_eighties.js
  43. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-twilight.js
  44. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-vibrant_ink.js
  45. 0 1
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-xcode.js
  46. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-coffee.js
  47. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-css.js
  48. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-html.js
  49. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-javascript.js
  50. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-json.js
  51. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-lua.js
  52. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-php.js
  53. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-xml.js
  54. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-xquery.js
  55. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ace.js
  56. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-beautify.js
  57. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-chromevox.js
  58. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-elastic_tabstops_lite.js
  59. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-emmet.js
  60. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-error_marker.js
  61. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-keybinding_menu.js
  62. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-language_tools.js
  63. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-linking.js
  64. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-modelist.js
  65. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-old_ie.js
  66. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-searchbox.js
  67. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-settings_menu.js
  68. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-spellcheck.js
  69. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-split.js
  70. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-static_highlight.js
  71. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-statusbar.js
  72. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-textarea.js
  73. 1 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-themelist.js
  74. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/ext-whitespace.js
  75. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/keybinding-emacs.js
  76. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/keybinding-vim.js
  77. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-abap.js
  78. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-abc.js
  79. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-actionscript.js
  80. 1 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-ada.js
  81. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-apache_conf.js
  82. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-applescript.js
  83. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-asciidoc.js
  84. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-assembly_x86.js
  85. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-autohotkey.js
  86. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-batchfile.js
  87. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-c9search.js
  88. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-c_cpp.js
  89. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-cirru.js
  90. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-clojure.js
  91. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-cobol.js
  92. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-coffee.js
  93. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-coldfusion.js
  94. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-csharp.js
  95. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-css.js
  96. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-curly.js
  97. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-d.js
  98. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-dart.js
  99. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-diff.js
  100. 0 0
      desktop/core/src/desktop/static/desktop/js/ace/mode-django.js

+ 3 - 0
.gitignore

@@ -100,3 +100,6 @@ apps/logs
 
 # Static files
 /static
+
+# Node Modules
+node_modules/

+ 14 - 1
apps/spark/src/spark/static/spark/css/spark.css

@@ -431,4 +431,17 @@ input[type="text"].filechooser-input {
 
 table.airy tr td {
   padding: 4px;
-}
+}
+
+.ace-editor {
+  height: 200px;
+}
+
+.ace-filechooser {
+  position: absolute;
+  display: none;
+  z-index: 20000;
+  background-color: #FFFFFF;
+  padding: 10px;
+  min-width: 350px;
+}

+ 183 - 189
apps/spark/src/spark/static/spark/js/ace.autocomplete.js

@@ -14,114 +14,95 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-  var TIME_TO_LIVE_IN_MILLIS = 86400000; // 1 day
+var TIME_TO_LIVE_IN_MILLIS = 86400000; // 1 day
 
-  var hasExpired = function(timestamp){
-    return (new Date()).getTime() - timestamp > TIME_TO_LIVE_IN_MILLIS;
-  };
+var hasExpired = function (timestamp) {
+  return (new Date()).getTime() - timestamp > TIME_TO_LIVE_IN_MILLIS;
+};
 
 
-  /**
-   *
-   * @param options {object}
-   * @param options.autocompleteBaseURL
-   * @param options.autocompleteApp
-   * @param options.autocompleteUser
-   * @param options.autocompleteGlobalCallback
-   * @param options.autocompleteFailsSilentlyOn
-   * @param options.autocompleteFailsQuietlyOn
-   *
-   * @constructor
-   */
-  function Autocomplete (options) {
-    this.options = options;
-  }
-
-  Autocomplete.prototype.jsonCalls = function (options) {
-    var _url = typeof options.autocompleteBaseURL != "undefined" ? options.autocompleteBaseURL : this.options.autocompleteBaseURL;
-    if (_url != ""){
-      if (options.database != null) {
-        _url += options.database
-      }
-      if (options.table != null) {
-        _url += "/" + options.table
-      }
+/**
+ *
+ * @param options {object}
+ * @param options.autocompleteBaseURL
+ * @param options.autocompleteApp
+ * @param options.autocompleteUser
+ * @param options.autocompleteGlobalCallback
+ * @param options.autocompleteFailsSilentlyOn
+ * @param options.autocompleteFailsQuietlyOn
+ *
+ * @constructor
+ */
+function Autocomplete(options) {
+  this.options = options;
+  this.currentDB = "";
+}
 
-      $.ajax({
-        type: "GET",
-        url: _url + "?" + Math.random(),
-        success: options.onDataReceived,
-        async: typeof options.sync == "undefined"
-      });
+Autocomplete.prototype.jsonCalls = function (options) {
+  var _url = typeof options.autocompleteBaseURL != "undefined" ? options.autocompleteBaseURL : this.options.autocompleteBaseURL;
+  if (_url != "") {
+    if (options.database != null) {
+      _url += options.database
     }
-  };
-
-  Autocomplete.prototype.getTableAliases = function (textScanned) {
-    var _aliases = {};
-    var _val = textScanned.split("\n").join(" ");
-    var _from = _val.toUpperCase().indexOf("FROM ");
-    if (_from > -1) {
-      var _match = _val.toUpperCase().substring(_from).match(/ ON| LIMIT| WHERE| GROUP| SORT| ORDER BY|;/);
-      var _to = _val.length;
-      if (_match) {
-        _to = _match.index;
-      }
-      var _found = _val.substr(_from, _to).replace(/(\r\n|\n|\r)/gm, "").replace(/from/gi, "").replace(/join/gi, ",").split(",");
-      for (var i = 0; i < _found.length; i++) {
-        var _tablealias = $.trim(_found[i]).split(" ");
-        if (_tablealias.length > 1) {
-          _aliases[_tablealias[1]] = _tablealias[0];
-        }
-      }
+    if (options.table != null) {
+      _url += "/" + options.table
     }
-    return _aliases;
-  };
 
-  Autocomplete.prototype.getTotalStorageUserPrefix = function () {
-    var _app = "";
-    if (typeof this.options.autocompleteApp != "undefined") {
-      _app = this.options.autocompleteApp;
+    $.ajax({
+      type: "GET",
+      url: _url + "?" + Math.random(),
+      success: options.onDataReceived,
+      async: typeof options.sync == "undefined"
+    });
+  }
+};
+
+Autocomplete.prototype.getTableAliases = function (textScanned) {
+  var _aliases = {};
+  var _val = textScanned.split("\n").join(" ");
+  var _from = _val.toUpperCase().indexOf("FROM ");
+  if (_from > -1) {
+    var _match = _val.toUpperCase().substring(_from).match(/ ON| LIMIT| WHERE| GROUP| SORT| ORDER BY|;/);
+    var _to = _val.length;
+    if (_match) {
+      _to = _match.index;
     }
-    if (typeof this.options.autocompleteUser != "undefined") {
-      return _app + "_" + this.options.autocompleteUser + "_";
+    var _found = _val.substr(_from, _to).replace(/(\r\n|\n|\r)/gm, "").replace(/from/gi, "").replace(/join/gi, ",").split(",");
+    for (var i = 0; i < _found.length; i++) {
+      var _tablealias = $.trim(_found[i]).split(" ");
+      if (_tablealias.length > 1) {
+        _aliases[_tablealias[1]] = _tablealias[0];
+      }
     }
-    return (_app != "" ? _app + "_" : "");
-  };
+  }
+  return _aliases;
+};
 
-  Autocomplete.prototype.getTableColumns = function (databaseName, tableName, textScanned, callback) {
-    var self = this;
-    if (tableName.indexOf("(") > -1) {
-      tableName = tableName.substr(tableName.indexOf("(") + 1);
-    }
+Autocomplete.prototype.getTotalStorageUserPrefix = function () {
+  var _app = "";
+  if (typeof this.options.autocompleteApp != "undefined") {
+    _app = this.options.autocompleteApp;
+  }
+  if (typeof this.options.autocompleteUser != "undefined") {
+    return _app + "_" + this.options.autocompleteUser + "_";
+  }
+  return (_app != "" ? _app + "_" : "");
+};
 
-    var _aliases = self.getTableAliases(textScanned);
-    if (_aliases[tableName]) {
-      tableName = _aliases[tableName];
-    }
+Autocomplete.prototype.getTableColumns = function (databaseName, tableName, textScanned, callback) {
+  var self = this;
+  if (tableName.indexOf("(") > -1) {
+    tableName = tableName.substr(tableName.indexOf("(") + 1);
+  }
 
-    if ($.totalStorage(self.getTotalStorageUserPrefix() + 'columns_' + databaseName + '_' + tableName) != null && $.totalStorage(self.getTotalStorageUserPrefix() + 'extended_columns_' + databaseName + '_' + tableName) != null) {
-      callback($.totalStorage(self.getTotalStorageUserPrefix() + 'columns_' + databaseName + '_' + tableName), $.totalStorage(self.getTotalStorageUserPrefix() + 'extended_columns_' + databaseName + '_' + tableName));
-      if ($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_columns_' + databaseName + '_' + tableName) == null || hasExpired($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_columns_' + databaseName + '_' + tableName))){
-        self.jsonCalls({
-          database: databaseName,
-          table: tableName,
-          onDataReceived: function (data) {
-            if (typeof self.options.autocompleteGlobalCallback == "function") {
-              self.options.autocompleteGlobalCallback(data);
-            }
-            if (data.error) {
-              self.errorHandler(data);
-            }
-            else {
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'columns_' + databaseName + '_' + tableName, (data.columns ? "* " + data.columns.join(" ") : "*"));
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'extended_columns_' + databaseName + '_' + tableName, (data.extended_columns ? data.extended_columns : []));
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_columns_' + databaseName + '_' + tableName, (new Date()).getTime());
-            }
-          }
-        });
-      }
-    }
-    else {
+  var _aliases = self.getTableAliases(textScanned);
+  if (_aliases[tableName]) {
+    tableName = _aliases[tableName];
+  }
+
+  if ($.totalStorage(self.getTotalStorageUserPrefix() + 'columns_' + databaseName + '_' + tableName) != null && $.totalStorage(self.getTotalStorageUserPrefix() + 'extended_columns_' + databaseName + '_' + tableName) != null) {
+    callback($.totalStorage(self.getTotalStorageUserPrefix() + 'columns_' + databaseName + '_' + tableName), $.totalStorage(self.getTotalStorageUserPrefix() + 'extended_columns_' + databaseName + '_' + tableName));
+    if ($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_columns_' + databaseName + '_' + tableName) == null || hasExpired($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_columns_' + databaseName + '_' + tableName))) {
       self.jsonCalls({
         database: databaseName,
         table: tableName,
@@ -136,47 +117,49 @@
             $.totalStorage(self.getTotalStorageUserPrefix() + 'columns_' + databaseName + '_' + tableName, (data.columns ? "* " + data.columns.join(" ") : "*"));
             $.totalStorage(self.getTotalStorageUserPrefix() + 'extended_columns_' + databaseName + '_' + tableName, (data.extended_columns ? data.extended_columns : []));
             $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_columns_' + databaseName + '_' + tableName, (new Date()).getTime());
-            callback($.totalStorage(self.getTotalStorageUserPrefix() + 'columns_' + databaseName + '_' + tableName), $.totalStorage(self.getTotalStorageUserPrefix() + 'extended_columns_' + databaseName + '_' + tableName));
           }
         }
       });
     }
-  };
-
-  Autocomplete.prototype.tableHasAlias = function (tableName, textScanned) {
-    var self = this;
-    var _aliases = self.getTableAliases(textScanned);
-    for (var alias in _aliases) {
-      if (_aliases[alias] == tableName) {
-        return true;
+  }
+  else {
+    self.jsonCalls({
+      database: databaseName,
+      table: tableName,
+      onDataReceived: function (data) {
+        if (typeof self.options.autocompleteGlobalCallback == "function") {
+          self.options.autocompleteGlobalCallback(data);
+        }
+        if (data.error) {
+          self.errorHandler(data);
+        }
+        else {
+          $.totalStorage(self.getTotalStorageUserPrefix() + 'columns_' + databaseName + '_' + tableName, (data.columns ? "* " + data.columns.join(" ") : "*"));
+          $.totalStorage(self.getTotalStorageUserPrefix() + 'extended_columns_' + databaseName + '_' + tableName, (data.extended_columns ? data.extended_columns : []));
+          $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_columns_' + databaseName + '_' + tableName, (new Date()).getTime());
+          callback($.totalStorage(self.getTotalStorageUserPrefix() + 'columns_' + databaseName + '_' + tableName), $.totalStorage(self.getTotalStorageUserPrefix() + 'extended_columns_' + databaseName + '_' + tableName));
+        }
       }
-    }
-    return false;
-  };
+    });
+  }
+};
 
-  Autocomplete.prototype.getTables = function (databaseName, callback) {
-    var self = this;
-    if ($.totalStorage(self.getTotalStorageUserPrefix() + 'tables_' + databaseName) != null) {
-      callback($.totalStorage(self.getTotalStorageUserPrefix() + 'tables_' + databaseName));
-      if ($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_tables_' + databaseName) == null || hasExpired($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_tables_' + databaseName))){
-        self.jsonCalls({
-          database: databaseName,
-          onDataReceived: function (data) {
-            if (typeof self.options.autocompleteGlobalCallback == "function") {
-              self.options.autocompleteGlobalCallback(data);
-            }
-            if (data.error) {
-              self.errorHandler(data);
-            }
-            else {
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'tables_' + databaseName, data.tables.join(" "));
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_tables_' + databaseName, (new Date()).getTime());
-            }
-          }
-        });
-      }
+Autocomplete.prototype.tableHasAlias = function (tableName, textScanned) {
+  var self = this;
+  var _aliases = self.getTableAliases(textScanned);
+  for (var alias in _aliases) {
+    if (_aliases[alias] == tableName) {
+      return true;
     }
-    else {
+  }
+  return false;
+};
+
+Autocomplete.prototype.getTables = function (databaseName, callback) {
+  var self = this;
+  if ($.totalStorage(self.getTotalStorageUserPrefix() + 'tables_' + databaseName) != null) {
+    callback($.totalStorage(self.getTotalStorageUserPrefix() + 'tables_' + databaseName));
+    if ($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_tables_' + databaseName) == null || hasExpired($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_tables_' + databaseName))) {
       self.jsonCalls({
         database: databaseName,
         onDataReceived: function (data) {
@@ -187,41 +170,42 @@
             self.errorHandler(data);
           }
           else {
-            if (data.tables) {
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'tables_' + databaseName, data.tables.join(" "));
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_tables_' + databaseName, (new Date()).getTime());
-              callback($.totalStorage(self.getTotalStorageUserPrefix() + 'tables_' + databaseName));
-            }
+            $.totalStorage(self.getTotalStorageUserPrefix() + 'tables_' + databaseName, data.tables.join(" "));
+            $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_tables_' + databaseName, (new Date()).getTime());
           }
         }
       });
     }
-  };
-
-  Autocomplete.prototype.getDatabases = function (callback) {
-    var self = this;
-    if ($.totalStorage(self.getTotalStorageUserPrefix() + 'databases') != null) {
-      if (callback) {
-        callback($.totalStorage(self.getTotalStorageUserPrefix() + 'databases'));
-      }
-      if ($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_databases') == null || hasExpired($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_databases'))){
-        this.jsonCalls({
-          onDataReceived: function (data) {
-            if (typeof self.options.autocompleteGlobalCallback == "function") {
-              self.options.autocompleteGlobalCallback(data);
-            }
-            if (data.error) {
-              self.errorHandler(data);
-            }
-            else {
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'databases', data.databases);
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_databases', (new Date()).getTime());
-            }
+  }
+  else {
+    self.jsonCalls({
+      database: databaseName,
+      onDataReceived: function (data) {
+        if (typeof self.options.autocompleteGlobalCallback == "function") {
+          self.options.autocompleteGlobalCallback(data);
+        }
+        if (data.error) {
+          self.errorHandler(data);
+        }
+        else {
+          if (data.tables) {
+            $.totalStorage(self.getTotalStorageUserPrefix() + 'tables_' + databaseName, data.tables.join(" "));
+            $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_tables_' + databaseName, (new Date()).getTime());
+            callback($.totalStorage(self.getTotalStorageUserPrefix() + 'tables_' + databaseName));
           }
-        });
+        }
       }
+    });
+  }
+};
+
+Autocomplete.prototype.getDatabases = function (callback) {
+  var self = this;
+  if ($.totalStorage(self.getTotalStorageUserPrefix() + 'databases') != null) {
+    if (callback) {
+      callback($.totalStorage(self.getTotalStorageUserPrefix() + 'databases'));
     }
-    else {
+    if ($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_databases') == null || hasExpired($.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_databases'))) {
       this.jsonCalls({
         onDataReceived: function (data) {
           if (typeof self.options.autocompleteGlobalCallback == "function") {
@@ -231,43 +215,53 @@
             self.errorHandler(data);
           }
           else {
-            if (data.databases) {
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'databases', data.databases);
-              $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_databases', (new Date()).getTime());
-              if (callback) {
-                callback($.totalStorage(self.getTotalStorageUserPrefix() + 'databases'));
-              }
-            }
+            $.totalStorage(self.getTotalStorageUserPrefix() + 'databases', data.databases);
+            $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_databases', (new Date()).getTime());
           }
         }
       });
     }
-  };
-
-  Autocomplete.prototype.errorHandler = function (data) {
-    var self = this;
-    $(document).trigger('error.autocomplete');
-    if (typeof self.options.autocompleteFailsSilentlyOn == "undefined" || data.code == null || self.options.autocompleteFailsSilentlyOn.indexOf(data.code) == -1){
-      if (typeof self.options.autocompleteFailsQuietlyOn  != "undefined" && self.options.autocompleteFailsQuietlyOn.indexOf(data.code) > -1){
-        $(document).trigger('info', data.error);
-      }
-      else {
-        $(document).trigger('error', data.error);
+  }
+  else {
+    this.jsonCalls({
+      onDataReceived: function (data) {
+        if (typeof self.options.autocompleteGlobalCallback == "function") {
+          self.options.autocompleteGlobalCallback(data);
+        }
+        if (data.error) {
+          self.errorHandler(data);
+        }
+        else {
+          if (data.databases) {
+            $.totalStorage(self.getTotalStorageUserPrefix() + 'databases', data.databases);
+            $.totalStorage(self.getTotalStorageUserPrefix() + 'timestamp_databases', (new Date()).getTime());
+            if (callback) {
+              callback($.totalStorage(self.getTotalStorageUserPrefix() + 'databases'));
+            }
+          }
+        }
       }
-    }
+    });
   }
+};
 
+Autocomplete.prototype.errorHandler = function (data) {
+  var self = this;
+  $(document).trigger('error.autocomplete');
+  if (typeof self.options.autocompleteFailsSilentlyOn == "undefined" || data.code == null || self.options.autocompleteFailsSilentlyOn.indexOf(data.code) == -1) {
+    if (typeof self.options.autocompleteFailsQuietlyOn != "undefined" && self.options.autocompleteFailsQuietlyOn.indexOf(data.code) > -1) {
+      $(document).trigger('info', data.error);
+    }
+    else {
+      $(document).trigger('error', data.error);
+    }
+  }
+}
 
+Autocomplete.prototype.setDatabase = function (db) {
+  this.currentDB = db;
+}
 
-
-
-
-
-
-
-
-
-
-
-
-
+Autocomplete.prototype.getDatabase = function () {
+  return this.currentDB;
+}

+ 22 - 3
apps/spark/src/spark/static/spark/js/spark.ko.js

@@ -15,6 +15,10 @@
 // limitations under the License.
 
 
+var SPARK_MAPPING = {
+  ignore: ["ace"]
+}
+
 var Result = function (snippet, result) {
   var self = this;
 
@@ -109,6 +113,14 @@ var TYPE_EDITOR_MAP = {
   'pig': 'text/x-pig'
 }
 
+var TYPE_ACE_EDITOR_MAP = {
+  'hive': 'ace/mode/hive',
+  'impala': 'ace/mode/impala',
+  'python': 'ace/mode/python',
+  'scala': 'ace/mode/scala',
+  'pig': 'ace/mode/pig'
+}
+
 var Snippet = function (vm, notebook, snippet) {
   var self = this;
 
@@ -116,6 +128,13 @@ var Snippet = function (vm, notebook, snippet) {
   self.name = ko.observable(typeof snippet.name != "undefined" && snippet.name != null ? snippet.name : '');
   self.type = ko.observable(typeof snippet.type != "undefined" && snippet.type != null ? snippet.type : "hive");
   self.editorMode = ko.observable(TYPE_EDITOR_MAP[self.type()]);
+
+  //Ace stuff
+  self.aceEditorMode = ko.observable(TYPE_ACE_EDITOR_MAP[self.type()]);
+  self.ace = ko.observable(null);
+  self.completers = ko.observableArray([]);
+  self.errors = ko.observableArray([]);
+
   self.statement_raw = ko.observable(typeof snippet.statement_raw != "undefined" && snippet.statement_raw != null ? snippet.statement_raw : vm.snippetPlaceholders[self.type()]);
   self.codemirrorSize = ko.observable(typeof snippet.codemirrorSize != "undefined" && snippet.codemirrorSize != null ? snippet.codemirrorSize : 100);
   // self.statement_raw.extend({ rateLimit: 150 }); // Should prevent lag from typing but currently send the old query when using the key shortcut
@@ -425,7 +444,7 @@ var Snippet = function (vm, notebook, snippet) {
   self.fetchResultMetadata = function () {
     $.post("/spark/api/fetch_result_metadata", {
       notebook: ko.mapping.toJSON(notebook.getContext()),
-      snippet: ko.mapping.toJSON(self.getContext()),
+      snippet: ko.mapping.toJSON(self.getContext())
     }, function (data) {
       if (data.status == 0) {
         self.result.meta(data.result.meta);
@@ -681,7 +700,7 @@ var Notebook = function (vm, notebook) {
 
   self.save = function () {
     $.post("/spark/api/notebook/save", {
-      "notebook": ko.mapping.toJSON(self)
+      "notebook": ko.mapping.toJSON(self, SPARK_MAPPING)
     }, function (data) {
       if (data.status == 0) {
         self.id(data.id);
@@ -700,7 +719,7 @@ var Notebook = function (vm, notebook) {
 
   self.close = function () {
     $.post("/spark/api/notebook/close", {
-      "notebook": ko.mapping.toJSON(self)
+      "notebook": ko.mapping.toJSON(self, SPARK_MAPPING)
     });
   };
 

+ 0 - 301
apps/spark/src/spark/templates/ace.mako

@@ -1,301 +0,0 @@
-## Licensed to Cloudera, Inc. under one
-## or more contributor license agreements.  See the NOTICE file
-## distributed with this work for additional information
-## regarding copyright ownership.  Cloudera, Inc. licenses this file
-## to you under the Apache License, Version 2.0 (the
-## "License"); you may not use this file except in compliance
-## with the License.  You may obtain a copy of the License at
-##
-##     http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-
-<%!
-  from desktop.views import commonheader, commonfooter, commonshare, commonimportexport
-  from django.utils.translation import ugettext as _
-%>
-<%namespace name="actionbar" file="actionbar.mako" />
-
-${ commonheader(_("Notebooks"), "spark", user, "60px") | n,unicode }
-
-<script src="${ static('desktop/ext/js/ace/ace.js') }"></script>
-<script src="${ static('desktop/ext/js/ace/ext-language_tools.js') }"></script>
-<script src="${ static('desktop/js/ace.extended.js') }"></script>
-
-<style type="text/css" media="screen">
-  .editor {
-    height: 200px;
-    margin: 20px;
-  }
-  .filechooser {
-    position: absolute;
-    display: none;
-    z-index: 20000;
-    background-color: #FFFFFF;
-    padding: 10px;
-    min-width: 350px;
-  }
-</style>
-
-<!-- ko foreach: editors -->
-  <div class="editor" data-bind="attr: {id: UUID()}, aceEditor: {value: snippet, aceInstance: ace, mode: mode, onChange: onChangeHandler, onAfterExec: onAfterExecHandler, extraCompleters: completers, errors: errors }">
-  </div>
-<!-- /ko -->
-
-<div class="filechooser">
-  <a class="pointer pull-right" data-bind="click: function(){ $('.filechooser').hide(); }"><i class="fa fa-times"></i></a>
-  <div class="filechooser-content">
-    <!--[if !IE]><!--><i class="fa fa-spinner fa-spin" style="font-size: 30px; color: #DDD"></i><!--<![endif]-->
-    <!--[if IE]><img src="${ static('desktop/art/spinner.gif') }"/><![endif]-->
-  </div>
-</div>
-
-<script src="${ static('desktop/ext/js/knockout.min.js') }" type="text/javascript" charset="utf-8"></script>
-<script src="${ static('desktop/ext/js/knockout-mapping.min.js') }" type="text/javascript" charset="utf-8"></script>
-<script src="${ static('desktop/ext/js/knockout-sortable.min.js') }" type="text/javascript" charset="utf-8"></script>
-<script src="${ static('desktop/ext/js/knockout-deferred-updates.min.js') }" type="text/javascript" charset="utf-8"></script>
-<script src="${ static('desktop/js/ko.hue-bindings.js') }" type="text/javascript" charset="utf-8"></script>
-
-<script src="${ static('spark/js/ace.autocomplete.js') }" type="text/javascript" charset="utf-8"></script>
-
-<script>
-
-
-  var AceAutocomplete = new Autocomplete({
-   autocompleteBaseURL: "/beeswax/api/autocomplete/",
-   autocompleteApp: "beeswax",
-   autocompleteUser: "hue",
-   autocompleteFailsQuietlyOn: [500] // error codes from beeswax/views.py - autocomplete
-  });
-
-  var DEFAULT_DB = "default";
-
-  function newCompleter(items) {
-    return {
-      getCompletions: function(editor, session, pos, prefix, callback) {
-        callback(null, items);
-      }
-    }
-  }
-
-  function fieldsAutocomplete(editor, valueAccessor) {
-    try {
-      var _before = editor.getTextBeforeCursor(";");
-      var _after = editor.getTextAfterCursor(";");
-      var _statement = _before + _after;
-      var _foundTable = "";
-      if (_before.substr(-1) == "."){ // gets the table alias
-        _foundTable = _before.split(" ").pop().slice(0, -1);
-      }
-      else { // gets the standard table
-        var _from = _statement.toUpperCase().indexOf("FROM");
-        if (_from > -1) {
-          var _match = _statement.toUpperCase().substring(_from).match(/ ON| LIMIT| WHERE| GROUP| SORT| ORDER BY|;/);
-          var _to = _statement.length;
-          if (_match) {
-            _to = _match.index;
-          }
-          var _found = _statement.substr(_from, _to).replace(/(\r\n|\n|\r)/gm, "").replace(/from/gi, "").replace(/join/gi, ",").split(",");
-        }
-
-        for (var i = 0; i < _found.length; i++) {
-          if ($.trim(_found[i]) != "" && _foundTable == "") {
-            _foundTable = $.trim(_found[i]).split(" ")[0];
-          }
-        }
-      }
-
-      if (_foundTable != "") {
-          editor.showSpinner();
-          // fill up with fields
-          AceAutocomplete.getTableColumns(DEFAULT_DB, _foundTable, _statement, function(data){
-            var _fieldNames = data.split(" ");
-            var _fields = [];
-            _fieldNames.forEach(function(fld){
-              _fields.push({value: fld, score: (fld == "*") ? 1001: 1000, meta: "column"});
-            });
-            valueAccessor().extraCompleters([newCompleter(_fields)]);
-            editor.hideSpinner();
-          });
-      }
-    }
-    catch (e) {
-    }
-  }
-
-  function onAfterExecHandler(e, editor, valueAccessor) {
-    editor.session.getMode().$id = valueAccessor().mode(); // forces the id again because of Ace command internals
-    if ((editor.session.getMode().$id == "ace/mode/hivesql" || editor.session.getMode().$id == "ace/mode/impalasql") && e.args == "."){
-      fieldsAutocomplete(editor, valueAccessor);
-    }
-        // if it's pig and before it's LOAD ' we disable the autocomplete and show a filechooser btn
-    if (editor.session.getMode().$id = "ace/mode/pig" && e.args) {
-      var _textBefore = editor.getTextBeforeCursor();
-      if ((e.args == "'" && _textBefore.toUpperCase().indexOf("LOAD ") > -1 && _textBefore.toUpperCase().indexOf("LOAD ") == _textBefore.toUpperCase().length - 5)
-          || _textBefore.toUpperCase().indexOf("LOAD '") > -1 && _textBefore.toUpperCase().indexOf("LOAD '") == _textBefore.toUpperCase().length - 6){
-        editor.disableAutocomplete();
-        var _btn = editor.showFileButton();
-        _btn.on("click", function(ie){
-          ie.preventDefault();
-          if ($(".filechooser-content").data("spinner") == null){
-            $(".filechooser-content").data("spinner", $(".filechooser-content").html());
-          }
-          else {
-            $(".filechooser-content").html($(".filechooser-content").data("spinner"));
-          }
-          $(".filechooser-content").jHueFileChooser({
-            onFileChoose: function (filePath) {
-              editor.session.insert(editor.getCursorPosition(), filePath + "'");
-              editor.hideFileButton();
-              editor.enableAutocomplete();
-              $(".filechooser").hide();
-            },
-            selectFolder: false,
-            createFolder: false
-          });
-          $(".filechooser").css({ "top": $(ie.currentTarget).position().top, "left": $(ie.currentTarget).position().left}).show();
-        });
-      }
-      else {
-        editor.hideFileButton();
-        editor.enableAutocomplete();
-      }
-      if (e.args != "'" && _textBefore.toUpperCase().indexOf("LOAD '") > -1 && _textBefore.toUpperCase().indexOf("LOAD '") == _textBefore.toUpperCase().length - 6) {
-        editor.hideFileButton();
-        editor.enableAutocomplete();
-      }
-    }
-
-  }
-
-
-  function onChangeHandler(event, editor, valueAccessor) {
-    valueAccessor().extraCompleters([]);
-    editor.session.getMode().$id = valueAccessor().mode();
-
-    var _before = editor.getTextBeforeCursor(";");
-    var _beforeU = _before.toUpperCase();
-    var _after = editor.getTextAfterCursor(";");
-    var _afterU = _after.toUpperCase();
-    if (editor.session.getMode().$id == "ace/mode/hivesql" || editor.session.getMode().$id == "ace/mode/impalasql") {
-      if ($.trim(_before).substr(-1) != ".") {
-        if ((_beforeU.indexOf(" FROM ") > -1 || _beforeU.indexOf(" TABLE ") > -1 || _beforeU.indexOf(" STATS ") > -1) && _beforeU.indexOf(" ON ") == -1 && _beforeU.indexOf(" ORDER BY ") == -1 && _beforeU.indexOf(" WHERE ") == -1 ||
-            _beforeU.indexOf("REFRESH") > -1 || _beforeU.indexOf("METADATA") > -1 || _beforeU.indexOf("DESCRIBE") > -1) {
-          editor.showSpinner();
-          valueAccessor().extraCompleters([]);
-          AceAutocomplete.getTables(DEFAULT_DB, function (data) {
-            var _tableNames = data.split(" ");
-            var _tables = [];
-            _tableNames.forEach(function (tbl) {
-              _tables.push({value: tbl, score: 1000, meta: "table"});
-            });
-            valueAccessor().extraCompleters([newCompleter(_tables)]);
-            editor.hideSpinner();
-          });
-        }
-        if (_beforeU.indexOf("SELECT ") > -1 && _beforeU.indexOf(" FROM ") == -1) { //  && !CodeMirror.fromDot
-          if (_afterU.indexOf("FROM ") > -1) {
-            fieldsAutocomplete(editor, valueAccessor);
-          }
-          else {
-            console.log("table magic")
-          }
-        }
-        else {
-          if ((_beforeU.indexOf("WHERE") > -1 || _beforeU.indexOf("ORDER BY") > -1) && _beforeU.match(/ ON| LIMIT| GROUP| SORT/) == null) {
-            fieldsAutocomplete(editor, valueAccessor);
-          }
-          else {
-            console.log("do other stuff")
-          }
-        }
-      }
-    }
-  }
-
-  function Snip(mode) {
-    var self = this;
-    self.ace = ko.observable(null);
-    self.mode = ko.observable(mode);
-    self.snippet = ko.observable("");
-    self.completers = ko.observableArray([]);
-    self.errors = ko.observableArray([]);
-  }
-
-  function AceViewModel() {
-    var self = this;
-    self.editors = ko.observableArray();
-  }
-
-  function addEditor() {
-##    var snippy2 = new Snip("ace/mode/python");
-##    snippy2.snippet("def nano:");
-##    viewModel.editors.push(snippy2);
-    var snippy3 = new Snip("ace/mode/hivesql");
-    snippy3.snippet("SELECT * FROM sample_07 sa, web_logs w");
-    viewModel.editors.push(snippy3);
-    var snippy = new Snip("ace/mode/pig");
-    snippy.snippet("A = LOAD ''");
-    viewModel.editors.push(snippy);
-  }
-
-  var viewModel = new AceViewModel();
-  ko.applyBindings(viewModel);
-  addEditor();
-
-  var extra = {
-    getCompletions: function(editor, session, pos, prefix, callback) {
-      callback(null, [
-        {value: "sample_07", score: 1000, meta: "table"},
-        {value: "code", score: 1000, meta: "column"},
-        {value: "ud", score: 1000, meta: "column"}
-      ]);
-    }
-  }
-
-
-##
-##  editor.completers.push({
-##    getCompletions: function(editor, session, pos, prefix, callback) {
-##      callback(null, [
-##        {value: "default", score: 1000, meta: "database"},
-##        {value: "sample_07", score: 1000, meta: "table"},
-##        {value: "code", score: 1000, meta: "column"}
-##      ]);
-##    }
-##  })
-##
-##          var snippetManager = ace.require("ace/snippets").snippetManager;
-##        var config = ace.require("ace/config");
-##
-##      ace.config.loadModule("ace/snippets/python", function(m) {
-##        if (m) {
-##          snippetManager.files.python = m;
-##          m.snippets = snippetManager.parseSnippetFile(m.snippetText);
-##
-##          // or do this if you already have them parsed
-##          m.snippets.push({
-##            content: "SELECT * FROM sample_07",
-##            name: "SELECT * FROM sample_07",
-##            tabTrigger: "sel07"
-##          });
-##          m.snippets.push({
-##            content: "SELECT * FROM sample_08",
-##            name: "SELECT * FROM sample_08",
-##            tabTrigger: "sel08"
-##          });
-##          snippetManager.register(m.snippets, m.scope);
-##          }
-##        });
-##
-##
-
-
-</script>
-
-
-${commonfooter(messages) | n,unicode}

+ 30 - 3
apps/spark/src/spark/templates/editor.mako

@@ -113,6 +113,12 @@ ${ commonheader(_('Editor'), app_name, user, "68px") | n,unicode }
 <![endif]-->
 <script src="${ static('desktop/ext/js/medium-editor.min.js') }" type="text/javascript" charset="utf-8"></script>
 
+<script src="${ static('desktop/js/ace/ace.js') }"></script>
+<script src="${ static('desktop/js/ace/ext-language_tools.js') }"></script>
+<script src="${ static('desktop/js/ace.extended.js') }"></script>
+<script src="${ static('spark/js/ace.autocomplete.js') }" type="text/javascript" charset="utf-8"></script>
+
+
 <style type="text/css">
 % if conf.CUSTOM.BANNER_TOP_HTML.get():
   .search-bar {
@@ -124,7 +130,6 @@ ${ commonheader(_('Editor'), app_name, user, "68px") | n,unicode }
 % endif
 </style>
 
-
 <div class="search-bar">
   <div class="pull-right" style="padding-right:50px">
 
@@ -449,8 +454,8 @@ ${ commonheader(_('Editor'), app_name, user, "68px") | n,unicode }
           <input type="text" data-bind="value: value" />
         </div>
       </div>
-      <textarea data-bind="value: statement_raw, codemirror: { 'id': id(), 'viewportMargin': Infinity, 'lineNumbers': true, 'indentUnit': 0, 'matchBrackets': true, 'mode': editorMode(), 'enter': execute }"></textarea>
-    </div>
+      <div class="ace-editor" data-bind="attr: {id: id()}, aceEditor: {value: statement_raw, aceInstance: ace, mode: aceEditorMode, extraCompleters: completers, errors: errors, autocompleter: aceAutocomplete, placeholder: $root.snippetPlaceholders[type()] }"></div>
+      </div>
   </div>
 
   <!-- ko template: 'snippet-footer-actions' --><!-- /ko -->
@@ -756,6 +761,17 @@ ${ commonheader(_('Editor'), app_name, user, "68px") | n,unicode }
 </div>
 
 
+
+<div class="ace-filechooser">
+  <a class="pointer pull-right" data-bind="click: function(){ $('.filechooser').hide(); }"><i class="fa fa-times"></i></a>
+  <div class="ace-filechooser-content">
+    <!--[if !IE]><!--><i class="fa fa-spinner fa-spin" style="font-size: 30px; color: #DDD"></i><!--<![endif]-->
+    <!--[if IE]><img src="${ static('desktop/art/spinner.gif') }"/><![endif]-->
+  </div>
+</div>
+
+
+
 <div id="sessionsDemiModal" class="demi-modal fade" data-backdrop="false">
   <a href="javascript: void(0)" data-dismiss="modal" class="pull-right" style="margin: 10px"><i class="fa fa-times"></i></a>
   <div class="modal-body">
@@ -829,6 +845,13 @@ ${ koComponents.assistPanel() }
 
 <script type="text/javascript" charset="utf-8">
 
+  var aceAutocomplete = new Autocomplete({
+    autocompleteBaseURL: "${ autocomplete_base_url | n,unicode }",
+    autocompleteApp: "beeswax",
+    autocompleteUser: "${user}",
+    autocompleteFailsQuietlyOn: [500] // error codes from beeswax/views.py - autocomplete
+  });
+
   var assist = new Assist({
     app: "beeswax",
     user: "${user}",
@@ -890,6 +913,10 @@ ${ koComponents.assistPanel() }
     }
   });
 
+  huePubSub.subscribe('assist.mainObjectChange', function (db) {
+    aceAutocomplete.setDatabase(db);
+  });
+
   ko.bindingHandlers.verticalSlide = {
     init: function(element, valueAccessor) {
       if (ko.utils.unwrapObservable(valueAccessor())) {

+ 4 - 7
apps/spark/src/spark/views.py

@@ -55,10 +55,10 @@ def notebook(request):
       'options_json': json.dumps({
           'languages': LANGUAGES.get(),
           'snippet_placeholders' : {
-              'scala': _('Example: 1 + 1, or press CTRL + space'),
-              'python': _('Example: 1 + 1, or press CTRL + space'),
-              'impala': _('Example: SELECT * FROM tablename, or press CTRL + space'),
-              'hive': _('Example: SELECT * FROM tablename, or press CTRL + space'),
+              'scala': _('/** Example: 1 + 1, or press CTRL + space */'),
+              'python': _('# Example: 1 + 1, or press CTRL + space'),
+              'impala': _('-- Example: SELECT * FROM tablename, or press CTRL + space'),
+              'hive': _('-- Example: SELECT * FROM tablename, or press CTRL + space'),
               'text': _('<h2>This is a text snippet</h2>Type your text here')
           }
       }),
@@ -112,9 +112,6 @@ def notebooks(request):
       'notebooks_json': json.dumps(notebooks, cls=JSONEncoderForHTML)
   })
 
-def ace(request):
-  return render('ace.mako', request, {})
-
 
 @check_document_modify_permission()
 def delete(request):

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ace.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-elastic_tabstops_lite.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-language_tools.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-modelist.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-settings_menu.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-static_highlight.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-textarea.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-whitespace.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/keybinding-vim.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-html.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-markdown.js


+ 0 - 125
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-pig.js

@@ -1,125 +0,0 @@
-// Licensed to Cloudera, Inc. under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  Cloudera, Inc. licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var SqlHighlightRules = function() {
-
-    var keywords = (
-      "%DECLARE|%DEFAULT|VOID|IMPORT|RETURNS|ARRANGE|DEFINE|LOAD|FILTER|FOREACH|ORDER|CUBE|DISTINCT|COGROUP|CP|CD|DU|"
-      + "JOIN|CROSS|UNION|SPLIT|INTO|IF|OTHERWISE|ALL|AS|BY|USING|INNER|OUTER|ONSCHEMA|PARALLEL|"
-      + "PARTITION|GROUP|AND|ANY|OR|NOT|GENERATE|FLATTEN|ASC|DESC|DESCRIBE|EXPLAIN|IS|STREAM|THROUGH|STORE|MAPREDUCE|"
-      + "SHIP|CACHE|INPUT|OUTPUT|STDERROR|STDIN|STDOUT|LIMIT|SAMPLE|LEFT|RIGHT|FULL|EQ|GT|LT|GTE|LTE|"
-      + "NEQ|MATCHES|TRUE|FALSE|REGISTER|DUMP|EXEC|HELP|ILLUSTRATE|KILL|LS|MKDIR|MV|PIG|PWD|QUIT|RM|RMF|RUN|SET"
-    );
-
-    var builtinConstants = (
-        "TRUE|FALSE|NULL"
-    );
-
-    var builtinFunctions = (
-      "ABS|ACOS|ARITY|ASIN|ATAN|AVG|BAGSIZE|BINSTORAGE|BLOOM|BUILDBLOOM|CBRT|CEIL|"
-      + "CONCAT|COPYFROMLOCAL|COPYTOLOCAL|CAT|COR|COS|COSH|COUNT|COUNT_STAR|COV|CONSTANTSIZE|CUBEDIMENSIONS|DIFF|DISTINCT|DOUBLEABS|"
-      + "DOUBLEAVG|DOUBLEBASE|DOUBLEMAX|DOUBLEMIN|DOUBLEROUND|DOUBLESUM|EXP|FLOOR|FLOATABS|FLOATAVG|"
-      + "FLOATMAX|FLOATMIN|FLOATROUND|FLOATSUM|GENERICINVOKER|INDEXOF|INTABS|INTAVG|INTMAX|INTMIN|"
-      + "INTSUM|INVOKEFORDOUBLE|INVOKEFORFLOAT|INVOKEFORINT|INVOKEFORLONG|INVOKEFORSTRING|INVOKER|"
-      + "ISEMPTY|JSONLOADER|JSONMETADATA|JSONSTORAGE|LAST_INDEX_OF|LCFIRST|LOG|LOG10|LOWER|LONGABS|"
-      + "LONGAVG|LONGMAX|LONGMIN|LONGSUM|MAX|MIN|MAPSIZE|MONITOREDUDF|NONDETERMINISTIC|OUTPUTSCHEMA||"
-      + "PIGSTORAGE|PIGSTREAMING|RANDOM|REGEX_EXTRACT|REGEX_EXTRACT_ALL|REPLACE|ROUND|SIN|SINH|SIZE|"
-      + "SQRT|STRSPLIT|SUBSTRING|SUM|STRINGCONCAT|STRINGMAX|STRINGMIN|STRINGSIZE|TAN|TANH|TOBAG|"
-      + "TOKENIZE|TOMAP|TOP|TOTUPLE|TRIM|TEXTLOADER|TUPLESIZE|UCFIRST|UPPER|UTF8STORAGECONVERTER|EVAL|PIGDUMP|PIGSTORAGE"
-    );
-
-    var dataTypes = (
-        "BOOLEAN|INT|LONG|FLOAT|DOUBLE|CHARARRAY|BYTEARRAY|BAG|TUPLE|MAP|DATETIME"
-    );
-
-    var keywordMapper = this.createKeywordMapper({
-        "support.function": builtinFunctions,
-        "keyword": keywords,
-        "constant.language": builtinConstants,
-        "storage.type": dataTypes
-    }, "identifier", false);
-
-    this.$rules = {
-        "start" : [ {
-            token : "comment",
-            regex : "--.*$"
-        },  {
-            token : "comment",
-            start : "/\\*",
-            end : "\\*/"
-        }, {
-            token : "string",           // " string
-            regex : '".*?"'
-        }, {
-            token : "string",           // ' string
-            regex : "'.*?'"
-        }, {
-            token : "constant.numeric", // float
-            regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
-        }, {
-            token : keywordMapper,
-            regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
-        }, {
-            token : "keyword.operator",
-            regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
-        }, {
-            token : "paren.lparen",
-            regex : "[\\(]"
-        }, {
-            token : "paren.rparen",
-            regex : "[\\)]"
-        }, {
-            token : "text",
-            regex : "\\s+"
-        } ]
-    };
-    this.normalizeRules();
-};
-
-oop.inherits(SqlHighlightRules, TextHighlightRules);
-
-exports.SqlHighlightRules = SqlHighlightRules;
-});
-
-ace.define("ace/mode/pig",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/range"], function(require, exports, module) {
-"use strict";
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules;
-var Range = require("../range").Range;
-
-var Mode = function() {
-    this.HighlightRules = SqlHighlightRules;
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-    this.lineCommentStart = "--";
-
-    this.$id = "ace/mode/pig";
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-
-});

+ 0 - 1
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-sql.js

@@ -1 +0,0 @@
-ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant",t="true|false",n="count|min|max|avg|sum|rank|now|coalesce",r="int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer",i=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t,"storage.type":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.SqlHighlightRules=s}),ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sql_highlight_rules").SqlHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(u.prototype),t.Mode=u})

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-clouds.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-clouds_midnight.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-cobalt.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-dawn.js


+ 0 - 138
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-hue.js

@@ -1,138 +0,0 @@
-// Licensed to Cloudera, Inc. under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  Cloudera, Inc. licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-ace.define("ace/theme/hue",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
-
-exports.isDark = false;
-exports.cssClass = "ace-hue";
-exports.cssText = ".ace-hue .ace_gutter {\
-background: #f6f6f6;\
-color: #4D4D4C\
-}\
-.ace-hue .ace_print-margin {\
-width: 1px;\
-background: #f6f6f6\
-}\
-.ace-hue {\
-background-color: #FFFFFF;\
-color: #4D4D4C\
-}\
-.ace-hue .ace_cursor {\
-color: #AEAFAD\
-}\
-.ace-hue .ace_marker-layer .ace_selection {\
-background: #D6D6D6\
-}\
-.ace-tomorrow.ace_multiselect .ace_selection.ace_start {\
-box-shadow: 0 0 3px 0px #FFFFFF;\
-border-radius: 2px\
-}\
-.ace-hue .ace_marker-layer .ace_step {\
-background: rgb(255, 255, 0)\
-}\
-.ace-hue .ace_marker-layer .ace_bracket {\
-margin: -1px 0 0 -1px;\
-border: 1px solid #D1D1D1\
-}\
-.ace-hue .ace_marker-layer .ace_active-line {\
-background: #EFEFEF\
-}\
-.ace-hue .ace_marker-layer .ace_error-line {\
-background: #F2DEDE\
-}\
-.ace-hue .ace_gutter-active-line {\
-background-color : #dcdcdc\
-}\
-.ace-hue .ace_marker-layer .ace_selected-word {\
-border: 1px solid #D6D6D6\
-}\
-.ace-hue .ace_invisible {\
-color: #D1D1D1\
-}\
-.ace-hue .ace_keyword,\
-.ace-hue .ace_meta,\
-.ace-hue .ace_storage,\
-.ace-hue .ace_storage.ace_type,\
-.ace-hue .ace_support.ace_type {\
-color: #8959A8\
-}\
-.ace-hue .ace_keyword.ace_operator {\
-color: #3E999F\
-}\
-.ace-hue .ace_constant.ace_character,\
-.ace-hue .ace_constant.ace_language,\
-.ace-hue .ace_constant.ace_numeric,\
-.ace-hue .ace_keyword.ace_other.ace_unit,\
-.ace-hue .ace_support.ace_constant,\
-.ace-hue .ace_variable.ace_parameter {\
-color: #F5871F\
-}\
-.ace-hue .ace_constant.ace_other {\
-color: #666969\
-}\
-.ace-hue .ace_invalid {\
-color: #FFFFFF;\
-background-color: #C82829\
-}\
-.ace-hue .ace_invalid.ace_deprecated {\
-color: #FFFFFF;\
-background-color: #8959A8\
-}\
-.ace-hue .ace_fold {\
-background-color: #4271AE;\
-border-color: #4D4D4C\
-}\
-.ace-hue .ace_entity.ace_name.ace_function,\
-.ace-hue .ace_support.ace_function,\
-.ace-hue .ace_variable {\
-color: #4271AE\
-}\
-.ace-hue .ace_support.ace_class,\
-.ace-hue .ace_support.ace_type {\
-color: #C99E00\
-}\
-.ace-hue .ace_heading,\
-.ace-hue .ace_markup.ace_heading,\
-.ace-hue .ace_string {\
-color: #718C00\
-}\
-.ace-hue .ace_entity.ace_name.ace_tag,\
-.ace-hue .ace_entity.ace_other.ace_attribute-name,\
-.ace-hue .ace_meta.ace_tag,\
-.ace-hue .ace_string.ace_regexp,\
-.ace-hue .ace_variable {\
-color: #C82829\
-}\
-.ace-hue .ace_comment {\
-color: #8E908C\
-}\
-.ace-hue .ace_indent-guide {\
-background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y\
-}\
-.ace-spinner, .ace-inline-button {\
-  position: absolute;\
-  z-index: 1030;\
-}\
-.ace-inline-button {\
-  opacity: 0.7;\
-}\
-.ace-inline-button:hover {\
-  opacity: 1;\
-}";
-
-var dom = require("../lib/dom");
-dom.importCssString(exports.cssText, exports.cssClass);
-});

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-idle_fingers.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-katzenmilch.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-kr_theme.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-merbivore.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-merbivore_soft.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-mono_industrial.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-monokai.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-pastel_on_dark.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-solarized_dark.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-solarized_light.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-sqlserver.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-terminal.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night_blue.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night_bright.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night_eighties.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-twilight.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-vibrant_ink.js


+ 0 - 1
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-xcode.js

@@ -1 +0,0 @@
-ace.define("ace/theme/xcode",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-xcode",t.cssText=".ace-xcode .ace_gutter {background: #e8e8e8;color: #333}.ace-xcode .ace_print-margin {width: 1px;background: #e8e8e8}.ace-xcode {background-color: #FFFFFF;color: #000000}.ace-xcode .ace_cursor {color: #000000}.ace-xcode .ace_marker-layer .ace_selection {background: #B5D5FF}.ace-xcode.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;border-radius: 2px}.ace-xcode .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-xcode .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-xcode .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_gutter-active-line {background-color: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_marker-layer .ace_selected-word {border: 1px solid #B5D5FF}.ace-xcode .ace_constant.ace_language,.ace-xcode .ace_keyword,.ace-xcode .ace_meta,.ace-xcode .ace_variable.ace_language {color: #C800A4}.ace-xcode .ace_invisible {color: #BFBFBF}.ace-xcode .ace_constant.ace_character,.ace-xcode .ace_constant.ace_other {color: #275A5E}.ace-xcode .ace_constant.ace_numeric {color: #3A00DC}.ace-xcode .ace_entity.ace_other.ace_attribute-name,.ace-xcode .ace_support.ace_constant,.ace-xcode .ace_support.ace_function {color: #450084}.ace-xcode .ace_fold {background-color: #C800A4;border-color: #000000}.ace-xcode .ace_entity.ace_name.ace_tag,.ace-xcode .ace_support.ace_class,.ace-xcode .ace_support.ace_type {color: #790EAD}.ace-xcode .ace_storage {color: #C900A4}.ace-xcode .ace_string {color: #DF0002}.ace-xcode .ace_comment {color: #008E00}.ace-xcode .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)})

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/worker-coffee.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/worker-css.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/worker-html.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/worker-javascript.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/worker-json.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/worker-lua.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/worker-php.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/worker-xml.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/worker-xquery.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ace.js


+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-beautify.js → desktop/core/src/desktop/static/desktop/js/ace/ext-beautify.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ext-chromevox.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ext-elastic_tabstops_lite.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ext-emmet.js


+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-error_marker.js → desktop/core/src/desktop/static/desktop/js/ace/ext-error_marker.js


+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-keybinding_menu.js → desktop/core/src/desktop/static/desktop/js/ace/ext-keybinding_menu.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ext-language_tools.js


+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-linking.js → desktop/core/src/desktop/static/desktop/js/ace/ext-linking.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ext-modelist.js


+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-old_ie.js → desktop/core/src/desktop/static/desktop/js/ace/ext-old_ie.js


+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-searchbox.js → desktop/core/src/desktop/static/desktop/js/ace/ext-searchbox.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ext-settings_menu.js


+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-spellcheck.js → desktop/core/src/desktop/static/desktop/js/ace/ext-spellcheck.js


+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-split.js → desktop/core/src/desktop/static/desktop/js/ace/ext-split.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ext-static_highlight.js


+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-statusbar.js → desktop/core/src/desktop/static/desktop/js/ace/ext-statusbar.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ext-textarea.js


+ 1 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-themelist.js → desktop/core/src/desktop/static/desktop/js/ace/ext-themelist.js

@@ -2,3 +2,4 @@ ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrow
                 (function() {
                     ace.require(["ace/ext/themelist"], function() {});
                 })();
+            

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ext-whitespace.js


+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/keybinding-emacs.js → desktop/core/src/desktop/static/desktop/js/ace/keybinding-emacs.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/keybinding-vim.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-abap.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-abc.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-actionscript.js


+ 1 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-ada.js

@@ -0,0 +1 @@
+ace.define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(u.prototype),t.Mode=u})

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-apache_conf.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-applescript.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-asciidoc.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-assembly_x86.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-autohotkey.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-batchfile.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-c9search.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-c_cpp.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-cirru.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-clojure.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-cobol.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-coffee.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-coldfusion.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-csharp.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-css.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-curly.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-d.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-dart.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-diff.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/mode-django.js


Някои файлове не бяха показани, защото твърде много файлове са промени