Merged PR 1250: clean up debug info, reduce page weight

clean up debug info, reduce page weight

Related work items: #12190
This commit is contained in:
Robert Bond
2024-09-26 09:15:38 +00:00
11 changed files with 49 additions and 36 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ NEXTAUTH_URL_INTERNAL = $API_ROOT
NEXTAUTH_SECRET = SuperSecret
// CNR sql server
DATABASE_URL = sqlserver://sql-srv-plt-pedw-cnr-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
DATABASE_URL = sqlserver://sql-srv-plt-pedw-cnr-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword
// dev test sql server
+6 -1
View File
@@ -26,4 +26,9 @@ docker
dockerfile*
.dockerignore
Makefile
docker*.yml
docker*.yml
# Polling
pages/api/poll-queue.js
pages/polling.js
+20 -20
View File
@@ -70,11 +70,11 @@ export const createContainerSas = async (containerName) => {
expiresOn: TEN_MINUTES_AFTER_NOW,
};
console.log(
"\n////////////////////////\nsasOptions :",
JSON.stringify(sasOptions),
"\n////////////////////////"
);
// console.log(
// "\n////////////////////////\nsasOptions :",
// JSON.stringify(sasOptions),
// "\n////////////////////////"
// );
const sasToken = generateBlobSASQueryParameters(
sasOptions,
@@ -82,11 +82,11 @@ export const createContainerSas = async (containerName) => {
accountName
).toString();
console.log(
"\n////////////////////////\nsasToken :",
sasToken,
"\n////////////////////////"
);
// console.log(
// "\n////////////////////////\nsasToken :",
// sasToken,
// "\n////////////////////////"
// );
return sasToken;
};
@@ -140,7 +140,7 @@ export const createBlobSas = async (containerName, blobName) => {
export const createContainer = async (containerName) => {
const creds = new DefaultAzureCredential();
console.log(JSON.stringify(creds));
//console.log(JSON.stringify(creds));
//containerName = containerName.toLowerCase();
//console.log(
@@ -159,7 +159,7 @@ export const createContainer = async (containerName) => {
const createContainerResponse = await containerClient
.createIfNotExists()
.then((data) => {
console.log(data);
//console.log(data);
return data;
})
.catch((error) => {
@@ -933,7 +933,7 @@ export const downloadAllRepsFiles = async (containerName, repsBlobObj) => {
Array.isArray(repsBlobObj) &&
!repsBlobObj.length &&
console.log("is empt and an array");
console.log("No partial reps for this container:" + containerName);
for (const prop in repsBlobObj) {
//console.log(`Progress - ${prop}: ${repsBlobObj[prop].path}`);
@@ -1128,13 +1128,13 @@ export const getAllProgressBlobs = async (containerName) => {
});
}
console.log(
"\n////////////////////////////\n",
sasUrl,
"blobObj:",
blobObj,
"\n////////////////////////////"
);
// console.log(
// "\n////////////////////////////\n",
// sasUrl,
// "blobObj:",
// blobObj,
// "\n////////////////////////////"
// );
return blobObj;
};
+5 -5
View File
@@ -47,8 +47,8 @@ const DocumentDetails = (props) => {
var startTime = docsOffline.split(",")[0];
var endTime = docsOffline.split(",")[1];
console.log(startTime);
console.log(endTime);
// console.log(startTime);
// console.log(endTime);
var currentDate = new Date();
@@ -62,9 +62,9 @@ const DocumentDetails = (props) => {
endDate.setMinutes(endTime.split(":")[1]);
endDate.setSeconds(endTime.split(":")[2]);
console.log(startDate);
console.log(endDate);
console.log(currentDate);
// console.log(startDate);
// console.log(endDate);
// console.log(currentDate);
var valid = startDate < currentDate && endDate > currentDate;
ShowDocLinks = valid;
+1 -1
View File
@@ -71,7 +71,7 @@ const ServiceBanner = (props) => {
<div className="serviceBanner_userDetails_name">
<Link
href="/account/personaldetails"
className="govuk-button-secondary"
className="govuk-button-secondary govuk-link"
>
{props.accountDetails.accountDetails.firstname}{" "}
{props.accountDetails.accountDetails.lastname}
+4 -2
View File
@@ -9,7 +9,7 @@ module.exports = {
},
],
"pages": {
"*": ["common", "newappeal", "search"],
"*": ["common", "search"],
"/": ["common", "home", "case"],
"/error": ["common", "home", "myportal"],
"/furtherdetails": ["common", "home", "myportal"],
@@ -39,11 +39,13 @@ module.exports = {
"/case/id/[incident]": ["case", "home"],
"/myportal/representation": ["case", "myrepresentations", "common"],
"/myportal/error": ["myportal", "common"],
"/myportal/case/id/[incident]": ["case","home"],
"/myportal/case/id/[incident]": ["case", "home"],
"/myportal/addresssearch": ["search", "case", "myportal"],
"/myportal/addresssearchresults": ["search", "case", "myportal"],
"/myportal/[appealtypes]": ["newappeal", "home"],
"/newappeal": ["newappeal", "home"],
"/newappeal/*": ["newappeal", "home"],
"/newappeal/[appealtypes]": ["newappeal", "home"],
"/newappeal/selectappeal": ["newappeal", "home"],
"/dns/*": ["dnsCommon", "case", "common"],
"/dns/[developmentName]": ["dnsCommon", "case", "common"],
+4 -1
View File
@@ -38,6 +38,7 @@
"fs": "0.0.2",
"google-map-react": "^2.2.1",
"govuk-frontend": "^5.0.0",
"history": "^5.3.0",
"jsonpath": "^1.1.1",
"jsonpath-plus": "^4.0.0",
"leaflet": "^1.9.4",
@@ -58,6 +59,7 @@
"nodemailer": "^6.9.7",
"nookies": "^2.5.2",
"notifications-node-client": "^7.0.6",
"openapi-types": "^12.1.3",
"ospoint": "^0.2.1",
"path": "^0.12.7",
"prop-types": "^15.8.1",
@@ -83,13 +85,14 @@
"sass-loader": "13.3.2",
"swagger-ui": "^5.10.3",
"swagger-ui-react": "^5.10.3",
"tslib": "^2.7.0",
"typescript": "^5.3.2",
"uuid": "9.0.0",
"webpack": "^5.66.0",
"xpath": "^0.0.32"
},
"devDependencies": {
"eslint": "^8.6.0",
"eslint": "^9.11.1",
"eslint-config-next": "^14.0.1",
"eslint-plugin-jsdoc": "^48.2.3",
"prisma": "^5.0.0"
+1 -1
View File
@@ -45,7 +45,7 @@ class MyDocument extends Document {
csp += `connect-src 'self' https://ukwest-0.in.applicationinsights.azure.com https://js.monitor.azure.com https://region1.google-analytics.com;`;
csp += `script-src 'self' 'unsafe-eval' 'unsafe-inline' https://ukwest-0.in.applicationinsights.azure.com https://region1.google-analytics.com https://www.google-analytics.com/ https://tagmanager.google.com/ https://www.googletagmanager.com/;`;
csp += `style-src 'self' 'unsafe-inline' https://pro.fontawesome.com/ https://www.google-analytics.com https://tagmanager.google.com/ https://www.googletagmanager.com/ https://fonts.googleapis.com/;`;
csp += `img-src 'self' 'unsafe-inline' https://www.gov.wales https://gov.wales https://fonts.gstatic.com https://www.googletagmanager.com https://www.google-analytics.com https://ssl.gstatic.com/ data:;`;
csp += `img-src 'self' 'unsafe-inline' https://www.gov.wales https://gov.wales https://fonts.gstatic.com https://www.googletagmanager.com https://www.google-analytics.com https://ssl.gstatic.com/ blob: data:;`;
csp += `font-src 'self' 'unsafe-inline' https://pro.fontawesome.com/ https://fonts.gstatic.com/ data:;`;
return (
+1 -1
View File
@@ -123,7 +123,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
console.log(cookies);
console.log("the query :", query.ticketnumber);
console.log("viewkey:" + query.hasOwnProperty("key") ? "yes" : "no");
console.log("viewkey: " + (query.hasOwnProperty("key") ? "yes" : "no"));
const showLoginCheck = process.env.SHOWLOGIN || false;
let thisSession = await getSession(ctx);
+3 -3
View File
@@ -227,7 +227,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
myCases,
myRepresentations,
watchedCases,
awaitingSubmission,
//awaitingSubmission,
awaitingSubmissionFromBlob,
] = await Promise.all([
accountDetails.pinswg_typeofinvolvement == 846040012
@@ -236,7 +236,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
await getRepsFromBlob(thisSession.user.id),
await getWatchedCases(loggedInUser),
await getAwaitingSubmission(loggedInUser),
//await getAwaitingSubmission(loggedInUser),
await getAwaitingSubmissionFromBlob(thisSession.user.id),
]);
@@ -337,7 +337,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
store.dispatch(setWatchedCasesDetails(watchedCasesDetails));
store.dispatch(setMySubmittedReps(mySubmittedReps));
store.dispatch(setMySubmittedRepsDetails(mySubmittedRepsDetails));
store.dispatch(setAwaitingSubmission(awaitingSubmission));
//store.dispatch(setAwaitingSubmission(awaitingSubmission));
store.dispatch(
setAwaitingSubmissionFromBlob(awaitingSubmissionFromBlob)
);
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
plugins: {},
};