Skip to content
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

Log message web page #1390

Merged
merged 25 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5e2b5bd
Developing new database model
ianLewis8 Jul 30, 2024
b4dae28
LogMsg Model
ianLewis8 Aug 2, 2024
195396c
slight changes
ianLewis8 Aug 2, 2024
60fda20
Merge branch 'OpenEnergyDashboard:development' into development
ianLewis8 Aug 7, 2024
0758401
Update get logs from dates
ianLewis8 Aug 7, 2024
d0a4fc5
create logmsg table in database
nmqng Oct 14, 2024
c72148b
upload for fetching logs data from server question
nmqng Oct 30, 2024
acc3e1a
Pre-review version for log message table now able to call log data fr…
nmqng Nov 4, 2024
02bc0d9
fix writing the whole log file to database again to only write new log
nmqng Nov 4, 2024
b18deaa
improve UI by using pagination
nmqng Nov 9, 2024
f1f951e
update UI to show only first 80 characters for long log messages
nmqng Nov 9, 2024
fcbd0a8
add select all log type option and apply translate function for all t…
nmqng Nov 9, 2024
38b5bbb
update UI for log msg page including pagination, show all button, new…
nmqng Nov 12, 2024
5a15a02
bring back log type filter for table and update log type downdrop for…
nmqng Nov 12, 2024
9929eda
update so that instead of making 4 requests for 4 types, logTypes is …
nmqng Nov 15, 2024
43b51fb
fix some comments from origin draft pull request
nmqng Nov 15, 2024
a47e0bf
add comments for LogMsgComponent
nmqng Nov 15, 2024
2819142
update using time interval instead of date for log date range
nmqng Nov 20, 2024
5c3865e
update 'Select All' button action
nmqng Nov 20, 2024
d887604
Merge branch 'development' into pr/ianLewis8/1327
nmqng Nov 20, 2024
0cd7042
Merge branch 'development' into pr/ianLewis8/1327
nmqng Dec 2, 2024
ede099a
resolved PR comments
nmqng Dec 3, 2024
c5da842
refactor LogMsgComponent.tsx and resolved some PR comments
nmqng Dec 4, 2024
cfc010d
resolved PR comments
nmqng Dec 5, 2024
0c534f9
resolved PR comments and refactor code
nmqng Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"generateCosineSquaredTestingData": "node -e 'require(\"./src/server/data/automatedTestingData\").generateCosineSquaredTestingData(2.5)'",
"generateTestingData": "node -e 'require(\"./src/server/data/automatedTestingData\").generateTestingData()'",
"testData": "node -e 'require(\"./src/server/data/automatedTestingData.js\").insertSpecialUnitsConversionsMetersGroups()'",
"webData": "node -e 'require(\"./src/server/data/websiteData.js\").insertWebsiteData()'"
"webData": "node -e 'require(\"./src/server/data/websiteData.js\").insertWebsiteData()'",
"addLogMsg": "node -e 'require(\"./src/server/services/addLogMsg.js\").addLogMsgToDB()'"
},
"nodemonConfig": {
"watch": [
Expand Down Expand Up @@ -135,4 +136,4 @@
"webpack": "~5.76.0",
"webpack-cli": "~5.1.4"
}
}
}
11 changes: 10 additions & 1 deletion src/client/app/components/HeaderButtonsComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default function HeaderButtonsComponent() {
shouldCSVReadingsButtonDisabled: true,
shouldUnitsButtonDisabled: true,
shouldConversionsButtonDisabled: true,
shouldLogMsgButtonDisabled: true,
shouldVisualUnitMapButtonDisabled: true,
// Translated menu title that depend on whether logged in.
menuTitle: '',
Expand Down Expand Up @@ -101,6 +102,7 @@ export default function HeaderButtonsComponent() {
shouldCSVReadingsButtonDisabled: pathname === '/csvReadings',
shouldUnitsButtonDisabled: pathname === '/units',
shouldConversionsButtonDisabled: pathname === '/conversions',
shouldLogMsgButtonDisabled: pathname === '/logmsg',
shouldVisualUnitMapButtonDisabled: pathname === '/visual-unit'
}));
}, [pathname]);
Expand Down Expand Up @@ -244,6 +246,13 @@ export default function HeaderButtonsComponent() {
to="/admin">
<FormattedMessage id='admin.settings' />
</DropdownItem>
<DropdownItem
style={state.adminViewableLinkStyle}
disabled={state.shouldLogMsgButtonDisabled}
tag={Link}
to="/logmsg">
<FormattedMessage id='log.messages' />
</DropdownItem>
<DropdownItem
style={state.adminViewableLinkStyle}
disabled={state.shouldUsersButtonDisabled}
Expand Down Expand Up @@ -306,7 +315,7 @@ export default function HeaderButtonsComponent() {
{translate('log.in')}
</ModalHeader>
<ModalBody>
<LoginComponent handleClose={handleClose}/>
<LoginComponent handleClose={handleClose} />
</ModalBody>
</Modal>
</>
Expand Down
3 changes: 3 additions & 0 deletions src/client/app/components/RouteComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import RoleOutlet from './router/RoleOutlet';
import UnitsDetailComponent from './unit/UnitsDetailComponent';
import ErrorComponent from './router/ErrorComponent';
import { selectSelectedLanguage } from '../redux/slices/appStateSlice';
import LogMsgComponent from './admin/LogMsgComponent';
import VisualUnitDetailComponent from './visual-unit/VisualUnitDetailComponent';

/**
Expand Down Expand Up @@ -60,6 +61,8 @@ const router = createBrowserRouter([
{ path: 'maps', element: <MapsDetailContainer /> },
{ path: 'units', element: <UnitsDetailComponent /> },
{ path: 'users', element: <UsersDetailComponent /> },
{ path: 'logmsg', element: <LogMsgComponent /> },
{ path: 'users', element: <UsersDetailComponent /> },
{ path: 'visual-unit', element: <VisualUnitDetailComponent/> }
]
},
Expand Down
Loading