mirror of
https://github.com/valitydev/redash.git
synced 2024-11-08 18:03:54 +00:00
45 lines
2.4 KiB
HTML
45 lines
2.4 KiB
HTML
<new-widget-form dashboard="dashboard"></new-widget-form>
|
|
<edit-dashboard-form dashboard="dashboard" id="edit_dashboard_dialog"></edit-dashboard-form>
|
|
|
|
<div class="container">
|
|
<h2 id="dashboard_title">
|
|
{{dashboard.name}}
|
|
<span ng-show="dashboard.canEdit()">
|
|
<button type="button" class="btn btn-default btn-xs" data-toggle="modal" href="#edit_dashboard_dialog" tooltip="Edit Dashboard (Name/Layout)"><span
|
|
class="glyphicon glyphicon-cog"></span></button>
|
|
<button type="button" class="btn btn-default btn-xs" data-toggle="modal"
|
|
href="#add_query_dialog" tooltip="Add Widget (Chart/Table)"><span class="glyphicon glyphicon-import"></span>
|
|
</button>
|
|
</span>
|
|
</h2>
|
|
</div>
|
|
|
|
<div class="container" id="dashboard">
|
|
<div ng-repeat="row in dashboard.widgets" class="row">
|
|
<div ng-repeat="widget in row" class="col-lg-{{widget.width | colWidth}}"
|
|
ng-controller='WidgetCtrl'>
|
|
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title" ng-mouseenter="inFocus = true"
|
|
ng-mouseleave="inFocus = false">
|
|
<button type="button" class="close delete-button" aria-hidden="true" ng-show="dashboard.canEdit()" ng-click="deleteWidget()" tooltip="Remove Widget">×</button>
|
|
<a ng-href="/queries/{{query.id}}">{{query.name}}</a>
|
|
<span class="glyphicon glyphicon-pencil" ng-show="inFocus"></span>
|
|
|
|
<span class="label label-default pull-right"
|
|
am-time-ago="queryResult.getUpdatedAt()"
|
|
tooltip="next update {{nextUpdateTime}} (query runtime: {{queryResult.getRuntime() | durationHumanize}})"
|
|
tooltip-placement="bottom"></span>
|
|
</h3>
|
|
</div>
|
|
|
|
<div ng-switch on="widget.type" class="panel-body">
|
|
<chart-renderer ng-switch-when="chart" query-result="queryResult" stacking="widget.options.stacking"></chart-renderer>
|
|
<grid-renderer ng-switch-when="grid" query-result="queryResult"></grid-renderer>
|
|
<cohort-renderer ng-switch-when="cohort" query-result="queryResult"></cohort-renderer>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |