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

HUE-7853 [editor] Changed help dialog title + link to online doc

jdesjean 7 жил өмнө
parent
commit
a64b558bff

+ 9 - 17
desktop/core/src/desktop/templates/common_notebook_ko_components.mako

@@ -652,46 +652,38 @@ except ImportError, e:
                   }}}" class="margin-top-10 margin-bottom-20"></div>
             </div>
             <div class="tab-pane" id="help-editor-syntax-variable">
-              <div>${ _('Variables are used to easily configure parameters in a query. They can be of two types:')}</div>
+              <span>${ _('Variables are used to easily configure parameters in a query. They can be of two types:')}</span>
               <ul class="nav help-list-spacing">
                 <li>
-                  <div class="margin-top-20"><b>${ _('Single Valued')}</b><span class="muted padding-left-20">${ _('${variable_name=variable_value}')}</span></div>
+                  <div class="margin-top-20"><b>${ _('Single Valued')}</b><span class="muted padding-left-20">${ _('${variable_name}')}</span></div>
                   <div data-bind="component: { name: 'hue-simple-ace-editor-multi', params: {
-                    value: ko.observable('${ _('select * from web_logs where bytes = ${bytes}')}'),
+                    value: ko.observable('${ _('select * from web_logs where country_code = "${country_code}"')}'),
                     lines: 1,
                     mode: 'impala',
                     aceOptions: {
                       readOnly: true
                     }}}" class="margin-top-10 margin-bottom-10"></div>
-                  <div>${ _('The variable_value is optional.')}</div>
+                  <div>${ _('The variable can have a default value.')}</div>
                   <div data-bind="component: { name: 'hue-simple-ace-editor-multi', params: {
-                    value: ko.observable('${ _('select * from web_logs where bytes = ${bytes=search}')}'),
+                    value: ko.observable('${ _('select * from web_logs where country_code = "${country_code=US}"')}'),
                     lines: 1,
                     mode: 'impala',
                     aceOptions: {
                       readOnly: true
                     }}}" class="margin-top-10 margin-bottom-10"></div>
-                  <div>${ _('A string should be wrapped in quotes.')}</div>
-                  <div data-bind="component: { name: 'hue-simple-ace-editor-multi', params: {
-                    value: ko.observable('${ _('select * from web_logs where app = "${app=search}"')}'),
-                    lines: 1,
-                    mode: 'impala',
-                    aceOptions: {
-                      readOnly: true
-                    }}}" class="margin-top-10 margin-bottom-20"></div>
                 </li>
                 <li>
-                  <div class="margin-top-30"><b>${ _('Multi Valued')}</b><span class="muted padding-left-20">${ _('${variable_name=variable_value1(variable_text1), variable_value2(variable_text2),...}')}</span></div>
+                  <div class="margin-top-30"><b>${ _('Multi Valued')}</b><span class="muted padding-left-20">${ _('${variable_name=variable_value1, variable_value2,...}')}</span></div>
                   <div data-bind="component: { name: 'hue-simple-ace-editor-multi', params: {
-                    value: ko.observable('${ _('select * from web_logs where app = "${app=search, metastore(meta), hbase}"')}'),
+                    value: ko.observable('${ _('select * from web_logs where country_code = "${country_code=CA, FR, US}"')}'),
                     lines: 1,
                     mode: 'impala',
                     aceOptions: {
                       readOnly: true
                     }}}" class="margin-top-10 margin-bottom-10"></div>
-                  <div>${ _('The variable_text is optional.')}</div>
+                  <div>${ _('The displayed text can be changed.')}</div>
                   <div data-bind="component: { name: 'hue-simple-ace-editor-multi', params: {
-                    value: ko.observable('${ _('select * from web_logs where app = "${app=search(solr), metastore(meta)}"')}'),
+                    value: ko.observable('${ _('select * from web_logs where country_code = "${country_code=CA(Canada), FR(France), US(United States)}"')}'),
                     lines: 1,
                     mode: 'impala',
                     aceOptions: {

+ 2 - 2
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -392,7 +392,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
 <div id="helpModal${ suffix }" class="modal transparent-modal hide" data-backdrop="true" style="width:980px;margin-left:-510px!important">
   <div class="modal-header">
     <button type="button" class="close" data-dismiss="modal" aria-label="${ _('Close') }"><span aria-hidden="true">&times;</span></button>
-    <h2 class="modal-title">${_('Editor keyboard shortcuts')}</h2>
+    <h2 class="modal-title">${_('Editor help')}</h2>
   </div>
   <div class="modal-body">
     <!-- ko component: 'aceKeyboardShortcuts' --><!-- /ko -->
@@ -936,7 +936,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
    <!-- ko template: { name: 'snippet-header-statement-type${ suffix }' } --><!-- /ko -->
 
     <a class="inactive-action margin-left-10" href="javascript:void(0)" data-bind="toggle: settingsVisible, visible: hasProperties, css: { 'blue' : settingsVisible }" title="${ _('Query settings') }"><i class="fa fa-cog"></i></a>
-    <a class="inactive-action margin-left-10 pointer" title="${ _('Show editor shortcuts') }" data-toggle="modal" data-target="#helpModal${ suffix }"><i class="fa fa-question"></i></a>
+    <a class="inactive-action margin-left-10 pointer" title="${ _('Show editor help') }" data-toggle="modal" data-target="#helpModal${ suffix }"><i class="fa fa-question"></i></a>
   </div>
 </script>