diff --git a/release_dashboard/static/release_dashboard/js/hotfix.js b/release_dashboard/static/release_dashboard/js/hotfix.js index b7e7620..dfce7cd 100644 --- a/release_dashboard/static/release_dashboard/js/hotfix.js +++ b/release_dashboard/static/release_dashboard/js/hotfix.js @@ -11,6 +11,7 @@ $( "button.hotfix" ).click( function( e ) { var branch = $( "select#version_" + id + " option:selected" ).val().replace( "branch/", "" ); var repo = id; var span = $( "span#hotfix_error_" + id ); + var links = $( "#links_" + id ); var push = $( "select#push_" + id + " option:selected" ).val(); var empty = $( "input#empty_" + id ).prop( "checked" ); @@ -29,10 +30,13 @@ $( "button.hotfix" ).click( function( e ) { button.attr( "disabled", "disabled" ); span.html( "processing" ); span.show(); + links.addClass( "hidden" ); function successFunc( data, _status ) { span.html( "" ); - span.append( "Done" ); + $( "#link_done_" + id ).attr( "href", data.urls[ 0 ] ); + $( "#link_latest_" + id ).attr( "href", data.urls[ 1 ] ); + links.removeClass( "hidden" ); button.removeAttr( "disabled" ); } @@ -47,6 +51,7 @@ $( "td.version > select" ).change( function() { var version = $( this ).val(); var button = $( "button#hotfix_" + id ); var span = $( "span#hotfix_error_" + id ); + var links = $( "#links_" + id ); if ( version.match( /^branch\/mr[0-9]+\.[0-9]+\.[0-9]+$/ ) ) { button.html( "Release hotfix" ); @@ -56,6 +61,7 @@ $( "td.version > select" ).change( function() { button.attr( "disabled", "disabled" ); } span.html( "" ); + links.addClass( "hidden" ); } ); $( document ).ready( function() { diff --git a/release_dashboard/templates/release_dashboard/hotfix.html b/release_dashboard/templates/release_dashboard/hotfix.html index d799a2d..859b716 100644 --- a/release_dashboard/templates/release_dashboard/hotfix.html +++ b/release_dashboard/templates/release_dashboard/hotfix.html @@ -48,6 +48,14 @@