Skip to content

Commit

Permalink
MB-43089 Enable Implicit Transactions in QWB
Browse files Browse the repository at this point in the history
- added new execute button “Run As Transaction”
- created a drawer to hide this and the other secondary button next to Execute

DEPENDS on changes in other repos

Change-Id: Id513d5d0eebe5c2300481d167ab5da80e70bc9b3
Reviewed-on: http://review.couchbase.org/c/query-ui/+/142592
Tested-by: Eben Haber <eben@couchbase.com>
Reviewed-by: Eben Haber <eben@couchbase.com>
  • Loading branch information
robashcom authored and ebenhaber committed Dec 23, 2020
1 parent fc4b4aa commit 1703812
Showing 1 changed file with 38 additions and 17 deletions.
55 changes: 38 additions & 17 deletions query-ui/ui-current/query.html
Expand Up @@ -81,7 +81,6 @@ <h4>Query Editor</h4>
ui-ace="qc.aceInputOptions"
ng-model="qc.lastResult().query">
</div>

<!-- wrapper under query editor for button and stats ------------------------->
<div class="wb-query-editor-footer" ng-click="qc.handleClick('results')">
<span class="wb-button-wrapper nowrap">
Expand All @@ -92,20 +91,42 @@ <h4>Query Editor</h4>
<span class="icon fa-spinner fa-spin fa-pulse"></span>
</div>
</button>
<button
ng-disabled="qc.lastResult().busy"
ng-click="qc.query({explainOnly: true})"
class="outline tight">
Explain
<span ng-if="qc.lastResult().busy" class="icon fa-spinner fa-spin fa-pulse"></span>
</button>
<button ng-if="qc.isEnterprise()"
ng-disabled="qc.lastResult().busy"
ng-click="qc.runAdviseOnLatest()"
class="outline tight">
Advise
<span ng-if="qc.lastResult().busy" class="icon fa-spinner fa-spin fa-pulse"></span>
</button>
<div
class="cbui-drawer"
ng-class="{open : poolDefault.openDrawer}">
<div
class="cbui-drawer-opener"
title="show more actions"
ng-click="poolDefault.openDrawer = true">
|<span class="icon fa-angle-right"></span>
</div>
<div class="nowrap">
<button
ng-disabled="qc.lastResult().busy"
ng-click="qc.query({explainOnly: true})"
class="outline tight">
Explain
</button>
<button ng-if="qc.isEnterprise()"
ng-disabled="qc.lastResult().busy"
ng-click="qc.runAdviseOnLatest()"
class="outline tight">
Advise
</button>
<button ng-if="qc.isEnterprise()"
ng-disabled="qc.lastResult().busy"
ng-click="qc.query({txImplicit: true})"
class="outline tight">
Run As Transaction
</button>
</div>
<div
class="cbui-drawer-closer"
title="hide this"
ng-click="poolDefault.openDrawer = false">
<span class="icon fa-times-circle padding-half"></span>
</div>
</div>
</span>
<!-- query execution summary stats -------------------------------------------->
<div class="wb-result-summary">
Expand Down Expand Up @@ -137,7 +158,7 @@ <h4>Query Editor</h4>
</span>
</div>
<!-- format & full-screen controls ----------------------------------------- -->
<span class="nowrap">
<div class="nowrap" style="padding: 0 0 .25rem 0;">
<span
ng-disabled="qc.executingQuery.busy"
ng-click="$event.stopPropagation(); qc.format(); qc.handleClick('editor');"
Expand All @@ -151,7 +172,7 @@ <h4>Query Editor</h4>
<span ng-if="!qc.fullscreen" class="icon fa-expand" title="expand"></span>
<span ng-if="qc.fullscreen" class="icon fa-compress" title="contract"></span>
</span>
</span>
</div>

</div>
</div>
Expand Down

0 comments on commit 1703812

Please sign in to comment.