Explorar o código

HUE-9249 [browser] Trim impala query and protect when missing

Romain %!s(int64=5) %!d(string=hai) anos
pai
achega
f52078fb53
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

+ 8 - 1
apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

@@ -1628,7 +1628,14 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
           <pre data-bind="visible:!properties.plan || !properties.plan().plan_json || !properties.plan().plan_json.plan_nodes.length" >${ _('The selected tab has no data') }</pre>
         </div>
         <div class="tab-pane" id="queries-page-stmt${ SUFFIX }" data-profile="plan">
-          <pre data-bind="highlight: { value: (properties.plan && properties.plan().stmt) || _('The selected tab has no data'), formatted: true, dialect: 'impala' }"/>
+          <!-- ko if: properties.plan && properties.plan().stmt -->
+            <pre data-bind="highlight: { value: properties.plan().stmt.trim(), formatted: true, dialect: 'impala' }"/>
+          <!-- /ko -->
+          <!-- ko ifnot: properties.plan && properties.plan().stmt -->
+            <pre>
+              ${ _('The selected tab has no data') }
+            </pre>
+          <!-- /ko -->
         </div>
         <div class="tab-pane" id="queries-page-plan-text${ SUFFIX }" data-profile="plan">
           <pre data-bind="text: (properties.plan && properties.plan().plan) || _('The selected tab has no data')"/>