Skip to content
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

Merged
merged 1 commit into from
Feb 2, 2017

Conversation

skateman
Copy link
Member

@skateman skateman commented Jan 18, 2017

  • 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

Resolves #162

@skateman skateman force-pushed the unified-remote-console-view branch from 46572af to a1bd2f5 Compare January 18, 2017 12:19
@skateman skateman changed the title [WIP] Unified the layout for VNC/SPICE remote consoles Unified the layout for VNC/SPICE remote consoles Jan 18, 2017
@miq-bot miq-bot removed the wip label Jan 18, 2017
@skateman
Copy link
Member Author

@@ -156,22 +156,23 @@ def vm_selected
end

def launch_html5_console
proto = request.ssl? ? 'wss' : 'ws'
prefix = request.ssl? ? 'wss' : 'ws'
Copy link
Member

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

Copy link
Member Author

@skateman skateman Jan 18, 2017

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 ;)

Copy link
Member

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 ;-)

Copy link
Member Author

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

@skateman skateman force-pushed the unified-remote-console-view branch from a1bd2f5 to bf5ee6f Compare January 20, 2017 10:30
@skateman skateman force-pushed the unified-remote-console-view branch 2 times, most recently from 4da2da6 to 5b12143 Compare February 1, 2017 15:16
@mzazrivec
Copy link
Contributor

@skateman The new console screen lacks tooltips for ctrl-alt-delete & fullscreen buttons

@mzazrivec mzazrivec self-assigned this Feb 2, 2017
onerror: function(e) {
spice.stop();
$('#connection-status').removeClass('label-success label-warning').addClass('label-danger');
$('#connection-status').text('Disconnected');
Copy link
Contributor

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');
Copy link
Contributor

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');
Copy link
Contributor

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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gettext as above.

@skateman skateman force-pushed the unified-remote-console-view branch from 5b12143 to 9a4b863 Compare February 2, 2017 12:15
@skateman
Copy link
Member Author

skateman commented Feb 2, 2017

@mzazrivec should be all fixed!

@mzazrivec
Copy link
Contributor

Now I see bunch of errors in JS console like:

Uncaught ReferenceError: __ is not defined

@skateman skateman force-pushed the unified-remote-console-view branch 2 times, most recently from 98020f0 to e75893b Compare February 2, 2017 12:49
- 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
@skateman skateman force-pushed the unified-remote-console-view branch from e75893b to 253e27d Compare February 2, 2017 13:04
@miq-bot
Copy link
Member

miq-bot commented Feb 2, 2017

Checked commit skateman@253e27d with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks good. 🍪

@mzazrivec mzazrivec added this to the Sprint 54 Ending Feb 13, 2017 milestone Feb 2, 2017
@mzazrivec mzazrivec merged commit 390f341 into ManageIQ:master Feb 2, 2017
@skateman skateman deleted the unified-remote-console-view branch February 2, 2017 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants