2017-11-07 08:41:29 +00:00
|
|
|
<div class="widget-wrapper">
|
2018-03-23 16:25:21 +00:00
|
|
|
<div class="tile body-container widget-visualization" ng-if="$ctrl.type=='visualization'" ng-class="$ctrl.type"
|
2018-04-08 12:32:14 +00:00
|
|
|
ng-switch="$ctrl.widget.getQueryResult().getStatus()">
|
2017-11-07 08:41:29 +00:00
|
|
|
<div class="body-row">
|
|
|
|
<div class="t-header widget clearfix">
|
2017-11-07 14:31:24 +00:00
|
|
|
<div class="dropdown pull-right widget-menu-remove" ng-if="!$ctrl.public && $ctrl.dashboard.canEdit()">
|
|
|
|
<div class="actions">
|
|
|
|
<a ng-click="$ctrl.deleteWidget()" title="Remove From Dashboard"><i class="zmdi zmdi-close"></i></a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="dropdown pull-right widget-menu-regular" ng-if="!$ctrl.public" uib-dropdown>
|
2017-11-07 08:41:29 +00:00
|
|
|
<div class="actions">
|
2018-04-30 08:01:36 +00:00
|
|
|
<a data-toggle="dropdown" uib-dropdown-toggle><i class="zmdi zmdi-more-vert"></i></a>
|
2016-11-04 17:15:09 +00:00
|
|
|
</div>
|
|
|
|
|
2017-11-07 08:41:29 +00:00
|
|
|
<ul class="dropdown-menu pull-right" uib-dropdown-menu style="z-index:1000000">
|
2018-04-08 12:32:14 +00:00
|
|
|
<li ng-class="{'disabled': $ctrl.widget.getQueryResult().isEmpty()}"><a ng-href="{{$ctrl.widget.getQueryResult().getLink($ctrl.widget.getQuery().id, 'csv')}}" download="{{$ctrl.widget.getQueryResult().getName($ctrl.widget.getQuery().name, 'csv')}}" target="_self">Download as CSV File</a></li>
|
|
|
|
<li ng-class="{'disabled': $ctrl.widget.getQueryResult().isEmpty()}"><a ng-href="{{$ctrl.widget.getQueryResult().getLink($ctrl.widget.getQuery().id, 'xlsx')}}" download="{{$ctrl.widget.getQueryResult().getName($ctrl.widget.getQuery().name, 'xlsx')}}" target="_self">Download as Excel File</a></li>
|
|
|
|
<li><a ng-href="{{$ctrl.widget.getQuery().getUrl(true, $ctrl.widget.visualization.id)}}" ng-show="$ctrl.canViewQuery">View Query</a></li>
|
2017-11-07 08:41:29 +00:00
|
|
|
<li><a ng-show="$ctrl.dashboard.canEdit()" ng-click="$ctrl.deleteWidget()">Remove From Dashboard</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="th-title">
|
2018-09-28 08:26:37 +00:00
|
|
|
<p>
|
|
|
|
<query-link query="$ctrl.widget.getQuery()" visualization="$ctrl.widget.visualization"
|
|
|
|
readonly="!$ctrl.canViewQuery"></query-link>
|
2017-11-07 08:41:29 +00:00
|
|
|
</p>
|
2018-04-08 12:32:14 +00:00
|
|
|
<div class="text-muted query--description" ng-bind-html="$ctrl.widget.getQuery().description | markdown"></div>
|
2016-11-04 17:15:09 +00:00
|
|
|
</div>
|
2017-11-06 19:48:21 +00:00
|
|
|
</div>
|
2018-01-31 21:06:10 +00:00
|
|
|
<div class="m-b-10" ng-if="$ctrl.localParametersDefs().length > 0">
|
|
|
|
<parameters parameters="$ctrl.localParametersDefs()"></parameters>
|
|
|
|
</div>
|
2017-11-07 08:41:29 +00:00
|
|
|
</div>
|
2016-11-04 17:15:09 +00:00
|
|
|
|
2017-11-07 08:41:29 +00:00
|
|
|
<div ng-switch-when="failed" class="body-row-auto scrollbox">
|
2018-04-08 12:32:14 +00:00
|
|
|
<div class="alert alert-danger m-5" ng-show="$ctrl.widget.getQueryResult().getError()">Error running query: <strong>{{$ctrl.widget.getQueryResult().getError()}}</strong></div>
|
2017-11-07 08:41:29 +00:00
|
|
|
</div>
|
2018-03-23 16:25:21 +00:00
|
|
|
<div ng-switch-when="done" class="body-row-auto scrollbox">
|
2018-04-08 12:32:14 +00:00
|
|
|
<visualization-renderer visualization="$ctrl.widget.visualization" query-result="$ctrl.widget.getQueryResult()" class="t-body"></visualization-renderer>
|
2017-11-07 08:41:29 +00:00
|
|
|
</div>
|
|
|
|
<div ng-switch-default class="body-row-auto spinner-container">
|
|
|
|
<div class="spinner">
|
|
|
|
<i class="zmdi zmdi-refresh zmdi-hc-spin zmdi-hc-5x"></i>
|
2017-11-06 19:48:21 +00:00
|
|
|
</div>
|
2016-11-04 17:15:09 +00:00
|
|
|
</div>
|
|
|
|
|
2017-11-09 22:37:52 +00:00
|
|
|
<div class="body-row clearfix tile__bottom-control">
|
2018-04-30 08:01:36 +00:00
|
|
|
<a class="small hidden-print" ng-click="$ctrl.refresh()" ng-if="!$ctrl.public">
|
2018-06-11 15:19:45 +00:00
|
|
|
<i ng-class='{"zmdi-hc-spin": $ctrl.widget.loading}' class="zmdi zmdi-refresh"></i>
|
2018-04-30 08:01:36 +00:00
|
|
|
<span am-time-ago="$ctrl.widget.getQueryResult().getUpdatedAt()" ng-if="!$ctrl.widget.loading"></span>
|
|
|
|
<rd-timer timestamp="$ctrl.widget.refreshStartedAt" ng-if="$ctrl.widget.loading"></rd-timer>
|
2017-11-19 20:34:40 +00:00
|
|
|
</a>
|
2017-12-05 14:34:46 +00:00
|
|
|
<span class="small hidden-print" ng-if="$ctrl.public">
|
2018-04-08 12:32:14 +00:00
|
|
|
<i class="zmdi zmdi-time-restore"></i> <span am-time-ago="$ctrl.widget.getQueryResult().getUpdatedAt()"></span>
|
2017-12-05 14:34:46 +00:00
|
|
|
</span>
|
2017-11-07 08:41:29 +00:00
|
|
|
<span class="visible-print">
|
2018-04-08 12:32:14 +00:00
|
|
|
<i class="zmdi zmdi-time-restore"></i> {{$ctrl.widget.getQueryResult().getUpdatedAt() | dateTime}}
|
2017-11-07 08:41:29 +00:00
|
|
|
</span>
|
2017-11-19 20:34:40 +00:00
|
|
|
|
2018-04-30 08:01:36 +00:00
|
|
|
<button class="btn btn-sm btn-default pull-right hidden-print btn-transparent btn__refresh" ng-click="$ctrl.refresh()" ng-if="!$ctrl.public"><i class="zmdi zmdi-refresh"></i></button>
|
2018-10-14 07:42:31 +00:00
|
|
|
<button class="btn btn-sm btn-default pull-right hidden-print btn-transparent btn__refresh" ng-click="$ctrl.expandVisualization()"><i class="zmdi zmdi-fullscreen"></i></button>
|
2017-11-07 08:41:29 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-03-23 16:25:21 +00:00
|
|
|
<div class="tile body-container widget-restricted" ng-if="$ctrl.type=='restricted'" ng-class="$ctrl.type">
|
2017-11-07 08:41:29 +00:00
|
|
|
<div class="t-body body-row-auto scrollbox">
|
2016-11-04 17:15:09 +00:00
|
|
|
<div class="text-center">
|
|
|
|
<h1><span class="zmdi zmdi-lock"></span></h1>
|
|
|
|
<p class="text-muted">
|
|
|
|
This widget requires access to a data source you don't have access to.
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-03-23 16:25:21 +00:00
|
|
|
<div class="tile body-container widget-text" ng-hide="$ctrl.widget.width === 0" ng-if="$ctrl.type=='textbox'" ng-class="$ctrl.type">
|
2017-11-07 08:41:29 +00:00
|
|
|
<div class="body-row clearfix t-body">
|
2017-11-07 14:31:24 +00:00
|
|
|
<div class="dropdown pull-right widget-menu-remove" ng-if="!$ctrl.public && $ctrl.dashboard.canEdit()">
|
|
|
|
<div class="dropdown-header">
|
|
|
|
<a class="actions" ng-click="$ctrl.deleteWidget()" title="Remove From Dashboard"><i class="zmdi zmdi-close"></i></a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="dropdown pull-right widget-menu-regular" ng-if="!$ctrl.public && $ctrl.dashboard.canEdit()" uib-dropdown>
|
2016-11-04 17:15:09 +00:00
|
|
|
<div class="dropdown-header">
|
|
|
|
<a data-toggle="dropdown" uib-dropdown-toggle class="actions"><i class="zmdi zmdi-more"></i></a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<ul class="dropdown-menu pull-right" uib-dropdown-menu style="z-index:1000000">
|
|
|
|
<li><a ng-show="$ctrl.dashboard.canEdit()" ng-click="$ctrl.editTextBox()">Edit</a></li>
|
|
|
|
<li><a ng-show="$ctrl.dashboard.canEdit()" ng-click="$ctrl.deleteWidget()">Remove From Dashboard</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-12-06 20:30:27 +00:00
|
|
|
<div class="body-row-auto scrollbox tiled t-body p-15" ng-bind-html="$ctrl.widget.text | markdown"></div>
|
2016-11-04 17:15:09 +00:00
|
|
|
</div>
|
|
|
|
</div>
|