1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00

Screen error message improved.

This commit is contained in:
Gunther Brunner 2014-05-20 19:17:28 +09:00
parent e405ca1577
commit 282ceab17a
3 changed files with 32 additions and 6 deletions

View file

@ -115,6 +115,10 @@ module.exports = function DeviceScreenDirective($document, ScalingService, Vendo
scope.control.paste(e.clipboardData.getData('text/plain')) scope.control.paste(e.clipboardData.getData('text/plain'))
} }
scope.retryLoadingScreen = function () {
maybeLoadScreen()
}
function maybeLoadScreen() { function maybeLoadScreen() {
if (!loading && scope.$parent.showScreen && scope.device) { if (!loading && scope.$parent.showScreen && scope.device) {
loading = true loading = true

View file

@ -1,13 +1,25 @@
.screen-error { .screen-error {
width: 100%; width: 100%;
background: rgba(0, 0, 0, 0.6); height: 100%;
position: relative; background: rgba(0, 0, 0, 0.7);
top: 50%;
transform: translateY(-50%);
z-index: 100; z-index: 100;
pointer-events: none; /* MUST HAVE */ position: absolute;
/*pointer-events: none; */
} }
.screen-error .nothing-to-show { .screen-error .nothing-to-show {
color: #eee; color: #eee;
} }
.screen-error .screen-error-message {
position: relative;
top: 35%;
transform: translateY(-35%);
text-align: center;
}
.screen-error .screen-error-alert {
padding: 15px;
margin-bottom: 20px;
color: #ccc;
}

View file

@ -1,5 +1,15 @@
canvas(ng-show='device') canvas(ng-show='device')
div(ng-if='displayError').screen-error div(ng-if='displayError').screen-error
nothing-to-show(message='{{"No device screen"|translate}}', icon='fa-eye-slash', ng-show='true') .screen-error-message
nothing-to-show(message='{{"No device screen"|translate}}', icon='fa-eye-slash', ng-show='true')
// TODO: PING here to check for connectivity http://172.19.9.107:7401/api/v1/displays/0
.well
.screen-error-alert This might be caused by a network error, or you might be trying to access a secure view.
.well
button(ng-click='retryLoadingScreen()', style='text-align: center;').btn.btn-primary.btn-block
i.fa.fa-refresh
span(translate) Retry
textarea(tabindex='-1') textarea(tabindex='-1')
span.finger span.finger