ManageIQ/manageiq-ui-classic

View on GitHub
app/javascript/oldjs/remote_console.js

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 7 of 7 total issues

Unexpected function expression.
Open

$('#fullscreen').click(function() {

Unexpected function expression.
Open

$(function() {

Expected a default case.
Open

switch (true) {

Similar blocks of code found in 4 locations. Consider refactoring.
Open

case document.msFullscreenEnabled:
if (document.msFullscreenElement) {
document.msExitFullscreen();
} else {
document.documentElement.msRequestFullscreen();
Severity: Major
Found in app/javascript/oldjs/remote_console.js and 3 other locations - About 40 mins to fix
app/javascript/oldjs/remote_console.js on lines 4..10
app/javascript/oldjs/remote_console.js on lines 11..17
app/javascript/oldjs/remote_console.js on lines 18..24

Similar blocks of code found in 4 locations. Consider refactoring.
Open

case document.webkitFullscreenEnabled:
if (document.webkitFullscreenElement) {
document.webkitExitFullscreen();
} else {
document.documentElement.webkitRequestFullscreen();
Severity: Major
Found in app/javascript/oldjs/remote_console.js and 3 other locations - About 40 mins to fix
app/javascript/oldjs/remote_console.js on lines 4..10
app/javascript/oldjs/remote_console.js on lines 18..24
app/javascript/oldjs/remote_console.js on lines 25..31

Similar blocks of code found in 4 locations. Consider refactoring.
Open

case document.fullScreenEnabled:
if (document.fullscreenElement) {
document.exitFullscreen();
} else {
document.documentElement.requestFullscreen();
Severity: Major
Found in app/javascript/oldjs/remote_console.js and 3 other locations - About 40 mins to fix
app/javascript/oldjs/remote_console.js on lines 11..17
app/javascript/oldjs/remote_console.js on lines 18..24
app/javascript/oldjs/remote_console.js on lines 25..31

Similar blocks of code found in 4 locations. Consider refactoring.
Open

case document.mozFullScreenEnabled:
if (document.mozFullScreenElement) {
document.mozCancelFullScreen();
} else {
document.documentElement.mozRequestFullScreen();
Severity: Major
Found in app/javascript/oldjs/remote_console.js and 3 other locations - About 40 mins to fix
app/javascript/oldjs/remote_console.js on lines 4..10
app/javascript/oldjs/remote_console.js on lines 11..17
app/javascript/oldjs/remote_console.js on lines 25..31

There are no issues that match your filters.

Category
Status