Skip to content

Commit

Permalink
update status page to fetch helmi status
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKharleeci committed Mar 11, 2024
1 parent c6f3478 commit 586c446
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
15 changes: 15 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@
</div>

{% include scripts.html %}
<script>
async function getHelmiStatus() {
let obj
const response = await fetch("https://fiqci-backend-fiqci-workspace.rahtiapp.fi/healthcheck")
console.log(response)
const result = await response.json();
if (result && result.data !== null) {
const {data: { status }} = result
document.getElementById("helmi_status").innerHTML= status ? "🟢" : "🔴"
} else{
document.getElementById("helmi_status").innerHTML="🔴"
}
}
getHelmiStatus()
</script>

</body>
</html>
4 changes: 2 additions & 2 deletions _pages/landing-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ intro:
- excerpt: 'Making the power of quantum computing accessible'

feature_row:
- image_path: /assets/images/access-icon.png
- image_path: /assets/images/access-only-icon.jpg
title: "How to get access"
excerpt: "Access to FiQCI is granted through the CSC supercomputing environment"
url: "/access"
btn_class: "btn--primary"
btn_label: "Learn more"
- image_path: /assets/images/posts-icon.jpg
- image_path: /assets/images/books-icon.jpg
title: "Posts and publications"
excerpt: "Blog posts, publications, and other material of interest"
url: "/publications"
Expand Down
2 changes: 1 addition & 1 deletion _pages/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Helmi is accessible through the LUMI environment daily between 00:00 EET and 23:
<tbody>
<tr>
<td class="tg-tbqi">LUMI-Helmi</td>
<td class="tg-49rs">🟢</td>
<td class="tg-49rs" id="helmi_status"></td>
</tr>
</tbody>
</table>
Expand Down
Binary file added assets/images/access-only-icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/books-icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"uglify": "uglifyjs assets/js/vendor/jquery/jquery-3.5.1.js assets/js/plugins/jquery.fitvids.js assets/js/plugins/jquery.greedy-navigation.js assets/js/plugins/jquery.magnific-popup.js assets/js/plugins/jquery.ba-throttle-debounce.js assets/js/plugins/smooth-scroll.js assets/js/plugins/gumshoe.js assets/js/_main.js -c -m -o assets/js/main.min.js",
"add-banner": "node banner.js",
"watch:js": "onchange \"assets/js/**/*.js\" -e \"assets/js/main.min.js\" -- npm run build:js",
"build:js": "npm run uglify && npm run add-banner"
"update-dev": "bundle update && bundle exec jekyll serve --watch --incremental --config _config.yml",
"dev": "bundle exec jekyll serve --watch --incremental --config _config.yml"

}
}

0 comments on commit 586c446

Please sign in to comment.