1
0
mirror of synced 2025-12-19 17:48:10 -05:00

Remove dev from dashboard

This commit is contained in:
Simon Cozens
2025-11-06 17:27:12 +00:00
parent c826dd07cf
commit a49844b207

View File

@@ -41,7 +41,6 @@ export function RenderFamily({family, directory, allResults, metadata, servers,
); );
} }
let repo_metadata = metadata[directory]; let repo_metadata = metadata[directory];
let dev_metadata = servers?.dev?.metadata[family] || {};
let sandbox_metadata = servers?.sandbox?.metadata[family] || {}; let sandbox_metadata = servers?.sandbox?.metadata[family] || {};
let production_metadata = servers?.production?.metadata[family] || {}; let production_metadata = servers?.production?.metadata[family] || {};
@@ -53,7 +52,6 @@ export function RenderFamily({family, directory, allResults, metadata, servers,
<tr><th>Date added</th> <td>{new Date(repo_metadata.dateAdded).toLocaleDateString()}</td></tr> <tr><th>Date added</th> <td>{new Date(repo_metadata.dateAdded).toLocaleDateString()}</td></tr>
<tr><th>Last updated</th> <td>{lastUpdated}</td></tr> <tr><th>Last updated</th> <td>{lastUpdated}</td></tr>
<tr><th>Repo version</th> <td>{repo_metadata.version}</td></tr> <tr><th>Repo version</th> <td>{repo_metadata.version}</td></tr>
<tr><th>Dev version</th> <td class="dev">{servers?.dev.families[family]?.version || "None"}</td></tr>
<tr><th>Sandbox version</th> <td class="sandbox">{servers?.sandbox.families[family]?.version || "None"}</td></tr> <tr><th>Sandbox version</th> <td class="sandbox">{servers?.sandbox.families[family]?.version || "None"}</td></tr>
<tr ><th>Production version</th> <td class="production">{servers?.production.families[family]?.version || "None"}</td></tr> <tr ><th>Production version</th> <td class="production">{servers?.production.families[family]?.version || "None"}</td></tr>
{ pullsForThisDirectory.length > 0 ? { pullsForThisDirectory.length > 0 ?
@@ -72,7 +70,6 @@ export function RenderFamily({family, directory, allResults, metadata, servers,
{CompareMetadata({ {CompareMetadata({
repo: repo_metadata, repo: repo_metadata,
dev: dev_metadata,
sandbox: sandbox_metadata, sandbox: sandbox_metadata,
production: production_metadata, production: production_metadata,
})} })}
@@ -101,10 +98,9 @@ export function RenderFamily({family, directory, allResults, metadata, servers,
</div>; </div>;
} }
function CompareMetadata({repo, dev, sandbox, production}) { function CompareMetadata({repo, sandbox, production}) {
let allKeys = new Set([ let allKeys = new Set([
...Object.keys(repo), ...Object.keys(repo),
...Object.keys(dev),
...Object.keys(sandbox), ...Object.keys(sandbox),
...Object.keys(production), ...Object.keys(production),
]); ]);
@@ -126,9 +122,9 @@ function CompareMetadata({repo, dev, sandbox, production}) {
return value !== undefined && value !== null && value !== ''; return value !== undefined && value !== null && value !== '';
}; };
let allEmpty = (key) => { let allEmpty = (key) => {
return !truthy(repo[key]) && !truthy(dev[key]) && !truthy(sandbox[key]) && !truthy(production[key]); return !truthy(repo[key]) && !truthy(sandbox[key]) && !truthy(production[key]);
}; };
let servers = { "repo": repo, "dev": dev, "sandbox": sandbox, "production": production }; let servers = { "repo": repo, "sandbox": sandbox, "production": production };
let furthest = (serverlist) => { let furthest = (serverlist) => {
if (serverlist.includes("production")) { if (serverlist.includes("production")) {
return "production"; return "production";
@@ -136,9 +132,6 @@ function CompareMetadata({repo, dev, sandbox, production}) {
if (serverlist.includes("sandbox")) { if (serverlist.includes("sandbox")) {
return "sandbox"; return "sandbox";
} }
if (serverlist.includes("dev")) {
return "dev";
}
return "repo"; return "repo";
} }
@@ -174,10 +167,8 @@ function CompareMetadata({repo, dev, sandbox, production}) {
export function hasVersionDifference(family, metadata, servers) { export function hasVersionDifference(family, metadata, servers) {
let repoVersion = metadata[family]?.version?.split(";")[0]; let repoVersion = metadata[family]?.version?.split(";")[0];
let devVersion = servers?.dev?.families[family]?.version.split(";")[0];
let sandboxVersion = servers?.sandbox?.families[family]?.version.split(";")[0]; let sandboxVersion = servers?.sandbox?.families[family]?.version.split(";")[0];
let productionVersion = servers?.production?.families[family]?.version.split(";")[0]; let productionVersion = servers?.production?.families[family]?.version.split(";")[0];
return (repoVersion && repoVersion !== devVersion) || return (repoVersion && repoVersion !== sandboxVersion) ||
(sandboxVersion && sandboxVersion !== devVersion) ||
(productionVersion && productionVersion !== sandboxVersion); (productionVersion && productionVersion !== sandboxVersion);
} }