-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unified the layout for VNC/SPICE remote consoles #186
Unified the layout for VNC/SPICE remote consoles #186
Conversation
46572af
to
a1bd2f5
Compare
Pivotal story: https://www.pivotaltracker.com/story/show/137880407 |
app/controllers/vm_common.rb
Outdated
@@ -156,22 +156,23 @@ def vm_selected | |||
end | |||
|
|||
def launch_html5_console | |||
proto = request.ssl? ? 'wss' : 'ws' | |||
prefix = request.ssl? ? 'wss' : 'ws' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why rename proto
to prefix
?
it's a protocol so the new one is not a better name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I'm using the same variable name 2 lines lower ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that. Not a very good reason for a poor name ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, it can be scheme
a1bd2f5
to
bf5ee6f
Compare
4da2da6
to
5b12143
Compare
@skateman The new console screen lacks tooltips for ctrl-alt-delete & fullscreen buttons |
onerror: function(e) { | ||
spice.stop(); | ||
$('#connection-status').removeClass('label-success label-warning').addClass('label-danger'); | ||
$('#connection-status').text('Disconnected'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__('Disconnected')
}, | ||
onsuccess: function() { | ||
$('#connection-status').removeClass('label-danger label-warning').addClass('label-success'); | ||
$('#connection-status').text('Connected'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gettext (as above).
onUpdateState: function(_, state, _, msg) { | ||
if (['normal', 'loaded'].includes(state)) { | ||
$('#connection-status').removeClass('label-danger label-warning').addClass('label-success'); | ||
$('#connection-status').text('Connected'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gettext as above.
$('#connection-status').text('Connected'); | ||
} else if (state === 'disconnected') { | ||
$('#connection-status').removeClass('label-success label-warning').addClass('label-danger'); | ||
$('#connection-status').text('Disconnected'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gettext as above.
5b12143
to
9a4b863
Compare
@mzazrivec should be all fixed! |
Now I see bunch of errors in JS console like:
|
98020f0
to
e75893b
Compare
- Created a common HAML view for both console types - Separate JS files with preprocessed dependencies - Removed the old HAML views for VNC/SPICE - Removed some dead code in the related controller
e75893b
to
253e27d
Compare
Checked commit skateman@253e27d with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Resolves #162