Skip to content

Commit bac757f

Browse files
committed
bug 1480988. Use project annotation to determine kibana url for ops namespaces
1 parent d105f64 commit bac757f

File tree

3 files changed

+73
-66
lines changed

3 files changed

+73
-66
lines changed

app/scripts/directives/logViewer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ angular.module('openshiftConsole')
431431
// Kibana archives -------------------------------------------------
432432

433433
APIDiscovery
434-
.getLoggingURL()
434+
.getLoggingURL($scope.context.project)
435435
.then(function(url) {
436436
var projectName = _.get($scope.context, 'project.metadata.name');
437437
var containerName = _.get($scope.options, 'container');

app/scripts/services/discovery.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
'use strict';
22

33
angular.module('openshiftConsole')
4-
.factory('APIDiscovery', ['LOGGING_URL', 'METRICS_URL', '$q', function(LOGGING_URL, METRICS_URL, $q) {
4+
.factory('APIDiscovery', ['LOGGING_URL', 'METRICS_URL', '$q', '$filter', function(LOGGING_URL, METRICS_URL, $q, $filter) {
55
return {
66
// Simulate asynchronous requests for now. If these are ever updated to call to a discovery
77
// endpoint, we need to make sure to trigger a digest loop using (or update all callers).
8-
getLoggingURL: function() {
9-
return $q.when(LOGGING_URL);
8+
getLoggingURL: function(project) {
9+
var loggingURL = LOGGING_URL;
10+
var loggingUIHostname = $filter('annotation')(project, 'loggingUIHostname');
11+
if(loggingUIHostname) {
12+
loggingURL = 'https://' + loggingUIHostname;
13+
}
14+
15+
return $q.when(loggingURL);
1016
},
1117
getMetricsURL: function() {
1218
return $q.when(METRICS_URL);

0 commit comments

Comments
 (0)