staticuiextension changed behavior.

We have been using the staticuiextenstion plugin to convert convert url's to links in the Team City log.

For example, if this is "url(http://www.autoscout24.de)" logged it will be transformed to <a href="http://www.autoscout24.de">http://www.autoscout24.de</a> in the Team City log. This way it's possible can click the link in the Team City log and go right to the url.

Since the upgrade to 9.0.3 this is no longer working.

I have checked the version of the plugin and it is the latest.


"static-ui-extensions.xml"
<rule html-file="show-link.html" place-id="BEFORE_CONTENT">
    <url starts="viewLog.html" />
</rule>


"show-link.html"
<script>
  (function ($) {
    var regex = /url\((.*)\)/g

    function createLinksFromUrls() {
      $("div .fullStacktrace, div .msg").each(function () {
        var div = $(this);
        var oldHtml = div.html();
        var newHtml = oldHtml.replace(regex, "<a href='$1' target='_blank'>$1</a>");
        if (oldHtml !== newHtml) div.html(newHtml);
      });
    }

    $(document).ready(createLinksFromUrls);
    $(document).click(function () {
        window.setTimeout(createLinksFromUrls, 50);
        window.setTimeout(createLinksFromUrls, 100);
        window.setTimeout(createLinksFromUrls, 500);
    });
})(window.jQuery);
</script>

2 comments
Comment actions Permalink

Hi Ron,

Please try to replace <url starts="viewLog.html" /> with <url contains="viewLog.html" />. I checked and it work for me with your "show-link.html".
We have the related issue https://youtrack.jetbrains.com/issue/TW-37820, please vote. From which version did you upgrade to 9.0.3?

0
Comment actions Permalink

Great, the links are working as before.
We upgraded from the last version 8 to 9.0.3EAP and then to 9.0.3. 9.0.2 did not work for us.

0

Please sign in to leave a comment.