Skip to content

Commit 68101d2

Browse files
Merge pull request #1513 from OctopusDeploy/sf/revert-performance-change
Revert performance changes as it break API consumers
2 parents 22b2139 + 194003b commit 68101d2

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ node_modules/
22
dist/
33
build/
44
app/services/*.json
5+
integrations/
56
.idea/
67

78
junitresults.xml

app/components/TemplateItem.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default class TemplateItem extends React.Component {
6969
<div className="step-template">
7070
<div className="row clearfix">
7171
<div className="column two-thirds">
72-
<img className="logo" loading="lazy" src={this.state.template.Logo} />
72+
<img className="logo" src={"data:image/gif;base64," + this.state.template.Logo} />
7373
<h2 className="name">{this.state.template.Name}</h2>
7474
<p className="who-when faint no-top-margin">
7575
<i>{this.state.template.ActionType}</i> exported {moment(this.state.template.ExportedAt).calendar()} by

app/components/TemplateList.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class TemplateList extends React.Component {
2727
let friendlySlug = SlugMaker.make(item.Name);
2828
return (
2929
<li className={"item-summary " + (item.ScriptClass || "")} key={index + "." + item.Name}>
30-
<img loading="lazy" src={item.Logo} />
30+
<img src={"data:image/gif;base64," + item.Logo} />
3131
<h4 key={index + "." + item.Name + ".0"}>
3232
<Link to={`/step-templates/${item.Id}/${friendlySlug}`}>{item.Name}</Link>
3333
</h4>

gulpfile.babel.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,10 @@ function provideMissingData() {
300300

301301
template.Category = humanize(categoryId);
302302

303-
// Note: this deprecates base64 encoded images in the template files - they will be ignored
304-
template.Logo = "https://i.octopus.com/library/step-templates/" + categoryId + ".png";
303+
if (!template.Logo) {
304+
var logo = fs.readFileSync("./step-templates/logos/" + categoryId + ".png");
305+
template.Logo = Buffer.from(logo).toString("base64");
306+
}
305307

306308
file.contents = Buffer.from(JSON.stringify(template));
307309

0 commit comments

Comments
 (0)