@@ -5386,7 +5386,15 @@ return d += " -n " + a.metadata.namespace;
5386
5386
return {
5387
5387
getLogsCommand:c
5388
5388
};
5389
- } ]), angular.module("openshiftConsole").controller("ProjectsController", [ "$scope", "$filter", "$location", "$route", "$timeout", "AlertMessageService", "AuthService", "DataService", "KeywordService", "Logger", "ProjectsService", function(a, b, c, d, e, f, g, h, i, j, k) {
5389
+ } ]), angular.module("openshiftConsole").factory("HTMLService", function() {
5390
+ return {
5391
+ linkify:function(a, b, c) {
5392
+ return a ? (c || (a = _.escape(a)), a.replace(/https?:\/\/[A-Za-z0-9._%+-]+\S*[^\s.;,(){}<>"\u201d\u2019]/gm, function(a) {
5393
+ return b ? '<a href="' + a + '" target="' + b + '">' + a + "</a>" :'<a href="' + a + '">' + a + "</a>";
5394
+ })) :a;
5395
+ }
5396
+ };
5397
+ }), angular.module("openshiftConsole").controller("ProjectsController", [ "$scope", "$filter", "$location", "$route", "$timeout", "AlertMessageService", "AuthService", "DataService", "KeywordService", "Logger", "ProjectsService", function(a, b, c, d, e, f, g, h, i, j, k) {
5390
5398
var l, m, n = [], o = [];
5391
5399
a.alerts = a.alerts || {}, a.loading = !0, a.showGetStarted = !1, a.canCreate = void 0, a.search = {
5392
5400
text:""
@@ -12839,15 +12847,11 @@ a.destroy();
12839
12847
});
12840
12848
}
12841
12849
};
12842
- } ]), angular.module("openshiftConsole").directive("logViewer", [ "$sce", "$timeout", "$window", "$filter", "AuthService", "APIService", "APIDiscovery", "DataService", "ModalsService", "logLinks", "BREAKPOINTS", function(a, b, c, d, e, f, g, h, i, j, k) {
12843
- var l = $(window), m = function(a) {
12844
- return a.replace(/https?:\/\/[A-Za-z0-9._%+-]+\S*[^\s.;,(){}<>"\u201d\u2019]/gm, function(a) {
12845
- return '<a href="' + a + '" target="_blank">' + a + "</a>";
12846
- });
12847
- }, n = $('<tr class="log-line"><td class="log-line-number"></td><td class="log-line-text"></td></tr>').get(0), o = function(a, b) {
12850
+ } ]), angular.module("openshiftConsole").directive("logViewer", [ "$sce", "$timeout", "$window", "$filter", "AuthService", "APIService", "APIDiscovery", "DataService", "HTMLService", "ModalsService", "logLinks", "BREAKPOINTS", function(a, b, c, d, e, f, g, h, i, j, k, l) {
12851
+ var m = $(window), n = $('<tr class="log-line"><td class="log-line-number"></td><td class="log-line-text"></td></tr>').get(0), o = function(a, b) {
12848
12852
var c = n.cloneNode(!0);
12849
12853
c.firstChild.setAttribute("data-line-number", a);
12850
- var d = ansi_up.escape_for_html(b), e = ansi_up.ansi_to_html(d), f = m(e );
12854
+ var d = ansi_up.escape_for_html(b), e = ansi_up.ansi_to_html(d), f = i.linkify(e, "_blank", !0 );
12851
12855
return c.lastChild.innerHTML = f, c;
12852
12856
};
12853
12857
return {
@@ -12868,25 +12872,25 @@ empty:"=?",
12868
12872
run:"=?"
12869
12873
},
12870
12874
controller:[ "$scope", function(i) {
12871
- var m , n, p, q, r, s = document.documentElement;
12875
+ var j , n, p, q, r, s = document.documentElement;
12872
12876
i.logViewerID = _.uniqueId("log-viewer"), i.empty = !0;
12873
12877
var t, u;
12874
12878
"ReplicationController" === i.object.kind ? (t = "deploymentconfigs/log", u = d("annotation")(i.object, "deploymentConfig")) :(t = f.kindToResource(i.object.kind) + "/log", u = i.object.metadata.name);
12875
12879
var v = function() {
12876
- q = window.innerWidth < k .screenSmMin && !i.fixedHeight ? null :n;
12880
+ q = window.innerWidth < l .screenSmMin && !i.fixedHeight ? null :n;
12877
12881
}, w = function() {
12878
12882
i.$apply(function() {
12879
- var a = m .getBoundingClientRect();
12883
+ var a = j .getBoundingClientRect();
12880
12884
i.fixedHeight ? i.showScrollLinks = a && a.height > i.fixedHeight :i.showScrollLinks = a && (a.top < 0 || a.bottom > s.clientHeight);
12881
12885
});
12882
12886
}, x = !1, y = function() {
12883
12887
x ? x = !1 :i.$evalAsync(function() {
12884
12888
i.autoScrollActive = !1;
12885
12889
});
12886
12890
}, z = function() {
12887
- p.off("scroll", y), l .off("scroll", y), window.innerWidth <= k .screenSmMin && !i.fixedHeight ? l .on("scroll", y) :p.on("scroll", y);
12891
+ p.off("scroll", y), m .off("scroll", y), window.innerWidth <= l .screenSmMin && !i.fixedHeight ? m .on("scroll", y) :p.on("scroll", y);
12888
12892
}, A = function() {
12889
- i.fixedHeight || (window.innerWidth < k .screenSmMin && !i.fixedHeight ? r.removeClass("target-logger-node").affix({
12893
+ i.fixedHeight || (window.innerWidth < l .screenSmMin && !i.fixedHeight ? r.removeClass("target-logger-node").affix({
12890
12894
target:window,
12891
12895
offset:{
12892
12896
top:i.followAffixTop || 0,
@@ -12910,17 +12914,17 @@ i.chromeless || i.fixedHeight || (e -= 35), a ? b.animate({
12910
12914
}, C = _.debounce(function() {
12911
12915
B(!0), v(), z(), w(), A(), y();
12912
12916
}, 100);
12913
- l .on("resize", C);
12917
+ m .on("resize", C);
12914
12918
var D, E = function() {
12915
- x = !0, j .scrollBottom(q);
12919
+ x = !0, k .scrollBottom(q);
12916
12920
}, F = function() {
12917
12921
i.autoScrollActive = !i.autoScrollActive, i.autoScrollActive && E();
12918
12922
}, G = document.createDocumentFragment(), H = _.debounce(function() {
12919
- m .appendChild(G), G = document.createDocumentFragment(), i.autoScrollActive && E(), i.showScrollLinks || w();
12923
+ j .appendChild(G), G = document.createDocumentFragment(), i.autoScrollActive && E(), i.showScrollLinks || w();
12920
12924
}, 100, {
12921
12925
maxWait:300
12922
12926
}), I = function(a) {
12923
- D && (D.stop(), D = null), a || (H.cancel(), m && (m .innerHTML = ""), G = document.createDocumentFragment());
12927
+ D && (D.stop(), D = null), a || (H.cancel(), j && (j .innerHTML = ""), G = document.createDocumentFragment());
12924
12928
}, J = function() {
12925
12929
if (I(), i.run) {
12926
12930
angular.extend(i, {
@@ -12969,7 +12973,7 @@ kibanaAuthUrl:a.trustAsResourceUrl(URI(b).segment("auth").segment("token").norma
12969
12973
access_token:e.UserStore().getToken()
12970
12974
}), i.$watchGroup([ "context.project.metadata.name", "options.container", "name" ], function() {
12971
12975
angular.extend(i, {
12972
- kibanaArchiveUrl:a.trustAsResourceUrl(j .archiveUri({
12976
+ kibanaArchiveUrl:a.trustAsResourceUrl(k .archiveUri({
12973
12977
namespace:i.context.project.metadata.name,
12974
12978
namespaceUid:i.context.project.metadata.uid,
12975
12979
podname:u,
@@ -12981,7 +12985,7 @@ backlink:URI.encode(c.location.href)
12981
12985
}), this.cacheScrollableNode = function(a) {
12982
12986
n = a, p = $(n);
12983
12987
}, this.cacheLogNode = function(a) {
12984
- m = a;
12988
+ j = a;
12985
12989
}, this.cacheAffixable = function(a) {
12986
12990
r = $(a);
12987
12991
}, this.start = function() {
@@ -12992,16 +12996,16 @@ loading:!0,
12992
12996
autoScroll:!1,
12993
12997
state:!1,
12994
12998
onScrollBottom:function() {
12995
- j .scrollBottom(q);
12999
+ k .scrollBottom(q);
12996
13000
},
12997
13001
onScrollTop:function() {
12998
- i.autoScrollActive = !1, j .scrollTop(q);
13002
+ i.autoScrollActive = !1, k .scrollTop(q);
12999
13003
},
13000
13004
toggleAutoScroll:F,
13001
- goChromeless:j .chromelessLink,
13005
+ goChromeless:k .chromelessLink,
13002
13006
restartLogs:J
13003
13007
}), i.$on("$destroy", function() {
13004
- I(), l .off("resize", C), l .off("scroll", y), p.off("scroll", y);
13008
+ I(), m .off("resize", C), m .off("scroll", y), p.off("scroll", y);
13005
13009
}), "deploymentconfigs/logs" !== t || u ? void i.$watchGroup([ "name", "options.container", "run" ], J) :(i.state = "empty", void (i.emptyStateMessage = "Logs are not available for this replication controller because it was not generated from a deployment configuration."));
13006
13010
} ],
13007
13011
require:"logViewer",
@@ -13016,7 +13020,7 @@ type:"text/plain;charset=utf-8"
13016
13020
saveAs(e, d);
13017
13021
};
13018
13022
a.canSave = !!new Blob(), a.saveLog = function() {
13019
- return a.largeLog ? void i .confirmSaveLog(a.object).then(f) :void f();
13023
+ return a.largeLog ? void j .confirmSaveLog(a.object).then(f) :void f();
13020
13024
};
13021
13025
}
13022
13026
};
@@ -15745,7 +15749,11 @@ return d.replace(f, "<mark>$&</mark>");
15745
15749
};
15746
15750
} ]).filter("encodeURIComponent", function() {
15747
15751
return window.encodeURIComponent;
15748
- }), angular.module("openshiftConsole").filter("camelToLower", function() {
15752
+ }).filter("linkify", [ "HTMLService", function(a) {
15753
+ return function(b, c, d) {
15754
+ return a.linkify(b, c, d);
15755
+ };
15756
+ } ]), angular.module("openshiftConsole").filter("camelToLower", function() {
15749
15757
return function(a) {
15750
15758
return a ? _.startCase(a).toLowerCase() :a;
15751
15759
};
@@ -15975,7 +15983,7 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
15975
15983
$templateCache.put('views/_cannot-create-project.html',
15976
15984
"<span ng-if=\"!newProjectMessage\">A cluster admin can create a project for you by running the command\n" +
15977
15985
"<code>oadm new-project <projectname> --admin={{user.metadata.name || '<YourUsername>'}}</code></span>\n" +
15978
- "<span ng-if=\"newProjectMessage\" ng-bind-html=\"newProjectMessage | linky : '_blank'\" class=\"projects-instructions-link\"></span>"
15986
+ "<span ng-if=\"newProjectMessage\" ng-bind-html=\"newProjectMessage | linkify : '_blank'\" class=\"projects-instructions-link\"></span>"
15979
15987
);
15980
15988
15981
15989
@@ -17231,7 +17239,7 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
17231
17239
"<span ng-switch-when=\"Image change\">\n" +
17232
17240
"{{trigger.message}} for {{trigger.imageChangeBuild.fromRef.name}}\n" +
17233
17241
"</span>\n" +
17234
- "<span ng-switch-default ng-bind-html=\"trigger.message | linky : '_blank'\"></span>\n" +
17242
+ "<span ng-switch-default ng-bind-html=\"trigger.message | linkify : '_blank'\"></span>\n" +
17235
17243
"</div>\n" +
17236
17244
"</div>\n" +
17237
17245
"</dd>\n" +
@@ -20968,7 +20976,7 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
20968
20976
"</div>\n" +
20969
20977
"<div class=\"alert alert-info template-message\" ng-if=\"templateMessage.length\">\n" +
20970
20978
"<span class=\"pficon pficon-info\" aria-hidden=\"true\"></span>\n" +
20971
- "<div class=\"resource-description\" ng-bind-html=\"templateMessage | linky : '_blank'\"></div>\n" +
20979
+ "<div class=\"resource-description\" ng-bind-html=\"templateMessage | linkify : '_blank'\"></div>\n" +
20972
20980
"</div>\n" +
20973
20981
"<div class=\"row\" ng-controller=\"TasksController\">\n" +
20974
20982
"<div ng-if=\"!pendingTasks(tasks()).length && erroredTasks(tasks()).length\" class=\"col-md-12\">\n" +
@@ -23248,7 +23256,7 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
23248
23256
23249
23257
$templateCache.put('views/directives/osc-image-summary.html',
23250
23258
"<h1>{{ name || (resource | displayName) }}</h1>\n" +
23251
- "<div class=\"resource-description\" ng-bind-html=\"resource | description | linky : '_blank'\"></div>\n" +
23259
+ "<div class=\"resource-description\" ng-bind-html=\"resource | description | linkify : '_blank'\"></div>\n" +
23252
23260
"<div class=\"resource-metadata\">\n" +
23253
23261
"<div ng-show=\"resource | annotation:'provider'\">Provider: {{ resource | annotation:'provider' }}</div>\n" +
23254
23262
"<div ng-show=\"resource.metadata.namespace && resource.metadata.namespace !=='openshift'\">Namespace: {{ resource.metadata.namespace }}</div>\n" +
0 commit comments