Fix a bunch of imports and certs page missing user

update-next
Thomas Lynch 5 months ago
parent 5b1e386934
commit 36f54dfdc3
  1. 2
      agent.js
  2. 1
      controllers/certs.js
  3. 1
      pages/account.js
  4. 1
      pages/certs.js
  5. 5
      pages/global.css
  6. 2
      router.js
  7. 2
      util.js

@ -1,6 +1,8 @@
'use strict';
import https from 'https';
import dotenv from 'dotenv';
await dotenv.config({ path: '.env' });
const agentOptions = {
rejectUnauthorized: !process.env.ALLOW_SELF_SIGNED_SSL,

@ -28,6 +28,7 @@ export async function certsPage(app, req, res) {
.then(certs => filterCertsByDomain(certs.data, res.locals.user.domains));
return app.render(req, res, '/certs', {
csrf: req.csrfToken(),
user: res.locals.user,
dbCerts: dbCerts || [],
clusterCerts: clusterCerts || [],
});

@ -157,7 +157,6 @@ export default function Account(props) {
innerData = (
<div className='d-flex flex-column'>
{error && <ErrorAlert error={error} />}
<div className='text-center mb-4'>
<div className='spinner-border mt-5' role='status'>
<span className='visually-hidden'>Loading...</span>

@ -39,7 +39,6 @@ export default function Certs(props) {
}
const { user, csrf, dbCerts, clusterCerts } = state;
console.log(user, csrf, dbCerts, clusterCerts);
if (user && !user.onboarding) {
router.push('/onboarding');

@ -39,7 +39,7 @@ input:autofill, input:-webkit-autofill {
box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
border-color: #86b7fe!important;
}
tr:target, tr:target textarea {
tr:target td, tr:target textarea {
background: var(--bs-highlight-bg);
}
table.notaborder textarea {
@ -89,8 +89,9 @@ table.notaborder textarea {
.list-group-item-action:focus, .list-group-item-action:hover { color: #fff; background-color: #1F1F1F; }
.sidebar, .table { background-color: #2c2f33!important; }
.table { border-color: var(--bs-gray-900)!important; }
tr:target {
tr:target td {
background: #ffc10720!important;
--bs-table-accent-bg: #ffc10720 !important;
}
tr:target textarea {
background: transparent!important;

@ -10,7 +10,7 @@ import * as db from './db.js';
import { dynamicResponse } from './util.js';
import definition from './specification_openapiv3.js';
import * as update from './update.js';
import * as agent from './agent.js';
import agent from './agent.js';
import * as accountController from './controllers/account.js';
import * as mapsController from './controllers/maps.js';

@ -139,7 +139,7 @@ export function getApproxSubject(storageName) {
export function filterCertsByDomain(certs, allowedDomains) {
return certs.filter((c) => {
const approxSubject = module.exports.getApproxSubject(c.storage_name);
const approxSubject = getApproxSubject(c.storage_name);
return allowedDomains.includes(approxSubject);
});
}

Loading…
Cancel
Save