|
|
@@ -27,58 +27,59 @@
|
|
|
|
|
|
<form name="ctrl.editForm">
|
|
|
<div class="gf-form-group">
|
|
|
- <div class="gf-form">
|
|
|
- <span class="gf-form-label width-7">Name</span>
|
|
|
- <input class="gf-form-input max-width-21" type="text" ng-model="ctrl.current.name" placeholder="My data source name" required>
|
|
|
- <info-popover offset="0px -95px">
|
|
|
- The name is used when you select the data source in panels.
|
|
|
- The <code>Default</code> data source is preselected in new
|
|
|
- panels.
|
|
|
- </info-popover>
|
|
|
+ <div class="gf-form-inline">
|
|
|
+ <div class="gf-form">
|
|
|
+ <span class="gf-form-label width-7">Name</span>
|
|
|
+ <input class="gf-form-input max-width-21" type="text" ng-model="ctrl.current.name" placeholder="My data source name" required>
|
|
|
+ <info-popover offset="0px -130px">
|
|
|
+ The name is used when you select the data source in panels.
|
|
|
+ The <code>Default</code> data source is preselected in new
|
|
|
+ panels.
|
|
|
+ </info-popover>
|
|
|
+ </div>
|
|
|
+ <gf-form-switch class="gf-form" label="Default" checked="ctrl.current.isDefault" switch-class="max-width-6"></gf-form-switch>
|
|
|
+ </div>
|
|
|
|
|
|
- <editor-checkbox text="Default" model="ctrl.current.isDefault"></editor-checkbox>
|
|
|
- </div>
|
|
|
+ <div class="gf-form">
|
|
|
+ <span class="gf-form-label width-7">Type</span>
|
|
|
+ <div class="gf-form-select-wrapper">
|
|
|
+ <select class="gf-form-input gf-size-auto" ng-model="ctrl.current.type" ng-options="v.id as v.name for v in ctrl.types" ng-change="ctrl.typeChanged()"></select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="gf-form">
|
|
|
- <span class="gf-form-label width-7">Type</span>
|
|
|
- <div class="gf-form-select-wrapper">
|
|
|
- <select class="gf-form-input gf-size-auto" ng-model="ctrl.current.type" ng-options="v.id as v.name for v in ctrl.types" ng-change="ctrl.typeChanged()"></select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <rebuild-on-change property="ctrl.datasourceMeta.id">
|
|
|
+ <plugin-component type="datasource-config-ctrl">
|
|
|
+ </plugin-component>
|
|
|
+ </rebuild-on-change>
|
|
|
|
|
|
- <rebuild-on-change property="ctrl.datasourceMeta.id">
|
|
|
- <plugin-component type="datasource-config-ctrl">
|
|
|
- </plugin-component>
|
|
|
- </rebuild-on-change>
|
|
|
+ <div ng-if="ctrl.testing" style="margin-top: 25px">
|
|
|
+ <h5 ng-show="!ctrl.testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5>
|
|
|
+ <h5 ng-show="ctrl.testing.done">Test results</h5>
|
|
|
+ <div class="alert-{{ctrl.testing.status}} alert">
|
|
|
+ <div class="alert-title">{{ctrl.testing.title}}</div>
|
|
|
+ <div ng-bind='ctrl.testing.message'></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div ng-if="ctrl.testing" style="margin-top: 25px">
|
|
|
- <h5 ng-show="!ctrl.testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5>
|
|
|
- <h5 ng-show="ctrl.testing.done">Test results</h5>
|
|
|
- <div class="alert-{{ctrl.testing.status}} alert">
|
|
|
- <div class="alert-title">{{ctrl.testing.title}}</div>
|
|
|
- <div ng-bind='ctrl.testing.message'></div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="gf-form-button-row">
|
|
|
- <button type="submit" class="btn btn-success" ng-show="ctrl.isNew" ng-click="ctrl.saveChanges()">Add</button>
|
|
|
- <button type="submit" class="btn btn-success" ng-show="!ctrl.isNew" ng-click="ctrl.saveChanges()">Save</button>
|
|
|
- <button type="submit" class="btn btn-secondary" ng-show="!ctrl.isNew" ng-click="ctrl.saveChanges(true)">
|
|
|
- Test Connection
|
|
|
- </button>
|
|
|
+ <div class="gf-form-button-row">
|
|
|
+ <button type="submit" class="btn btn-success" ng-show="ctrl.isNew" ng-click="ctrl.saveChanges()">Add</button>
|
|
|
+ <button type="submit" class="btn btn-success" ng-show="!ctrl.isNew" ng-click="ctrl.saveChanges()">Save</button>
|
|
|
+ <button type="submit" class="btn btn-secondary" ng-show="!ctrl.isNew" ng-click="ctrl.saveChanges(true)">
|
|
|
+ Test Connection
|
|
|
+ </button>
|
|
|
<button type="submit" class="btn btn-danger" ng-show="!ctrl.isNew" ng-click="ctrl.delete()">
|
|
|
Delete
|
|
|
- </button>
|
|
|
- <a class="btn btn-link" href="datasources">Cancel</a>
|
|
|
- </div>
|
|
|
+ </button>
|
|
|
+ <a class="btn btn-link" href="datasources">Cancel</a>
|
|
|
+ </div>
|
|
|
|
|
|
- </form>
|
|
|
- </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
|
|
|
- <div ng-if="ctrl.tabIndex === 1" class="tab-content">
|
|
|
- <dashboard-import-list plugin="ctrl.datasourceMeta" datasource="ctrl.current"></dashboard-import-list>
|
|
|
- </div>
|
|
|
+ <div ng-if="ctrl.tabIndex === 1" class="tab-content">
|
|
|
+ <dashboard-import-list plugin="ctrl.datasourceMeta" datasource="ctrl.current"></dashboard-import-list>
|
|
|
+ </div>
|
|
|
|
|
|
</div>
|
|
|
|