Change console levels
This commit is contained in:
parent
ad6502d824
commit
756998847c
@ -5,10 +5,10 @@ import IProgressToken from "./interfaces/IProgressToken";
|
||||
export class Job
|
||||
{
|
||||
static async GetAllJobs(): Promise<string[]> {
|
||||
console.debug("Getting all Jobs");
|
||||
console.info("Getting all Jobs");
|
||||
return getData("http://127.0.0.1:6531/v2/Jobs")
|
||||
.then((json) => {
|
||||
console.debug("Got all Jobs");
|
||||
console.info("Got all Jobs");
|
||||
const ret = json as string[];
|
||||
console.debug(ret);
|
||||
return (ret);
|
||||
@ -16,10 +16,10 @@ export class Job
|
||||
}
|
||||
|
||||
static async GetRunningJobs(): Promise<string[]> {
|
||||
console.debug("Getting all running Jobs");
|
||||
console.info("Getting all running Jobs");
|
||||
return getData("http://127.0.0.1:6531/v2/Jobs/Running")
|
||||
.then((json) => {
|
||||
console.debug("Got all running Jobs");
|
||||
console.info("Got all running Jobs");
|
||||
const ret = json as string[];
|
||||
console.debug(ret);
|
||||
return (ret);
|
||||
@ -27,10 +27,10 @@ export class Job
|
||||
}
|
||||
|
||||
static async GetWaitingJobs(): Promise<string[]> {
|
||||
console.debug("Getting all waiting Jobs");
|
||||
console.info("Getting all waiting Jobs");
|
||||
return getData("http://127.0.0.1:6531/v2/Jobs/Waiting")
|
||||
.then((json) => {
|
||||
console.debug("Got all waiting Jobs");
|
||||
console.info("Got all waiting Jobs");
|
||||
const ret = json as string[];
|
||||
console.debug(ret);
|
||||
return (ret);
|
||||
@ -38,10 +38,10 @@ export class Job
|
||||
}
|
||||
|
||||
static async GetMonitoringJobs(): Promise<string[]> {
|
||||
console.debug("Getting all monitoring Jobs");
|
||||
console.info("Getting all monitoring Jobs");
|
||||
return getData("http://127.0.0.1:6531/v2/Jobs/Monitoring")
|
||||
.then((json) => {
|
||||
console.debug("Got all monitoring Jobs");
|
||||
console.info("Got all monitoring Jobs");
|
||||
const ret = json as string[];
|
||||
console.debug(ret);
|
||||
return (ret);
|
||||
@ -53,10 +53,10 @@ export class Job
|
||||
console.error(`JobId was not provided`);
|
||||
return Promise.reject();
|
||||
}
|
||||
console.debug(`Getting Job ${jobId}`);
|
||||
console.info(`Getting Job ${jobId}`);
|
||||
return getData(`http://127.0.0.1:6531/v2/Job/${jobId}`)
|
||||
.then((json) => {
|
||||
console.debug(`Got Job ${jobId}`);
|
||||
console.info(`Got Job ${jobId}`);
|
||||
const ret = json as IJob;
|
||||
console.debug(ret);
|
||||
return (ret);
|
||||
@ -69,10 +69,10 @@ export class Job
|
||||
return Promise.reject();
|
||||
}
|
||||
let reqStr = jobIds.join(",");
|
||||
console.debug(`Getting Jobs ${reqStr}`);
|
||||
console.info(`Getting Jobs ${reqStr}`);
|
||||
return getData(`http://127.0.0.1:6531/v2/Job?jobIds=${reqStr}`)
|
||||
.then((json) => {
|
||||
console.debug(`Got Jobs ${reqStr}`);
|
||||
console.info(`Got Jobs ${reqStr}`);
|
||||
const ret = json as IJob[];
|
||||
console.debug(ret);
|
||||
return (ret);
|
||||
@ -80,10 +80,10 @@ export class Job
|
||||
}
|
||||
|
||||
static async GetJobProgress(jobId: string): Promise<IProgressToken> {
|
||||
console.debug(`Getting Job ${jobId} Progress`);
|
||||
console.info(`Getting Job ${jobId} Progress`);
|
||||
return getData(`http://127.0.0.1:6531/v2/Job/${jobId}/Progress`)
|
||||
.then((json) => {
|
||||
console.debug(`Got Job ${jobId} Progress`);
|
||||
console.info(`Got Job ${jobId} Progress`);
|
||||
const ret = json as IProgressToken;
|
||||
console.debug(ret);
|
||||
return (ret);
|
||||
@ -91,14 +91,14 @@ export class Job
|
||||
}
|
||||
|
||||
static async CreateJob(internalId: string, jobType: string, interval: string): Promise<null> {
|
||||
console.debug(`Creating Job for Manga ${internalId} at ${interval} interval`);
|
||||
console.info(`Creating Job for Manga ${internalId} at ${interval} interval`);
|
||||
let data = {
|
||||
internalId: internalId,
|
||||
interval: interval
|
||||
};
|
||||
return postData(`http://127.0.0.1:6531/v2/Job/Create/${jobType}`, data)
|
||||
.then((json) => {
|
||||
console.debug(`Created Job for Manga ${internalId} at ${interval} interval`);
|
||||
console.info(`Created Job for Manga ${internalId} at ${interval} interval`);
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
@ -4,10 +4,10 @@ import { getData } from '../App';
|
||||
export class Manga
|
||||
{
|
||||
static async GetAllManga(): Promise<IManga[]> {
|
||||
console.debug("Getting all Manga");
|
||||
console.info("Getting all Manga");
|
||||
return getData("http://127.0.0.1:6531/v2/Mangas")
|
||||
.then((json) => {
|
||||
console.debug("Got all Manga");
|
||||
console.info("Got all Manga");
|
||||
const ret = json as IManga[];
|
||||
console.debug(ret);
|
||||
return (ret);
|
||||
@ -15,10 +15,10 @@ export class Manga
|
||||
}
|
||||
|
||||
static async SearchManga(name: string): Promise<IManga[]> {
|
||||
console.debug(`Getting Manga ${name} from all Connectors`);
|
||||
console.info(`Getting Manga ${name} from all Connectors`);
|
||||
return await getData(`http://127.0.0.1:6531/v2/Manga/Search?title=${name}`)
|
||||
.then((json) => {
|
||||
console.debug(`Got Manga ${name}`);
|
||||
console.info(`Got Manga ${name}`);
|
||||
const ret = json as IManga[];
|
||||
console.debug(ret);
|
||||
return (ret);
|
||||
@ -26,10 +26,10 @@ export class Manga
|
||||
}
|
||||
|
||||
static async GetMangaById(internalId: string): Promise<IManga> {
|
||||
console.debug(`Getting Manga ${internalId}`);
|
||||
console.info(`Getting Manga ${internalId}`);
|
||||
return await getData(`http://127.0.0.1:6531/v2/Manga/${internalId}`)
|
||||
.then((json) => {
|
||||
console.debug(`Got Manga ${internalId}`);
|
||||
console.info(`Got Manga ${internalId}`);
|
||||
const ret = json as IManga;
|
||||
console.debug(ret);
|
||||
return (ret);
|
||||
|
@ -5,28 +5,28 @@ import { getData } from '../App';
|
||||
export class MangaConnector
|
||||
{
|
||||
static async GetAllConnectors(): Promise<IMangaConnector[]> {
|
||||
console.debug("Getting all MangaConnectors");
|
||||
console.info("Getting all MangaConnectors");
|
||||
return getData("http://127.0.0.1:6531/v2/Connector/Types")
|
||||
.then((json) => {
|
||||
console.debug("Got all MangaConnectors");
|
||||
console.info("Got all MangaConnectors");
|
||||
return (json as IMangaConnector[]);
|
||||
});
|
||||
}
|
||||
|
||||
static async GetMangaFromConnectorByTitle(connector: IMangaConnector, name: string): Promise<IManga[]> {
|
||||
console.debug(`Getting Manga ${name}`);
|
||||
console.info(`Getting Manga ${name}`);
|
||||
return await getData(`http://127.0.0.1:6531/v2/Connector/${connector.name}/GetManga?title=${name}`)
|
||||
.then((json) => {
|
||||
console.debug(`Got Manga ${name}`);
|
||||
console.info(`Got Manga ${name}`);
|
||||
return (json as IManga[]);
|
||||
});
|
||||
}
|
||||
|
||||
static async GetMangaFromConnectorByUrl(connector: IMangaConnector, url: string): Promise<IManga> {
|
||||
console.debug(`Getting Manga ${url}`);
|
||||
console.info(`Getting Manga ${url}`);
|
||||
return await getData(`http://127.0.0.1:6531/v2/Connector/${connector.name}/GetManga?url=${url}`)
|
||||
.then((json) => {
|
||||
console.debug(`Got Manga ${url}`);
|
||||
console.info(`Got Manga ${url}`);
|
||||
return (json as IManga);
|
||||
});
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ export default function Search({onJobsChanged, closeSearch} : {onJobsChanged: Ev
|
||||
console.error("Tried initiating search while not all fields where submitted.")
|
||||
return;
|
||||
}
|
||||
console.debug(`Searching Name: ${searchBoxValue} Connector: ${selectedConnector.name} Language: ${selectedLanguage}`);
|
||||
console.info(`Searching Name: ${searchBoxValue} Connector: ${selectedConnector.name} Language: ${selectedLanguage}`);
|
||||
if(isValidUri(searchBoxValue) && !selectedConnector.BaseUris.find((uri: string) => {
|
||||
const match = searchBoxValue.match(pattern);
|
||||
if(match === null)
|
||||
|
Loading…
Reference in New Issue
Block a user