diff --git a/navigation/index.js b/navigation/index.js index 697cc16..06b3687 100644 --- a/navigation/index.js +++ b/navigation/index.js @@ -1,94 +1,22 @@ export default [ { - "header": "Utama", - "description": "", - "child": [ + header: "Utama", + description: "", + child: [ { - "title": "Dashboard", - "path": "/dashboard", - "icon": "ic:outline-dashboard", - "child": [], - "meta": {} - } + title: "Dashboard", + path: "/dashboard", + icon: "ic:outline-dashboard", + child: [], + meta: {}, + }, + { + title: "Queue Dashboard", + icon: "mdi:view-dashboard", + path: "/admin", + child: [], + }, ], - "meta": {} + meta: {}, }, - { - "header": "Pentadbiran", - "description": "Urus aplikasi anda", - "child": [ - { - "title": "Konfigurasi", - "icon": "ic:outline-settings", - "child": [ - { - "title": "Persekitaran", - "path": "/devtool/config/environment" - }, - { - "title": "Site Settings", - "path": "/devtool/config/site-settings" - } - ] - }, - { - "title": "Queue Dashboard", - "icon": "mdi:view-dashboard", - "path": "/admin", - "child": [] - }, - { - "title": "Penyunting Menu", - "icon": "ci:menu-alt-03", - "path": "/devtool/menu-editor", - "child": [] - }, - { - "title": "Urus Pengguna", - "path": "/devtool/user-management", - "icon": "ph:user-circle-gear", - "child": [ - { - "title": "Senarai Pengguna", - "path": "/devtool/user-management/user", - "icon": "", - "child": [] - }, - { - "title": "Senarai Peranan", - "path": "/devtool/user-management/role", - "icon": "", - "child": [] - } - ] - }, - { - "title": "Kandungan", - "icon": "mdi:pencil-ruler", - "child": [ - { - "title": "Penyunting", - "path": "/devtool/content-editor" - }, - { - "title": "Templat", - "path": "/devtool/content-editor/template" - } - ] - }, - { - "title": "Penyunting API", - "path": "/devtool/api-editor", - "icon": "material-symbols:api-rounded", - "child": [] - } - ], - "meta": { - "auth": { - "role": [ - "Developer" - ] - } - } - } -] \ No newline at end of file +]; diff --git a/pages/BF-PRF/AS/DETAIL/[id]/index.vue b/pages/BF-PRF/AS/DETAIL/[id]/index.vue deleted file mode 100644 index 81c6af4..0000000 --- a/pages/BF-PRF/AS/DETAIL/[id]/index.vue +++ /dev/null @@ -1,674 +0,0 @@ - - - \ No newline at end of file diff --git a/pages/BF-PRF/AS/LIST/index.vue b/pages/BF-PRF/AS/LIST/index.vue deleted file mode 100644 index 00a279a..0000000 --- a/pages/BF-PRF/AS/LIST/index.vue +++ /dev/null @@ -1,337 +0,0 @@ - - - \ No newline at end of file diff --git a/pages/BF-PRF/AS/QUEUE/index.vue b/pages/BF-PRF/AS/QUEUE/index.vue deleted file mode 100644 index 493767f..0000000 --- a/pages/BF-PRF/AS/QUEUE/index.vue +++ /dev/null @@ -1,183 +0,0 @@ - - - \ No newline at end of file diff --git a/server/api/queue/asnaf-analysis/index.get.js b/server/api/queue/asnaf-analysis/index.get.js index 53f552d..aee414c 100644 --- a/server/api/queue/asnaf-analysis/index.get.js +++ b/server/api/queue/asnaf-analysis/index.get.js @@ -1,40 +1,45 @@ -import Queue from 'bull'; +// import Queue from 'bull'; -// Create a Bull queue instance -const asnafAnalysisQueue = new Queue('asnaf-analysis', { - redis: { - host: process.env.REDIS_HOST || 'localhost', - port: process.env.REDIS_PORT || 6379, - password: process.env.REDIS_PASSWORD - } -}); +// // Create a Bull queue instance +// const asnafAnalysisQueue = new Queue('asnaf-analysis', { +// redis: { +// host: process.env.REDIS_HOST || 'localhost', +// port: process.env.REDIS_PORT || 6379, +// password: process.env.REDIS_PASSWORD +// } +// }); export default defineEventHandler(async (event) => { try { - // Get all jobs from different states - const [waiting, active, completed, failed] = await Promise.all([ - asnafAnalysisQueue.getWaiting(), - asnafAnalysisQueue.getActive(), - asnafAnalysisQueue.getCompleted(), - asnafAnalysisQueue.getFailed() - ]); + // // Get all jobs from different states + // const [waiting, active, completed, failed] = await Promise.all([ + // asnafAnalysisQueue.getWaiting(), + // asnafAnalysisQueue.getActive(), + // asnafAnalysisQueue.getCompleted(), + // asnafAnalysisQueue.getFailed() + // ]); - // Combine all jobs and format them - const allJobs = [...waiting, ...active, ...completed, ...failed] - .map(job => ({ - id: job.id, - status: job.finishedOn ? 'completed' : - job.failedReason ? 'failed' : - job.processedOn ? 'active' : 'waiting', - data: job.data, - timestamp: job.timestamp, - processedOn: job.processedOn, - finishedOn: job.finishedOn, - failedReason: job.failedReason - })) - .sort((a, b) => b.timestamp - a.timestamp); // Sort by timestamp, newest first + // // Combine all jobs and format them + // const allJobs = [...waiting, ...active, ...completed, ...failed] + // .map(job => ({ + // id: job.id, + // status: job.finishedOn ? 'completed' : + // job.failedReason ? 'failed' : + // job.processedOn ? 'active' : 'waiting', + // data: job.data, + // timestamp: job.timestamp, + // processedOn: job.processedOn, + // finishedOn: job.finishedOn, + // failedReason: job.failedReason + // })) + // .sort((a, b) => b.timestamp - a.timestamp); // Sort by timestamp, newest first - return allJobs; + // return allJobs; + + return { + message: 'Queue data fetched successfully', + data: [] + } } catch (error) { console.error('Error fetching queue data:', error); throw createError({