-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow per-query tenant configuration #85
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3947c77
Allow per-query tenant configuration
jotak 8a4218c
Reorganize tests (split in several files)
jotak 474e9e2
Add unit tests for per query tenants
jotak 4f67105
Code style: single quotes and string interpolation
jotak 30620b6
Test datasource on "/" when tenant is unknown
jotak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export class HawkularConfigCtrl { | ||
|
||
constructor() { | ||
this.current.url = this.current.url || 'http://your_server:8080/hawkular/metrics' | ||
} | ||
} | ||
|
||
HawkularConfigCtrl.templateUrl = 'partials/config.html'; |
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
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,7 +1,22 @@ | ||
|
||
<h5 class="section-heading">Query</h5> | ||
<div class="gf-form-group"> | ||
<div class="gf-form-inline"> | ||
<div class="gf-form"> | ||
<span class="gf-form-label"> | ||
Tenant | ||
<i class="fa fa-question-circle" bs-tooltip="'Use for per-query tenant configuration only, see datasource configuration'" data-placement="right"></i> | ||
</span> | ||
<input type="text" class="gf-form-input max-width-10" ng-model="ctrl.annotation.tenant" placeholder=""> | ||
</div> | ||
<div class="gf-form"> | ||
<span class="gf-form-label">Type</span> | ||
<select class="gf-form-input max-width-10" ng-model="ctrl.annotation.type"> | ||
<option value="availability">Availability</option> | ||
<option value="strings">String</option> | ||
</select> | ||
</div> | ||
</div> | ||
<div class="gf-form"> | ||
<span class="gf-form-label">Metric name</span> | ||
<input type="text" class="gf-form-input" ng-model="ctrl.annotation.query" placeholder=""> | ||
</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
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,4 +1,4 @@ | ||
<section class="grafana-metric-options" > | ||
<section class="grafana-metric-options"> | ||
<div class="gf-form"> | ||
</div> | ||
</section> |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is that the status endpoint might be reachable even without the proper credentials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, but I can't see other way round. In openshift for example authentication is closely linked to the tenant, so it cannot be checked anyway at this step.