|
|
|
<div class="section gf-form-group">
|
|
|
|
<div class="gf-form">
|
|
|
|
<label class="gf-form-label">Select Hastic datasource</label>
|
|
|
|
<select class="gf-form-input"
|
|
|
|
ng-model="ctrl.panel.hasticDatasource"
|
|
|
|
ng-options="ds.id as ds.name for ds in ctrl.hasticDatasources"
|
|
|
|
ng-change="ctrl.onHasticDatasourceChange()"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<ng-include src="ctrl.partialsPath + '/reconnect_to_datasource.html'" />
|
|
|
|
|
|
|
|
<div ng-if="ctrl.analyticsController.serverStatus === true && !ctrl.analyticsController.loading">
|
|
|
|
<ng-include src="ctrl.getTemplatePath('analytic_units')">
|
|
|
|
</ng-include>
|
|
|
|
|
|
|
|
<ng-include
|
|
|
|
ng-if="ctrl.analyticsController.creatingNew"
|
|
|
|
src="ctrl.getTemplatePath('new_analytic_unit')"
|
|
|
|
>
|
|
|
|
</ng-include>
|
|
|
|
|
|
|
|
<div class="gf-form-button-row" ng-if="!ctrl.analyticsController.creatingNew">
|
|
|
|
<button
|
|
|
|
class="btn btn-secondary width-12"
|
|
|
|
ng-click="ctrl.createNew()"
|
|
|
|
>
|
|
|
|
<i class="fa fa-plus"></i>
|
|
|
|
 Add Analytic Unit
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
ng-if="ctrl.analyticsController.analyticUnits.length > 0"
|
|
|
|
class="gf-form-label width-12 pointer"
|
|
|
|
style="display: inline;"
|
|
|
|
ng-click="ctrl.redetectAll()"
|
|
|
|
>
|
|
|
|
Re-detect all analytic units
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
class="gf-form-label width-12 pointer"
|
|
|
|
style="display: inline;"
|
|
|
|
ng-click="ctrl.showHelp = !ctrl.showHelp"
|
|
|
|
>
|
|
|
|
Show Help
|
|
|
|
<i class="fa fa-caret-down" ng-show="ctrl.showHelp"></i>
|
|
|
|
<i class="fa fa-caret-right" ng-hide="ctrl.showHelp"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="gf-form-button-row" ng-if="ctrl.analyticsController.creatingNew">
|
|
|
|
<button
|
|
|
|
class="btn btn-secondary width-12"
|
|
|
|
ng-click="ctrl.saveNew()"
|
|
|
|
ng-if="!ctrl.analyticsController.saving"
|
|
|
|
>
|
|
|
|
<i class="fa fa-plus"></i>
|
|
|
|
 Create
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
class="btn btn-secondary width-12"
|
|
|
|
ng-click="ctrl.saveNew()"
|
|
|
|
ng-if="ctrl.analyticsController.saving"
|
|
|
|
ng-disabled="true"
|
|
|
|
>
|
|
|
|
<i class="fa fa-spin fa-spinner"></i>
|
|
|
|
Saving
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
class="btn btn-inverse width-12"
|
|
|
|
ng-click="ctrl.cancelCreation()"
|
|
|
|
ng-disabled="ctrl.analyticsController.saving"
|
|
|
|
>
|
|
|
|
<i class="fa fa-ban"></i>
|
|
|
|
 Cancel
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="gf-form" ng-show="ctrl.showHelp" ng-bind-html="ctrl.analyticsController.helpSectionText"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-if="ctrl.analyticsController.serverStatus === true && ctrl.analyticsController.loading">
|
|
|
|
<i class="fa fa-spinner fa-spin" /> Fetching analytic units...
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|