|
|
@@ -31,10 +31,16 @@
|
|
|
contents will be encrypted and saved in the Grafana database.</info-popover>
|
|
|
</div>
|
|
|
|
|
|
- <gf-form-switch class="gf-form" label="Use GCE default Authentication" checked="ctrl.current.jsonData.gceAutomaticAuthentication"
|
|
|
- switch-class="max-width-4" label-class="width-16"></gf-form-switch>
|
|
|
+ <div class="gf-form-inline">
|
|
|
+ <div class="gf-form max-width-30">
|
|
|
+ <span class="gf-form-label width-10">Authentication Type</span>
|
|
|
+ <div class="gf-form-select-wrapper max-width-24">
|
|
|
+ <select class="gf-form-input" ng-model="ctrl.current.jsonData.authenticationType" ng-options="f.key as f.value for f in ctrl.authenticationTypes"></select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div ng-if="!ctrl.current.jsonData.clientEmail && !ctrl.inputDataValid">
|
|
|
+ <div ng-if="ctrl.current.jsonData.authenticationType === ctrl.defaultAuthenticationType && !ctrl.current.jsonData.clientEmail && !ctrl.inputDataValid">
|
|
|
<div class="gf-form-group" ng-if="!ctrl.inputDataValid">
|
|
|
<div class="gf-form">
|
|
|
<form>
|
|
|
@@ -55,23 +61,23 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
-<div class="gf-form-group" ng-if="ctrl.inputDataValid || ctrl.current.jsonData.clientEmail">
|
|
|
+<div class="gf-form-group" ng-if="ctrl.current.jsonData.authenticationType === ctrl.defaultAuthenticationType && (ctrl.inputDataValid || ctrl.current.jsonData.clientEmail)">
|
|
|
<h6>Uploaded Key Details</h6>
|
|
|
|
|
|
<div class="gf-form">
|
|
|
- <span class="gf-form-label width-9">Project</span>
|
|
|
+ <span class="gf-form-label width-10">Project</span>
|
|
|
<input class="gf-form-input width-40" disabled type="text" ng-model="ctrl.current.jsonData.defaultProject" />
|
|
|
</div>
|
|
|
<div class="gf-form">
|
|
|
- <span class="gf-form-label width-9">Client Email</span>
|
|
|
+ <span class="gf-form-label width-10">Client Email</span>
|
|
|
<input class="gf-form-input width-40" disabled type="text" ng-model="ctrl.current.jsonData.clientEmail" />
|
|
|
</div>
|
|
|
<div class="gf-form">
|
|
|
- <span class="gf-form-label width-9">Token URI</span>
|
|
|
+ <span class="gf-form-label width-10">Token URI</span>
|
|
|
<input class="gf-form-input width-40" disabled type="text" ng-model='ctrl.current.jsonData.tokenUri' />
|
|
|
</div>
|
|
|
<div class="gf-form" ng-if="ctrl.current.secureJsonFields.privateKey">
|
|
|
- <span class="gf-form-label width-9">Private Key</span>
|
|
|
+ <span class="gf-form-label width-10">Private Key</span>
|
|
|
<input type="text" class="gf-form-input max-width-12" disabled="disabled" value="configured">
|
|
|
</div>
|
|
|
|
|
|
@@ -84,9 +90,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
-<p class="gf-form-label" ng-hide="ctrl.current.secureJsonFields.privateKey"><i class="fa fa-save"></i> Do not forget to save your changes after uploading a file.</p>
|
|
|
+<p class="gf-form-label" ng-hide="ctrl.current.secureJsonFields.privateKey || ctrl.current.jsonData.authenticationType !== ctrl.defaultAuthenticationType"><i
|
|
|
+ class="fa fa-save"></i> Do not forget to
|
|
|
|
|
|
-
|
|
|
-<div class="grafana-info-box" ng-hide="ctrl.current.secureJsonFields.privateKey">
|
|
|
- Do not forget to save your changes after uploading a file.
|
|
|
-</div>
|
|
|
+<p class="gf-form-label" ng-show="ctrl.current.jsonData.authenticationType !== ctrl.defaultAuthenticationType"><i class="fa fa-save"></i>
|
|
|
+ Verify GCE automatic authentication by clicking Save & Test</p>
|