You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by wu...@apache.org on 2022/11/17 08:41:40 UTC
[ambari] branch trunk updated: AMBARI-25448: Mask credentials during install step (#3520)
This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new ef88386109 AMBARI-25448: Mask credentials during install step (#3520)
ef88386109 is described below
commit ef8838610991081b581d95f3712fdd85359cb2b3
Author: Zhiguo Wu <wu...@apache.org>
AuthorDate: Thu Nov 17 16:41:35 2022 +0800
AMBARI-25448: Mask credentials during install step (#3520)
---
ambari-web/app/templates/wizard/step8.hbs | 2 +-
ambari-web/app/views/wizard/step8_view.js | 27 ++++++++++++++++++++++++++-
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/ambari-web/app/templates/wizard/step8.hbs b/ambari-web/app/templates/wizard/step8.hbs
index 00a97fe364..37b16d9124 100644
--- a/ambari-web/app/templates/wizard/step8.hbs
+++ b/ambari-web/app/templates/wizard/step8.hbs
@@ -48,7 +48,7 @@
{{else}}
<div>
<ul>
- {{#each item in controller.clusterInfo.repoInfo}}
+ {{#each item in view.repoInfo}}
<li>
<p><span class="text text-info">{{item.os_type}} ({{item.repo_id}}): <br/></span>{{item.base_url}}</p>
</li>
diff --git a/ambari-web/app/views/wizard/step8_view.js b/ambari-web/app/views/wizard/step8_view.js
index 3176f46e6c..4c4733d9b4 100644
--- a/ambari-web/app/views/wizard/step8_view.js
+++ b/ambari-web/app/views/wizard/step8_view.js
@@ -34,6 +34,31 @@ App.WizardStep8View = Em.View.extend({
printReview: function () {
var o = $("#step8-info");
o.jqprint();
- }
+ },
+
+ repoInfo: function() {
+ var repoInfo = this.get('controller.clusterInfo.repoInfo');
+ if (!repoInfo) {
+ return [];
+ }
+ return repoInfo.map(function (item) {
+ var link = item.get('base_url');
+ try {
+ var urlObject = new URL(link);
+ if (urlObject.username && urlObject.password) {
+ urlObject.username = urlObject.username.replace(/./g, "*");
+ urlObject.password = urlObject.password.replace(/./g, "*");
+ link = urlObject.toString();
+ }
+ } catch (e) {
+ }
+
+ return {
+ os_type: item.get('os_type'),
+ repo_id: item.get('repo_id'),
+ base_url: link
+ };
+ });
+ }.property('controller.clusterInfo.repoInfo')
});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org