forked from marshell08/grafana-plugins
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mehdi Abaakouk
committed
Jul 12, 2016
1 parent
c273d16
commit b1d7511
Showing
3 changed files
with
80 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,68 @@ | ||
<datasource-http-settings current="ctrl.current"> | ||
</datasource-http-settings> | ||
|
||
<h3>Gnocchi Details</h3> | ||
<div class="gf-info-box" style="margin: 30px 0 0 0"> | ||
If you plan to use the proxy mode, use the Gnocchi URL and fill the Token | ||
<div class="gf-info-box" style="margin: 10px 0 30px 0" ng-if="ctrl.current.access == 'direct'"> | ||
When "direct" access is used, Gnocchi and Keystone MUST have CORS configured correctly on the server side.<br /> | ||
</div> | ||
|
||
<h3>Gnocchi Details</h3> | ||
<div class="gf-form-group"> | ||
<div class="gf-form-inline"> | ||
<div class="gf-form max-width-30"> | ||
<span class="gf-form-label width-7">Token</span> | ||
<input type="text" class="tight-form-input input-xlarge" ng-model='ctrl.current.jsonData.token' placeholder=""></input> | ||
<span class="gf-form-label width-7">Auth Mode</span> | ||
<div class="gf-form-select-wrapper gf-form-select-wrapper--has-help-icon max-width-24"> | ||
<select class="gf-form-input" ng-model="ctrl.current.jsonData.mode" ng-options="f for f in ['noauth', 'token', 'keystone']"></select> | ||
<info-popover mode="right-absolute"> | ||
noauth = we send domain/project/username in X-<XXX>-Id headers to Gnocchi<br /> | ||
token = we send the X-Token-ID header to Gnocchi<br /> | ||
keystone = we retreive the token on keystone with domain/project/username/password | ||
</info-popover> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="gf-info-box" style="margin: 30px 0 0 0"> | ||
If you plan to use the direct mode, use the Keystone URL and fill the Project, User and Password<br> | ||
In this mode, Gnocchi and Keystone MUST have CORS configured correctly on the server side. | ||
</div> | ||
|
||
<div class="gf-form-group"> | ||
<div class="gf-form-inline"> | ||
<div class="gf-form max-width-30"> | ||
<span class="gf-form-label width-7">Project</span> | ||
<input type="text" class="tight-form-input input-xlarge" ng-model='ctrl.current.jsonData.project' placeholder=""></input> | ||
</div> | ||
<div style="padding:5px"> | ||
<span ng-if="ctrl.current.access == 'direct' && ctrl.current.jsonData.mode == 'keystone'">The Keystone URL is expected in Http settings</span> | ||
<span ng-if="ctrl.current.access == 'proxy' && ctrl.current.jsonData.mode == 'keystone'">This configuration can't works, select another 'Access' or 'Auth Mode'</span> | ||
<span ng-if="ctrl.current.jsonData.mode != 'keystone'">The Gnocchi URL is expected in Http settings</span> | ||
</div> | ||
<div class="gf-form-inline"> | ||
<div class="gf-form max-width-30"> | ||
<span class="gf-form-label width-7">User</span> | ||
<input type="text" class="tight-form-input input-xlarge" ng-model='ctrl.current.jsonData.username' placeholder=""></input> | ||
<div ng-if="(ctrl.current.access == 'direct' && ctrl.current.jsonData.mode != 'token') || ctrl.current.jsonData.mode == 'noauth'"> | ||
<div class="gf-form-inline"> | ||
<div class="gf-form max-width-30"> | ||
<span class="gf-form-label width-7">Domain</span> | ||
<input type="text" class="tight-form-input input-xlarge" ng-model='ctrl.current.jsonData.domain' placeholder="default"></input> | ||
</div> | ||
</div> | ||
<div class="gf-form-inline"> | ||
<div class="gf-form max-width-30"> | ||
<span class="gf-form-label width-7">Project</span> | ||
<input type="text" class="tight-form-input input-xlarge" ng-model='ctrl.current.jsonData.project' placeholder=""></input> | ||
</div> | ||
</div> | ||
<div class="gf-form-inline"> | ||
<div class="gf-form max-width-30"> | ||
<span class="gf-form-label width-7">User</span> | ||
<input type="text" class="tight-form-input input-xlarge" ng-model='ctrl.current.jsonData.username' placeholder=""></input> | ||
</div> | ||
</div> | ||
<div class="gf-form-inline" ng-if="ctrl.current.jsonData.mode == 'keystone'"> | ||
<div class="gf-form max-width-30"> | ||
<span class="gf-form-label width-7">Password</span> | ||
<input type="text" class="tight-form-input input-xlarge" ng-model='ctrl.current.jsonData.password' placeholder=""></input> | ||
</div> | ||
</div> | ||
<div class="gf-form-inline" ng-if="ctrl.current.jsonData.mode == 'noauth'"> | ||
<div class="gf-form max-width-30"> | ||
<span class="gf-form-label width-7">Roles</span> | ||
<input type="text" class="tight-form-input input-xlarge" ng-model='ctrl.current.jsonData.roles' placeholder="admin"></input> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
<div class="gf-form-inline"> | ||
<div class="gf-form max-width-30"> | ||
<span class="gf-form-label width-7">Password</span> | ||
<input type="text" class="tight-form-input input-xlarge" ng-model='ctrl.current.jsonData.password' placeholder=""></input> | ||
<div ng-if="ctrl.current.jsonData.mode == 'token'"> | ||
<div class="gf-form-inline"> | ||
<div class="gf-form max-width-30"> | ||
<span class="gf-form-label width-7">Token</span> | ||
<input type="text" class="tight-form-input input-xlarge" ng-model='ctrl.current.jsonData.token' placeholder=""></input> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters