fix(striker-ui-api): remove console calls

main
Tsu-ba-me 2 years ago
parent 32ecfec762
commit c4232916f9
  1. 3
      striker-ui-api/src/lib/request_handlers/anvil/buildQueryAnvilDetail.ts
  2. 3
      striker-ui-api/src/lib/request_handlers/file/buildQueryFileDetail.ts
  3. 16
      striker-ui-api/src/lib/request_handlers/host/configStriker.ts
  4. 3
      striker-ui-api/src/lib/request_handlers/server/getServer.ts

@ -2,6 +2,7 @@ import NODE_AND_DR_RESERVED_MEMORY_SIZE from '../../consts/NODE_AND_DR_RESERVED_
import { OS_LIST } from '../../consts/OS_LIST';
import join from '../../join';
import { stdoutVar } from '../../shell';
const buildQueryAnvilDetail = ({
anvilUUIDs = ['*'],
@ -19,7 +20,7 @@ const buildQueryAnvilDetail = ({
separator: ', ',
});
console.log(`condAnvilsUUID=[${condAnvilsUUID}]`);
stdoutVar({ condAnvilsUUID });
const buildHostQuery = ({
isSummary = false,

@ -1,4 +1,5 @@
import join from '../../join';
import { stdoutVar } from '../../shell';
const buildQueryFileDetail = ({
fileUUIDs = ['*'],
@ -14,7 +15,7 @@ const buildQueryFileDetail = ({
separator: ', ',
});
console.log(`condFilesUUID=[${condFileUUIDs}]`);
stdoutVar({ condFileUUIDs });
return `
SELECT

@ -10,6 +10,7 @@ import {
import SERVER_PATHS from '../../consts/SERVER_PATHS';
import { job } from '../../accessModule';
import { stderr, stdoutVar } from '../../shell';
const fvar = (configStepCount: number, fieldName: string) =>
['form', `config_step${configStepCount}`, fieldName, 'value'].join('::');
@ -40,8 +41,7 @@ export const configStriker: RequestHandler<
undefined,
InitializeStrikerForm
> = ({ body }, response) => {
console.log('Begin initialize Striker.');
console.dir(body, { depth: null });
stdoutVar(body, 'Begin initialize Striker; body=');
const {
adminPassword = '',
@ -105,13 +105,11 @@ export const configStriker: RequestHandler<
`Data organization prefix can only contain 1 to 5 lowercase alphanumeric characters; got [${dataOrganizationPrefix}]`,
);
} catch (assertError) {
console.log(
stderr(
`Failed to assert value when trying to initialize striker; CAUSE: ${assertError}.`,
);
response.status(400).send();
return;
return response.status(400).send();
}
try {
@ -153,11 +151,9 @@ ${buildNetworkLinks(2, networkShortName, interfaces)}`;
job_description: 'job_0071',
});
} catch (subError) {
console.log(`Failed to queue striker initialization; CAUSE: ${subError}`);
response.status(500).send();
stderr(`Failed to queue striker initialization; CAUSE: ${subError}`);
return;
return response.status(500).send();
}
response.status(200).send();

@ -1,6 +1,7 @@
import buildGetRequestHandler from '../buildGetRequestHandler';
import join from '../../join';
import { sanitize } from '../../sanitize';
import { stdoutVar } from '../../shell';
export const getServer = buildGetRequestHandler(
(request, buildQueryOptions) => {
@ -13,7 +14,7 @@ export const getServer = buildGetRequestHandler(
separator: ', ',
});
console.log(`condAnvilsUUID=[${condAnvilUUIDs}]`);
stdoutVar({ condAnvilUUIDs });
if (buildQueryOptions) {
buildQueryOptions.afterQueryReturn = (queryStdout) => {

Loading…
Cancel
Save