polish
parent
20702c598a
commit
a4e4a11a59
|
|
@ -9,6 +9,7 @@ import exitHook from 'exit-hook';
|
||||||
import { initializeDatabase } from '../database/initializeDatabase.js';
|
import { initializeDatabase } from '../database/initializeDatabase.js';
|
||||||
import { DEBUG_NAMESPACE } from '../debug.config.js';
|
import { DEBUG_NAMESPACE } from '../debug.config.js';
|
||||||
import { getConfigProperty } from '../helpers/config.helpers.js';
|
import { getConfigProperty } from '../helpers/config.helpers.js';
|
||||||
|
import version from '../version.js';
|
||||||
const debug = Debug(`${DEBUG_NAMESPACE}:www:${process.pid}`);
|
const debug = Debug(`${DEBUG_NAMESPACE}:www:${process.pid}`);
|
||||||
// INITIALIZE THE DATABASE
|
// INITIALIZE THE DATABASE
|
||||||
await initializeDatabase();
|
await initializeDatabase();
|
||||||
|
|
@ -18,6 +19,7 @@ const applicationName = getConfigProperty('application.applicationName');
|
||||||
process.title = `${applicationName} (Primary)`;
|
process.title = `${applicationName} (Primary)`;
|
||||||
debug(`Primary pid: ${process.pid}`);
|
debug(`Primary pid: ${process.pid}`);
|
||||||
debug(`Primary title: ${process.title}`);
|
debug(`Primary title: ${process.title}`);
|
||||||
|
debug(`Version: ${version}`);
|
||||||
debug(`Launching ${processCount} processes`);
|
debug(`Launching ${processCount} processes`);
|
||||||
const clusterSettings = {
|
const clusterSettings = {
|
||||||
exec: `${directoryName}/wwwProcess.js`
|
exec: `${directoryName}/wwwProcess.js`
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import { initializeDatabase } from '../database/initializeDatabase.js'
|
||||||
import { DEBUG_NAMESPACE } from '../debug.config.js'
|
import { DEBUG_NAMESPACE } from '../debug.config.js'
|
||||||
import { getConfigProperty } from '../helpers/config.helpers.js'
|
import { getConfigProperty } from '../helpers/config.helpers.js'
|
||||||
import type { WorkerMessage } from '../types/applicationTypes.js'
|
import type { WorkerMessage } from '../types/applicationTypes.js'
|
||||||
|
import version from '../version.js'
|
||||||
|
|
||||||
const debug = Debug(`${DEBUG_NAMESPACE}:www:${process.pid}`)
|
const debug = Debug(`${DEBUG_NAMESPACE}:www:${process.pid}`)
|
||||||
|
|
||||||
|
|
@ -31,6 +32,7 @@ process.title = `${applicationName} (Primary)`
|
||||||
|
|
||||||
debug(`Primary pid: ${process.pid}`)
|
debug(`Primary pid: ${process.pid}`)
|
||||||
debug(`Primary title: ${process.title}`)
|
debug(`Primary title: ${process.title}`)
|
||||||
|
debug(`Version: ${version}`)
|
||||||
debug(`Launching ${processCount} processes`)
|
debug(`Launching ${processCount} processes`)
|
||||||
|
|
||||||
const clusterSettings = {
|
const clusterSettings = {
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
<i class="fas fa-exclamation-triangle" aria-hidden="true"></i>
|
<i class="fas fa-exclamation-triangle" aria-hidden="true"></i>
|
||||||
</span>`
|
</span>`
|
||||||
: ''}
|
: ''}
|
||||||
</a><br />
|
${cemetery.cemeteryKey === ''
|
||||||
|
? ''
|
||||||
|
: `<span class="tag">${cityssm.escapeHTML(cemetery.cemeteryKey)}</span>`}
|
||||||
|
</a>
|
||||||
|
<br />
|
||||||
<span class="is-size-7">
|
<span class="is-size-7">
|
||||||
${cityssm.escapeHTML(cemetery.cemeteryDescription)}
|
${cityssm.escapeHTML(cemetery.cemeteryDescription)}
|
||||||
</span>
|
</span>
|
||||||
</td><td>
|
|
||||||
${cityssm.escapeHTML(cemetery.cemeteryKey)}
|
|
||||||
</td><td>
|
</td><td>
|
||||||
${cemetery.cemeteryAddress1 === ''
|
${cemetery.cemeteryAddress1 === ''
|
||||||
? ''
|
? ''
|
||||||
|
|
@ -70,19 +72,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
</td><td class="has-text-centered">
|
</td><td class="has-text-centered">
|
||||||
${cemetery.parentCemeteryId === null
|
${cemetery.parentCemeteryId === null
|
||||||
? ''
|
? ''
|
||||||
: `<span data-tooltip="Parent: ${cemetery.parentCemeteryName ?? '(No Name)'}">
|
: `<span class="icon" data-tooltip="Parent: ${cemetery.parentCemeteryName ?? '(No Name)'}">
|
||||||
<i class="fas fa-turn-up" role="img" aria-label="Parent: ${cemetery.parentCemeteryName ?? '(No Name)'}"></i>
|
<i class="fas fa-turn-up" role="img" aria-label="Parent: ${cemetery.parentCemeteryName ?? '(No Name)'}"></i>
|
||||||
</span>`}
|
</span>`}
|
||||||
</td><td class="has-text-centered">
|
|
||||||
${cemetery.cemeteryLatitude && cemetery.cemeteryLongitude
|
${cemetery.cemeteryLatitude && cemetery.cemeteryLongitude
|
||||||
? `<span data-tooltip="Has Geographic Coordinates">
|
? `<span class="icon" data-tooltip="Geographic Coordinates">
|
||||||
<i class="fas fa-map-marker-alt" role="img" aria-label="Has Geographic Coordinates"></i>
|
<i class="fas fa-map-marker-alt" role="img" aria-label="Geographic Coordinates"></i>
|
||||||
</span>`
|
</span>`
|
||||||
: ''}
|
: ''}
|
||||||
</td><td class="has-text-centered">
|
|
||||||
${(cemetery.cemeterySvg ?? '') === ''
|
${(cemetery.cemeterySvg ?? '') === ''
|
||||||
? ''
|
? ''
|
||||||
: '<span data-tooltip="Has Image"><i class="fas fa-image" role="img" aria-label="Has Image"></i></span>'}
|
: `<span class="icon" data-tooltip="Image">
|
||||||
|
<i class="fas fa-image" role="img" aria-label="Image"></i>
|
||||||
|
</span>`}
|
||||||
</td><td class="has-text-right">
|
</td><td class="has-text-right">
|
||||||
<a href="${sunrise.urlPrefix}/burialSites?cemeteryId=${cemetery.cemeteryId}">${cemetery.burialSiteCount}</a>
|
<a href="${sunrise.urlPrefix}/burialSites?cemeteryId=${cemetery.cemeteryId}">${cemetery.burialSiteCount}</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -100,13 +102,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
'table is-fullwidth is-striped is-hoverable has-sticky-header';
|
'table is-fullwidth is-striped is-hoverable has-sticky-header';
|
||||||
searchResultsTableElement.innerHTML = `<thead><tr>
|
searchResultsTableElement.innerHTML = `<thead><tr>
|
||||||
<th>Cemetery</th>
|
<th>Cemetery</th>
|
||||||
<th>Key</th>
|
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
<th>Phone Number</th>
|
<th>Phone Number</th>
|
||||||
<th class="has-text-centered">Parent</th>
|
<th class="has-text-centered">Features</th>
|
||||||
<th class="has-text-centered">Coordinates</th>
|
<th class="has-text-right">Burial Sites</th>
|
||||||
<th class="has-text-centered">Image</th>
|
|
||||||
<th class="has-text-right">Burial Site Count</th>
|
|
||||||
</tr></thead>`;
|
</tr></thead>`;
|
||||||
searchResultsTableElement.append(searchResultsTbodyElement);
|
searchResultsTableElement.append(searchResultsTbodyElement);
|
||||||
searchResultsContainerElement.append(searchResultsTableElement);
|
searchResultsContainerElement.append(searchResultsTableElement);
|
||||||
|
|
|
||||||
|
|
@ -78,12 +78,16 @@ declare const exports: Record<string, unknown>
|
||||||
</span>`
|
</span>`
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
</a><br />
|
${
|
||||||
|
cemetery.cemeteryKey === ''
|
||||||
|
? ''
|
||||||
|
: `<span class="tag">${cityssm.escapeHTML(cemetery.cemeteryKey)}</span>`
|
||||||
|
}
|
||||||
|
</a>
|
||||||
|
<br />
|
||||||
<span class="is-size-7">
|
<span class="is-size-7">
|
||||||
${cityssm.escapeHTML(cemetery.cemeteryDescription)}
|
${cityssm.escapeHTML(cemetery.cemeteryDescription)}
|
||||||
</span>
|
</span>
|
||||||
</td><td>
|
|
||||||
${cityssm.escapeHTML(cemetery.cemeteryKey)}
|
|
||||||
</td><td>
|
</td><td>
|
||||||
${
|
${
|
||||||
cemetery.cemeteryAddress1 === ''
|
cemetery.cemeteryAddress1 === ''
|
||||||
|
|
@ -108,23 +112,23 @@ declare const exports: Record<string, unknown>
|
||||||
${
|
${
|
||||||
cemetery.parentCemeteryId === null
|
cemetery.parentCemeteryId === null
|
||||||
? ''
|
? ''
|
||||||
: `<span data-tooltip="Parent: ${cemetery.parentCemeteryName ?? '(No Name)'}">
|
: `<span class="icon" data-tooltip="Parent: ${cemetery.parentCemeteryName ?? '(No Name)'}">
|
||||||
<i class="fas fa-turn-up" role="img" aria-label="Parent: ${cemetery.parentCemeteryName ?? '(No Name)'}"></i>
|
<i class="fas fa-turn-up" role="img" aria-label="Parent: ${cemetery.parentCemeteryName ?? '(No Name)'}"></i>
|
||||||
</span>`
|
</span>`
|
||||||
}
|
}
|
||||||
</td><td class="has-text-centered">
|
|
||||||
${
|
${
|
||||||
cemetery.cemeteryLatitude && cemetery.cemeteryLongitude
|
cemetery.cemeteryLatitude && cemetery.cemeteryLongitude
|
||||||
? `<span data-tooltip="Has Geographic Coordinates">
|
? `<span class="icon" data-tooltip="Geographic Coordinates">
|
||||||
<i class="fas fa-map-marker-alt" role="img" aria-label="Has Geographic Coordinates"></i>
|
<i class="fas fa-map-marker-alt" role="img" aria-label="Geographic Coordinates"></i>
|
||||||
</span>`
|
</span>`
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
</td><td class="has-text-centered">
|
|
||||||
${
|
${
|
||||||
(cemetery.cemeterySvg ?? '') === ''
|
(cemetery.cemeterySvg ?? '') === ''
|
||||||
? ''
|
? ''
|
||||||
: '<span data-tooltip="Has Image"><i class="fas fa-image" role="img" aria-label="Has Image"></i></span>'
|
: `<span class="icon" data-tooltip="Image">
|
||||||
|
<i class="fas fa-image" role="img" aria-label="Image"></i>
|
||||||
|
</span>`
|
||||||
}
|
}
|
||||||
</td><td class="has-text-right">
|
</td><td class="has-text-right">
|
||||||
<a href="${sunrise.urlPrefix}/burialSites?cemeteryId=${cemetery.cemeteryId}">${cemetery.burialSiteCount}</a>
|
<a href="${sunrise.urlPrefix}/burialSites?cemeteryId=${cemetery.cemeteryId}">${cemetery.burialSiteCount}</a>
|
||||||
|
|
@ -147,13 +151,10 @@ declare const exports: Record<string, unknown>
|
||||||
|
|
||||||
searchResultsTableElement.innerHTML = `<thead><tr>
|
searchResultsTableElement.innerHTML = `<thead><tr>
|
||||||
<th>Cemetery</th>
|
<th>Cemetery</th>
|
||||||
<th>Key</th>
|
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
<th>Phone Number</th>
|
<th>Phone Number</th>
|
||||||
<th class="has-text-centered">Parent</th>
|
<th class="has-text-centered">Features</th>
|
||||||
<th class="has-text-centered">Coordinates</th>
|
<th class="has-text-right">Burial Sites</th>
|
||||||
<th class="has-text-centered">Image</th>
|
|
||||||
<th class="has-text-right">Burial Site Count</th>
|
|
||||||
</tr></thead>`
|
</tr></thead>`
|
||||||
|
|
||||||
searchResultsTableElement.append(searchResultsTbodyElement)
|
searchResultsTableElement.append(searchResultsTbodyElement)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.has-width-1 {
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
/* to fix page titles inside level components, set on .level-left */
|
/* to fix page titles inside level components, set on .level-left */
|
||||||
|
|
||||||
.has-flex-shrink-1 {
|
.has-flex-shrink-1 {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
export function getDeathAgePeriod(legacyDeathAgePeriod) {
|
export function getDeathAgePeriod(legacyDeathAgePeriod) {
|
||||||
switch (legacyDeathAgePeriod.toLowerCase()) {
|
switch (legacyDeathAgePeriod.toLowerCase()) {
|
||||||
case 'yrs': {
|
case 'dys': {
|
||||||
return 'Years';
|
return 'Days';
|
||||||
}
|
}
|
||||||
case 'mts': {
|
case 'mts': {
|
||||||
return 'Months';
|
return 'Months';
|
||||||
}
|
}
|
||||||
case 'dys': {
|
case 'yrs': {
|
||||||
return 'Days';
|
return 'Years';
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
return legacyDeathAgePeriod;
|
return legacyDeathAgePeriod;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
export function getDeathAgePeriod(legacyDeathAgePeriod: string): string {
|
export function getDeathAgePeriod(legacyDeathAgePeriod: string): string {
|
||||||
switch (legacyDeathAgePeriod.toLowerCase()) {
|
switch (legacyDeathAgePeriod.toLowerCase()) {
|
||||||
case 'yrs': {
|
case 'dys': {
|
||||||
return 'Years'
|
return 'Days'
|
||||||
}
|
}
|
||||||
case 'mts': {
|
case 'mts': {
|
||||||
return 'Months'
|
return 'Months'
|
||||||
}
|
}
|
||||||
case 'dys': {
|
case 'yrs': {
|
||||||
return 'Days'
|
return 'Years'
|
||||||
}
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<div class="level">
|
<div class="level is-mobile">
|
||||||
<div class="level-left">
|
<div class="level-left">
|
||||||
<div class="level-item">
|
<div class="level-item">
|
||||||
<h2 class="title is-5 has-text-weight-bold has-text-white">Image</h2>
|
<h2 class="title is-5 has-text-weight-bold has-text-white">Image</h2>
|
||||||
|
|
@ -345,10 +345,12 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th class="has-text-right">
|
<th class="has-width-1 has-text-right">
|
||||||
Burial Site Count
|
Burial Sites
|
||||||
|
</th>
|
||||||
|
<th class="has-width-1 has-text-right">
|
||||||
|
Percentage
|
||||||
</th>
|
</th>
|
||||||
<th class="has-text-right">Percentage</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -375,10 +377,12 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th class="has-text-right">
|
<th class="has-width-1 has-text-right">
|
||||||
Burial Site Count
|
Burial Sites
|
||||||
|
</th>
|
||||||
|
<th class="has-width-1 has-text-right">
|
||||||
|
Percentage
|
||||||
</th>
|
</th>
|
||||||
<th class="has-text-right">Percentage</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
||||||
|
|
@ -209,10 +209,12 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th class="has-text-right">
|
<th class="has-width-1 has-text-right">
|
||||||
Burial Site Count
|
Burial Sites
|
||||||
|
</th>
|
||||||
|
<th class="has-width-1 has-text-right">
|
||||||
|
Percentage
|
||||||
</th>
|
</th>
|
||||||
<th class="has-text-right">Percentage</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -224,10 +226,10 @@
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="has-text-right">
|
<td class="has-text-right">
|
||||||
<%= burialSiteType.burialSiteCount %>
|
<%= burialSiteType.burialSiteCount %>
|
||||||
</td>
|
</td>
|
||||||
<td class="has-text-right">
|
<td class="has-text-right">
|
||||||
<%= ((burialSiteType.burialSiteCount / cemetery.burialSiteCount) * 100).toFixed(1) %>%
|
<%= ((burialSiteType.burialSiteCount / cemetery.burialSiteCount) * 100).toFixed(1) %>%
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
@ -239,10 +241,10 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th class="has-text-right">
|
<th class="has-width-1 has-text-right">
|
||||||
Burial Site Count
|
Burial Sites
|
||||||
</th>
|
</th>
|
||||||
<th class="has-text-right">Percentage</th>
|
<th class="has-width-1 has-text-right">Percentage</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -250,14 +252,14 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="has-text-weight-bold" href="<%= burialSiteSearchUrl %>&burialSiteStatusId=<%= burialSiteStatus.burialSiteStatusId %>">
|
<a class="has-text-weight-bold" href="<%= burialSiteSearchUrl %>&burialSiteStatusId=<%= burialSiteStatus.burialSiteStatusId %>">
|
||||||
<%= burialSiteStatus.burialSiteStatus %>
|
<%= burialSiteStatus.burialSiteStatus %>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="has-text-right">
|
<td class="has-text-right">
|
||||||
<%= burialSiteStatus.burialSiteCount %>
|
<%= burialSiteStatus.burialSiteCount %>
|
||||||
</td>
|
</td>
|
||||||
<td class="has-text-right">
|
<td class="has-text-right">
|
||||||
<%= ((burialSiteStatus.burialSiteCount / cemetery.burialSiteCount) * 100).toFixed(1) %>%
|
<%= ((burialSiteStatus.burialSiteCount / cemetery.burialSiteCount) * 100).toFixed(1) %>%
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue