✨feature: Add basic template and wire up single domain list
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -53,12 +53,10 @@ router.get('/domain/:domain', async function (req, res, next) {
|
|||||||
return res.status(400).send('Error fetching site: ' + error.message);
|
return res.status(400).send('Error fetching site: ' + error.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Site found:', sites);
|
|
||||||
|
|
||||||
if (!sites || sites.length === 0) {
|
if (!sites || sites.length === 0) {
|
||||||
return res.status(404).send('Site not found');
|
return res.status(404).send('Site not found');
|
||||||
} else {
|
} else {
|
||||||
res.json(sites[0]); // Return the first match
|
res.render('sites', { title: 'Playwright Testing Dashboard', sites: sites });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
15
views/sites.ejs
Normal file
15
views/sites.ejs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<%- include('header'); -%>
|
||||||
|
|
||||||
|
<article class="container mx-auto py-4 min-h-[70dvh]">
|
||||||
|
<h2>Welcome to <%= title %></h2>
|
||||||
|
|
||||||
|
<%- include('add-form'); -%>
|
||||||
|
|
||||||
|
<h2 class="text-25px font-bold mt-8">Your Tests</h2>
|
||||||
|
|
||||||
|
<div class="mt-8">
|
||||||
|
<%- include('domain-cards', { data: sites }); -%>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<%- include('footer'); -%>
|
||||||
Reference in New Issue
Block a user