From f1ee68d0fabebc46573b009b628cfeb15559951d Mon Sep 17 00:00:00 2001 From: Robert Fairley Date: Nov 08 2019 02:13:11 +0000 Subject: coreos: link AMI IDs to AWS console launch page Link AMI IDs to AWS console launch page on the coreos download page, making it easier for users to start an AWS instance of FCOS. Signed-off-by: Robert Fairley --- diff --git a/sites/static/js/coreos-download.js b/sites/static/js/coreos-download.js index 1ddd834..a2172de 100644 --- a/sites/static/js/coreos-download.js +++ b/sites/static/js/coreos-download.js @@ -250,7 +250,8 @@ var coreos_download_app = new Vue({ h('span', { "class":"font-weight-bold" }, this.streamData.stream), " (", h('span', {}, [ - h('a', { attrs: { href: this.getObjectUrl(this.streamData.stream + '.json') } }, "JSON")]), + h('a', { attrs: { href: this.getObjectUrl(this.streamData.stream + '.json') } }, "JSON") + ]), ")", "—", h('span', {}, this.timeSince(this.streamData.metadata['last-modified'])) @@ -283,9 +284,15 @@ var coreos_download_app = new Vue({ amiInfo.release ? h('div', { class: "ml-2" }, [ h('span', {}, [ amiInfo.release, " " ]), h('span', { class: "text-secondary" }, coreos_download_app.streamData.stream) - ]) : null, - amiInfo.image ? h('div', { class: "ml-2" }, amiInfo.image) : null - ]); + ]) : null, + amiInfo.image ? h('div', { class: "ml-2" }, [ + h('a', { + attrs: { + href: "https://console.aws.amazon.com/ec2/home?region=" + amiInfo.region + "#launchAmi=" + amiInfo.image + } + }, amiInfo.image) + ]) : null + ]) })); } } @@ -352,7 +359,7 @@ var coreos_download_app = new Vue({ displayInfo.release ? h('div', { class: "ml-2" }, [ h('span', {}, [ displayInfo.release, " " ]), h('span', { class: "text-secondary" }, coreos_download_app.streamData.stream) - ]) : null, + ]) : null, displayInfo.downloads ? h('div', { class: "ml-2" }, [ createDownloadsSubSection(displayInfo.downloads.disk, 'disk', false, imageType), createDownloadsSubSection(displayInfo.downloads.kernel, 'kernel', true, imageType),