Skip to content

Commit

Permalink
Merge pull request #27 from Sae126V/master
Browse files Browse the repository at this point in the history
Update code to reflect the el8 and el9 rpms
  • Loading branch information
tofu-rocketry authored Aug 7, 2024
2 parents 516de22 + e42af99 commit 546c6df
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 53 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
language: ruby
rvm: 2.7.4
rvm: 3.3.3
# Pinned rvm to `3.3.3` version because the current stable
# version 3.3.4 isn't available in 'travis-ci-language-archive' yet

cache: bundler

Expand Down
82 changes: 47 additions & 35 deletions _layouts/downloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,42 @@
<div class="col-md-6">
<h1 class="apel-version">APEL</h1>

<h3>SL6</h3>

<a id="sl6-src-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Source RPM</a>
<a id="sl6-client-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Client</a>
<a id="sl6-server-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Server</a>
<a id="sl6-lib-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Lib</a>
<a id="sl6-parsers-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Parsers</a>

<h3>SL7</h3>

<a id="sl7-src-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Source RPM</a>
<a id="sl7-client-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Client</a>
<a id="sl7-server-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Server</a>
<a id="sl7-lib-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Lib</a>
<a id="sl7-parsers-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Parsers</a>

<!-- AEPL - EL8 - Python3.6 -->
<h3>EL8</h3>
<a id="el8-client-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Client</a>
<a id="el8-server-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Server</a>
<a id="el8-lib-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Lib</a>
<a id="el8-parsers-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Parsers</a>

<!-- AEPL - EL9 - Python3.9 -->
<h3>EL9</h3>
<a id="el9-client-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Client</a>
<a id="el9-server-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Server</a>
<a id="el9-lib-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Lib</a>
<a id="el9-parsers-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Parsers</a>
</div>

<div class="col-md-6 col-md-push-1">
<h1 class="apelssm-version">APEL SSM</h1>

<h3>SL6</h3>

<a id="ssm-sl6-src-download" class="btn btn-theme" href="https://github.com/apel/ssm/releases/latest">Source RPM</a>
<a id="ssm-sl6-client-download" class="btn btn-theme" href="https://github.com/apel/ssm/releases/latest">Client</a>

<h3>SL7</h3>

<a id="ssm-sl7-src-download" class="btn btn-theme" href="https://github.com/apel/ssm/releases/latest">Source RPM</a>
<a id="ssm-sl7-client-download" class="btn btn-theme" href="https://github.com/apel/ssm/releases/latest">Client</a>
<a id="ssm-sl7-client-download" class="btn btn-theme" href="https://github.com/apel/ssm/releases/latest">Client</a>

<!-- SSM - EL8 - Python3.6 -->
<h3>EL8</h3>
<a id="ssm-el8-client-download" class="btn btn-theme" href="https://github.com/apel/ssm/releases/latest">Client</a>

<!-- SSM - EL9 - Python3.9 -->
<h3>EL9</h3>
<a id="ssm-el9-client-download" class="btn btn-theme" href="https://github.com/apel/ssm/releases/latest">Client</a>
</div>

</section>
Expand All @@ -70,24 +77,28 @@ <h3>SL7</h3>

var rpms = [];

for (var x = 0; x < 10; x++) {
for (var x = 0; x < 15; x++) {
var data = json[objCount].assets[x].name;
rpms.push(json[objCount].assets[x]);
}

//SL6 Elements
document.getElementById("sl6-src-download").href = rpms[0].browser_download_url;
document.getElementById("sl6-client-download").href = rpms[2].browser_download_url;
document.getElementById("sl6-lib-download").href = rpms[4].browser_download_url;
document.getElementById("sl6-parsers-download").href = rpms[6].browser_download_url;
document.getElementById("sl6-server-download").href = rpms[8].browser_download_url;

//SL7 Elements
document.getElementById("sl7-src-download").href = rpms[1].browser_download_url;
document.getElementById("sl7-client-download").href = rpms[3].browser_download_url;
document.getElementById("sl7-lib-download").href = rpms[5].browser_download_url;
document.getElementById("sl7-parsers-download").href = rpms[7].browser_download_url;
// SL7 Elements
document.getElementById("sl7-client-download").href = rpms[0].browser_download_url;
document.getElementById("sl7-lib-download").href = rpms[3].browser_download_url;
document.getElementById("sl7-parsers-download").href = rpms[6].browser_download_url;
document.getElementById("sl7-server-download").href = rpms[9].browser_download_url;

// EL8 Elements
document.getElementById("el8-client-download").href = rpms[1].browser_download_url;
document.getElementById("el8-lib-download").href = rpms[4].browser_download_url;
document.getElementById("el8-parsers-download").href = rpms[7].browser_download_url;
document.getElementById("el8-server-download").href = rpms[10].browser_download_url;

// EL9 Elements
document.getElementById("el9-client-download").href = rpms[2].browser_download_url;
document.getElementById("el9-lib-download").href = rpms[5].browser_download_url;
document.getElementById("el9-parsers-download").href = rpms[8].browser_download_url;
document.getElementById("el9-server-download").href = rpms[11].browser_download_url;

//Set HREFs to relevant urls
$(".apel-version").text("APEL version " + json[objCount].tag_name);
Expand Down Expand Up @@ -168,14 +179,15 @@ <h3>SL7</h3>
rpms.push(json[objCount].assets[x]);
}

//SL6 Elements
document.getElementById("ssm-sl6-src-download").href = rpms[1].browser_download_url;
document.getElementById("ssm-sl6-client-download").href = rpms[0].browser_download_url;
// SL7 Elements
document.getElementById("ssm-sl7-client-download").href = rpms[0].browser_download_url;

//SL7 Elements
document.getElementById("ssm-sl7-src-download").href = rpms[3].browser_download_url;
document.getElementById("ssm-sl7-client-download").href = rpms[2].browser_download_url;
// EL8 Elements
document.getElementById("ssm-el8-client-download").href = rpms[1].browser_download_url;

// EL9 Elements
document.getElementById("ssm-el9-client-download").href = rpms[2].browser_download_url;

//Set HREFs to relevant urls
$(".apelssm-version").text("SSM version " + json[objCount].tag_name);

Expand Down
5 changes: 3 additions & 2 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<div class="row centered">
<div class="col-md-6 col-md-push-3">
<h1> Download APEL </h1>
<a id ="sl6-download" class="btn btn-theme" href="/downloads/latest/SL6/">Download <strong>SL6 RPM</strong></a>
<a id ="sl7-download" class="btn btn-theme" href="/downloads/latest/SL7/">Download <strong>SL7 RPM</strong></a>
<a id ="el7-download" class="btn btn-theme" href="/downloads/latest/SL7/">Download <strong>SL7 RPM</strong></a>
<a id ="el8-download" class="btn btn-theme" href="/downloads/latest/EL8/">Download <strong>EL8 RPM</strong></a>
<a id ="el9-download" class="btn btn-theme" href="/downloads/latest/EL9/">Download <strong>EL9 RPM</strong></a>
<a class="btn btn-theme" href="{{ page.project-url }}">View On <strong>GitHub</strong></a>
</div>
</div>
Expand Down
25 changes: 12 additions & 13 deletions _layouts/latest.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@

<h2 class="version"></h2>

<div hidden id="sl-type">{{page.type}}</div>
<div hidden id="el-type">{{page.type}}</div>

<a id="apel-src-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Source RPM</a>
<a id="apel-client-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Client</a>
<a id="apel-server-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Server</a>
<a id="apel-lib-download" class="btn btn-theme" href="https://github.com/apel/apel/releases/latest">Lib</a>
Expand All @@ -35,12 +34,13 @@ <h2 class="version"></h2>
// Successful JSON request
.success(function (json) {

var type = document.getElementById("sl-type").textContent;
var type = document.getElementById("el-type").textContent;

if (type == "SL6") {
type = "el6";
}
else {
if (type == "El9") {
type = "el9";
} else if (type == "El8") {
type = "el8";
} else {
type = "el7";
}

Expand All @@ -54,19 +54,18 @@ <h2 class="version"></h2>

var rpms = [];

for (var x = 0; x < 10; x++) {
for (var x = 0; x < 15; x++) {
var data = json[objCount].assets[x].name;

if (data.indexOf(type) >= 0) {
rpms.push(json[objCount].assets[x]);
}
}

document.getElementById("apel-src-download").href= rpms[0].browser_download_url;
document.getElementById("apel-client-download").href= rpms[1].browser_download_url;
document.getElementById("apel-lib-download").href= rpms[2].browser_download_url;
document.getElementById("apel-parsers-download").href= rpms[3].browser_download_url;
document.getElementById("apel-server-download").href= rpms[4].browser_download_url;
document.getElementById("apel-client-download").href= rpms[0].browser_download_url;
document.getElementById("apel-lib-download").href= rpms[1].browser_download_url;
document.getElementById("apel-parsers-download").href= rpms[2].browser_download_url;
document.getElementById("apel-server-download").href= rpms[3].browser_download_url;

//Set HREFs to relevant urls
$(".version").text("APEL version: " + json[objCount].tag_name);
Expand Down
5 changes: 5 additions & 0 deletions downloads/latest/EL8/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: latest
title: Latest EL8 APEL Packages
type: EL8
---
5 changes: 5 additions & 0 deletions downloads/latest/EL9/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: latest
title: Latest EL9 APEL Packages
type: EL9
---
4 changes: 2 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Statistics are available for view in different detail by Users, VO Managers, Sit
[![GitHub issues](https://img.shields.io/github/issues-raw/apel/apel.svg)](https://github.com/apel/apel/issues)

[![codecov](https://codecov.io/gh/apel/apel/branch/dev/graph/badge.svg?token=YetTFdOZo0)](https://codecov.io/gh/apel/apel)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/a8cdc36c46b241e6a77428fbfb6f23bd)](https://www.codacy.com/gh/apel/apel/dashboard)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/a8cdc36c46b241e6a77428fbfb6f23bd)](https://app.codacy.com/gh/apel/apel/dashboard)
[![Maintainability](https://api.codeclimate.com/v1/badges/03094b74f5fc4f728bc7/maintainability)](https://codeclimate.com/github/apel/apel/maintainability)

### SSM
Expand All @@ -32,5 +32,5 @@ Statistics are available for view in different detail by Users, VO Managers, Sit
[![GitHub issues](https://img.shields.io/github/issues-raw/apel/ssm.svg)](https://github.com/apel/ssm/issues)

[![codecov](https://codecov.io/gh/apel/ssm/branch/dev/graph/badge.svg?token=ySjD8zgHKP)](https://codecov.io/gh/apel/ssm)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9d2b1c88ab844f0081e5fafab49b269d)](https://www.codacy.com/gh/apel/ssm/dashboard)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9d2b1c88ab844f0081e5fafab49b269d)](https://app.codacy.com/gh/apel/ssm/dashboard)
[![Maintainability](https://api.codeclimate.com/v1/badges/34aa04f3583afce2ceb2/maintainability)](https://codeclimate.com/github/apel/ssm/maintainability)

0 comments on commit 546c6df

Please sign in to comment.