-
Notifications
You must be signed in to change notification settings - Fork 0
Adding missing features #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…integrate it into multiple tabs fix: adjust card enter animation for smoother appearance
…less scrolling experience
…nd FormInput components
…AdminNavbar with user actions
- Added Dockerode dependency to interact with Docker API. - Implemented Docker service methods for listing containers, fetching logs, and managing container states (start, stop, restart). - Enhanced admin controller to handle new Docker-related endpoints. - Updated admin routes to include new Docker management routes. - Created frontend hooks for fetching container data and logs, and managing container actions. - Revamped ControlSection component to display container information with action buttons for management. - Added Docker socket mounting in docker-compose for container communication. - Updated global CSS to ensure consistent font usage across the application.
…y and action buttons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request implements comprehensive admin dashboard functionality with extensive backend and frontend enhancements. The PR adds missing features for administration, monitoring, and UI improvements.
Key Changes:
- Complete admin dashboard with sections for managing users, reviews, places, ads, alerts, and Docker containers
- New MasonryGrid component for improved layout consistency across tabs
- Backend monitoring service with Docker integration and system alerts
- Password visibility toggles across authentication forms
- Review status workflow (pending/approved/rejected)
Reviewed changes
Copilot reviewed 69 out of 81 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/seed/ads_dummy.json | Added client names and renamed fields (instagram_handle → web_handle, link → link_url) |
| frontend/src/styles/global.css | Simplified font stack, adjusted animation translateY, added Mapbox popup overrides |
| frontend/src/index.css | Duplicated @theme block and font changes from global.css |
| frontend/src/pages/discoverTabs/* | Refactored to use MasonryGrid component for consistent masonry layout |
| frontend/src/pages/adminSections/* | Complete rewrite from mock data to functional admin panels with CRUD operations |
| frontend/src/pages/RegisterFlow/Register.jsx | Added password visibility toggle |
| frontend/src/pages/Login.jsx | Added password visibility toggle |
| frontend/src/pages/ForgotFlow/NewPass.jsx | Added password visibility toggles for both fields |
| frontend/src/pages/Place.jsx | Replaced external URLs with local SVG imports, added crossOrigin attribute |
| frontend/src/pages/Collections.jsx | Refactored to use MasonryGrid and LocationCard |
| frontend/src/pages/Discover.jsx | Improved endless scroll logic to avoid recent duplicates |
| frontend/src/pages/CreateFlow/FormInput.jsx | Fixed hardcoded pixel values to use Tailwind units |
| frontend/src/pages/Admin.jsx | Complete redesign to modern tab-based navigation with search |
| frontend/src/components/* | Added MasonryGrid, ConfirmationOverlay, AdminModal, AdminNavbar components |
| frontend/src/hooks/useAdmin.js | New hook providing all admin API operations |
| frontend/src/hooks/useApi.js | Added authorization header support |
| frontend/src/assets/place_Icon/* | Added local SVG icon files |
| frontend/src/App.jsx | Protected admin routes with role-based access, removed PostPage route |
| docker-compose.yml | Mounted Docker socket for container management |
| backend/src/services/* | Added monitor.service.js and docker.service.js for system monitoring |
| backend/src/models/* | Added Promotion, SysAlert, DailyStat, VisitorLog models; updated User and Review |
| backend/src/routes/* | Added admin.routes.js and promotions.routes.js; updated auth and review routes |
| backend/src/controllers/* | Added admin, alerts, promotions controllers; updated auth and reviews |
| backend/src/middleware/* | Updated auth with verifyAdmin, added trackTraffic, enhanced upload and errorHandler |
| backend/src/server.js | Integrated monitoring service and startup alert |
| backend/package.json | Added dockerode dependency |
Files not reviewed (1)
- backend/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,76 @@ | |||
| const SysAlert = require('../models/SysAlert'); | |||
| const { Op } = require('sequelize'); | |||
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable Op.
| const { Op } = require('sequelize'); |
| } | ||
|
|
||
| const totalVisits = await DailyStat.sum('uniqueVisitors') || 0; | ||
| const totalPageViews = await DailyStat.sum('requests') || 0; |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable totalPageViews.
| const Admin = () => { | ||
| const navigate = useNavigate(); | ||
| const [activeSection, setActiveSection] = useState('dashboard'); | ||
| const navigate = useNavigate(); |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable navigate.
| const yesterday = new Date(); | ||
| yesterday.setDate(yesterday.getDate() - 1); | ||
|
|
||
| let dateKey = date.toLocaleDateString(); |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial value of dateKey is unused, since it is always overwritten.
…oved user experience
… for better user interaction
No description provided.