Skip to content

Instantly share code, notes, and snippets.

@cedricwalter

cedricwalter/gist:6021647

Last active Dec 10, 2017
Embed
What would you like to do?
Optimized Radiator for Teamcity 8 and up All credits to http://saveandexit.com/diy-build-radiator-for-teamcity/
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("td.buildConfigurationName IMG[src *= 'success.png']")
.parents("table")
.addClass("buildSuccess");
$("td.buildConfigurationName IMG[src *= 'error.png']")
.parents("table")
.addClass("buildFailure");
$("td.buildConfigurationName IMG[src *= 'buildGray.png']")
.parents("table")
.addClass("buildUnknown");
$("DIV.teamCityDateTime").each(
function(index) {
var spanStr = $(this).find("SPAN.date").attr("title");
$(this).replaceWith("<span class='buildDate'>Last built: " + spanStr + "</span>");
}
);
});
</script>
<!-- <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="general.css"> -->
<style type="text/css">
body {
background-color: #000;
font-family: Tahoma;
color: #FFF;
}
a {
text-decoration: none;
color: #FFF;
}
hr {
color: #FFF;
width: 100%;;
}
table.tcTable {
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
-khtml-border-radius: 20px;
border-radius: 20px;
border: 4px solid #1c4c16;
padding: 8px;
margin: 15px;
float: left;
width: 31%;
}
#content {
width: 90%;
margin-left: auto;
margin-right: auto;
}
div.projectName a.buildTypeName {
text-shadow: 1px 1px 2px #000;
font-weight: bold;
font-size: 1.5em;
text-transform: uppercase;
}
td.buildConfigurationName a.buildTypeName,
.buildDate {
font-weight: normal;
font-size: 0.9em;
color: #bbb;
}
td.buildConfigurationName img,
td.buildResults,
div.teamCityBuildNumber {
display:none;
}
.buildSuccess {background: #407A39;}
.buildFailure {background: #AF0E01;}
.buildUnknown {background: #747474;}
</style>
<title></title>
</head>
<body>
<script type="text/javascript" src="http://xxxxx:8111/externalStatus.html?js=1"></script>
</body>
</html>
@iosdevben

This comment has been minimized.

Copy link

@iosdevben iosdevben commented Mar 8, 2017

The build status detection doesn't work with TeamCity 10.0.4, and text shadow is so 2015. Here's an updated version:

<!DOCTYPE html>
<html>
    <head>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {

                $(".build-status-icon_successful")
                        .parents("table")
                        .addClass("buildSuccess");

                $(".build-status-icon_failed")
                        .parents("table")
                        .addClass("buildFailure");

                $(".build-status-icon_unknown")
                        .parents("table")
                        .addClass("buildUnknown");

                $("DIV.teamCityDateTime").each(
                        function(index) {
                            var spanStr = $(this).find("SPAN.date").attr("title");
                            $(this).replaceWith("<span class='buildDate'>Last built: " + spanStr + "</span>");
                        }
                );
            });
        </script>

           <!-- <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
            <link rel="stylesheet" type="text/css" href="general.css"> -->

        <style type="text/css">
            body {
                background-color: #000;
                font-family: Tahoma;
                color: #FFF;
            }

            a {
                text-decoration: none;
                color: #FFF;
            }

            hr {
                color: #FFF;
                width: 100%;
            }

            table.tcTable {
                -moz-border-radius: 12px;
                -webkit-border-radius: 12px;
                -khtml-border-radius: 12px;
                border-radius: 12px;
                border: 0px solid #1c4c16;
                padding: 8px 12px;
                margin: 1%;
                float: left;
            }

            #content {
                width: 90%;
                margin-left: auto;
                margin-right: auto;
            }

            div.projectName a.buildTypeName {
                font-weight: bold;
                font-size: 1.5em;
                text-transform: uppercase;
            }

            td.buildConfigurationName a.buildTypeName,
            .buildDate {
                font-weight: normal;
                font-size: 0.9em;
                color: #bbb;
            }

            td.buildConfigurationName img,
            td.buildResults,
            div.teamCityBuildNumber {
                display: none;
            }

            .buildSuccess { background: #407A39; }
            .buildFailure { background: #AF0E01; }
            .buildUnknown { background: #747474; }
        </style>
        <title></title>
    </head>
    <body>
        <script type="text/javascript" src="http://localhost:8111/externalStatus.html?js=1"></script>
    </body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.