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

Add UI controls for developer session #1691

Merged
merged 48 commits into from
Jun 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
fbcd903
Add UI controls for developer session
Martchus Jun 14, 2018
93354f6
Expose VNC port to developer
foursixnine May 28, 2018
68327ea
Update instructions
foursixnine May 30, 2018
008f92f
Remove unnecesary options for livehandler service
foursixnine Jun 13, 2018
8fe15fc
Update service file for livehandler service
foursixnine Jun 13, 2018
82fe717
Connect via livehandler proxy to isotovideo to get updates
foursixnine Jun 14, 2018
1cf00be
Fix typos
foursixnine Jun 15, 2018
48e5ed1
Add status route to websocket proxy
foursixnine Jun 15, 2018
1614adb
Allow developer-instructions to be modified by status updates
foursixnine Jun 15, 2018
5584967
Remove deprecated ui test
foursixnine Jun 15, 2018
840bc5a
Move methods to build proxy url to OpenQA::Utils
foursixnine Jun 15, 2018
3a2165e
Add UI controls for developer session
Martchus Jun 14, 2018
6e2bd34
Pick the right route (either developer session or status only)
Martchus Jun 15, 2018
2e0ce46
Show VNC instruction only for running jobs
Martchus Jun 18, 2018
9e3c5ad
Keep track of status-only and devel ws tx separately
Martchus Jun 18, 2018
d4f0acc
Notify clients about removed sessions as well
Martchus Jun 18, 2018
343403e
Handle reconnects in the client
Martchus Jun 18, 2018
17e5f68
Update module select for devel mode like modules under details
Martchus Jun 19, 2018
c72e632
Adapt existing developer test to UI changes
Martchus Jun 19, 2018
cb12a77
Hide entire developer panel when test not running
Martchus Jun 19, 2018
b016b47
Document variables for developer mode
Martchus Jun 19, 2018
550d9b5
Check that VNC instructions are shown when test is paused
foursixnine Jun 19, 2018
d198635
Fix broken HTML on test details page
Martchus Jun 20, 2018
c3a3a00
Extend unit tests for status-only route
Martchus Jun 20, 2018
cdb9f7c
Fix style issues mentioned by @foursixnine in review
Martchus Jun 21, 2018
9e06414
Adapt to removal of waiting state
Martchus Jun 21, 2018
fc67d9b
Avoid using Mojo::IOLoop->one_tick() in developer unit tests
Martchus Jun 21, 2018
9796a63
Set status code when finishing ws connections
Martchus Jun 21, 2018
6b20245
Start developer session via submit button
Martchus Jun 21, 2018
a260e9d
Fix importing determine_web_ui_web_socket_url
Martchus Jun 22, 2018
5c0208b
Add tests for developer UI controls
Martchus Jun 22, 2018
4675cf0
Don't quit developer session when disconnecting from os-autoinst
Martchus Jun 25, 2018
4ef626a
Cancel job when quitting the developer session
Martchus Jun 25, 2018
d672819
Test UI controls also in developer fullstack test
Martchus Jun 25, 2018
fd13ce0
Improve error handling of livehandler daemon
Martchus Jun 25, 2018
cf792ce
Don't use Test::MockModule::redefine()
Martchus Jun 26, 2018
4ed6452
Remove useless debug printing in live view handler
Martchus Jun 26, 2018
a488b99
Show link to ws console only in development mode
Martchus Jun 26, 2018
32585a5
Prevent resetting the module to pause at on page load
Martchus Jun 26, 2018
172b3c0
Replace 'opened by' with 'owned by'
Martchus Jun 26, 2018
057842c
Rephrase to avoid 'developer session'
Martchus Jun 27, 2018
3c1a6b2
Don't update developer mode controls until confirmed
Martchus Jun 27, 2018
4af9d62
Never assume it is the own devel session when not logged in
Martchus Jun 27, 2018
c7d3ae7
devel mode: Handle case when module list still unknown
Martchus Jun 28, 2018
7b3eae7
Fix help popover in developer panel
Martchus Jun 28, 2018
513ef24
Show developer mode form only when connected via web sockets
Martchus Jun 28, 2018
77e88c6
Fix bugs in form controls for devel mode
Martchus Jun 28, 2018
1066d02
live view: Connect to ws server when testStatus.running is set
Martchus Jun 29, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions assets/javascripts/openqa.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,32 @@ function alignBuildLabels() {
var max = Math.max.apply(null, values);
$('.build-label').css('min-width', max + 'px');
}

// returns an absolute "ws://" URL for the specified URL which might be relative
function makeWsUrlAbsolute(url, servicePortDelta) {
Copy link
Member

Choose a reason for hiding this comment

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

Why not call it getabsolutewsurl? (It's just cosmetic I know ;))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it doesn't just return a value which is already stored somewhere. It actually computes the value (though this is not very expensive).

// don't adjust URLs which are already absolute
if (url.indexOf('ws:') === 0) {
return url;
}

// read port from the page's current URL
var port = Number.parseInt(window.location.port);
if (Number.isNaN(port)) {
// don't put a port in the URL if there's no explicit port
port = '';
} else {
if (port !== 80 || port !== 443) {
// if not using default ports we assume we're not accessing the web UI via Apache/NGINX
// reverse proxy
// -> so if not specified otherwise, we're further assuming a connection to the livehandler
// daemon which is supposed to run under the <web UI port> + 2
port += servicePortDelta ? servicePortDelta : 2;
}
port = ':' + port;
}

return 'ws://'
+ window.location.hostname + port
+ (url.indexOf('/') !== 0 ? '/' : '')
+ url;
}
Loading