mirror of
https://github.com/JasonHHouse/gaps.git
synced 2026-01-06 02:50:20 -06:00
Fixing merge issues
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<package-json value="$PROJECT_DIR$/package.json" />
|
||||
<command value="run" />
|
||||
<scripts>
|
||||
<script value="eslint-cypress" />
|
||||
<script value="minify-input-css" />
|
||||
</scripts>
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
|
||||
@@ -34,7 +34,7 @@ spring:
|
||||
password: admin
|
||||
server:
|
||||
servlet:
|
||||
context-path: /gaps
|
||||
context-path: /
|
||||
http2:
|
||||
enabled: true
|
||||
port: 8484
|
||||
|
||||
@@ -8,61 +8,54 @@
|
||||
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
export function getOwnedMoviesForTable(url, movieContainer, noMovieContainer, moviesTable) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
success(result) {
|
||||
if (result.code === 40) {
|
||||
movieContainer.show(100);
|
||||
noMovieContainer.css({ display: 'none' });
|
||||
moviesTable.rows.add(result.extras).draw();
|
||||
} else {
|
||||
movieContainer.css({ display: 'none' });
|
||||
noMovieContainer.show(100);
|
||||
}
|
||||
},
|
||||
error() {
|
||||
movieContainer.css({ display: 'none' });
|
||||
noMovieContainer.show(100);
|
||||
// Show error + error
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function getRecommendedMoviesForTable(url, movieContainer, noMovieContainer, notSearchedYetContainer, moviesTable) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
success(result) {
|
||||
if (result.code === 50) {
|
||||
movieContainer.show(100);
|
||||
noMovieContainer.css({ display: 'none' });
|
||||
notSearchedYetContainer.css({ display: 'none' });
|
||||
moviesTable.rows.add(result.extras).draw();
|
||||
} else if (result.code === 41) {
|
||||
movieContainer.css({ display: 'none' });
|
||||
notSearchedYetContainer.css({ display: 'none' });
|
||||
noMovieContainer.show(100);
|
||||
} else {
|
||||
movieContainer.css({ display: 'none' });
|
||||
noMovieContainer.css({ display: 'none' });
|
||||
notSearchedYetContainer.show(100);
|
||||
}
|
||||
},
|
||||
error() {
|
||||
movieContainer.css({ display: 'none' });
|
||||
notSearchedYetContainer.css({ display: 'none' });
|
||||
noMovieContainer.show(100);
|
||||
// Show error + error
|
||||
},
|
||||
});
|
||||
}
|
||||
import Payload from './payload.min.js';
|
||||
|
||||
export function getContextPath(url) {
|
||||
return document.getElementById('contextPath').value + url;
|
||||
const contextPath = document.getElementById('contextPath').value;
|
||||
if (contextPath && contextPath !== '/') {
|
||||
return contextPath + url;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
export async function getOwnedMoviesForTable(url, movieContainer, noMovieContainer, moviesTable) {
|
||||
const response = await fetch(getContextPath(url), {
|
||||
method: 'get',
|
||||
headers: {
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
},
|
||||
});
|
||||
const get = await response.json();
|
||||
if (get.code && get.code === Payload.PLEX_LIBRARY_MOVIE_FOUND) {
|
||||
movieContainer.show(100);
|
||||
noMovieContainer.css({ display: 'none' });
|
||||
moviesTable.rows.add(get.extras).draw();
|
||||
} else {
|
||||
movieContainer.css({ display: 'none' });
|
||||
noMovieContainer.show(100);
|
||||
}
|
||||
}
|
||||
|
||||
export async function getRecommendedMoviesForTable(url, movieContainer, noMovieContainer, notSearchedYetContainer, moviesTable) {
|
||||
const response = await fetch(getContextPath(url), {
|
||||
method: 'get',
|
||||
headers: {
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
},
|
||||
});
|
||||
const get = await response.json();
|
||||
if (get.code && get.code === Payload.RECOMMENDED_MOVIES_FOUND) {
|
||||
movieContainer.show(100);
|
||||
noMovieContainer.css({ display: 'none' });
|
||||
notSearchedYetContainer.css({ display: 'none' });
|
||||
moviesTable.rows.add(get.extras).draw();
|
||||
} else if (get.code && get.code === Payload.PLEX_LIBRARY_MOVIE_NOT_FOUND) {
|
||||
movieContainer.css({ display: 'none' });
|
||||
notSearchedYetContainer.css({ display: 'none' });
|
||||
noMovieContainer.show(100);
|
||||
} else {
|
||||
movieContainer.css({ display: 'none' });
|
||||
noMovieContainer.css({ display: 'none' });
|
||||
notSearchedYetContainer.show(100);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
import getNotificationTypes from './notification-types.min.js';
|
||||
import Payload from './payload.min.js';
|
||||
import hideAllAlertsAndSpinners from './alerts-manager.min.js';
|
||||
import { getContextPath } from './common.min.js';
|
||||
|
||||
export async function testDiscordNotifications() {
|
||||
hideAllAlertsAndSpinners();
|
||||
document.getElementById('discordSpinner').style.display = 'block';
|
||||
|
||||
const response = await fetch('/notifications/test/6', {
|
||||
const response = await fetch(getContextPath('/notifications/test/6'), {
|
||||
method: 'put',
|
||||
});
|
||||
const put = await response.json();
|
||||
@@ -41,7 +42,7 @@ export async function saveDiscordNotifications() {
|
||||
document.getElementById('discordPlexLibraryUpdateNotification').checked,
|
||||
document.getElementById('discordGapsMissingCollectionsNotification').checked);
|
||||
|
||||
const response = await fetch('/notifications/discord', {
|
||||
const response = await fetch(getContextPath('/notifications/discord'), {
|
||||
method: 'put',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -12,12 +12,13 @@
|
||||
import getNotificationTypes from './notification-types.min.js';
|
||||
import Payload from './payload.min.js';
|
||||
import hideAllAlertsAndSpinners from './alerts-manager.min.js';
|
||||
import { getContextPath } from './common.min.js';
|
||||
|
||||
export async function testEmailNotifications() {
|
||||
hideAllAlertsAndSpinners();
|
||||
document.getElementById('emailSpinner').style.display = 'block';
|
||||
|
||||
const response = await fetch('/notifications/test/4', {
|
||||
const response = await fetch(getContextPath('/notifications/test/4'), {
|
||||
method: 'put',
|
||||
});
|
||||
const put = await response.json();
|
||||
@@ -51,7 +52,7 @@ export async function saveEmailNotifications() {
|
||||
document.getElementById('emailPlexLibraryUpdateNotification').checked,
|
||||
document.getElementById('emailGapsMissingCollectionsNotification').checked);
|
||||
|
||||
const response = await fetch('/notifications/email', {
|
||||
const response = await fetch(getContextPath('/notifications/email'), {
|
||||
method: 'put',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -12,12 +12,13 @@
|
||||
import getNotificationTypes from './notification-types.min.js';
|
||||
import Payload from './payload.min.js';
|
||||
import hideAllAlertsAndSpinners from './alerts-manager.min.js';
|
||||
import { getContextPath } from './common.min.js';
|
||||
|
||||
export async function testGotifyNotifications() {
|
||||
hideAllAlertsAndSpinners();
|
||||
document.getElementById('gotifySpinner').style.display = 'block';
|
||||
|
||||
const response = await fetch('/notifications/test/3', {
|
||||
const response = await fetch(getContextPath('/notifications/test/3'), {
|
||||
method: 'put',
|
||||
});
|
||||
const put = await response.json();
|
||||
@@ -43,7 +44,7 @@ export async function saveGotifyNotifications() {
|
||||
document.getElementById('gotifyPlexLibraryUpdateNotification').checked,
|
||||
document.getElementById('gotifyGapsMissingCollectionsNotification').checked);
|
||||
|
||||
const response = await fetch('/notifications/gotify', {
|
||||
const response = await fetch(getContextPath('/notifications/gotify'), {
|
||||
method: 'put',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
/* eslint no-undef: "error" */
|
||||
|
||||
import { getContextPath } from './common.min.js';
|
||||
|
||||
export function openPlexLibraryConfigurationModel(title, machineIdentifier, key) {
|
||||
const obj = {
|
||||
title,
|
||||
@@ -35,7 +37,7 @@ export async function savePlexLibraryConfiguration(machineIdentifier, key) {
|
||||
defaultLibrary: document.getElementById('defaultLibrary').value,
|
||||
};
|
||||
|
||||
const response = await fetch('/configuration/update/plex/library', {
|
||||
const response = await fetch(getContextPath('/configuration/update/plex/library'), {
|
||||
method: 'put',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
import getNotificationTypes from './notification-types.min.js';
|
||||
import Payload from './payload.min.js';
|
||||
import hideAllAlertsAndSpinners from './alerts-manager.min.js';
|
||||
import { getContextPath } from './common.min.js';
|
||||
|
||||
export async function testPushBulletNotifications() {
|
||||
hideAllAlertsAndSpinners();
|
||||
document.getElementById('pushBulletSpinner').style.display = 'block';
|
||||
|
||||
const response = await fetch('/notifications/test/1', {
|
||||
const response = await fetch(getContextPath('/notifications/test/1'), {
|
||||
method: 'put',
|
||||
});
|
||||
const put = await response.json();
|
||||
@@ -42,7 +43,7 @@ export async function savePushBulletNotifications() {
|
||||
document.getElementById('pushBulletPlexLibraryUpdateNotification').checked,
|
||||
document.getElementById('pushBulletGapsMissingCollectionsNotification').checked);
|
||||
|
||||
const response = await fetch('/notifications/pushbullet', {
|
||||
const response = await fetch(getContextPath('/notifications/pushbullet'), {
|
||||
method: 'put',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -13,10 +13,11 @@
|
||||
import getNotificationTypes from './notification-types.min.js';
|
||||
import Payload from './payload.min.js';
|
||||
import hideAllAlertsAndSpinners from './alerts-manager.min.js';
|
||||
import { getContextPath } from './common.min.js';
|
||||
|
||||
export async function getSoundOptions() {
|
||||
let defaultSound;
|
||||
const pushOverResponse = await fetch('/notifications/pushOver', {
|
||||
const pushOverResponse = await fetch(getContextPath('/notifications/pushOver'), {
|
||||
method: 'get',
|
||||
});
|
||||
const pushOverBody = await pushOverResponse.json();
|
||||
@@ -50,7 +51,7 @@ export async function testPushOverNotifications() {
|
||||
hideAllAlertsAndSpinners();
|
||||
document.getElementById('pushOverSpinner').style.display = 'block';
|
||||
|
||||
const response = await fetch('/notifications/test/5', {
|
||||
const response = await fetch(getContextPath('/notifications/test/5'), {
|
||||
method: 'put',
|
||||
});
|
||||
const put = await response.json();
|
||||
@@ -80,7 +81,7 @@ export async function savePushOverNotifications() {
|
||||
document.getElementById('pushOverPlexLibraryUpdateNotification').checked,
|
||||
document.getElementById('pushOverGapsMissingCollectionsNotification').checked);
|
||||
|
||||
const response = await fetch('/notifications/pushOver', {
|
||||
const response = await fetch(getContextPath('/notifications/pushOver'), {
|
||||
method: 'put',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
import hideAllAlertsAndSpinners from './alerts-manager.min.js';
|
||||
import Payload from './payload.min.js';
|
||||
import { getContextPath } from './common.min.js';
|
||||
|
||||
export default async function saveSchedule() {
|
||||
hideAllAlertsAndSpinners();
|
||||
@@ -19,7 +20,7 @@ export default async function saveSchedule() {
|
||||
body.schedule = document.getElementById('setSchedule').value;
|
||||
body.enabled = document.getElementById('scheduleEnabled').value;
|
||||
|
||||
const response = await fetch('/schedule', {
|
||||
const response = await fetch(getContextPath('/schedule'), {
|
||||
method: 'put',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
|
||||
// ToDo
|
||||
// Update all the calls with the new common function
|
||||
// Test in cypress
|
||||
// Update docker
|
||||
// Push and notify on github
|
||||
@@ -17,12 +16,13 @@
|
||||
import getNotificationTypes from './notification-types.min.js';
|
||||
import Payload from './payload.min.js';
|
||||
import hideAllAlertsAndSpinners from './alerts-manager.min.js';
|
||||
import { getContextPath } from './common.min.js';
|
||||
|
||||
export async function testSlackNotifications() {
|
||||
hideAllAlertsAndSpinners();
|
||||
document.getElementById('slackSpinner').style.display = 'block';
|
||||
|
||||
const response = await fetch('/notifications/test/2', {
|
||||
const response = await fetch(getContextPath('/notifications/test/2'), {
|
||||
method: 'put',
|
||||
});
|
||||
const put = await response.json();
|
||||
@@ -47,7 +47,7 @@ export async function saveSlackNotifications() {
|
||||
document.getElementById('slackPlexLibraryUpdateNotification').checked,
|
||||
document.getElementById('slackGapsMissingCollectionsNotification').checked);
|
||||
|
||||
const response = await fetch('/notifications/slack', {
|
||||
const response = await fetch(getContextPath('/notifications/slack'), {
|
||||
method: 'put',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
import getNotificationTypes from './notification-types.min.js';
|
||||
import Payload from './payload.min.js';
|
||||
import hideAllAlertsAndSpinners from './alerts-manager.min.js';
|
||||
import { getContextPath } from './common.min.js';
|
||||
|
||||
export async function testTelegramNotifications() {
|
||||
hideAllAlertsAndSpinners();
|
||||
document.getElementById('telegramSpinner').style.display = 'block';
|
||||
|
||||
const response = await fetch('/notifications/test/0', {
|
||||
const response = await fetch(getContextPath('/notifications/test/0'), {
|
||||
method: 'put',
|
||||
});
|
||||
const put = await response.json();
|
||||
@@ -42,7 +43,7 @@ export async function saveTelegramNotifications() {
|
||||
document.getElementById('telegramPlexLibraryUpdateNotification').checked,
|
||||
document.getElementById('telegramGapsMissingCollectionsNotification').checked);
|
||||
|
||||
const response = await fetch('/notifications/telegram', {
|
||||
const response = await fetch(getContextPath('/notifications/telegram'), {
|
||||
method: 'put',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
import hideAllAlertsAndSpinners from '../modules/alerts-manager.min.js';
|
||||
import saveSchedule from '../modules/schedule.min.js';
|
||||
import Payload from '../modules/payload.min.js';
|
||||
import { getContextPath } from '../modules/common.min.js';
|
||||
import { saveTelegramNotifications, testTelegramNotifications } from '../modules/telegram-notifications.min.js';
|
||||
import { saveSlackNotifications, testSlackNotifications } from '../modules/slack-notifications.min.js';
|
||||
import { savePushBulletNotifications, testPushBulletNotifications } from '../modules/push-bullet-notifications.min.js';
|
||||
@@ -23,7 +24,6 @@ import { saveEmailNotifications, testEmailNotifications } from '../modules/email
|
||||
import { saveDiscordNotifications, testDiscordNotifications } from '../modules/discord-notifications.min.js';
|
||||
import { getSoundOptions, savePushOverNotifications, testPushOverNotifications } from '../modules/push-over-notifications.min.js';
|
||||
import { openPlexLibraryConfigurationModel, savePlexLibraryConfiguration } from '../modules/plex-configuration.min.js';
|
||||
import { getContextPath } from '../modules/common.min.js';
|
||||
|
||||
function testTmdbKey() {
|
||||
hideAllAlertsAndSpinners();
|
||||
@@ -249,7 +249,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
const socket = new SockJS(getContextPath('/gs-guide-websocket'));
|
||||
const stompClient = Stomp.over(socket);
|
||||
stompClient.connect({}, () => {
|
||||
stompClient.subscribe('/configuration/plex/complete', (message) => {
|
||||
stompClient.subscribe(getContextPath('/configuration/plex/complete'), (message) => {
|
||||
const payload = JSON.parse(message.body);
|
||||
|
||||
hideAllAlertsAndSpinners();
|
||||
@@ -271,7 +271,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
document.getElementById('plexSaveError').style.display = 'block';
|
||||
}
|
||||
});
|
||||
stompClient.subscribe('/configuration/plex/duplicate', () => {
|
||||
stompClient.subscribe(getContextPath('/configuration/plex/duplicate'), () => {
|
||||
hideAllAlertsAndSpinners();
|
||||
document.getElementById('plexDuplicateError').style.display = 'block';
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/* global Handlebars */
|
||||
/* eslint no-undef: "error" */
|
||||
|
||||
import { getOwnedMoviesForTable } from '../modules/common.min.js';
|
||||
import { getContextPath, getOwnedMoviesForTable } from '../modules/common.min.js';
|
||||
|
||||
let libraryTitle;
|
||||
let noMovieContainer;
|
||||
@@ -45,7 +45,7 @@ function searchForMovies() {
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: `/plex/movies/${machineIdentifier}/${key}`,
|
||||
url: getContextPath(`/plex/movies/${machineIdentifier}/${key}`),
|
||||
contentType: 'application/json',
|
||||
success(data) {
|
||||
movieSearchingContainer.css({ display: 'none' });
|
||||
@@ -62,7 +62,7 @@ jQuery(($) => {
|
||||
movieSearchingContainer = $('#movieSearchingContainer');
|
||||
plexServers = JSON.parse($('#plexServers').val());
|
||||
const plexServer = JSON.parse($('#plexServer').val());
|
||||
const key = JSON.parse($('#libraryKey').val());
|
||||
const key = $('#libraryKey').val();
|
||||
|
||||
moviesTable = $('#movies').DataTable({
|
||||
deferRender: true,
|
||||
|
||||
@@ -8,10 +8,12 @@
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import { getContextPath } from '../modules/common.min.js';
|
||||
|
||||
jQuery(($) => {
|
||||
$('#mislabeled').DataTable({
|
||||
ajax: {
|
||||
url: 'mislabeled/c51c432ae94e316d52570550f915ecbcd71bede8/1/.75',
|
||||
url: getContextPath('mislabeled/c51c432ae94e316d52570550f915ecbcd71bede8/1/.75'),
|
||||
dataSrc: '',
|
||||
},
|
||||
columns: [
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
/* global Handlebars, SockJS, Stomp */
|
||||
/* eslint no-undef: "error" */
|
||||
|
||||
import { getRecommendedMoviesForTable } from '../modules/common.js';
|
||||
import Payload from '../modules/payload.js';
|
||||
import { getContextPath, getRecommendedMoviesForTable } from '../modules/common.min.js';
|
||||
import Payload from '../modules/payload.min.js';
|
||||
|
||||
let libraryTitle;
|
||||
let notSearchedYetContainer;
|
||||
@@ -90,7 +90,7 @@ function searchForMovies() {
|
||||
// Change to searching with recommended
|
||||
$.ajax({
|
||||
type: 'PUT',
|
||||
url: `/recommended/find/${plexServer.machineIdentifier}/${libraryKey}`,
|
||||
url: getContextPath(`/recommended/find/${plexServer.machineIdentifier}/${libraryKey}`),
|
||||
contentType: 'application/json',
|
||||
});
|
||||
|
||||
@@ -181,7 +181,7 @@ jQuery(($) => {
|
||||
socket = new SockJS('/gs-guide-websocket');
|
||||
stompClient = Stomp.over(socket);
|
||||
stompClient.connect({}, () => {
|
||||
stompClient.subscribe('/finishedSearching', (message) => {
|
||||
stompClient.subscribe(getContextPath('/finishedSearching'), (message) => {
|
||||
searchContainer.css({ display: 'none' });
|
||||
|
||||
const payload = JSON.parse(message.body);
|
||||
@@ -201,7 +201,7 @@ jQuery(($) => {
|
||||
}
|
||||
});
|
||||
|
||||
stompClient.subscribe('/newMovieFound', (status) => {
|
||||
stompClient.subscribe(getContextPath('/newMovieFound'), (status) => {
|
||||
const obj = JSON.parse(status.body);
|
||||
showSearchStatus(obj);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
-->
|
||||
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<title>Gaps</title>
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
<body>
|
||||
|
||||
<div th:insert="fragments/header :: navBar"></div>
|
||||
|
||||
<div class="container">
|
||||
<img loading="lazy" th:src="@{/images/final-2.svg}" alt="Gaps Logo" style="width:50%;height:50%;" class="center">
|
||||
|
||||
|
||||
@@ -23,11 +23,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||
<a class="" href=".">
|
||||
<img loading="lazy" th:src="@{/images/final-gaps.svg}" class="d-inline-block align-top" alt="" width="96" height="96">
|
||||
</a>
|
||||
</nav>
|
||||
<div th:insert="fragments/header :: navBar"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="top-margin">
|
||||
|
||||
@@ -17,55 +17,60 @@
|
||||
<header th:fragment="navBar">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||
<a class="" th:href="@{/}">
|
||||
<img loading="lazy" th:src="@{/images/final-gaps.svg}" class="d-inline-block align-top" alt="" width="96" height="96">
|
||||
<img alt="" class="d-inline-block align-top" height="96" th:src="@{/images/final-gaps.svg}" width="96">
|
||||
</a>
|
||||
<div class="collapse navbar-collapse" id="navbarColor01">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li th:attr="aria-current=${librariesPage} ? 'page' : '', class=${librariesPage} ? 'nav-item nav-button-padding active' : 'nav-item nav-button-padding'">
|
||||
<a class="nav-link center-text nav-anchor-spacing" th:href="@{'/libraries'}">
|
||||
<div th:attr="class=${librariesPage} ? 'icon activePage' : 'icon default'"
|
||||
<a class="nav-link center-text nav-anchor-spacing" data-cy="libraries" th:href="@{'/libraries'}">
|
||||
<div data-cy="librariesIcon"
|
||||
th:attr="class=${librariesPage} ? 'icon activePage' : 'icon default'"
|
||||
th:style="'mask: url(' + @{'/images/list-ul.svg'} + ') no-repeat center / contain; -webkit-mask: url(' + @{'/images/list-ul.svg'} + ') no-repeat center / contain;'"></div>
|
||||
Libraries
|
||||
</a>
|
||||
</li>
|
||||
<li th:attr="aria-current=${recommendedPage} ? 'page' : '', class=${recommendedPage} ? 'nav-item nav-button-padding active' : 'nav-item nav-button-padding'">
|
||||
<a class="nav-link center-text nav-anchor-spacing" th:href="@{'/recommended'}">
|
||||
<div th:attr="class=${recommendedPage} ? 'icon activePage' : 'icon default'"
|
||||
<a class="nav-link center-text nav-anchor-spacing" data-cy="recommended"
|
||||
th:href="@{'/recommended'}">
|
||||
<div data-cy="recommendedIcon"
|
||||
th:attr="class=${recommendedPage} ? 'icon activePage' : 'icon default'"
|
||||
th:style="'mask: url(' + @{'/images/collection-fill.svg'} + ') no-repeat center / contain; -webkit-mask: url(' + @{'/images/collection-fill.svg'} + ') no-repeat center / contain;'"></div>
|
||||
Missing
|
||||
</a>
|
||||
</li>
|
||||
<!--<li th:attr="aria-current=${mislabeledPage} ? 'page' : '', class=${mislabeledPage} ? 'nav-item nav-button-padding active' : 'nav-item nav-button-padding'">
|
||||
<a class="nav-link center-text nav-anchor-spacing" th:href="${gapsConfiguration.getBaseUrl()} + '/mislabeled'">
|
||||
<!--<li th:attr="aria-current=${mislabeledPage} ? 'page' : '', class=${mislabeledPage} ? 'nav-item nav-button-padding active' : 'nav-item nav-button-padding'" hidden>
|
||||
<a data-cy="mislabeled" class="nav-link center-text nav-anchor-spacing" th:href="${gapsConfiguration.getBaseUrl()} + '/mislabeled'">
|
||||
<div th:attr="class=${mislabeledPage} ? 'icon activePage' : 'icon default'"
|
||||
th:style="'mask: url(' + @{'/images/exclamation-triangle.svg'} + ') no-repeat center / contain; -webkit-mask: url(' + @{'/images/exclamation-triangle.svg'} + ') no-repeat center / contain;'"></div>
|
||||
Mislabeled
|
||||
</a>
|
||||
</li>-->
|
||||
<li th:attr="aria-current=${rssCheckPage} ? 'page' : '', class=${rssCheckPage} ? 'nav-item nav-button-padding active' : 'nav-item nav-button-padding'">
|
||||
<a class="nav-link center-text nav-anchor-spacing" th:href="@{'/rssCheck'}">
|
||||
<div th:attr="class=${rssCheckPage} ? 'icon activePage' : 'icon default'"
|
||||
<a class="nav-link center-text nav-anchor-spacing" data-cy="rssCheck" th:href="@{'/rssCheck'}">
|
||||
<div data-cy="rssCheckIcon" th:attr="class=${rssCheckPage} ? 'icon activePage' : 'icon default'"
|
||||
th:style="'mask: url(' + @{'/images/rss.svg'} + ') no-repeat center / contain; -webkit-mask: url(' + @{'/images/rss.svg'} + ') no-repeat center / contain;'"></div>
|
||||
RSS
|
||||
</a>
|
||||
</li>
|
||||
<li th:attr="aria-current=${configurationPage} ? 'page' : '', class=${configurationPage} ? 'nav-item nav-button-padding active' : 'nav-item nav-button-padding'">
|
||||
<a class="nav-link center-text nav-anchor-spacing" th:href="@{'/configuration'}">
|
||||
<div th:attr="class=${configurationPage} ? 'icon activePage' : 'icon default'"
|
||||
<a class="nav-link center-text nav-anchor-spacing" data-cy="configuration"
|
||||
th:href="@{'/configuration'}">
|
||||
<div data-cy="configurationIcon"
|
||||
th:attr="class=${configurationPage} ? 'icon activePage' : 'icon default'"
|
||||
th:style="'mask: url(' + @{'/images/gear.svg'} + ') no-repeat center / contain; -webkit-mask: url(' + @{'/images/gear.svg'} + ') no-repeat center / contain;'"></div>
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
<li th:attr="aria-current=${updatesPage} ? 'page' : '', class=${updatesPage} ? 'nav-item nav-button-padding active' : 'nav-item nav-button-padding'">
|
||||
<a class="nav-link center-text nav-anchor-spacing" th:href="@{'/updates'}">
|
||||
<div th:attr="class=${updatesPage} ? 'icon activePage' : 'icon default'"
|
||||
<a class="nav-link center-text nav-anchor-spacing" data-cy="updates" th:href="@{'/updates'}">
|
||||
<div data-cy="updatesIcon" th:attr="class=${updatesPage} ? 'icon activePage' : 'icon default'"
|
||||
th:style="'mask: url(' + @{'/images/arrow-clockwise.svg'} + ') no-repeat center / contain; -webkit-mask: url(' + @{'/images/arrow-clockwise.svg'} + ') no-repeat center / contain;'"></div>
|
||||
Updates
|
||||
</a>
|
||||
</li>
|
||||
<li th:attr="aria-current=${aboutPage} ? 'page' : '', class=${aboutPage} ? 'nav-item nav-button-padding active' : 'nav-item nav-button-padding'">
|
||||
<a class="nav-link center-text nav-anchor-spacing" th:href="@{'/about'}">
|
||||
<div th:attr="class=${aboutPage} ? 'icon activePage' : 'icon default'"
|
||||
<a class="nav-link center-text nav-anchor-spacing" data-cy="about" th:href="@{'/about'}">
|
||||
<div data-cy="aboutIcon" th:attr="class=${aboutPage} ? 'icon activePage' : 'icon default'"
|
||||
th:style="'mask: url(' + @{'/images/info-circle.svg'} + ') no-repeat center / contain; -webkit-mask: url(' + @{'/images/info-circle.svg'} + ') no-repeat center / contain;'"></div>
|
||||
About
|
||||
</a>
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
<input id="plexServer" name="plexServer" th:value="${{plexServer}}" type="hidden"/>
|
||||
<input id="plexProperties" name="plexProperties" th:value="${{plexProperties}}" type="hidden"/>
|
||||
<input id="libraryKey" name="libraryKey" th:value="${{plexLibrary.key}}" type="hidden"/>
|
||||
<div th:insert="fragments/common :: contextPath"></div>
|
||||
|
||||
<script th:src="@{/js/libraries/jquery-3.4.1.min.js}" type="text/javascript"></script>
|
||||
<script th:src="@{/js/libraries/bootstrap.bundle.min.js}" type="text/javascript"></script>
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div th:insert="fragments/common :: contextPath"></div>
|
||||
|
||||
<script th:src="@{/js/libraries/jquery-3.4.1.min.js}" type="text/javascript"></script>
|
||||
<script th:src="@{/js/libraries/bootstrap.bundle.min.js}" type="text/javascript"></script>
|
||||
<script th:src="@{/js/libraries/datatables.min.js}" type="text/javascript"></script>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
<form action="/rss" class="top-margin" method="get">
|
||||
<div th:each="instance : ${plexServerMap}" class="form-check">
|
||||
<a th:th:href="'@{/rss/}' + ${instance.value.getMachineIdentifier() + '/' + instance.key.getKey()}"
|
||||
<a th:href="(@{'/rss/'} + ${instance.value.getMachineIdentifier()} + '/' + ${instance.key.getKey()})"
|
||||
th:text="${instance.value.getFriendlyName() + ' - ' + instance.key.getTitle()}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@ export function spyOnAddEventListener(win) {
|
||||
}
|
||||
|
||||
export function nuke() {
|
||||
cy.request('PUT', '/nuke')
|
||||
cy.request('PUT', `${BASE_URL}/nuke`)
|
||||
.then((response) => {
|
||||
expect(response.body).to.have.property('code', 30);
|
||||
expect(response.body).to.have.property('reason', 'Nuke successful. All files deleted.');
|
||||
|
||||
@@ -19,27 +19,27 @@ describe('Configuration Tests', () => {
|
||||
|
||||
cy.visit(`${BASE_URL}/configuration`, { onBeforeLoad: spyOnAddEventListener });
|
||||
|
||||
cy.get('.active > .nav-link')
|
||||
cy.get('[data-cy=configuration]')
|
||||
.should('have.attr', 'href', `${BASE_URL}/configuration`)
|
||||
.parent()
|
||||
.should('have.attr', 'aria-current', 'page');
|
||||
|
||||
cy.get('.navbar-nav > :nth-child(1) > .nav-link')
|
||||
cy.get('[data-cy=libraries]')
|
||||
.should('have.attr', 'href', `${BASE_URL}/libraries`)
|
||||
.parent()
|
||||
.should('not.have.attr', 'aria-current', 'page');
|
||||
|
||||
cy.get('.navbar-nav > :nth-child(2) > .nav-link')
|
||||
cy.get('[data-cy=recommended]')
|
||||
.should('have.attr', 'href', `${BASE_URL}/recommended`)
|
||||
.parent()
|
||||
.should('not.have.attr', 'aria-current', 'page');
|
||||
|
||||
cy.get('.navbar-nav > :nth-child(4) > .nav-link')
|
||||
cy.get('[data-cy=rssCheck]')
|
||||
.should('have.attr', 'href', `${BASE_URL}/rssCheck`)
|
||||
.parent()
|
||||
.should('not.have.attr', 'aria-current', 'page');
|
||||
|
||||
cy.get('.navbar-nav > :nth-child(7) > .nav-link')
|
||||
cy.get('[data-cy=about]')
|
||||
.should('have.attr', 'href', `${BASE_URL}/about`)
|
||||
.parent()
|
||||
.should('not.have.attr', 'aria-current', 'page');
|
||||
|
||||
@@ -14,26 +14,23 @@
|
||||
import { BASE_URL, spyOnAddEventListener } from '../common.spec.js';
|
||||
|
||||
function checkNavIcons(cy, isLibDefault = true, isMissingDefault = true, isRssDefault = true, isSettingsDefault = true, isUpdatesDefault = true, isAboutDefault = true) {
|
||||
cy.get(':nth-child(1) > .nav-link > .icon')
|
||||
.should('have.class', isLibDefault ? 'list-ul-default' : 'list-ul-active');
|
||||
cy.get('[data-cy=librariesIcon]') // ToDo Update Icon data-cy below
|
||||
.should('have.class', isLibDefault ? 'default' : 'activePage');
|
||||
|
||||
cy.get(':nth-child(2) > .nav-link > .icon')
|
||||
.should('have.class', isMissingDefault ? 'collection-fill-default' : 'collection-fill-active');
|
||||
cy.get('[data-cy=recommendedIcon]')
|
||||
.should('have.class', isMissingDefault ? 'default' : 'activePage');
|
||||
|
||||
cy.get(':nth-child(3) > .nav-link > .icon')
|
||||
.should('not.be.visible');
|
||||
cy.get('[data-cy=rssCheckIcon]')
|
||||
.should('have.class', isRssDefault ? 'default' : 'activePage');
|
||||
|
||||
cy.get(':nth-child(4) > .nav-link > .icon')
|
||||
.should('have.class', isRssDefault ? 'rss-default' : 'rss-active');
|
||||
cy.get('[data-cy=configurationIcon]')
|
||||
.should('have.class', isSettingsDefault ? 'default' : 'activePage');
|
||||
|
||||
cy.get(':nth-child(5) > .nav-link > .icon')
|
||||
.should('have.class', isSettingsDefault ? 'gear-default' : 'gear-active');
|
||||
cy.get('[data-cy=updatesIcon]')
|
||||
.should('have.class', isUpdatesDefault ? 'default' : 'activePage');
|
||||
|
||||
cy.get(':nth-child(6) > .nav-link > .icon')
|
||||
.should('have.class', isUpdatesDefault ? 'arrow-clockwise-default' : 'arrow-clockwise-active');
|
||||
|
||||
cy.get(':nth-child(7) > .nav-link > .icon')
|
||||
.should('have.class', isAboutDefault ? 'info-circle-default' : 'info-circle-active');
|
||||
cy.get('[data-cy=aboutIcon]')
|
||||
.should('have.class', isAboutDefault ? 'default' : 'activePage');
|
||||
}
|
||||
|
||||
describe('Verify Navbars', () => {
|
||||
|
||||
@@ -71,6 +71,8 @@ describe('Search for Recommended', () => {
|
||||
cy.get('[data-cy=searchForMovies]')
|
||||
.click();
|
||||
|
||||
cy.scrollTo(0, 1000);
|
||||
|
||||
cy.get('#movies_info', { timeout: 5000 })
|
||||
.should('have.text', 'Showing 1 to 7 of 7 entries');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user