diff --git a/services/web/app/views/project/editor.jade b/services/web/app/views/project/editor.jade index 0ccdcd88f4..18e88b6620 100644 --- a/services/web/app/views/project/editor.jade +++ b/services/web/app/views/project/editor.jade @@ -13,7 +13,9 @@ block content h3 #{translate("loading")}... .progress .progress-bar(style="width: 20%", ng-style="{'width': state.load_progress + '%'}") - p.text-center.text-danger(ng-if="state.error").ng-cloak {{ state.error }} + p.text-center.text-danger(ng-if="state.error").ng-cloak + span(ng-bind-html="state.error") + .global-alerts(ng-cloak) .alert.alert-danger.small(ng-if="connection.forced_disconnect") diff --git a/services/web/public/coffee/ide/connection/ConnectionManager.coffee b/services/web/public/coffee/ide/connection/ConnectionManager.coffee index 9aa0513b09..40ea21f5a7 100644 --- a/services/web/public/coffee/ide/connection/ConnectionManager.coffee +++ b/services/web/public/coffee/ide/connection/ConnectionManager.coffee @@ -39,6 +39,13 @@ define [], () -> @joinProject() , 100) + @ide.socket.on "connect_failed", () => + @connected = false + $scope.$apply () => + @$scope.state.error = "Unable to connect, please view the connection problems guide to fix the issue." + + + @ide.socket.on 'disconnect', () => @connected = false @ide.pushEvent("disconnected")