@microlight/core 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scripts/prepareServer.js +26 -1
- package/dist/server/app/layout.js +2 -18
- package/dist/server/app/library/[[...f_path]]/ViewFolder.js +37 -66
- package/dist/server/app/monitoring/MonitoringDashboard.js +167 -215
- package/dist/server/app/tasks/[slug]/ViewTask.js +81 -173
- package/dist/server/app/tasks/[slug]/runs/[r_id]/ViewRun.js +68 -164
- package/dist/server/app/tasks/[slug]/runs/[r_id]/_components/DropdownActions/DropdownActions.js +19 -25
- package/dist/server/components/Link.js +6 -15
- package/dist/server/components/MLInput.js +19 -22
- package/dist/server/components/Navbar/Navbar.js +14 -51
- package/dist/server/components/Navbar/NavbarContainer.js +7 -20
- package/dist/server/components/PageHeader.js +22 -54
- package/dist/server/components/StatusChip.js +5 -5
- package/dist/server/components/ui/alert.js +61 -0
- package/dist/server/components/ui/badge.js +37 -0
- package/dist/server/components/ui/breadcrumb.js +82 -0
- package/dist/server/components/ui/button.js +65 -0
- package/dist/server/components/ui/card.js +81 -0
- package/dist/server/components/ui/dropdown-menu.js +222 -0
- package/dist/server/components/ui/input.js +21 -0
- package/dist/server/components/ui/label.js +20 -0
- package/dist/server/components/ui/select.js +165 -0
- package/dist/server/components/ui/stack.js +104 -0
- package/dist/server/components/ui/table.js +77 -0
- package/dist/server/components/ui/tabs.js +59 -0
- package/dist/server/components/ui/typography.js +229 -0
- package/dist/server/utils/css/cn.js +11 -0
- package/package.json +15 -3
- package/dist/server/components/Icon.js +0 -22
|
@@ -26,9 +26,34 @@ export async function prepareServer() {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
// Copy files
|
|
29
|
+
// Copy server JS files
|
|
30
30
|
copySync(serverSrcDir, serverDestDir, {
|
|
31
31
|
overwrite: true
|
|
32
32
|
});
|
|
33
|
+
|
|
34
|
+
// Copy static assets from src/app (globals.css, favicon.ico)
|
|
35
|
+
const staticAssets = ["globals.css", "favicon.ico"];
|
|
36
|
+
const srcAppDir = path.join(coreRoot, "src", "app");
|
|
37
|
+
const destAppDir = path.join(serverDestDir, "app");
|
|
38
|
+
for (const asset of staticAssets) {
|
|
39
|
+
const srcPath = path.join(srcAppDir, asset);
|
|
40
|
+
const destPath = path.join(destAppDir, asset);
|
|
41
|
+
if (fs.existsSync(srcPath)) {
|
|
42
|
+
copySync(srcPath, destPath, {
|
|
43
|
+
overwrite: true
|
|
44
|
+
});
|
|
45
|
+
console.log(`Copied ${asset}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Copy public folder assets
|
|
50
|
+
const publicSrcDir = path.join(coreRoot, "public");
|
|
51
|
+
const publicDestDir = path.join(processDir, ".microlight", "server", "public");
|
|
52
|
+
if (fs.existsSync(publicSrcDir)) {
|
|
53
|
+
copySync(publicSrcDir, publicDestDir, {
|
|
54
|
+
overwrite: true
|
|
55
|
+
});
|
|
56
|
+
console.log("Public assets copied successfully!");
|
|
57
|
+
}
|
|
33
58
|
console.log("Server files copied successfully!");
|
|
34
59
|
}
|
|
@@ -2,35 +2,19 @@ import { Inter } from "next/font/google";
|
|
|
2
2
|
const inter = Inter({
|
|
3
3
|
subsets: ["latin"]
|
|
4
4
|
});
|
|
5
|
+
import "./globals.css";
|
|
5
6
|
import TopLoader from "../components/TopLoader";
|
|
6
7
|
// import ServiceWorkerRegistration from "@/components/ServiceWorkerRegistration";
|
|
7
8
|
import NavbarContainer from "../components/Navbar/NavbarContainer";
|
|
8
9
|
export const metadata = {
|
|
9
10
|
title: "Microlight",
|
|
10
11
|
description: "Simple single server task runner"
|
|
11
|
-
// icons: {
|
|
12
|
-
// icon: [
|
|
13
|
-
// { url: '/favicon.ico' },
|
|
14
|
-
// { url: '/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
|
|
15
|
-
// { url: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
|
|
16
|
-
// { url: '/favicon-48x48.png', sizes: '48x48', type: 'image/png' },
|
|
17
|
-
// ],
|
|
18
|
-
// apple: [
|
|
19
|
-
// { url: '/apple-touch-icon.png' },
|
|
20
|
-
// ],
|
|
21
|
-
// },
|
|
22
12
|
};
|
|
23
13
|
export default function RootLayout({
|
|
24
14
|
children
|
|
25
15
|
}) {
|
|
26
16
|
return <html lang="en">
|
|
27
|
-
<
|
|
28
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" />
|
|
29
|
-
</head>
|
|
30
|
-
<body className={inter.className} style={{
|
|
31
|
-
margin: 0,
|
|
32
|
-
padding: 0
|
|
33
|
-
}}>
|
|
17
|
+
<body className={`${inter.className} m-0 p-0`}>
|
|
34
18
|
{/* <ServiceWorkerRegistration /> */}
|
|
35
19
|
<TopLoader />
|
|
36
20
|
<NavbarContainer>
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { Table, Box, Container, Typography } from '@mui/joy';
|
|
4
3
|
import React from 'react';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
// import Link from '@/components/Link';
|
|
8
|
-
|
|
9
|
-
import { Link } from 'switchless';
|
|
4
|
+
import { Folder, Send } from 'lucide-react';
|
|
5
|
+
import Link from "../../../components/Link";
|
|
10
6
|
import PageHeader from "../../../components/PageHeader";
|
|
7
|
+
import { Typography } from "../../../components/ui/typography";
|
|
8
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../../../components/ui/table";
|
|
11
9
|
function generateBreadcrumbs({
|
|
12
10
|
params
|
|
13
11
|
}) {
|
|
@@ -47,67 +45,40 @@ export default function ViewFolder({
|
|
|
47
45
|
params
|
|
48
46
|
});
|
|
49
47
|
const dir = params.f_path ? '/' + params.f_path?.join('/') : '';
|
|
50
|
-
return
|
|
51
|
-
<Container>
|
|
48
|
+
return <div className="max-w-7xl mx-auto">
|
|
52
49
|
<PageHeader breadcrumbs={breadcrumbs} header={{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
part1: 'Folder:',
|
|
51
|
+
part2: folder.name
|
|
52
|
+
}} />
|
|
56
53
|
<Typography level='body-sm'>{folder.description}</Typography>
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<Link href={'/library' + '/' + content.slug}>{content.name}</Link>
|
|
83
|
-
</Box>
|
|
84
|
-
</>}
|
|
85
|
-
{content.type == 'task' && <>
|
|
86
|
-
<Box sx={{
|
|
87
|
-
display: 'flex',
|
|
88
|
-
alignItems: 'center',
|
|
89
|
-
gap: 1
|
|
90
|
-
}}>
|
|
91
|
-
{/* <Icon icon='send' color='#6435c9'/> */}
|
|
92
|
-
<i class="fa-solid fa-paper-plane fa-xl" style={{
|
|
93
|
-
color: '#6435c9'
|
|
94
|
-
}}></i>
|
|
95
|
-
<Link href={'/tasks/' + content.slug}>{content.name}</Link>
|
|
96
|
-
</Box>
|
|
97
|
-
</>}
|
|
98
|
-
</td>
|
|
99
|
-
<td>{content.description}</td>
|
|
100
|
-
<td></td>
|
|
101
|
-
</tr>
|
|
102
|
-
</React.Fragment>;
|
|
54
|
+
<div className="mt-2">
|
|
55
|
+
<Table>
|
|
56
|
+
<TableHeader>
|
|
57
|
+
<TableRow>
|
|
58
|
+
<TableHead>Name</TableHead>
|
|
59
|
+
<TableHead>Description</TableHead>
|
|
60
|
+
<TableHead>Tasks</TableHead>
|
|
61
|
+
</TableRow>
|
|
62
|
+
</TableHeader>
|
|
63
|
+
<TableBody>
|
|
64
|
+
{contents.map(content => {
|
|
65
|
+
return <TableRow key={`${content.type}__${content.slug}`}>
|
|
66
|
+
<TableCell>
|
|
67
|
+
{content.type == 'folder' && <div className="flex items-center gap-2">
|
|
68
|
+
<Folder className="h-5 w-5 text-muted-foreground" />
|
|
69
|
+
<Link href={'/library' + '/' + content.slug}>{content.name}</Link>
|
|
70
|
+
</div>}
|
|
71
|
+
{content.type == 'task' && <div className="flex items-center gap-2">
|
|
72
|
+
<Send className="h-5 w-5 text-[#6435c9]" />
|
|
73
|
+
<Link href={'/tasks/' + content.slug}>{content.name}</Link>
|
|
74
|
+
</div>}
|
|
75
|
+
</TableCell>
|
|
76
|
+
<TableCell>{content.description}</TableCell>
|
|
77
|
+
<TableCell></TableCell>
|
|
78
|
+
</TableRow>;
|
|
103
79
|
})}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
{/* <pre>{JSON.stringify(folder,null,2)}</pre> */}
|
|
110
|
-
{/* <pre>{JSON.stringify(contents,null,2)}</pre> */}
|
|
111
|
-
</Container>
|
|
112
|
-
</>;
|
|
80
|
+
</TableBody>
|
|
81
|
+
</Table>
|
|
82
|
+
</div>
|
|
83
|
+
</div>;
|
|
113
84
|
}
|