Эх сурвалжийг харах

[core] Initial support for AceEditor

Enrico Berti 10 жил өмнө
parent
commit
8be413929b
98 өөрчлөгдсөн 510 нэмэгдсэн , 0 устгасан
  1. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ace.js
  2. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-beautify.js
  3. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-chromevox.js
  4. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-elastic_tabstops_lite.js
  5. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-emmet.js
  6. 5 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-error_marker.js
  7. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-keybinding_menu.js
  8. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-language_tools.js
  9. 5 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-linking.js
  10. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-modelist.js
  11. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-old_ie.js
  12. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-searchbox.js
  13. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-settings_menu.js
  14. 5 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-spellcheck.js
  15. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-split.js
  16. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-static_highlight.js
  17. 5 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-statusbar.js
  18. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-textarea.js
  19. 5 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-themelist.js
  20. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/ext-whitespace.js
  21. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/keybinding-emacs.js
  22. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/keybinding-vim.js
  23. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-css.js
  24. 112 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-hivesql.js
  25. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-html.js
  26. 112 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-impalasql.js
  27. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-java.js
  28. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-javascript.js
  29. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-json.js
  30. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-markdown.js
  31. 125 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-pig.js
  32. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-plain_text.js
  33. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-properties.js
  34. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-python.js
  35. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-scala.js
  36. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-sql.js
  37. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-text.js
  38. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/mode-xml.js
  39. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/css.js
  40. 29 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/hivesql.js
  41. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/html.js
  42. 29 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/impalasql.js
  43. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/java.js
  44. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/javascript.js
  45. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/json.js
  46. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/markdown.js
  47. 27 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/pig.js
  48. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/plain_text.js
  49. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/properties.js
  50. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/python.js
  51. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/scala.js
  52. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/sql.js
  53. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/text.js
  54. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/xml.js
  55. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-ambiance.js
  56. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-chaos.js
  57. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-chrome.js
  58. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-clouds.js
  59. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-clouds_midnight.js
  60. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-cobalt.js
  61. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-crimson_editor.js
  62. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-dawn.js
  63. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-dreamweaver.js
  64. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-eclipse.js
  65. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-github.js
  66. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-idle_fingers.js
  67. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-iplastic.js
  68. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-katzenmilch.js
  69. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-kr_theme.js
  70. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-kuroir.js
  71. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-merbivore.js
  72. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-merbivore_soft.js
  73. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-mono_industrial.js
  74. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-monokai.js
  75. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-pastel_on_dark.js
  76. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-solarized_dark.js
  77. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-solarized_light.js
  78. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-sqlserver.js
  79. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-terminal.js
  80. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-textmate.js
  81. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow.js
  82. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night.js
  83. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night_blue.js
  84. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night_bright.js
  85. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-tomorrow_night_eighties.js
  86. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-twilight.js
  87. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-vibrant_ink.js
  88. 1 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/theme-xcode.js
  89. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-coffee.js
  90. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-css.js
  91. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-html.js
  92. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-javascript.js
  93. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-json.js
  94. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-lua.js
  95. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-php.js
  96. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-xml.js
  97. 0 0
      desktop/core/src/desktop/static/desktop/ext/js/ace/worker-xquery.js
  98. 39 0
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 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-beautify.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-chromevox.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-emmet.js


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

@@ -0,0 +1,5 @@
+;
+                (function() {
+                    ace.require(["ace/ext/error_marker"], function() {});
+                })();
+            

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-keybinding_menu.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-language_tools.js


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

@@ -0,0 +1,5 @@
+ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var t=e.editor,n=e.getAccelKey();if(n){var t=e.editor,r=e.getDocumentPosition(),i=t.session,s=i.getTokenAt(r.row,r.column);t._emit("linkHover",{position:r,token:s})}}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}})});
+                (function() {
+                    ace.require(["ace/ext/linking"], function() {});
+                })();
+            

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 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-old_ie.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-searchbox.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-settings_menu.js


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

@@ -0,0 +1,5 @@
+ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){console.log(e,a,n.selectionStart,n.selectionEnd);if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})});
+                (function() {
+                    ace.require(["ace/ext/spellcheck"], function() {});
+                })();
+            

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-split.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-static_highlight.js


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

@@ -0,0 +1,5 @@
+ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this));e.on("changeStatus",function(){n.schedule(100)}),e.on("changeSelection",function(){n.schedule(100)})};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection.lead;n(r.row+":"+r.column," ");if(!e.selection.isEmpty()){var i=e.getSelectionRange();n("("+(i.end.row-i.start.row)+":"+(i.end.column-i.start.column)+")")}t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s});
+                (function() {
+                    ace.require(["ace/ext/statusbar"], function() {});
+                })();
+            

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/ext-textarea.js


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

@@ -0,0 +1,5 @@
+ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){"use strict";e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})});
+                (function() {
+                    ace.require(["ace/ext/themelist"], function() {});
+                })();
+            

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 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-emacs.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-css.js


+ 112 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-hivesql.js

@@ -0,0 +1,112 @@
+// 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 = (
+        "ADD|AFTER|ALL|ALTER|ANALYZE|AND|ARCHIVE|AS|ASC|BETWEEN|BUCKET|BUCKETS|BY|CASCADE|CHANGE|CLI|CLUSTER|CLUSTERED|COALESCE|COLLECTION|COLUMN|COLUMNS|COMMENT|COMPUTE|CREATE|CROSS|DATA|DATABASE|DATABASES|DBPROPERTIES|DEFERRED|DELIMITED|DEPENDENCY|DESC|DESCRIBE|DIRECTORY|DISABLE|DISTINCT|DISTRIBUTE|DOT|DROP|ENABLE|ESCAPED|EXISTS|EXPLAIN|EXPORT|EXTENDED|EXTERNAL|FIELDS|FILEFORMAT|FIRST|FORMAT|FORMATTED|FROM|FULL|FUNCTION|FUNCTIONS|GRANT|GROUP|HAVING|IDXPROPERTIES|IF|IGNORE|IMPORT|IN|INDEX|INDEXES|INPATH|INSERT|INTO|IS|ITEMS|JOIN|KEYS|LATERAL|LEFT|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCATION|LOCKS|MAP|MAPJOIN|MSCK|NOT|OF|OFFLINE|ON|OPTION|ORDER|OUT|OUTER|OVERWRITE|PARTITION|PARTITIONED|PARTITIONS|PERCENT|PRIVILEGES|PROTECTION|REBUILD|RECORDREADER|RECOVER|REDUCE|REGEXP|RENAME|REPAIR|REPLACE|RESTRICT|REVOKE|RIGHT|RLIKE|ROLE|ROW|SCHEMA|SCHEMAS|SELECT|SEMI|SEPARATED|SERDE|SERDEPROPERTIES|SET|SHOW|SKEWED|SORT|SORTED|STATISTICS|STORED|SUM|TABLE|TABLES|TABLESAMPLE|TBLPROPERTIES|TEMPORARY|TERMINATED|TO|TOUCH|TRANSFORM|TRUNCATE|UNARCHIVE|UNION|US|USER|USING|VIEW|WHERE|WITH"
+    );
+
+    var builtinConstants = (
+        "TRUE|FALSE|NULL"
+    );
+
+    var builtinFunctions = (
+        "ROUND|FLOOR|CEIL|CEILING|RAND|EXP|LN|LOG10|LOG2|LOG|POW|POWER|SQRT|BIN|HEX|UNHEX|CONV|ABS|PMOD|SIN|ASIN|COS|ACOS|TAN|ATAN|DEGREES|RADIANS|POSITIVE|NEGATIVE|SIGN|E|PI|SIZE|MAP_KEYS|MAP_VALUES|ARRAY_CONTAINS|SORT_ARRAY|BINARY|CAST|FROM_UNIXTIME|UNIX_TIMESTAMP|TO_DATE|YEAR|MONTH|DAY|HOUR|MINUTE|SECOND|WEEKOFYEAR|DATEDIFF|DATE_ADD|DATE_SUB|FROM_UTC_TIMESTAMP|TO_UTC_TIMESTAMP|ASCII|CONCAT|CONTEXT_NGRAMS|CONCAT_WS|FIND_IN_SET|FORMAT_NUMBER|GET_JSON_OBJECT|IN_FILE|INSTR|LENGTH|LOCATE|LOWER|LCASE|LPAD|LTRIM|NGRAMS|PARSE_URL|PRINTF|REGEXP_EXTRACT|REGEXP_REPLACE|REPEAT|REVERSE|RPAD|RTRIM|SENTENCES|SPACE|SPLIT|STR_TO_MAP|SUBSTR|SUBSTRING|TRANSLATE|TRIM|UPPER|UCASE|JAVA_METHOD|REFLECT|XPATH|XPATH_SHORT|XPATH_INT|XPATH_LONG|XPATH_FLOAT|XPATH_DOUBLE|XPATH_NUMBER|XPATH_STRING|COUNT|SUM|AVG|MIN|MAX|VARIANCE|VAR_SAMP|STDEV_POP|STDEV_SAMP|COVAR_POP|COVAR_SAMP|CORR|PERCENTILE|PERCENTILE_APPROX|HISTOGRAM_NUMERIC|COLLECT_SET|INLINE|EXPLODE|JSON_TUPLE|PARSE_URL_TUPLE|GET_JSON_OBJECT"
+    );
+
+    var dataTypes = (
+        "TINYINT|SMALLINT|INT|BIGINT|BOOLEAN|FLOAT|DOUBLE|STRING|BINARY|TIMESTAMP|DECIMAL|ARRAY|MAP|STRUCT|UNIONTYPE|DELIMITED|SERDE|SEQUENCEFILE|TEXTFILE|RCFILE|INPUTFORMAT|OUTPUTFORMAT"
+    );
+
+    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/hivesql",["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/hivesql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-html.js


+ 112 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-impalasql.js

@@ -0,0 +1,112 @@
+// 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 = (
+        "ADD|AGGREGATE|ALL|AND|API_VERSION|AS|AVRO|BINARY|BY|CACHED|CASE|CHANGE|CHAR|CLASS|CLOSE_FN|COLUMN|COLUMNS|COMMENT|COMPUTE|CREATE|CROSS|DATA|DATABASE|DATABASES|DECIMAL|DELIMITED|DESCRIBE|DISTINCT|DIV|DROP|ELSE|END|ESCAPED|EXISTS|EXPLAIN|EXTERNAL|FALSE|FIELDS|FILEFORMAT|FINALIZE_FN|FIRST|FORMAT|FORMATTED|FROM|FULL|FUNCTION|FUNCTIONS|GROUP|HAVING|IF|INIT_FN|INNER|INPATH|INSERT|INTEGER|INTERMEDIATE|INTERVAL|INTO|INVALIDATE|JOIN|LAST|LEFT|LIKE|LIMIT|LINES|LOAD|LOCATION|MERGE_FN|METADATA|NOT|NULL|NULLS|OFFSET|OR|ORDER|OUTER|OVERWRITE|PARQUET|PARTITION|PARTITIONED|PARTITIONS|PREPARE_FN|PRODUCED|REAL|REFRESH|REGEXP|RENAME|REPLACE|RETURNS|RIGHT|RLIKE|ROW|SCHEMA|SCHEMAS|SELECT|SEMI|SERDEPROPERTIES|SERIALIZE_FN|SHOW|STATS|STORED|STRAIGHT_JOIN|SYMBOL|TABLE|TABLES|TBLPROPERTIES|TERMINATED|THEN|TO|TRUE|UNCACHED|UNION|UPDATE_FN|USE|USING|VIEW|WHEN|WHERE|WITH"
+    );
+
+    var builtinConstants = (
+        "TRUE|FALSE|NULL"
+    );
+
+    var builtinFunctions = (
+        "ABS|ACOS|ASCII|ASIN|ATAN|AVG|BIN|CAST|CEIL|CEILING|COALESCE|CONCAT|CONCAT_WS|COUNT|CONV|COS|DATE_ADD|DATE_SUB|DATEDIFF|DAY|DAYNAME|DAYOFMONTH|DAYOFWEEK|DEGREES|E|EXP|FIND_IN_SET|FLOOR|FNV_HASH|FROM_UNIXTIME|FROM_UTC_TIMESTAMP|GREATEST|GROUP_CONCAT|HEX|HOUR|IF|INITCAP|INSTR|ISNULL|LCASE|LEAST|LENGTH|LN|LOCATE|LOG|LOG10|LOG2|LOWER|LPAD|LTRIM|MAX|MIN|MINUTE|MONTH|NDV|NEGATIVE|NOW|NVL|PARSE_URL|PI|PMOD|POSITIVE|POW|POWER|QUOTIENT|RADIANS|RAND|REGEXP_EXTRACT|REPEAT|REVERSE|ROUND|RPAD|RTRIM|SECOND|SIGN|SIN|SPACE|SQRT|SUBSTR|SUBSTRING|SUM|TAN|TO_DATE|TO_UTC_TIMESTAMP|TRANSLATE|TRIM|UCASE|UNHEX|UNIX_TIMESTAMP|UPPER|USER|WEEKOFYEAR|YEAR|DENSE_RANK|FIRST_VALUE|LAG|LAST_VALUE|LEAD|OVER|RANK|ROW_NUMBER|WINDOW"
+    );
+
+    var dataTypes = (
+        "TINYINT|SMALLINT|INT|BIGINT|BOOLEAN|FLOAT|DOUBLE|STRING|TIMESTAMP|PARQUETFILE|SEQUENCEFILE|TEXTFILE|RCFILE"
+    );
+
+    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/impalasql",["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/impalasql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-java.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-javascript.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-json.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-markdown.js


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

@@ -0,0 +1,125 @@
+// 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;
+
+});

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

@@ -0,0 +1 @@
+ace.define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,u=function(){this.HighlightRules=s,this.$behaviour=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return""},this.$id="ace/mode/plain_text"}.call(u.prototype),t.Mode=u})

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

@@ -0,0 +1 @@
+ace.define("ace/mode/properties_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=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),ace.define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o})

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-python.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-scala.js


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

@@ -0,0 +1 @@
+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/mode-text.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/mode-xml.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/css.js


+ 29 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/hivesql.js

@@ -0,0 +1,29 @@
+// 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/snippets/hivesql",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet tbl\n\
+	CREATE TABLE ${1:table} (\n\
+		${2:column_name} ${3:column_type}\n\
+	) ${4:COMMENT ''};\n\
+snippet s*\n\
+	SELECT * FROM ${1:table}\n\
+";
+exports.scope = "hivesql";
+
+});

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/html.js


+ 29 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/impalasql.js

@@ -0,0 +1,29 @@
+// 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/snippets/impalasql",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet tbl\n\
+	CREATE TABLE ${1:table} (\n\
+		${2:column_name} ${3:column_type}\n\
+	) ${4:COMMENT ''};\n\
+snippet s*\n\
+	SELECT * FROM ${1:table}\n\
+";
+exports.scope = "impalasql";
+
+});

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/java.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/javascript.js


+ 1 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/json.js

@@ -0,0 +1 @@
+ace.define("ace/snippets/json",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="json"})

+ 1 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/markdown.js

@@ -0,0 +1 @@
+ace.define("ace/snippets/markdown",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Markdown\n\n# Includes octopress (http://octopress.org/) snippets\n\nsnippet [\n	[${1:text}](http://${2:address} "${3:title}")\nsnippet [*\n	[${1:link}](${2:`@*`} "${3:title}")${4}\n\nsnippet [:\n	[${1:id}]: http://${2:url} "${3:title}"\nsnippet [:*\n	[${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ![\n	![${1:alttext}](${2:/images/image.jpg} "${3:title}")\nsnippet ![*\n	![${1:alt}](${2:`@*`} "${3:title}")${4}\n\nsnippet ![:\n	![${1:id}]: ${2:url} "${3:title}"\nsnippet ![:*\n	![${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ===\nregex /^/=+/=*//\n	${PREV_LINE/./=/g}\n	\n	${0}\nsnippet ---\nregex /^/-+/-*//\n	${PREV_LINE/./-/g}\n	\n	${0}\nsnippet blockquote\n	{% blockquote %}\n	${1:quote}\n	{% endblockquote %}\n\nsnippet blockquote-author\n	{% blockquote ${1:author}, ${2:title} %}\n	${3:quote}\n	{% endblockquote %}\n\nsnippet blockquote-link\n	{% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n	${4:quote}\n	{% endblockquote %}\n\nsnippet bt-codeblock-short\n	```\n	${1:code_snippet}\n	```\n\nsnippet bt-codeblock-full\n	``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n	${5:code_snippet}\n	```\n\nsnippet codeblock-short\n	{% codeblock %}\n	${1:code_snippet}\n	{% endcodeblock %}\n\nsnippet codeblock-full\n	{% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n	${5:code_snippet}\n	{% endcodeblock %}\n\nsnippet gist-full\n	{% gist ${1:gist_id} ${2:filename} %}\n\nsnippet gist-short\n	{% gist ${1:gist_id} %}\n\nsnippet img\n	{% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\nsnippet youtube\n	{% youtube ${1:video_id} %}\n\n# The quote should appear only once in the text. It is inherently part of it.\n# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\nsnippet pullquote\n	{% pullquote %}\n	${1:text} {" ${2:quote} "} ${3:text}\n	{% endpullquote %}\n',t.scope="markdown"})

+ 27 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/pig.js

@@ -0,0 +1,27 @@
+// 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/snippets/pig",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet load\n\
+	A = LOAD '${1:what}' USING PigStorage() AS (\n\
+		${2:var_name}:${3:var_type}\n\
+	);\n\
+";
+exports.scope = "pig";
+
+});

+ 1 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/plain_text.js

@@ -0,0 +1 @@
+ace.define("ace/snippets/plain_text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="plain_text"})

+ 1 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/properties.js

@@ -0,0 +1 @@
+ace.define("ace/snippets/properties",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="properties"})

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/python.js


+ 1 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/scala.js

@@ -0,0 +1 @@
+ace.define("ace/snippets/scala",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scala"})

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

@@ -0,0 +1 @@
+ace.define("ace/snippets/sql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet tbl\n	create table ${1:table} (\n		${2:columns}\n	);\nsnippet col\n	${1:name}	${2:type}	${3:default ''}	${4:not null}\nsnippet ccol\n	${1:name}	varchar2(${2:size})	${3:default ''}	${4:not null}\nsnippet ncol\n	${1:name}	number	${3:default 0}	${4:not null}\nsnippet dcol\n	${1:name}	date	${3:default sysdate}	${4:not null}\nsnippet ind\n	create index ${3:$1_$2} on ${1:table}(${2:column});\nsnippet uind\n	create unique index ${1:name} on ${2:table}(${3:column});\nsnippet tblcom\n	comment on table ${1:table} is '${2:comment}';\nsnippet colcom\n	comment on column ${1:table}.${2:column} is '${3:comment}';\nsnippet addcol\n	alter table ${1:table} add (${2:column} ${3:type});\nsnippet seq\n	create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\nsnippet s*\n	select * from ${1:table}\n",t.scope="sql"})

+ 1 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/text.js

@@ -0,0 +1 @@
+ace.define("ace/snippets/text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="text"})

+ 1 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/snippets/xml.js

@@ -0,0 +1 @@
+ace.define("ace/snippets/xml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="xml"})

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-ambiance.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-chaos.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-chrome.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 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-crimson_editor.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-dawn.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-dreamweaver.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-eclipse.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/ext/js/ace/theme-github.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 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-iplastic.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-kuroir.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-textmate.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


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

@@ -0,0 +1 @@
+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


+ 39 - 0
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -1369,3 +1369,42 @@ ko.bindingHandlers.textSqueezer = {
 ko.toJSONObject = function (koObj) {
   return JSON.parse(ko.toJSON(koObj));
 }
+
+ko.bindingHandlers.aceEditor = {
+    init: function (element, valueAccessor) {
+      var _el = $(element);
+      var _options = ko.unwrap(valueAccessor());
+      var _onBlur = _options.onBlur || function () {};
+      var _onChange = _options.onChange || function () {};
+      _el.text(_options.value());
+      ace.require("ace/ext/language_tools");
+      var editor = ace.edit(element);
+      editor.session.setMode(_options.mode());
+      editor.setTheme($.totalStorage("hue.ace.theme") || "ace/theme/clouds");
+      editor.setOptions({
+        enableBasicAutocompletion: true,
+        enableSnippets: true,
+        enableLiveAutocompletion: true,
+        showGutter: false
+      });
+      editor.on("blur", function () {
+        _options.value(editor.getValue());
+        _onBlur(editor);
+      });
+      editor.on("change", function () {
+        _onChange(editor);
+      });
+      editor.$blockScrolling = Infinity
+      element.editor = editor;
+      element.editor.originalCompleters = editor.completers;
+    },
+    update: function (element, valueAccessor) {
+      var _options = ko.unwrap(valueAccessor());
+      if (element.editor) {
+        element.editor.completers = element.editor.originalCompleters.slice();
+        _options.extraCompleters().forEach(function (complete) {
+          element.editor.completers.push(complete);
+        });
+      }
+    }
+  }

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно