Skip to content

Commit

Permalink
update troubleshoot to fix custom resources redaction (#2290)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Nov 2, 2021
1 parent 68c2d3b commit cba1cd8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -61,7 +61,7 @@ require (
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
github.com/rancher/wrangler v0.8.3
github.com/replicatedhq/kurl v0.0.0-20210414162418-8d6211901244
github.com/replicatedhq/troubleshoot v0.22.0
github.com/replicatedhq/troubleshoot v0.22.1
github.com/replicatedhq/yaml/v3 v3.0.0-beta5-replicatedhq
github.com/robfig/cron v1.2.0
github.com/robfig/cron/v3 v3.0.1
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Expand Up @@ -1632,8 +1632,16 @@ github.com/replicatedhq/kurl v0.0.0-20210414162418-8d6211901244 h1:aSORttMXeqRXg
github.com/replicatedhq/kurl v0.0.0-20210414162418-8d6211901244/go.mod h1:SoROyLOtkt95R1COPVzdCi5FZbMmATPHohQQzW9V9ds=
github.com/replicatedhq/termui/v3 v3.1.1-0.20200811145416-f40076d26851/go.mod h1:JDxG6+uubnk9/BZ2yUsyAJJwlptjrnmB2MPF5d2Xe/8=
github.com/replicatedhq/troubleshoot v0.10.18/go.mod h1:8oFRnMJlFjzJ490eq72iLEN7DGJjkgLx22Z1vX6WwU0=
github.com/replicatedhq/troubleshoot v0.19.1-0.20211102182300-230459ab530a h1:NQmiA7UfSpSveg4m/ndCFUe1E7gNb256DWcLXKbrWvo=
github.com/replicatedhq/troubleshoot v0.19.1-0.20211102182300-230459ab530a/go.mod h1:aWhykK6xiTpfbLMjPpqnonih34avLwEag52Y9CYzb/Y=
github.com/replicatedhq/troubleshoot v0.19.1-0.20211102185020-88deff468cca h1:J6iwyuqPueSe+daSaG24HznTQoHxTMzBpL9+i3obKoo=
github.com/replicatedhq/troubleshoot v0.19.1-0.20211102185020-88deff468cca/go.mod h1:aWhykK6xiTpfbLMjPpqnonih34avLwEag52Y9CYzb/Y=
github.com/replicatedhq/troubleshoot v0.19.1-0.20211102190931-797a49edbc14 h1:9GLVlZBq3rb2HCtK/wGKn2GfFM10YtN402XaOFfNmHg=
github.com/replicatedhq/troubleshoot v0.19.1-0.20211102190931-797a49edbc14/go.mod h1:aWhykK6xiTpfbLMjPpqnonih34avLwEag52Y9CYzb/Y=
github.com/replicatedhq/troubleshoot v0.22.0 h1:eve5I1dYZJWZs31bS07mE/UY/iL5ukRgEyPWPd3aV9M=
github.com/replicatedhq/troubleshoot v0.22.0/go.mod h1:aWhykK6xiTpfbLMjPpqnonih34avLwEag52Y9CYzb/Y=
github.com/replicatedhq/troubleshoot v0.22.1 h1:WjrJ4Mkj0h/0wBlBJrrl2EIGls9EseVC0b0LBOY9OxI=
github.com/replicatedhq/troubleshoot v0.22.1/go.mod h1:aWhykK6xiTpfbLMjPpqnonih34avLwEag52Y9CYzb/Y=
github.com/replicatedhq/yaml/v3 v3.0.0-beta5-replicatedhq h1:PwPggruelq2336c1Ayg5STFqgbn/QB1tWLQwrVlU7ZQ=
github.com/replicatedhq/yaml/v3 v3.0.0-beta5-replicatedhq/go.mod h1:Txa7LopbYCU8aRgmNe0n+y/EPMz50NbCPcVVJBquwag=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
Expand Down
11 changes: 8 additions & 3 deletions web/src/components/troubleshoot/AnalyzerFileTree.jsx
Expand Up @@ -45,10 +45,15 @@ class AnalyzerFileTree extends React.Component {

buildFileContent = (data) => {
const nextFiles = this.state.fileContents;
const key = Object.keys(data);
const keys = Object.keys(data);

if (!keys.length) {
return;
}

let newObj = {};
newObj.content = new Buffer(data[key], "base64").toString();
newObj.key = key[0];
newObj.content = new Buffer(data[keys[0]], "base64").toString();
newObj.key = keys[0];
nextFiles.push(newObj);

this.setState({ fileContents: nextFiles });
Expand Down

0 comments on commit cba1cd8

Please sign in to comment.