Commit 46347409 authored by Leo P. Singer's avatar Leo P. Singer
Browse files

Add loading spinner to vega visualization

parent 471e681a
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="" integrity="sha256-azvvU9xKluwHFJ0Cpgtf0CYzK7zgtOznnzxV4924X1w=" crossorigin="anonymous">
<title>GWCelery task times</title>
<div id="vis"></div>
<div id="vis">
<div class="m-5">
<div class="spinner-border" role="status"></div>
Loading your visualization.
<script src="" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="" integrity="sha256-63ld7aiYP6UxBifJWEzz87ldJyVnETUABZAYs5Qcsmc=" crossorigin="anonymous"></script>
<script src="" integrity="sha256-PQIT4+snOH5mk7iwAQGYticYRaX7bB29LquVUQ0dfnY=" crossorigin="anonymous"></script>
<script src="" integrity="sha256-ro+FWr16NboXJ5rSwInNli1P16ObUXnWUJMgKc8KnHI=" crossorigin="anonymous"></script>
<script src="" integrity="sha256-UbNbFcw0lpFXNoOZFgV/0jmJyVuSdnXgzzNfePpjNYA=" crossorigin="anonymous"></script>
<script type="text/javascript">
let url = '/flower/api/tasks';
(async() => {
const resp = await fetch('/flower/api/tasks');
const resp = await fetch(url);
if (!resp.ok)
let abs_url = new URL(url, document.baseURI);
<div class="m-5 alert alert-danger" role=alert>
Failed to load JSON data. Try first visiting
<a href="${url}">${abs_url}</a>
to make sure that you have signed in with credentials.
const json = await resp.json();
const data = Object.values(json);
const spec = {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment