diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/gca-admin-gurusoft-message-dashboard/index.html b/gca-admin-gurusoft-message-dashboard/index.html index b19040a..e6c67c9 100644 --- a/gca-admin-gurusoft-message-dashboard/index.html +++ b/gca-admin-gurusoft-message-dashboard/index.html @@ -1,13 +1,18 @@ - + Vite App - - -
- - + + + + +
+ + diff --git a/gca-admin-gurusoft-message-dashboard/package-lock.json b/gca-admin-gurusoft-message-dashboard/package-lock.json index 90bb46e..844d25d 100644 --- a/gca-admin-gurusoft-message-dashboard/package-lock.json +++ b/gca-admin-gurusoft-message-dashboard/package-lock.json @@ -9,7 +9,8 @@ "version": "0.0.0", "dependencies": { "bootstrap": "^5.3.7", - "vue": "^3.5.17" + "vue": "^3.5.17", + "vue-router": "^4.5.1" }, "devDependencies": { "@vitejs/plugin-vue": "^6.0.0", @@ -1438,6 +1439,12 @@ "@vue/shared": "3.5.17" } }, + "node_modules/@vue/devtools-api": { + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", + "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==", + "license": "MIT" + }, "node_modules/@vue/devtools-core": { "version": "7.7.7", "resolved": "https://registry.npmjs.org/@vue/devtools-core/-/devtools-core-7.7.7.tgz", @@ -2877,6 +2884,21 @@ } } }, + "node_modules/vue-router": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.5.1.tgz", + "integrity": "sha512-ogAF3P97NPm8fJsE4by9dwSYtDwXIY1nFY9T6DyQnGHd1E2Da94w9JIolpe42LJGIl0DwOHBi8TcRPlPGwbTtw==", + "license": "MIT", + "dependencies": { + "@vue/devtools-api": "^6.6.4" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/gca-admin-gurusoft-message-dashboard/package.json b/gca-admin-gurusoft-message-dashboard/package.json index c6fa636..8f04039 100644 --- a/gca-admin-gurusoft-message-dashboard/package.json +++ b/gca-admin-gurusoft-message-dashboard/package.json @@ -10,7 +10,8 @@ }, "dependencies": { "bootstrap": "^5.3.7", - "vue": "^3.5.17" + "vue": "^3.5.17", + "vue-router": "^4.5.1" }, "devDependencies": { "@vitejs/plugin-vue": "^6.0.0", diff --git a/gca-admin-gurusoft-message-dashboard/src/App.vue b/gca-admin-gurusoft-message-dashboard/src/App.vue index 633a5df..02d8986 100644 --- a/gca-admin-gurusoft-message-dashboard/src/App.vue +++ b/gca-admin-gurusoft-message-dashboard/src/App.vue @@ -1,47 +1,10 @@ - - - + \ No newline at end of file diff --git a/gca-admin-gurusoft-message-dashboard/src/assets/main.css b/gca-admin-gurusoft-message-dashboard/src/assets/main.css index 36fb845..d36b898 100644 --- a/gca-admin-gurusoft-message-dashboard/src/assets/main.css +++ b/gca-admin-gurusoft-message-dashboard/src/assets/main.css @@ -1,35 +1,35 @@ -@import './base.css'; +/*@import './base.css';*/ -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - font-weight: normal; -} +/*#app {*/ +/* max-width: 1280px;*/ +/* margin: 0 auto;*/ +/* padding: 2rem;*/ +/* font-weight: normal;*/ +/*}*/ -a, -.green { - text-decoration: none; - color: hsla(160, 100%, 37%, 1); - transition: 0.4s; - padding: 3px; -} +/*a,*/ +/*.green {*/ +/* text-decoration: none;*/ +/* color: hsla(160, 100%, 37%, 1);*/ +/* transition: 0.4s;*/ +/* padding: 3px;*/ +/*}*/ -@media (hover: hover) { - a:hover { - background-color: hsla(160, 100%, 37%, 0.2); - } -} +/*@media (hover: hover) {*/ +/* a:hover {*/ +/* background-color: hsla(160, 100%, 37%, 0.2);*/ +/* }*/ +/*}*/ -@media (min-width: 1024px) { - body { - display: flex; - place-items: center; - } +/*@media (min-width: 1024px) {*/ +/* body {*/ +/* display: flex;*/ +/* place-items: center;*/ +/* }*/ - #app { - display: grid; - grid-template-columns: 1fr 1fr; - padding: 0 2rem; - } -} +/* #app {*/ +/* display: grid;*/ +/* grid-template-columns: 1fr 1fr;*/ +/* padding: 0 2rem;*/ +/* }*/ +/*}*/ diff --git a/gca-admin-gurusoft-message-dashboard/src/components/HelloWorld.vue b/gca-admin-gurusoft-message-dashboard/src/components/HelloWorld.vue deleted file mode 100644 index eff59f1..0000000 --- a/gca-admin-gurusoft-message-dashboard/src/components/HelloWorld.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/gca-admin-gurusoft-message-dashboard/src/components/SystemMessagesPage.vue b/gca-admin-gurusoft-message-dashboard/src/components/SystemMessagesPage.vue new file mode 100644 index 0000000..c836bd3 --- /dev/null +++ b/gca-admin-gurusoft-message-dashboard/src/components/SystemMessagesPage.vue @@ -0,0 +1,88 @@ + + + + diff --git a/gca-admin-gurusoft-message-dashboard/src/components/SystemMesssages.vue b/gca-admin-gurusoft-message-dashboard/src/components/SystemMesssages.vue new file mode 100644 index 0000000..ede876e --- /dev/null +++ b/gca-admin-gurusoft-message-dashboard/src/components/SystemMesssages.vue @@ -0,0 +1,86 @@ + + + + + + diff --git a/gca-admin-gurusoft-message-dashboard/src/components/TheWelcome.vue b/gca-admin-gurusoft-message-dashboard/src/components/TheWelcome.vue deleted file mode 100644 index fe48afc..0000000 --- a/gca-admin-gurusoft-message-dashboard/src/components/TheWelcome.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - diff --git a/gca-admin-gurusoft-message-dashboard/src/components/WelcomeItem.vue b/gca-admin-gurusoft-message-dashboard/src/components/WelcomeItem.vue deleted file mode 100644 index 6d7086a..0000000 --- a/gca-admin-gurusoft-message-dashboard/src/components/WelcomeItem.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - diff --git a/gca-admin-gurusoft-message-dashboard/src/components/icons/IconCommunity.vue b/gca-admin-gurusoft-message-dashboard/src/components/icons/IconCommunity.vue deleted file mode 100644 index 2dc8b05..0000000 --- a/gca-admin-gurusoft-message-dashboard/src/components/icons/IconCommunity.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/gca-admin-gurusoft-message-dashboard/src/components/icons/IconDocumentation.vue b/gca-admin-gurusoft-message-dashboard/src/components/icons/IconDocumentation.vue deleted file mode 100644 index 6d4791c..0000000 --- a/gca-admin-gurusoft-message-dashboard/src/components/icons/IconDocumentation.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/gca-admin-gurusoft-message-dashboard/src/components/icons/IconEcosystem.vue b/gca-admin-gurusoft-message-dashboard/src/components/icons/IconEcosystem.vue deleted file mode 100644 index c3a4f07..0000000 --- a/gca-admin-gurusoft-message-dashboard/src/components/icons/IconEcosystem.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/gca-admin-gurusoft-message-dashboard/src/components/icons/IconSupport.vue b/gca-admin-gurusoft-message-dashboard/src/components/icons/IconSupport.vue deleted file mode 100644 index 7452834..0000000 --- a/gca-admin-gurusoft-message-dashboard/src/components/icons/IconSupport.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/gca-admin-gurusoft-message-dashboard/src/components/icons/IconTooling.vue b/gca-admin-gurusoft-message-dashboard/src/components/icons/IconTooling.vue deleted file mode 100644 index 660598d..0000000 --- a/gca-admin-gurusoft-message-dashboard/src/components/icons/IconTooling.vue +++ /dev/null @@ -1,19 +0,0 @@ - - diff --git a/gca-admin-gurusoft-message-dashboard/src/main.js b/gca-admin-gurusoft-message-dashboard/src/main.js index 0ac3a5f..600780d 100644 --- a/gca-admin-gurusoft-message-dashboard/src/main.js +++ b/gca-admin-gurusoft-message-dashboard/src/main.js @@ -1,6 +1,9 @@ import './assets/main.css' -import { createApp } from 'vue' +import {createApp} from 'vue' import App from './App.vue' +import router from './router'; -createApp(App).mount('#app') +createApp(App) + .use(router) + .mount('#app'); diff --git a/gca-admin-gurusoft-message-dashboard/src/mocks/system_message.json b/gca-admin-gurusoft-message-dashboard/src/mocks/system_message.json new file mode 100644 index 0000000..db24a14 --- /dev/null +++ b/gca-admin-gurusoft-message-dashboard/src/mocks/system_message.json @@ -0,0 +1,142 @@ +[ + { + "id": 1, + "type": "info", + "title": "System Maintenance Notification", + "message": "Scheduled maintenance will occur this weekend.", + "description": "The system will be down for maintenance from 10 PM to 2 AM on Saturday.", + "url": "https://status.example.com/maintenance", + "tags": [ + "maintenance", + "downtime", + "system" + ], + "date": "2025-06-28T22:00:00Z" + }, + { + "id": 2, + "type": "warning", + "title": "High Memory Usage Detected", + "message": "One of the servers is experiencing high memory usage.", + "description": "Our monitoring tools have detected abnormal memory usage on node-03. Investigation is ongoing.", + "url": "https://status.example.com/memory-warning", + "tags": [ + "performance", + "alert", + "memory" + ], + "date": "2025-06-26T08:45:00Z" + }, + { + "id": 3, + "type": "new", + "title": "Database Connection Failure", + "message": "The application failed to connect to the database.", + "description": "An issue with the DB connection pool is preventing new sessions. Engineers are working on a fix.", + "url": "https://status.example.com/db-error", + "tags": [ + "database", + "error", + "critical" + ], + "date": "2025-06-25T14:10:00Z" + }, + { + "id": 4, + "type": "new", + "title": "New Feature Release", + "message": "We’ve launched a new dashboard experience.", + "description": "The new dashboard includes improved analytics and faster loading times. Available to all users.", + "url": "https://docs.example.com/new-dashboard", + "tags": [ + "release", + "feature", + "dashboard" + ], + "date": "2025-06-24T10:00:00Z" + }, + { + "id": 5, + "type": "random", + "title": "API Rate Limit Notice", + "message": "Your application is approaching the rate limit.", + "description": "Please optimize your API usage to avoid temporary blocks. Visit our docs for best practices.", + "url": "https://api.example.com/docs/rate-limiting", + "tags": [ + "api", + "rate-limit", + "usage" + ], + "date": "2025-06-23T17:30:00Z" + }, + { + "id": 6, + "type": "info", + "title": "System Maintenance Notification", + "message": "Scheduled maintenance will occur this weekend.", + "description": "The system will be down for maintenance from 10 PM to 2 AM on Saturday.", + "url": "https://status.example.com/maintenance", + "tags": [ + "maintenance", + "downtime", + "system" + ], + "date": "2025-06-28T22:00:00Z" + }, + { + "id": 7, + "type": "warning", + "title": "High Memory Usage Detected", + "message": "One of the servers is experiencing high memory usage.", + "description": "Our monitoring tools have detected abnormal memory usage on node-03. Investigation is ongoing.", + "url": "https://status.example.com/memory-warning", + "tags": [ + "performance", + "alert", + "memory" + ], + "date": "2025-06-26T08:45:00Z" + }, + { + "id": 8, + "type": "new", + "title": "Database Connection Failure", + "message": "The application failed to connect to the database.", + "description": "An issue with the DB connection pool is preventing new sessions. Engineers are working on a fix.", + "url": "https://status.example.com/db-error", + "tags": [ + "database", + "error", + "critical" + ], + "date": "2025-06-25T14:10:00Z" + }, + { + "id": 9, + "type": "new", + "title": "New Feature Release", + "message": "We’ve launched a new dashboard experience.", + "description": "The new dashboard includes improved analytics and faster loading times. Available to all users.", + "url": "https://docs.example.com/new-dashboard", + "tags": [ + "release", + "feature", + "dashboard" + ], + "date": "2025-06-24T10:00:00Z" + }, + { + "id": 10, + "type": "random", + "title": "API Rate Limit Notice", + "message": "Your application is approaching the rate limit.", + "description": "Please optimize your API usage to avoid temporary blocks. Visit our docs for best practices.", + "url": "https://api.example.com/docs/rate-limiting", + "tags": [ + "api", + "rate-limit", + "usage" + ], + "date": "2025-06-23T17:30:00Z" + } +] diff --git a/gca-admin-gurusoft-message-dashboard/src/router/index.js b/gca-admin-gurusoft-message-dashboard/src/router/index.js new file mode 100644 index 0000000..a05cafc --- /dev/null +++ b/gca-admin-gurusoft-message-dashboard/src/router/index.js @@ -0,0 +1,16 @@ +import {createRouter, createWebHistory} from 'vue-router'; +import SystemMessagesPage from '../components/SystemMessagesPage.vue'; +import SystemMessages from '../components/SystemMesssages.vue'; + + +const routes = [ + {path: '/', name: 'Home', component: SystemMessages}, + {path: '/systemmessagelist', name: 'MessagesPage', component: SystemMessagesPage} +]; + +const router = createRouter({ + history: createWebHistory(), + routes +}); + +export default router; diff --git a/gca-admin-gurusoft-message-dashboard/src/utils/api.js b/gca-admin-gurusoft-message-dashboard/src/utils/api.js new file mode 100644 index 0000000..7e50f70 --- /dev/null +++ b/gca-admin-gurusoft-message-dashboard/src/utils/api.js @@ -0,0 +1,27 @@ +import mockSystemMessages from '../mocks/system_message.json'; + +const createMockApi = () => { + return { + // Get all messages + getAllMessages: async () => { + await new Promise(resolve => setTimeout(resolve, 300)); + return mockSystemMessages; + }, + + // Get a single message by ID + getMessageById: async (id) => { + await new Promise(resolve => setTimeout(resolve, 200)); + return mockSystemMessages.find(msg => msg.id === id) || null; + }, + + // Get messages filtered by type (e.g. INFO, ERROR) + getMessagesByType: async (type) => { + await new Promise(resolve => setTimeout(resolve, 200)); + return mockSystemMessages.filter(msg => msg.type === type); + } + }; +}; + +export const initializeApi = (useMockedData = true) => { + return createMockApi(); +};