Commit 514593e2 authored by kpcyrd's avatar kpcyrd
Browse files

Show separate loading indicator for package list

parent f4aa34c3
Pipeline #9672 passed with stage
in 45 seconds
......@@ -57,9 +57,7 @@ class App extends React.Component {
});
}
componentDidMount() {
this.loadDashboard()
loadPkgs() {
const url = '/api/v0/pkgs/list';
fetch(url).then((response) => {
......@@ -93,6 +91,11 @@ class App extends React.Component {
this.setState({fetchFailed: true});
});
}
componentDidMount() {
this.loadDashboard()
this.loadPkgs()
}
}
module.exports = {App};
......
......@@ -11,6 +11,11 @@ class Body extends React.Component {
return (
<React.Fragment>
{!fetchFailed && !suites.length &&
<section className="section">
<p><b>Loading packages...</b></p>
</section>
}
{ fetchFailed &&
<section className="section">
<div className="tile box has-background-danger">
......
......@@ -59,7 +59,7 @@ class Header extends React.Component {
<br/>
<ul className="repo-summary">
{!fetchFailed && !dashboard &&
<p><b>Loading...</b></p>
<p><b>Loading stats...</b></p>
}
{!fetchFailed && dashboard &&
<li key="overall">Arch Linux is <span className="has-text-weight-bold">{ overallStats.percentage }%</span> reproducible with <span className="bad has-text-weight-bold">{ overallStats.bad } bad</span> <span className="unknown has-text-weight-bold">{ overallStats.unknown } unknown</span> and <span className="good has-text-weight-bold">{ overallStats.good } good</span> packages.</li>
......
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