diff --git a/static/css/directives/ui/build-logs-view.css b/static/css/directives/ui/build-logs-view.css index 368caa772..dca63e410 100644 --- a/static/css/directives/ui/build-logs-view.css +++ b/static/css/directives/ui/build-logs-view.css @@ -4,7 +4,13 @@ padding: 10px; overflow: auto; box-shadow: inset 10px 10px 5px -9px rgba(0,0,0,0.75); - background: linear-gradient(30deg, #263945, #061C2A) no-repeat left top fixed; + background-color: #263945; + + min-height: 100px; +} + +.build-logs-view .no-logs { + color: #8C8C8C; } .build-logs-view .container-header { @@ -109,6 +115,22 @@ position: relative; } +.build-logs-view .log-entry:hover { + background: rgba(0, 0, 0, 0.2); + cursor: pointer; +} + +.build-logs-view .log-entry:hover .timestamp { + visibility: visible; +} + +.build-logs-view .log-entry .timestamp { + float: right; + visibility: hidden; + color: #aaa; + margin-right: 10px; +} + .build-logs-view .log-entry .message { display: inline-block; margin-left: 46px; @@ -117,12 +139,41 @@ .build-logs-view .log-entry .id { color: #aaa; padding-right: 6px; - margin-right: 6px; + margin-right: 10px; text-align: right; font-size: 12px; width: 40px; position: absolute; - top: 4px; + top: 1px; left: 4px; } + +.build-logs-view .copy-button { + position: absolute; + top: 6px; + right: 6px; + z-index: 2; + transition: all 0.15s ease-in-out; +} + +.build-logs-view .copy-button:not(.zeroclipboard-is-hover) { + background: transparent; + border: 1px solid transparent; + color: #ddd; +} + +.build-logs-view .copy-button i.fa { + margin-right: 10px; +} + +.build-logs-view-element.with-timestamps .log-entry .message { + display: inline-block; + margin-left: 146px; +} + +.build-logs-view-element.with-timestamps .log-entry .id { + width: 140px; + white-space: nowrap; + padding-right: 10px; +} diff --git a/static/css/directives/ui/triggered-build-description.css b/static/css/directives/ui/triggered-build-description.css index d881f8bb4..2ef4914e3 100644 --- a/static/css/directives/ui/triggered-build-description.css +++ b/static/css/directives/ui/triggered-build-description.css @@ -3,9 +3,16 @@ display: block; } +.triggered-build-description-element .commit-message a { + color: black; +} + .triggered-build-description-element .commit-who img { width: 16px; height: 16px; + margin-left: 2px; + margin-right: 2px; + border-radius: 50%; } .triggered-build-description-element .fa-github { diff --git a/static/css/pages/build-view.css b/static/css/pages/build-view.css index 09d976b09..649f0005a 100644 --- a/static/css/pages/build-view.css +++ b/static/css/pages/build-view.css @@ -36,6 +36,11 @@ color: #2fcc66; } +.build-view .build-status-header .cor-options-menu { + float: right; + margin-left: 20px; +} + .build-view .build-status-header .timing { float: right; } diff --git a/static/directives/build-logs-view.html b/static/directives/build-logs-view.html index 01091f16e..285a8b141 100644 --- a/static/directives/build-logs-view.html +++ b/static/directives/build-logs-view.html @@ -1,13 +1,18 @@ -
+
+ + - (No Logs) + (Waiting for build to start)
+ ng-class="container.logs.isVisible ? 'fa-chevron-down' : 'fa-chevron-right'" + ng-show="hasLogs(container)">
@@ -22,8 +27,10 @@
- + + +
diff --git a/static/directives/source-commit-link.html b/static/directives/source-commit-link.html index 53d645400..d8803b319 100644 --- a/static/directives/source-commit-link.html +++ b/static/directives/source-commit-link.html @@ -1,4 +1,4 @@ - + {{ commitSha.substring(0, 8) }} \ No newline at end of file diff --git a/static/directives/source-ref-link.html b/static/directives/source-ref-link.html index f02c7b7f7..dcf142001 100644 --- a/static/directives/source-ref-link.html +++ b/static/directives/source-ref-link.html @@ -2,13 +2,13 @@ - + {{ getTitle(ref) }} - + {{ getTitle(ref) }} diff --git a/static/directives/triggered-build-description.html b/static/directives/triggered-build-description.html index 2c3ada7fc..1aa33820f 100644 --- a/static/directives/triggered-build-description.html +++ b/static/directives/triggered-build-description.html @@ -4,9 +4,15 @@ -
{{ build.job_config.trigger_metadata.commit_info.message }}
+
+ Authored @@ -27,7 +33,7 @@ - + Triggered by commit + + + + Hide Timestamps + + + Show Timestamps + + + + Cancel Build + + +
Build started @@ -39,7 +54,9 @@
-
diff --git a/test/testlogs.py b/test/testlogs.py index 49dcf3c7c..cf140f085 100644 --- a/test/testlogs.py +++ b/test/testlogs.py @@ -1,4 +1,5 @@ import logging +import datetime from random import SystemRandom from functools import wraps, partial @@ -108,7 +109,13 @@ class TestBuildLogs(RedisBuildLogs): return script def _generate_phase(self, start_weight, phase_name): - return (start_weight, {'message': phase_name, 'type': self.PHASE}, + message = { + 'message': phase_name, + 'type': self.PHASE, + 'datetime': str(datetime.datetime.now()) + } + + return (start_weight, message, (phase_name, deepcopy(self.STATUS_TEMPLATE))) def _generate_command(self, command_num, total_commands, command_weight): @@ -123,6 +130,7 @@ class TestBuildLogs(RedisBuildLogs): msg = { 'message': 'Step %s: %s %s' % (command_num, command, sentence), 'type': self.COMMAND, + 'datetime': str(datetime.datetime.now()) } status = deepcopy(self.STATUS_TEMPLATE) status['total_commands'] = total_commands @@ -133,10 +141,26 @@ class TestBuildLogs(RedisBuildLogs): def _generate_logs(count): others = [] if random.randint(0, 10) <= 8: - count = count - 2 - others = [(1, {'message': '\x1b[91m' + get_sentence()}, None), (1, {'message': '\x1b[0m'}, None)] + premessage = { + 'message': '\x1b[91m' + get_sentence(), + 'datetime': str(datetime.datetime.now()) + } - return others + [(1, {'message': get_sentence()}, None) for _ in range(count)] + postmessage = { + 'message': '\x1b[0m', + 'datetime': str(datetime.datetime.now()) + } + + count = count - 2 + others = [(1, premessage, None), (1, postmessage, None)] + + def get_message(): + return { + 'message': get_sentence(), + 'datetime': str(datetime.datetime.now()) + } + + return others + [(1, get_message(), None) for _ in range(count)] @staticmethod def _compute_total_completion(statuses, total_images):