Skip to content

Commit

Permalink
Improve about dialog and download pages
Browse files Browse the repository at this point in the history
  • Loading branch information
iaincollins committed Feb 11, 2024
1 parent 0cffba7 commit eb05bbb
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 33 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Deploy Ardent Website to Production

# ABOUT
#
# This deployment script assumes the following are configured in GitHub actions:
#
# SSH_PRIVATE_KEY [secret]
Expand All @@ -12,6 +13,12 @@ name: Deploy Ardent Website to Production
# * DEPLOY_DIR should be an absolute path.
# * SERVICE_NAME should match the name of the repository in GitHub.
#
# This deployment script differs slightly from the other ardent deployment
# scripts. Updating the service in place would cause Next.js runtime errors
# during the build step. To avoid that, instead of simply updating the project
# and restarting it, it creates a copy of the current deployment, updates that
# copy and then swaps directories and restarts the service.
#
# SETUP
#
# This script assumes that Node.js is installed, that "pm2" is installed
Expand Down
21 changes: 9 additions & 12 deletions components/dialog/about-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,30 @@ export default ({ toggle }) => {
</p>
<ul className='clear'>
<li>
Trade Orders: {stats.trade.tradeOrders.toLocaleString()}
</li>
<li>
Trade Orders: {stats.trade.tradeOrders.toLocaleString()}
Star systems: {stats.systems.toLocaleString()}
</li>
<li>
Markets: {(stats.trade.stations + stats.trade.carriers).toLocaleString()}
Stations, ports &amp; settlements: {stats.stations.stations.toLocaleString()}
</li>
<li>
Trade Systems: {stats.trade.systems.toLocaleString()}
Fleet Carriers: {stats.stations.carriers.toLocaleString()}
</li>
<li>
Star systems: {stats.systems.toLocaleString()}
Trade orders: {stats.trade.tradeOrders.toLocaleString()}
</li>
<li>
Stations &amp; Settlements: {stats.stations.stations.toLocaleString()}
Trade markets: {(stats.trade.stations + stats.trade.carriers).toLocaleString()}
</li>
<li>
Fleet Carriers: {stats.stations.carriers.toLocaleString()}
Trade systems: {stats.trade.systems.toLocaleString()}
</li>
<li>
Points of Interest: {stats.pointsOfInterest.toLocaleString()}
Points of interest: {stats.pointsOfInterest.toLocaleString()}
</li>
</ul>
</>}
<p>
Uses data submitted to <a href='https://eddn.edcd.io' rel='noreferrer' target='_blank'>EDDN</a>, which is run by <a href='https://edcd.github.io/' rel='noreferrer' target='_blank'>EDCD</a>.
Data from <a href='https://eddn.edcd.io' rel='noreferrer' target='_blank'>EDDN</a>, which is run by <a href='https://edcd.github.io/' rel='noreferrer' target='_blank'>EDCD</a>.
</p>
<h3>Downloads</h3>
<p className='clear'>
Expand All @@ -79,7 +76,7 @@ export default ({ toggle }) => {
<span className='muted'> | </span>
<a href='https://github.com/iaincollins/ardent-collector' rel='noreferrer' target='_blank'>Ardent Collector</a>
<span className='muted'> | </span>
<a href='/downloads' rel='noreferrer' target='_blank'>Downloads</a>
<a href='/downloads' rel='noreferrer' target='_blank'>Data Downloads</a>
</p>


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ardent-www",
"version": "0.38.8",
"version": "0.38.9",
"description": "Ardent Industry",
"main": "index.js",
"scripts": {
Expand Down
47 changes: 27 additions & 20 deletions pages/downloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,69 +17,76 @@ export default () => {
<div className='fx__fade-in'>
<h2 className='heading--with-icon'>
<i className='icon icarus-terminal-download' />
Downloads
Data Downloads
</h2>
<p className='clear'>
Bulk exports of data from Ardent Industry in SQLite databases.
Bulk exports of data from Ardent Industry as SQLite databases.
</p>
<p>
Sources include EDDB, ESDM, Spansh and EDDN.
Sources used to seed the data include EDDB, ESDM, Spansh and EDDN.
</p>
<p>
Last updated on {backupData?.completed?.replace(/\.(.*)/, '')?.replace('T', ' at ')?.replace(/$/, ' UTC') ?? '...'}
Last updated {backupData?.completed?.replace(/\.(.*)/, '')?.replace('T', ' @ ')?.replace(/$/, ' UTC') ?? '...'}
</p>
<h3>systems.db</h3>
<p className='clear'>
<em>Name and location of all solar systems in the galaxy known to Ardent.</em>
</p>
<p className='clear'>
<i className='icon icarus-terminal-download' />
<Link href='https://downloads.ardent-industry.com/systems.db'><strong>Download systems.db</strong></Link>
{backupData &&
<small>
<br />{backupData?.databases?.filter(db => db.name === 'systems.db')?.[0]?.tables?.systems?.toLocaleString()} systems
<br />{(backupData?.databases?.filter(db => db.name === 'systems.db')?.[0]?.size / 1000000000).toLocaleString(undefined, { maximumFractionDigits: 0 })} GB
<span style={{opacity: .5}}>{' | '}</span>
Size: {(backupData?.databases?.filter(db => db.name === 'systems.db')?.[0]?.size / 1000000000).toLocaleString(undefined, { maximumFractionDigits: 0 })} GB
</small>}
</p>
<p>
<em>Name and location of all solar systems in the galaxy known to Ardent.</em>
</p>

<h3>trade.db</h3>
<p className='clear'>
<em>A list of all buy and sell commodity orders being tracked by Ardent.</em>
</p>
<p className='clear'>
<i className='icon icarus-terminal-download' />
<Link href='https://downloads.ardent-industry.com/trade.db'><strong>Download trade.db</strong></Link>
{backupData &&
<small>
<br />{backupData?.databases?.filter(db => db.name === 'trade.db')?.[0]?.tables?.commodities?.toLocaleString()} commodities
<br />{(backupData?.databases?.filter(db => db.name === 'trade.db')?.[0]?.size / 1000000000).toLocaleString(undefined, { maximumFractionDigits: 0 })} GB
<span style={{opacity: .5}}>{' | '}</span>
Size: {(backupData?.databases?.filter(db => db.name === 'trade.db')?.[0]?.size / 1000000000).toLocaleString(undefined, { maximumFractionDigits: 0 })} GB
</small>}
</p>
<p>
<em>A list of all buy/sell commodity orders being tracked by Ardent.</em>
</p>

<h3>stations.db</h3>
<p className='clear'>
<em>All stations, ports, outposts, settlements, megaships and fleet carriers known to Ardent.</em>
</p>
<p className='clear'>
<i className='icon icarus-terminal-download' />
<Link href='https://downloads.ardent-industry.com/stations.db'><strong>Download stations.db</strong></Link>
{backupData &&
<small>
<br />{backupData?.databases?.filter(db => db.name === 'stations.db')?.[0]?.tables?.stations?.toLocaleString()} stations
<br />{(backupData?.databases?.filter(db => db.name === 'stations.db')?.[0]?.size / 1000000).toLocaleString(undefined, { maximumFractionDigits: 0 })} MB
<span style={{opacity: .5}}>{' | '}</span>
Size: {(backupData?.databases?.filter(db => db.name === 'stations.db')?.[0]?.size / 1000000).toLocaleString(undefined, { maximumFractionDigits: 0 })} MB
</small>}
</p>
<p>
<em>All stations, ports, outposts, settlements, megaships and fleet carriers known to Ardent.</em>
</p>

<h3>locations.db</h3>
<p className='clear'>
<em>Points of interest Ardent has received telemetry for.</em>
</p>
<p className='clear'>
<i className='icon icarus-terminal-download' />
<Link href='https://downloads.ardent-industry.com/locations.db'><strong>Download locations.db</strong></Link>
{backupData &&
<small>
<br />{backupData?.databases?.filter(db => db.name === 'locations.db')?.[0]?.tables?.locations?.toLocaleString()} locations
<br />{(backupData?.databases?.filter(db => db.name === 'locations.db')?.[0]?.size / 1000).toLocaleString(undefined, { maximumFractionDigits: 0 })} KB
<span style={{opacity: .5}}>{' | '}</span>
Size: {(backupData?.databases?.filter(db => db.name === 'locations.db')?.[0]?.size / 1000).toLocaleString(undefined, { maximumFractionDigits: 0 })} KB
</small>}
</p>
<p>
<em>Points of interest which Ardent has received telemetry for.</em>
</p>
</div>
</Layout>
)
Expand Down

0 comments on commit eb05bbb

Please sign in to comment.