Make query results full width.

This commit is contained in:
Andrea Leesley 2016-03-10 12:58:55 -06:00 committed by Alex DeBrie
parent c096a133c5
commit a9fbb1ccb2
2 changed files with 100 additions and 84 deletions

View File

@ -602,6 +602,12 @@ div.table-name:hover {
/* Bootstrap Overrides */
.flex-parent {
display: flex;
flex-direction: column;
justify-content: center;
}
.collapsing,
.collapse.in {
background: #f4f4f4;

View File

@ -15,7 +15,7 @@
<div class="row">
<div class="col-lg-12">
<div class="row">
<div class="col-lg-10">
<div class="col-lg-9">
<h2>
<edit-in-place editable="isQueryOwner" done="saveName" ignore-blanks='true' value="query.name"></edit-in-place>
</h2>
@ -32,7 +32,7 @@
</em>
</p>
</div>
<div class="col-lg-2">
<div class="col-lg-3">
<div class="pull-right">
<query-source-link></query-source-link>
</div>
@ -100,91 +100,101 @@
</div>
<hr ng-if="sourceMode">
<div class="row">
<div class="col-lg-3">
<p>
<span class="glyphicon glyphicon-user"></span>
<span class="text-muted">Created By </span>
<strong>{{query.user.name}}</strong>
</p>
<p ng-if="query.last_modified_by && query.user.id != query.last_modified_by.id">
<span class="glyphicon glyphicon-user"></span>
<span class="text-muted">Last Modified By </span>
<strong>{{query.last_modified_by.name}}</strong>
</p>
<p>
<span class="glyphicon glyphicon-time"></span>
<span class="text-muted">Last update </span>
<strong>
<rd-time-ago value="queryResult.query_result.retrieved_at"></rd-time-ago>
</strong>
</p>
<p>
<span class="glyphicon glyphicon-play"></span>
<span class="text-muted">Runtime </span>
<strong ng-show="!queryExecuting">{{queryResult.getRuntime() | durationHumanize}}</strong>
<span ng-show="queryExecuting">Running&hellip;</span>
</p>
<p>
<span class="glyphicon glyphicon-align-justify"></span>
<span class="text-muted">Rows </span><strong>{{queryResult.getData().length}}</strong>
</p>
<p>
<span class="glyphicon glyphicon-refresh"></span>
<span class="text-muted">Refresh Schedule</span>
<a ng-click="openScheduleForm()">{{query.schedule | scheduleHumanize}}</a>
</p>
<p>
<i class="fa fa-database"></i>
<span class="text-muted">Data Source</span>
<select ng-disabled="!isQueryOwner" ng-model="query.data_source_id" ng-change="updateDataSource()" ng-options="ds.id as ds.name for ds in dataSources"></select>
</p>
<hr>
<p>
<p>
<div class="btn-group" dropdown>
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" ng-disabled="queryExecuting || !queryResult.getData()" aria-haspopup="true" dropdown-toggle aria-expanded="false">
Download Dataset <span class="caret"></span>
</button>
<ul class="dropdown-menu" dropdown-menu>
<li>
<a query-result-link target="_self">
<span class="fa fa-file-o"></span> Download as CSV File
</a>
</li>
<li>
<a query-result-link file-type="xlsx" target="_self">
<span class="fa fa-file-excel-o"></span> Download as Excel File
</a>
</li>
</ul>
</div>
<a class="btn btn-warning btn-sm" ng-disabled="queryExecuting" data-toggle="modal" data-target="#archive-confirmation-modal" ng-show="!query.is_archived && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))">
<i class="fa fa-archive" title="Archive Query"></i>
</a>
<button class="btn btn-default btn-sm" ng-show="query.id != undefined" ng-click="showApiKey()">
<i class="fa fa-key" title="Show API Key"></i>
</button>
</p>
<div class="modal fade" id="archive-confirmation-modal" tabindex="-1" role="dialog" aria-labelledby="archiveConfirmationModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Query Archive</h4>
<div class="col-lg-12">
<div class="row">
<div class="col-lg-3">
<p>
<span class="glyphicon glyphicon-user"></span>
<span class="text-muted">Created By </span>
<strong>{{query.user.name}}</strong>
</p>
<p ng-if="query.last_modified_by && query.user.id != query.last_modified_by.id">
<span class="glyphicon glyphicon-user"></span>
<span class="text-muted">Last Modified By </span>
<strong>{{query.last_modified_by.name}}</strong>
</p>
</div>
<div class="col-lg-3">
<p>
<span class="glyphicon glyphicon-time"></span>
<span class="text-muted">Last update </span>
<strong><rd-time-ago value="queryResult.query_result.retrieved_at"></rd-time-ago></strong>
</p>
<p>
<span class="glyphicon glyphicon-play"></span>
<span class="text-muted">Runtime </span>
<strong ng-show="!queryExecuting">{{queryResult.getRuntime() | durationHumanize}}</strong>
<span ng-show="queryExecuting">Running&hellip;</span>
</p>
</div>
<div class="col-lg-3">
<p>
<span class="glyphicon glyphicon-align-justify"></span>
<span class="text-muted">Rows </span><strong>{{queryResult.getData().length}}</strong>
</p>
<p>
<span class="glyphicon glyphicon-refresh"></span>
<span class="text-muted">Refresh Schedule</span>
<a ng-click="openScheduleForm()">{{query.schedule | scheduleHumanize}}</a>
</p>
</div>
<div class="col-lg-3">
<p>
<i class="fa fa-database"></i>
<span class="text-muted">Data Source</span>
<select ng-disabled="!isQueryOwner" ng-model="query.data_source_id" ng-change="updateDataSource()" ng-options="ds.id as ds.name for ds in dataSources"></select>
</p>
<p>
<p>
<div class="btn-group" dropdown>
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" ng-disabled="queryExecuting || !queryResult.getData()" aria-haspopup="true" dropdown-toggle aria-expanded="false">
Download Dataset <span class="caret"></span>
</button>
<ul class="dropdown-menu" dropdown-menu>
<li>
<a query-result-link target="_self">
<span class="fa fa-file-o"></span> Download as CSV File
</a>
</li>
<li>
<a query-result-link file-type="xlsx" target="_self">
<span class="fa fa-file-excel-o"></span> Download as Excel File
</a>
</li>
</ul>
</div>
<div class="modal-body">
Are you sure you want to archive this query?
<br/> All dashboard widgets created with its visualizations will be deleted.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<button type="button" class="btn btn-primary" ng-click="archiveQuery()">Yes, archive.</button>
<a class="btn btn-warning btn-sm" ng-disabled="queryExecuting" data-toggle="modal" data-target="#archive-confirmation-modal" ng-show="!query.is_archived && query.id != undefined && (isQueryOwner || currentUser.hasPermission('admin'))">
<i class="fa fa-archive" title="Archive Query"></i>
</a>
<button class="btn btn-default btn-sm" ng-show="query.id != undefined" ng-click="showApiKey()">
<i class="fa fa-key" title="Show API Key"></i>
</button>
</p>
<div class="modal fade" id="archive-confirmation-modal" tabindex="-1" role="dialog" aria-labelledby="archiveConfirmationModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Query Archive</h4>
</div>
<div class="modal-body">
Are you sure you want to archive this query?
<br/> All dashboard widgets created with its visualizations will be deleted.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<button type="button" class="btn btn-primary" ng-click="archiveQuery()">Yes, archive.</button>
</div>
</div>
</div>
</div>
</div>
</p>
</div>
</p>
</div>
</div>
<div class="col-lg-9">
</div>
<hr>
<div class="row">
<div class="col-lg-12">
<!-- alerts -->
<div class="alert alert-info" ng-show="queryResult.getStatus() == 'processing'">
Executing query&hellip;
@ -235,8 +245,8 @@
</div>
<div ng-show="selectedTab == 'pivot'">
<h3>
Pivot tables are now regular visualization, which you can create from the <a hash="add" hash-link>"New Visualization" tab</a> and <strong>save</strong>.
</h3>
Pivot tables are now regular visualization, which you can create from the <a hash="add" hash-link>"New Visualization" tab</a> and <strong>save</strong>.
</h3>
</div>
<div ng-show="selectedTab == vis.id" ng-repeat="vis in query.visualizations">
<visualization-renderer visualization="vis" query-result="queryResult"></visualization-renderer>