#4642 Include the package's update information in their info page
Merged 4 years ago by pingou. Opened 4 years ago by pingou.

@@ -468,6 +468,11 @@ 

    text-align:right;

  }

  

+ .text-align-left {

+   text-align:left;

+ }

+ 

+ 

  .center {

      text-align:center;

  }

@@ -370,6 +370,14 @@ 

              </div>

              {% endif %}

  

+             {% if repo.namespace == 'rpms' %}

+             <div class="row">

+               <div class="col" id="bodhi_updates">

+                 <i class="fa fa-circle-o-notch fa-spin fa-1x fa-fw"></i>

+               </div>

+             </div>

+             {% endif %}

+ 

              {% if g.authenticated and g.repo_committer and not repo.is_fork

                and not repo.settings.get('pull_requests', True) and not readme %}

              <div class="row">
@@ -497,6 +505,20 @@ 

          }

        }

      });

+ 

+ 

+     $.ajax({

+       url: "{{ url_for('distgit_ns.bodhi_updates_endpoint', repo=repo.name, namespace=repo.namespace, html=1) }}",

+       type: 'GET',

+       dataType: 'html',

+       success: function(res) {

+         $("#bodhi_updates").html(res);

+       },

+       error: function(res) {

+         console.log(res);

+         $("#bodhi_updates").html("<p>Failed to retrieve updates from bodhi</p>");

+       }

+     });

    {% endif %}

  

  });

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

And this is how it looks:

pagure_bodhi_updates.png

It is quite slow to show up as there is no caching might be faster in prod where the networking effect on the backend should be lower.

:thumbsup:

And this is not tested =)

pretty please pagure-ci rebuild

4 years ago

Thanks for the reviews!

Pull-Request has been merged by pingou

4 years ago