mirror of
https://github.com/valitydev/redash.git
synced 2024-11-08 09:53:59 +00:00
51 lines
2.7 KiB
HTML
51 lines
2.7 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" style="cursor: pointer;" ng-click="open(query)">
|
|
<p>
|
|
<span ng-bind="query.name"></span>
|
|
</p>
|
|
<div class="text-muted" ng-bind="query.description"></div>
|
|
</h3>
|
|
</div>
|
|
|
|
<div ng-switch on="widget.type" class="panel-body">
|
|
<chart-renderer ng-switch-when="chart" query-result="queryResult" options="widget.options"></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 class="panel-footer">
|
|
<span class="label label-default"
|
|
tooltip="next update {{nextUpdateTime}} (query runtime: {{queryResult.getRuntime() | durationHumanize}})"
|
|
tooltip-placement="bottom">Updated: <span am-time-ago="queryResult.getUpdatedAt()"></span></span>
|
|
|
|
<span class="pull-right">
|
|
<a class="btn btn-default btn-xs" ng-href="/queries/{{query.id}}"><span class="glyphicon glyphicon-link"></span></a>
|
|
<button type="button" class="btn btn-default btn-xs" ng-show="dashboard.canEdit()" ng-click="deleteWidget()" title="Remove Widget"><span class="glyphicon glyphicon-trash"></span></button>
|
|
</span>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |