From 2723985073658f85fcadb955ed5fcfae608b1f9a Mon Sep 17 00:00:00 2001 From: Rick Elrod Date: Oct 18 2018 21:43:42 +0000 Subject: IoT site work: Fix links everywhere and how deliverables are presented on the page Signed-off-by: Rick Elrod --- diff --git a/iot.fedoraproject.org/build/iot_compose.py b/iot.fedoraproject.org/build/iot_compose.py index 468dbc9..4a6fcf3 100644 --- a/iot.fedoraproject.org/build/iot_compose.py +++ b/iot.fedoraproject.org/build/iot_compose.py @@ -9,29 +9,23 @@ except ImportError: print "Unable to import globalvar" sys.exit(1) -IOT_ARCHES = ['x86_64', 'aarch64'] VERSION = globalvar.release['curr_iot_id'] +BASEURL = 'https://dl.fedoraproject.org/pub/alt/iot/' + VERSION + '/' def iot_compose_links(): - compose = requests.get( - 'https://kojipkgs.fedoraproject.org/compose/iot/latest-Fedora-IoT-' + - VERSION + '/COMPOSE_ID').text + json = requests.get(BASEURL + '/metadata/images.json').json() - date = compose.split('-')[-1].split('.')[0] + date = json['payload']['compose']['date'] links = {} links['date'] = date[0:4] + '-' + date[4:6] + '-' + date[6:8] - links['arches'] = {} - - for arch in IOT_ARCHES: - if arch not in links['arches'].keys(): - links['arches'][arch] = {} - compose_iso = compose.replace( - 'Fedora-IoT', - 'Fedora-IoT-dvd-' + arch) - - links['date'] = date[0:4] + '-' + date[4:6] + '-' + date[6:8] - links['arches'][arch]['iso'] = 'https://kojipkgs.fedoraproject.org/compose/' +\ - 'iot/latest-Fedora-IoT-' + VERSION + '/compose/IoT/' +\ - arch + '/iso/' + compose_iso + '.iso' + links['type'] = {} + + for arch,lst in json['payload']['images']['IoT'].iteritems(): + for img in lst: + if img['type'] not in links['type'].keys(): + links['type'][img['type']] = {} + + links['type'][img['type']][img['arch']] = BASEURL + img['path'] + return links diff --git a/iot.fedoraproject.org/data/content/index.html b/iot.fedoraproject.org/data/content/index.html index bdbe7b4..2365ad9 100644 --- a/iot.fedoraproject.org/data/content/index.html +++ b/iot.fedoraproject.org/data/content/index.html @@ -27,7 +27,7 @@

${Markup(_('What is Fedora Internet of Things Edition?'))}

-

${_('Fedora Internet of Things is an edition of Fedora that...')}

+

${_('Fedora Internet of Things is a variant of Fedora focused on IoT ecosystems. Whether you\'re working on a home assistant, industrial gateways, or data storage and analytics, Fedora IoT provides a trusted open source platform to build on. Fedora IoT produces a monthly rolling release to help you keep your ecosystem up-to-date.')}

@@ -45,24 +45,40 @@

${_('Download the latest version of Fedora IoT Edition for your architecture here.')}

-
+ +

${_('Raw Images')}

+ + +

${_('Installer ISOs')}

+
+
+ +
+
+

${k1}

+
+ +
+ Latest release: ${iot_links['date']}
- +
@@ -76,21 +92,35 @@
-
+ +

${_('Raw Images')}

+
+
+ +
+ +
+ +

${_('Installer ISOs')}

+
- + Latest release: ${iot_links['date']}
- +
@@ -99,22 +129,38 @@
-
+

${_('Download the latest version of Fedora IoT Edition for your architecture here.')}

-
+ +

${_('Raw Images')}

+
+
+ +
+
+

${k1}

+
+ +
+ +

${_('Installer ISOs')}

+ + Latest release: ${iot_links['date']}