瀏覽代碼

HUE-8807 [frontend] Upgrade Knockout to 3.5

Johan Ahlen 6 年之前
父節點
當前提交
04f0c4f071

+ 68 - 68
apps/metastore/src/metastore/templates/metastore.mako

@@ -908,83 +908,83 @@ ${ components.menubar(is_embeddable) }
         <div class="metastore-main">
           <!-- ko hueSpinner: { spin: loading, center: true, size: 'xlarge' } --><!-- /ko -->
           <!-- ko ifnot: loading -->
-          <h1>
-            <div class="inline-block pull-right">
-              <!-- ko with: source -->
+            <h1>
+              <div class="inline-block pull-right">
+                <!-- ko with: source -->
+                  <!-- ko with: namespace -->
+                    <!-- ko with: database -->
+                      <!-- ko with: table -->
+                      % if USE_NEW_EDITOR.get():
+                        <a href="javascript: void(0);" class="btn btn-default" data-bind="click: function() { queryAndWatch(catalogEntry); }" title="${_('Query')}"><i class="fa fa-play fa-fw"></i> ${_('Query')}</a>
+                      % else:
+                        <a class="btn btn-default" data-bind="attr: { 'href': '/metastore/table/'+ catalogEntry.path.join('/') + '/read' }" title="${_('Browse Data')}"><i class="fa fa-play fa-fw"></i> ${_('Browse Data')}</a>
+                      % endif
+                      % if has_write_access:
+                        <a href="javascript: void(0);" class="btn btn-default" data-bind="click: showImportData, visible: tableDetails() && !tableDetails().is_view" title="${_('Import Data')}"><i class="fa fa-upload fa-fw"></i> ${_('Import')}</a>
+                      % endif
+                      % if has_write_access:
+                        <a href="#dropSingleTable" data-toggle="modal" class="btn btn-default" data-bind="attr: { 'title' : tableDetails() && tableDetails().is_view ? '${_('Drop View')}' : '${_('Drop Table')}' }"><i class="fa fa-times fa-fw"></i> ${_('Drop')}</a>
+                      % endif
+                      <a href="javascript: void(0);" class="btn btn-default" data-bind="click: reload" title="${_('Refresh the table')}"><i class="fa fa-refresh" data-bind="css: { 'fa-spin blue' : refreshing }"></i> ${_('Refresh')}</a>
+                      <!-- /ko -->
+                      <!-- ko if: !table() -->
+                      <a href="javascript: void(0);" class="btn btn-default" data-bind="click: reload" title="${_('Refresh the database')}"><i class="fa fa-refresh" data-bind="css: { 'fa-spin blue' : refreshing }"></i> ${_('Refresh')}</a>
+                      <!-- /ko -->
+                    <!-- /ko -->
+                    <!-- ko if: !database() -->
+                      <a href="javascript: void(0);" class="btn btn-default" data-bind="click: reload" title="${_('Refresh')}"><i class="fa fa-refresh" data-bind="css: { 'fa-spin blue' : loading }"></i> ${_('Refresh')}</a>
+                    <!-- /ko -->
+                  <!-- /ko -->
+                <!-- /ko -->
+              </div>
+
+              <!-- ko template: 'metastore-breadcrumbs' --><!-- /ko -->
+            </h1>
+
+            <!-- ko with: source -->
               <!-- ko with: namespace -->
-              <!-- ko with: database -->
-              <!-- ko with: table -->
-              % if USE_NEW_EDITOR.get():
-                <a href="javascript: void(0);" class="btn btn-default" data-bind="click: function() { queryAndWatch(catalogEntry); }" title="${_('Query')}"><i class="fa fa-play fa-fw"></i> ${_('Query')}</a>
-              % else:
-                <a class="btn btn-default" data-bind="attr: { 'href': '/metastore/table/'+ catalogEntry.path.join('/') + '/read' }" title="${_('Browse Data')}"><i class="fa fa-play fa-fw"></i> ${_('Browse Data')}</a>
-              % endif
-              % if has_write_access:
-                <a href="javascript: void(0);" class="btn btn-default" data-bind="click: showImportData, visible: tableDetails() && !tableDetails().is_view" title="${_('Import Data')}"><i class="fa fa-upload fa-fw"></i> ${_('Import')}</a>
-              % endif
-              % if has_write_access:
-                <a href="#dropSingleTable" data-toggle="modal" class="btn btn-default" data-bind="attr: { 'title' : tableDetails() && tableDetails().is_view ? '${_('Drop View')}' : '${_('Drop Table')}' }"><i class="fa fa-times fa-fw"></i> ${_('Drop')}</a>
-              % endif
-              <a href="javascript: void(0);" class="btn btn-default" data-bind="click: reload" title="${_('Refresh the table')}"><i class="fa fa-refresh" data-bind="css: { 'fa-spin blue' : refreshing }"></i> ${_('Refresh')}</a>
-              <!-- /ko -->
-              <!-- ko if: !table() -->
-              <a href="javascript: void(0);" class="btn btn-default" data-bind="click: reload" title="${_('Refresh the database')}"><i class="fa fa-refresh" data-bind="css: { 'fa-spin blue' : refreshing }"></i> ${_('Refresh')}</a>
+                <!-- ko template: { if: !loading() && !database(), name: 'metastore-databases' } --><!-- /ko -->
+                <!-- ko with: database -->
+                  <i data-bind="visible: loading" class="fa fa-spinner fa-spin fa-2x margin-left-10" style="color: #999; display: none;"></i>
+                  <!-- ko template: { if: !loading() && !table(), name: 'metastore-tables' } --><!-- /ko -->
+                  <!-- ko with: table -->
+                    <!-- ko template: 'metastore-describe-table' --><!-- /ko -->
+                  <!-- /ko -->
+                <!-- /ko -->
               <!-- /ko -->
-              <!-- /ko -->
-              <!-- ko if: !database() -->
-              <a href="javascript: void(0);" class="btn btn-default" data-bind="click: reload" title="${_('Refresh')}"><i class="fa fa-refresh" data-bind="css: { 'fa-spin blue' : loading }"></i> ${_('Refresh')}</a>
-              <!-- /ko -->
-              <!-- /ko -->
-              <!-- /ko -->
-            </div>
-
-            <!-- ko template: 'metastore-breadcrumbs' --><!-- /ko -->
-          </h1>
-
-          <!-- ko with: source -->
-          <!-- ko with: namespace -->
-          <!-- ko template: { if: !loading() && !database(), name: 'metastore-databases' } --><!-- /ko -->
-          <!-- ko with: database -->
-          <i data-bind="visible: loading" class="fa fa-spinner fa-spin fa-2x margin-left-10" style="color: #999; display: none;"></i>
-          <!-- ko template: { if: !loading() && !table(), name: 'metastore-tables' } --><!-- /ko -->
-          <!-- ko with: table -->
-            <!-- ko template: 'metastore-describe-table' --><!-- /ko -->
-          <!-- /ko -->
-          <!-- /ko -->
-          <!-- /ko -->
-          <!-- /ko -->
+            <!-- /ko -->
           <!-- /ko -->
         </div>
       </div>
     </div>
   </div>
   <!-- ko with: source -->
-  <!-- ko with: namespace -->
-  <div id="dropSingleTable" class="modal hide fade">
-    % if is_embeddable:
-    <form data-bind="submit: dropAndWatch" method="POST">
-      <input type="hidden" name="is_embeddable" value="true"/>
-      <input type="hidden" name="start_time" value=""/>
-      <input type="hidden" name="source_type" data-bind="value: $root.source().type"/>
-    % else:
-    <form method="POST">
-    % endif
-      ${ csrf_token(request) | n,unicode }
-      <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">${_('Drop Table')}</h2>
-      </div>
-      <div class="modal-body">
-        <div>${_('Do you really want to drop the table')} <span style="font-weight: bold;" data-bind="text: database() && database().table() ? database().table().catalogEntry.name : ''"></span>?</div>
-      </div>
-      <div class="modal-footer">
-        <input type="hidden" name="table_selection" data-bind="value: database() && database().table() ? database().table().catalogEntry.name : ''" />
-        <input type="button" class="btn" data-dismiss="modal" value="${_('No')}"/>
-        <input type="submit" data-bind="click: function (vm, e) { var $form = $(e.target).parents('form'); $form.attr('action', '/metastore/tables/drop/' + vm.database().catalogEntry.name); return true; }" class="btn btn-danger" value="${_('Yes, drop this table')}"/>
+    <!-- ko with: namespace -->
+      <div id="dropSingleTable" class="modal hide fade">
+        % if is_embeddable:
+        <form data-bind="submit: dropAndWatch" method="POST">
+          <input type="hidden" name="is_embeddable" value="true"/>
+          <input type="hidden" name="start_time" value=""/>
+          <input type="hidden" name="source_type" data-bind="value: $root.source().type"/>
+        % else:
+        <form method="POST">
+        % endif
+          ${ csrf_token(request) | n,unicode }
+          <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">${_('Drop Table')}</h2>
+          </div>
+          <div class="modal-body">
+            <div>${_('Do you really want to drop the table')} <span style="font-weight: bold;" data-bind="text: database() && database().table() ? database().table().catalogEntry.name : ''"></span>?</div>
+          </div>
+          <div class="modal-footer">
+            <input type="hidden" name="table_selection" data-bind="value: database() && database().table() ? database().table().catalogEntry.name : ''" />
+            <input type="button" class="btn" data-dismiss="modal" value="${_('No')}"/>
+            <input type="submit" data-bind="click: function (vm, e) { var $form = $(e.target).parents('form'); $form.attr('action', '/metastore/tables/drop/' + vm.database().catalogEntry.name); return true; }" class="btn btn-danger" value="${_('Yes, drop this table')}"/>
+          </div>
+        </form>
       </div>
-    </form>
-  </div>
-  <!-- /ko -->
+    <!-- /ko -->
   <!-- /ko -->
   <div id="import-data-modal" class="modal hide fade" style="display: block;width: 680px;margin-left: -340px!important;"></div>
 </div>

+ 0 - 1
desktop/core/src/desktop/js/ko/components/ko.navTags.js

@@ -41,7 +41,6 @@ const TEMPLATE = `
       load: getSelectizeTags
     }"></textarea>
    <div class="selectize-error" style="display: none;"><i class="fa fa-exclamation-triangle"></i> <span class="message"></span></div>
-   <!-- /ko -->
   </div>
   <!-- /ko -->
 `;

+ 2 - 2
desktop/core/src/desktop/templates/assist.mako

@@ -326,7 +326,7 @@ from desktop.views import _ko
     <!-- ko with: selectedSource -->
       <!-- ko template: { ifnot: selectedNamespace, name: 'assist-namespaces-template' } --><!-- /ko -->
       <!-- ko with: selectedNamespace -->
-        <!-- ko template: { ifnot: selectedDatabase, name: 'assist-databases-template' }--><!-- /ko -->
+        <!-- ko template: { ifnot: selectedDatabase, name: 'assist-databases-template' } --><!-- /ko -->
         <!-- ko with: selectedDatabase -->
           <!-- ko template: { name: 'assist-tables-template' } --><!-- /ko -->
         <!-- /ko -->
@@ -744,8 +744,8 @@ from desktop.views import _ko
       <div class="assist-errors" data-bind="visible: ! loading() && hasErrors()">
         <span>${ _('Error loading contents.') }</span>
       </div>
-      <!-- /ko -->
     </div>
+    <!-- /ko -->
   </script>
 
   <script type="text/html" id="assist-hbase-header-actions">

+ 17 - 1
desktop/core/src/desktop/templates/common_dashboard.mako

@@ -386,7 +386,23 @@
 </script>
 
 <script type="text/html" id="widget-template${ suffix }">
-  <div data-bind="attr: {'id': 'wdg_'+ id(),}, css: klass, draggable: { data: $data, isEnabled: $root.isGridster(), options: getDraggableOptions({ data: $data, parent: $parent }) }, droppable: { data: function() { $root.collection.dropOnWidget(id()) }, options:{ greedy:true, drop: function(event, ui) { huePubSub.publish('dashboard.drop.on.page', { event: event, ui: ui } } }}">
+  <div data-bind="attr: { 'id': 'wdg_'+ id() }, css: klass,
+      draggable: {
+         data: $data,
+         isEnabled: $root.isGridster(),
+         options: getDraggableOptions({ data: $data, parent: $parent })
+      },
+      droppable: {
+        data: function() {
+          $root.collection.dropOnWidget(id())
+        },
+        options: {
+          greedy:true,
+          drop: function(event, ui) {
+            huePubSub.publish('dashboard.drop.on.page', { event: event, ui: ui })
+          }
+        }
+      }">
     <h2 class="card-heading simple" data-bind="attr: { title: $root.isGridster() ? '${ _ko('Drag to move') }' : '' }">
       <!-- ko ifnot: $root.isGridster -->
       <span data-bind="visible: $root.isEditing">

+ 39 - 51
desktop/libs/dashboard/src/dashboard/templates/common_search.mako

@@ -571,50 +571,49 @@ ${ dashboard.layout_skeleton(suffix='search') }
 <script type="text/html" id="facet-toggle2">
   <div class="pull-left margin-right-20">
 
-  <!-- ko if: $root.isEditing -->
+    <!-- ko if: $root.isEditing -->
+    <div class="facet-field-cnt" data-bind="visible: $root.collection.nested.enabled">
+      <span class="spinedit-cnt">
+        <span class="facet-field-label">
+          ${ _('Domain') }
+        </span>
+        ${ _('Parent') }
+        <select data-bind="selectedOptions: properties.domain.blockParent, options: $root.collection.nestedNames" size="5" multiple="true"></select>
+        ${ _('Children') }
+        <select data-bind="selectedOptions: properties.domain.blockChildren, options: $root.collection.nestedNames" size="5" multiple="true"></select>
 
-  <div class="facet-field-cnt" data-bind="visible: $root.collection.nested.enabled">
-    <span class="spinedit-cnt">
-      <span class="facet-field-label">
-        ${ _('Domain') }
+        <input type="text" class="input-medium" data-bind="spinedit: properties.mincount"/>
       </span>
-      ${ _('Parent') }
-      <select data-bind="selectedOptions: properties.domain.blockParent, options: $root.collection.nestedNames" size="5" multiple="true"></select>
-      ${ _('Children') }
-      <select data-bind="selectedOptions: properties.domain.blockChildren, options: $root.collection.nestedNames" size="5" multiple="true"></select>
-
-      <input type="text" class="input-medium" data-bind="spinedit: properties.mincount"/>
-    </span>
-  </div>
-
-  <!-- /ko -->
+    </div>
+    <!-- /ko -->
 
-  <!-- ko if: !$parents[1].isLoading() || widgetType() == 'hit-widget' -->
-  <div class="edit-dimensions" data-bind="css: { 'is-editing': isEditing }">
-    <div data-bind="sortable: { data: properties.facets, allowDrop: false, options: { axis: 'x', handle: '.move-dimension', tolerance: 'pointer'}}" class="inline-block">
-      <div class="badge dimensions-badge-container" data-bind="css: { 'is-editing': isEditing }, click: function(){ $parent.isEditing(true); $parent.isAdding(false); $parent.properties.facets().forEach(function(f){ f.isEditing(false); }); isEditing(true); }" title="${ _('Edit') }">
-        <span data-bind="text: getPrettyMetric($data)"></span>
-        <span class="badge badge-info dimensions-badge" data-bind="text: field, attr: { 'title': field }"></span>
-        <!-- ko if: aggregate.function() != 'field' && aggregate.metrics && $parent.widgetType() != 'hit-widget' -->
-          <i class="fa" data-bind="css: { 'fa-long-arrow-down': sort() == 'desc', 'fa-long-arrow-up': sort() == 'asc' }"></i>
-        <!-- /ko -->
-        <div class="action-icon margin-left-5 move-dimension" data-bind="visible: $parent.properties.facets().length > 1" title="${ _('Move') }">
-          <i class="fa fa-bars"></i>
+    <!-- ko if: !$parents[1].isLoading() || widgetType() == 'hit-widget' -->
+    <div class="edit-dimensions" data-bind="css: { 'is-editing': isEditing }">
+      <div data-bind="sortable: { data: properties.facets, allowDrop: false, options: { axis: 'x', handle: '.move-dimension', tolerance: 'pointer'}}" class="inline-block">
+        <div class="badge dimensions-badge-container" data-bind="css: { 'is-editing': isEditing }, click: function(){ $parent.isEditing(true); $parent.isAdding(false); $parent.properties.facets().forEach(function(f){ f.isEditing(false); }); isEditing(true); }" title="${ _('Edit') }">
+          <span data-bind="text: getPrettyMetric($data)"></span>
+          <span class="badge badge-info dimensions-badge" data-bind="text: field, attr: { 'title': field }"></span>
+          <!-- ko if: aggregate.function() != 'field' && aggregate.metrics && $parent.widgetType() != 'hit-widget' -->
+            <i class="fa" data-bind="css: { 'fa-long-arrow-down': sort() == 'desc', 'fa-long-arrow-up': sort() == 'asc' }"></i>
+          <!-- /ko -->
+          <div class="action-icon margin-left-5 move-dimension" data-bind="visible: $parent.properties.facets().length > 1" title="${ _('Move') }">
+            <i class="fa fa-bars"></i>
+          </div>
+          <!-- ko if: isEditing -->
+          <div class="metric-form" data-bind="template: { name: 'metric-form' }"></div>
+          <!-- /ko -->
         </div>
-        <!-- ko if: isEditing -->
-        <div class="metric-form" data-bind="template: { name: 'metric-form' }"></div>
+      </div>
+      <div class="badge dimensions-badge-container dimensions-badge-container-add" data-bind="css: { 'is-adding': isAdding }, visible: properties.facets().length < 15 && widgetType() != 'hit-widget'">
+        <div class="action-icon" data-bind="click: function(){ isEditing(true); isAdding(true); properties.facets().forEach(function(f){ f.isEditing(false); });  }"><i class="fa fa-plus"></i> ${ _('Add') }</div>
+        <!-- ko if: isAdding -->
+          <div class="metric-form" data-bind="template: { name: 'metric-form', data: properties.facets_form }"></div>
         <!-- /ko -->
       </div>
+      <div class="clearfix"></div>
     </div>
-    <div class="badge dimensions-badge-container dimensions-badge-container-add" data-bind="css: { 'is-adding': isAdding }, visible: properties.facets().length < 15 && widgetType() != 'hit-widget'">
-      <div class="action-icon" data-bind="click: function(){ isEditing(true); isAdding(true); properties.facets().forEach(function(f){ f.isEditing(false); });  }"><i class="fa fa-plus"></i> ${ _('Add') }</div>
-      <!-- ko if: isAdding -->
-        <div class="metric-form" data-bind="template: { name: 'metric-form', data: properties.facets_form }"></div>
-      <!-- /ko -->
-    </div>
-    <div class="clearfix"></div>
+    <!-- /ko -->
   </div>
-  <!-- /ko -->
 
   <div class="clearfix"></div>
 </script>
@@ -856,12 +855,11 @@ ${ dashboard.layout_skeleton(suffix='search') }
 
 <script type="text/html" id="resultset-widget">
   <!-- ko if: $root.collection.template.isGridLayout() -->
-
-   <!-- ko with: $root -->
+    <!-- ko with: $root -->
       <!-- ko if: $root.hasRetrievedResults() && $root.response().response -->
       <span data-bind="template: {name: 'data-grid', data: $root.collection}"></span>
       <!-- /ko -->
-   <!-- /ko -->
+    <!-- /ko -->
   <!-- /ko -->
 </script>
 
@@ -1796,13 +1794,10 @@ ${ dashboard.layout_skeleton(suffix='search') }
           <div class="clearfix"></div>
           <!-- /ko -->
         <!-- /ko -->
-
        </div>
      </div>
-
     </div>
   </div>
-
 </script>
 
 
@@ -1811,13 +1806,10 @@ ${ dashboard.layout_skeleton(suffix='search') }
   ##  <i class="fa fa-spinner fa-spin"></i>
   ##</div>
 
-
   <!-- ko if: $root.getFacetFromQuery(id()).has_data() -->
   <div class="row-fluid" data-bind="with: $root.getFacetFromQuery(id())">
-
     <!-- ko with: $root.collection.getFacetById($parent.id()) -->
     <div>
-
 ##       <input type="text" class="input-medium" data-bind="value: properties.engine"/>
 ##       <textarea data-bind="value: properties.statement"></textarea>
 
@@ -1826,9 +1818,8 @@ ${ dashboard.layout_skeleton(suffix='search') }
 
       <span data-bind="template: { name: 'data-grid' }"></span>
     </div>
-   <!-- /ko -->
+    <!-- /ko -->
   </div>
-
   <!-- /ko -->
 </script>
 
@@ -1872,7 +1863,6 @@ ${ dashboard.layout_skeleton(suffix='search') }
     <span data-bind="template: { name: 'data-grid' }"></span>
    <!-- /ko -->
   </div>
-
   <!-- /ko -->
 </script>
 
@@ -2727,7 +2717,7 @@ ${ dashboard.layout_skeleton(suffix='search') }
           autocompleteFromEntries: $root.collection.template.autocompleteFromFieldsModalFilter
         }
       } --><!-- /ko -->
-      <!--<input id="addFacetInput" type="text" data-bind="clearable: $root.collection.template.fieldsModalFilter, valueUpdate:'afterkeydown'" placeholder="${_('Filter fields')}" class="input" style="float: left" /><br/>-->
+##       <input id="addFacetInput" type="text" data-bind="clearable: $root.collection.template.fieldsModalFilter, valueUpdate:'afterkeydown'" placeholder="${_('Filter fields')}" class="input" style="float: left" /><br/>
     </div>
     <div>
       <ul data-bind="foreach: $root.collection.template.filteredModalFields().sort(function (l, r) { return l.name() > r.name() ? 1 : -1 }), visible: $root.collection.template.filteredModalFields().length > 0"
@@ -2838,8 +2828,6 @@ ${ dashboard.layout_skeleton(suffix='search') }
             </div>
             <!-- /ko -->
             <!-- /ko -->
-
-            <!-- /ko -->
           </fieldset>
         </form>
       </div>

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

@@ -566,46 +566,46 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
       <!-- ko ifnot: sessions().length -->
       <p>${ _('There are currently no active sessions, please reload the page.') }</p>
       <!-- /ko -->
+
       <!-- ko foreach: sessions -->
-      <h4 style="clear:left; display: inline-block">
-        <span data-bind="text: $parents[1].getSnippetName(type())"></span>
-        <!-- ko if: typeof session_id != 'undefined' && session_id -->
-          <span data-bind="text: session_id"></span>
-        <!-- /ko -->
-      </h4>
-      <div class="session-actions">
-        <a class="inactive-action pointer" title="${ _('Recreate session') }" rel="tooltip" data-bind="click: function() { $parent.restartSession($data) }">
-          <i class="fa fa-refresh" data-bind="css: { 'fa-spin': restarting }"></i> ${ _('Recreate') }
-        </a>
-        <a class="inactive-action pointer margin-left-10" title="${ _('Close session') }" rel="tooltip" data-bind="click: function() { $parent.closeAndRemoveSession($data) }">
-          <i class="fa fa-times"></i> ${ _('Close') }
-        </a>
+        <h4 style="clear:left; display: inline-block">
+          <span data-bind="text: $parents[1].getSnippetName(type())"></span>
+          <!-- ko if: typeof session_id != 'undefined' && session_id -->
+            <span data-bind="text: session_id"></span>
+          <!-- /ko -->
+        </h4>
+        <div class="session-actions">
+          <a class="inactive-action pointer" title="${ _('Recreate session') }" rel="tooltip" data-bind="click: function() { $parent.restartSession($data) }">
+            <i class="fa fa-refresh" data-bind="css: { 'fa-spin': restarting }"></i> ${ _('Recreate') }
+          </a>
+          <a class="inactive-action pointer margin-left-10" title="${ _('Close session') }" rel="tooltip" data-bind="click: function() { $parent.closeAndRemoveSession($data) }">
+            <i class="fa fa-times"></i> ${ _('Close') }
+          </a>
+          % if conf.USE_DEFAULT_CONFIGURATION.get():
+            <a class="inactive-action pointer margin-left-10" title="${ _('Save session settings as default') }" rel="tooltip" data-bind="click: function() { $parent.saveDefaultUserProperties($data) }"><i class="fa fa-save"></i> ${ _('Set as default settings') }</a>
+          % endif
+          % if not IS_EMBEDDED.get():
+          <!-- ko if: type() == 'impala' && typeof http_addr != 'undefined' -->
+            <a class="margin-left-10" data-bind="attr: {'href': http_addr()}" target="_blank">
+              <span data-bind="text: http_addr().replace(/^(https?):\/\//, '')"></span> <i class="fa fa-external-link"></i>
+            </a>
+          <!-- /ko -->
+          % endif
+        </div>
         % if conf.USE_DEFAULT_CONFIGURATION.get():
-          <a class="inactive-action pointer margin-left-10" title="${ _('Save session settings as default') }" rel="tooltip" data-bind="click: function() { $parent.saveDefaultUserProperties($data) }"><i class="fa fa-save"></i> ${ _('Set as default settings') }</a>
+        <div style="width:100%;">
+          <!-- ko component: { name: 'property-selector', params: { properties: properties } } --><!-- /ko -->
+        </div>
         % endif
-        % if not IS_EMBEDDED.get():
-        <!-- ko if: type() == 'impala' && typeof http_addr != 'undefined' -->
-          <a class="margin-left-10" data-bind="attr: {'href': http_addr()}" target="_blank">
-            <span data-bind="text: http_addr().replace(/^(https?):\/\//, '')"></span> <i class="fa fa-external-link"></i>
+        <div style="clear:both; padding-left: 120px;">
+          <!-- ko if: availableNewProperties().length -->
+          <a class="pointer" style="padding:5px;" data-bind="click: selectedSessionProperty() && function() {
+                      properties.push(ko.mapping.fromJS({'name': selectedSessionProperty(), 'value': ''}));
+                      selectedSessionProperty('');
+                     }" style="margin-left:10px;vertical-align: text-top;">
           </a>
-        <!-- /ko -->
-        % endif
-      </div>
-      % if conf.USE_DEFAULT_CONFIGURATION.get():
-      <div style="width:100%;">
-        <!-- ko component: { name: 'property-selector', params: { properties: properties } } --><!-- /ko -->
-      </div>
-      % endif
-      <div style="clear:both; padding-left: 120px;">
-        <!-- ko if: availableNewProperties().length -->
-        <a class="pointer" style="padding:5px;" data-bind="click: selectedSessionProperty() && function() {
-                    properties.push(ko.mapping.fromJS({'name': selectedSessionProperty(), 'value': ''}));
-                    selectedSessionProperty('');
-                   }" style="margin-left:10px;vertical-align: text-top;">
-        </a>
-        <!-- /ko -->
-      </div>
-      <!-- /ko -->
+          <!-- /ko -->
+        </div>
       <!-- /ko -->
       <br/>
     </fieldset>

+ 21 - 55
package-lock.json

@@ -2991,12 +2991,6 @@
         "parse-json": "^4.0.0"
       },
       "dependencies": {
-        "esprima": {
-          "version": "4.0.1",
-          "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
-          "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
-          "dev": true
-        },
         "import-fresh": {
           "version": "2.0.0",
           "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
@@ -3008,9 +3002,9 @@
           }
         },
         "js-yaml": {
-          "version": "3.12.2",
-          "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz",
-          "integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==",
+          "version": "3.13.1",
+          "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+          "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
           "dev": true,
           "requires": {
             "argparse": "^1.0.7",
@@ -4125,12 +4119,6 @@
             "ms": "^2.1.1"
           }
         },
-        "esprima": {
-          "version": "4.0.1",
-          "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
-          "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
-          "dev": true
-        },
         "glob": {
           "version": "7.1.3",
           "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
@@ -4152,9 +4140,9 @@
           "dev": true
         },
         "js-yaml": {
-          "version": "3.12.1",
-          "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz",
-          "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==",
+          "version": "3.13.1",
+          "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+          "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
           "dev": true,
           "requires": {
             "argparse": "^1.0.7",
@@ -4247,9 +4235,9 @@
       }
     },
     "esprima": {
-      "version": "2.7.3",
-      "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
-      "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+      "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
       "dev": true
     },
     "esquery": {
@@ -5626,9 +5614,9 @@
       "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA=="
     },
     "grunt": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.3.tgz",
-      "integrity": "sha512-/JzmZNPfKorlCrrmxWqQO4JVodO+DVd5XX4DkocL/1WlLlKVLE9+SdEIempOAxDhWPysLle6afvn/hg7Ck2k9g==",
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.4.tgz",
+      "integrity": "sha512-PYsMOrOC+MsdGEkFVwMaMyc6Ob7pKmq+deg1Sjr+vvMWp35sztfwKE7qoN51V+UEtHsyNuMcGdgMLFkBHvMxHQ==",
       "dev": true,
       "requires": {
         "coffeescript": "~1.10.0",
@@ -5642,7 +5630,7 @@
         "grunt-legacy-log": "~2.0.0",
         "grunt-legacy-util": "~1.1.1",
         "iconv-lite": "~0.4.13",
-        "js-yaml": "~3.5.2",
+        "js-yaml": "~3.13.0",
         "minimatch": "~3.0.2",
         "mkdirp": "~0.5.1",
         "nopt": "~3.0.6",
@@ -5781,14 +5769,6 @@
         "grunt-legacy-log-utils": "~2.0.0",
         "hooker": "~0.2.3",
         "lodash": "~4.17.5"
-      },
-      "dependencies": {
-        "lodash": {
-          "version": "4.17.11",
-          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
-          "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
-          "dev": true
-        }
       }
     },
     "grunt-legacy-log-utils": {
@@ -5821,12 +5801,6 @@
             "supports-color": "^5.3.0"
           }
         },
-        "lodash": {
-          "version": "4.17.11",
-          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
-          "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
-          "dev": true
-        },
         "supports-color": {
           "version": "5.5.0",
           "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
@@ -5851,14 +5825,6 @@
         "lodash": "~4.17.10",
         "underscore.string": "~3.3.4",
         "which": "~1.3.0"
-      },
-      "dependencies": {
-        "lodash": {
-          "version": "4.17.11",
-          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
-          "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
-          "dev": true
-        }
       }
     },
     "gzip-size": {
@@ -6765,13 +6731,13 @@
       "dev": true
     },
     "js-yaml": {
-      "version": "3.5.5",
-      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz",
-      "integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=",
+      "version": "3.13.1",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+      "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
       "dev": true,
       "requires": {
-        "argparse": "^1.0.2",
-        "esprima": "^2.6.0"
+        "argparse": "^1.0.7",
+        "esprima": "^4.0.0"
       }
     },
     "jsbn": {
@@ -7065,9 +7031,9 @@
       "dev": true
     },
     "knockout": {
-      "version": "3.4.2",
-      "resolved": "https://registry.npmjs.org/knockout/-/knockout-3.4.2.tgz",
-      "integrity": "sha1-6HlY3netHpNvfOZFuri118RW2Tc="
+      "version": "3.5.0",
+      "resolved": "https://registry.npmjs.org/knockout/-/knockout-3.5.0.tgz",
+      "integrity": "sha512-vBUF/IsBDzaejHkNpiquKdc5uPrImXuQ4Mb9lEfNNJ5cyHGI8ThDupR+h3eMFZhfmPE/brfwcIAn/fm0yOvJUg=="
     },
     "knockout-sortable": {
       "version": "1.1.0",

+ 3 - 3
package.json

@@ -35,7 +35,7 @@
     "jquery-mousewheel": "3.1.13",
     "jquery-ui": "1.12.1",
     "jquery.cookie": "1.4.1",
-    "knockout": "3.4.2",
+    "knockout": "3.5.0",
     "knockout-sortable": "1.1.0",
     "knockout-switch-case": "2.1.0",
     "knockout.mapping": "2.4.3",
@@ -72,7 +72,7 @@
     "eslint-config-prettier": "4.0.0",
     "eslint-plugin-prettier": "3.0.1",
     "expose-loader": "0.7.5",
-    "grunt": "1.0.3",
+    "grunt": "^1.0.4",
     "grunt-contrib-less": "2.0.0",
     "grunt-contrib-uglify": "4.0.0",
     "grunt-contrib-watch": "1.1.0",
@@ -86,8 +86,8 @@
     "karma-spec-reporter": "0.0.32",
     "karma-webpack": "4.0.0-rc.6",
     "lesshint": "6.3.2",
-    "markdown": "0.5.0",
     "load-grunt-tasks": "4.0.0",
+    "markdown": "0.5.0",
     "prettier": "1.16.1",
     "stylelint": "^9.10.1",
     "stylelint-config-standard": "^18.2.0",