Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/Home/GetBuilds/ ajax doesn't report failure on error #3

Open
leecooknz opened this issue Jul 12, 2016 · 2 comments
Open

/Home/GetBuilds/ ajax doesn't report failure on error #3

leecooknz opened this issue Jul 12, 2016 · 2 comments

Comments

@leecooknz
Copy link

I have BuildMonitor set up on myServer:81/buildMonitor/ and found that the automatic refresh didn't work.

The problem was that I needed to change home.js to use url '/buildMonitor/Home/GetBuilds/'; however it would have been nice if the ajax function had implemented some way of reporting back if the query fails, for example:

        error: function(XMLHttpRequest, textStatus, errorThrown) {
            $("#last-updated").text("Ajax error: " + textStatus + " Details: " + errorThrown); 
        } 
@balassy
Copy link

balassy commented Aug 16, 2016

I have just submitted PR #7, which supposed to solve this.

@leecooknz: If you need this feature before this PR is merged, you can use my fork of this repo, it already contains this feature.

@tapika
Copy link

tapika commented Apr 15, 2019

This remains a problem, and balassy fixes are done on top of older release and do not fix the issue, only add error reporting.

My brief analysis has shown that regression appeared because of upgrade to newest .NET Core 2.2, and it was not so interesting to me to downgrade or go back to previous working build, I've decided to hack this solution on my own.

I have added refresh timer to BuildMonitor\Pages\Index.cshtml:

<script type="text/javascript">
    setTimeout(function() {
      location.reload();
    }, 20000);
</script>

also removed from BuildMonitor\Pages\Shared_Layout.cshtml site.js line, and that file in overall - it was causing nasty flickering.

This however is quick and dirty approach - to make proper solution - need to analyze in depth how to perform update of Html.Partial parts, previously this was handled via $.ajax function call in site.js, but I did not want to go that deep for time being. If someone figures out proper / better solution, let me know.

Other forks also remains unpatched and old, so scanning 31 fork on 4.2019 did not gave any result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants