Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
b4b0fbe
First pass... Table sort of working. Filters not.
mbusch3 Sep 4, 2025
7b8c8ec
Mid-stage commit to switch branches since I don't want to stash.
mbusch3 Sep 4, 2025
091d242
Back to feature parity! Files are now separated from other issues.
mbusch3 Sep 8, 2025
2162c43
Fixes analyzeReport issue that broke everything.
mbusch3 Sep 8, 2025
393be1b
Tidying up code and translations
mbusch3 Sep 9, 2025
f2c8254
Updates the Report Screen to show the correct number of errors, fixed…
mbusch3 Sep 10, 2025
da869ee
Adjusted severity tag to plural in Report printout.
mbusch3 Sep 10, 2025
1d9f34f
The Report.js analyzeReport now also finds all references to files in…
mbusch3 Sep 10, 2025
f986621
First pass... Table sort of working. Filters not.
mbusch3 Sep 4, 2025
55fa3c1
Mid-stage commit to switch branches since I don't want to stash.
mbusch3 Sep 4, 2025
35c746f
Back to feature parity! Files are now separated from other issues.
mbusch3 Sep 8, 2025
ffe57e5
Fixes analyzeReport issue that broke everything.
mbusch3 Sep 8, 2025
5868195
Tidying up code and translations
mbusch3 Sep 9, 2025
bd2b4f1
Updates the Report Screen to show the correct number of errors, fixed…
mbusch3 Sep 10, 2025
4118234
Adjusted severity tag to plural in Report printout.
mbusch3 Sep 10, 2025
106ff34
The Report.js analyzeReport now also finds all references to files in…
mbusch3 Sep 10, 2025
2c097c2
Merge branch 'file-review-page' of https://github.com/mbusch3/UDOIT-R…
mbusch3 Oct 10, 2025
0c16a72
First pass... Table sort of working. Filters not.
mbusch3 Sep 4, 2025
1687356
Mid-stage commit to switch branches since I don't want to stash.
mbusch3 Sep 4, 2025
2a95217
Back to feature parity! Files are now separated from other issues.
mbusch3 Sep 8, 2025
94760c1
Fixes analyzeReport issue that broke everything.
mbusch3 Sep 8, 2025
56c923a
Tidying up code and translations
mbusch3 Sep 9, 2025
2390513
Updates the Report Screen to show the correct number of errors, fixed…
mbusch3 Sep 10, 2025
e1c198e
Adjusted severity tag to plural in Report printout.
mbusch3 Sep 10, 2025
fb5dc8b
The Report.js analyzeReport now also finds all references to files in…
mbusch3 Sep 10, 2025
adab42a
First pass... Table sort of working. Filters not.
mbusch3 Sep 4, 2025
6babd26
Mid-stage commit to switch branches since I don't want to stash.
mbusch3 Sep 4, 2025
6e6842a
Back to feature parity! Files are now separated from other issues.
mbusch3 Sep 8, 2025
26c6a1e
Tidying up code and translations
mbusch3 Sep 9, 2025
ae0fc2e
Updates the Report Screen to show the correct number of errors, fixed…
mbusch3 Sep 10, 2025
f8d58aa
Adjusted severity tag to plural in Report printout.
mbusch3 Sep 10, 2025
bf823a2
The Report.js analyzeReport now also finds all references to files in…
mbusch3 Sep 10, 2025
22594f5
Merge branch 'file-review-page' of https://github.com/mbusch3/UDOIT-R…
mbusch3 Oct 10, 2025
e4d04bc
Moved const variables into Settings.js, logic into Report.js from Fix…
mbusch3 Oct 13, 2025
429831f
Finished file filters, added file type icons, first pass on file refe…
mbusch3 Oct 15, 2025
8152cfe
Add and read from default user settings, removes some magic variables.
mbusch3 Oct 16, 2025
da42f63
First tweaks for File Form (checkbox doesn't function)
mbusch3 Oct 16, 2025
a0050d5
Remove Async EqualAccess, files can now save to LMS.
mbusch3 Oct 27, 2025
9f68e71
The Broken commit: Need to pull replacement files live instead of sto…
mbusch3 Oct 31, 2025
19a360c
posting files and storing new file Ids in DB
Ishfaq-code Nov 4, 2025
0094b3c
replacement file is added into reports while scanning
Ishfaq-code Nov 4, 2025
5ea02c6
view replacement file next to current file
Ishfaq-code Nov 4, 2025
89ab5c8
new files pre reviewed on upload
Ishfaq-code Nov 4, 2025
e3cb04d
new file links for contentbody item on frontend
Ishfaq-code Nov 5, 2025
ab3c72b
Fix: Report contains file content
Ishfaq-code Nov 6, 2025
8d110cf
working route for updating content
Ishfaq-code Nov 6, 2025
f2d8701
Upload Content API with Multithreading CURL
Ishfaq-code Nov 12, 2025
ff7540f
working change-all-references tick
Ishfaq-code Nov 18, 2025
2a86b8f
basic file deletion
Ishfaq-code Nov 18, 2025
f24ed7d
deletion confirm modal
Ishfaq-code Nov 18, 2025
6842c50
added icons and banner to delete modal
Ishfaq-code Nov 18, 2025
663a0c6
File replacement in module - posting and deleting batch
Ishfaq-code Nov 21, 2025
bd63395
modules replacement after upload
Ishfaq-code Nov 24, 2025
cd398e1
differentiation files to issues using session files
Ishfaq-code Nov 24, 2025
178c82b
improved deletion logic
Ishfaq-code Nov 24, 2025
c170f77
better error handling and processing upload+reference changes
Ishfaq-code Nov 25, 2025
0cb3753
filtering modules fix
Ishfaq-code Nov 25, 2025
6b5679f
Active Session File fix - disables save button and works with 'file s…
Ishfaq-code Nov 25, 2025
bd29cf5
added toggle to be always 'true' when uploading and reviewing at the …
Ishfaq-code Dec 1, 2025
13e05f9
Merge branch 'new-main-page-UX' into file-review-page-references
Ishfaq-code Dec 2, 2025
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
36 changes: 35 additions & 1 deletion assets/css/udoit4-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ body {
}

#app-container {
position: relative;
margin: 0px 6px 6px 0px;
padding: 0 1rem;
border-radius: 16px;
Expand Down Expand Up @@ -158,7 +159,7 @@ body {

--hover-brightness: 1.15;

--link-color: #009DFF;
--link-color: #70C8FF;
--link-color-hover: color-mix(in srgb, var(--link-color) 100%, var(--white) 10%);
--link-color-light: color-mix(in srgb, var(--link-color) 50%, var(--white) 100%); /* #E9F3FF; */
--link-color-dark: color-mix(in srgb, var(--link-color) 100%, var(--black) 10%);
Expand Down Expand Up @@ -628,6 +629,11 @@ h1, h2, h3, h4, h5, h6 {
fill: var(--gray);
}

.gray-stroke {
stroke: var(--gray);
fill: none;
}

.white {
color: var(--white);
fill: var(--white);
Expand Down Expand Up @@ -696,6 +702,34 @@ button {
}
}

.btn-warn{
background-color: var(--issue-color);
border-color: var(--issue-color);
color: var(--primary-color-inverse);
fill: var(--primary-color-inverse);

&:hover,
&:focus {
filter: brightness(var(--hover-brightness));
color: var(--primary-color-inverse);
fill: var(--primary-color-inverse);
}
}

.btn-warn-secondary{

border-color: var(--issue-color);
background-color: var(--white);
color: var(--issue-color);
fill: var(--issue-color);

&:hover,
&:focus {
background-color: var(--issue-color-light);
}

}

.btn-secondary {
border-color: var(--primary-color);
background-color: var(--white);
Expand Down
82 changes: 66 additions & 16 deletions assets/js/Components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,30 @@ import Header from './Header'
import WelcomePage from './WelcomePage'
import HomePage from './HomePage'
import FixIssuesPage from './FixIssuesPage'
import ReviewFilesPage from './ReviewFilesPage'
import ReportsPage from './ReportsPage'
import SettingsPage from './SettingsPage'
import Api from '../Services/Api'
import MessageTray from './Widgets/MessageTray'
import { analyzeReport } from '../Services/Report'
import { ISSUE_STATE, WIDGET_STATE, ISSUE_FILTER, FILE_FILTER, FILE_TYPES, FILE_TYPE_MAP, DEFAULT_USER_SETTINGS } from '../Services/Settings'


export default function App(initialData) {

const [messages, setMessages] = useState(initialData.messages || [])
const [untranslatedMessage, setUntranslatedMessage] = useState('')
const [report, setReport] = useState(initialData.report || null)
const [settings, setSettings] = useState(initialData.settings || null)
const [settings, setSettings] = useState(Object.assign({},
initialData?.settings || {},
{ ISSUE_STATE },
{ WIDGET_STATE },
{ ISSUE_FILTER },
{ FILE_FILTER },
{ FILE_TYPES },
{ FILE_TYPE_MAP },
{ DEFAULT_USER_SETTINGS }
))
const [sections, setSections] = useState([])

const [navigation, setNavigation] = useState('summary')
Expand All @@ -25,17 +36,9 @@ export default function App(initialData) {
const [initialSearchTerm, setInitialSearchTerm] = useState('')
const [contentItemCache, setContentItemCache] = useState([])
const [sessionIssues, setSessionIssues] = useState({})
const [sessionFiles, setSessionFiles] = useState({})
const [welcomeClosed, setWelcomeClosed] = useState(false)

const ISSUE_STATE = {
UNCHANGED: 0,
SAVING: 1,
RESOLVING: 2,
SAVED: 3,
RESOLVED: 4,
ERROR: 5,
}

// `t` is used for text/translation. It will return the translated string if it exists
// in the settings.labels object.
const t = useCallback((key, values = {}) => {
Expand Down Expand Up @@ -113,7 +116,7 @@ export default function App(initialData) {
// Each issue has an id and state: { id: issueId, state: 2 }
// The valid states are set and read in the FixIssuesPage component.
const updateSessionIssue = (issueId, issueState = null, contentItemId = null) => {
if(issueState === null || issueState === ISSUE_STATE.UNCHANGED) {
if(issueState === null || issueState === settings.ISSUE_STATE.UNCHANGED) {
let newSessionIssues = Object.assign({}, sessionIssues)
if(newSessionIssues[issueId]) {
delete newSessionIssues[issueId]
Expand All @@ -130,12 +133,30 @@ export default function App(initialData) {
setSessionIssues(newSessionIssues)
}

const updateSessionFiles = (fileId, fileState = null, contentItemId = null) => {
if(fileState === null || fileState === settings.ISSUE_STATE.UNCHANGED) {
let newSessionFiles = Object.assign({}, sessionFiles)
if(newSessionFiles[fileId]) {
delete newSessionFiles[fileId]
}
setSessionFiles(newSessionFiles)

if(contentItemId) {
removeContentItemFromCache(contentItemId)
}

return
}
let newSessionFiles = Object.assign({}, sessionFiles, { [fileId]: fileState})
setSessionFiles(newSessionFiles)
}

const processNewReport = (rawReport) => {
const tempReport = analyzeReport(rawReport, ISSUE_STATE)
const tempReport = analyzeReport(rawReport, settings.ISSUE_STATE)
setReport(tempReport)

let api = new Api(settings)
api.setReportData(tempReport.id, {'scanCounts': tempReport.scanCounts})
api.setReportData(tempReport.id, {'scanCounts': tempReport.scanCounts, 'scanRules': tempReport.scanRules})
.then((response) => response.json())
.then((data) => {
if(data.errors && data.errors.length > 0) {
Expand All @@ -159,11 +180,17 @@ export default function App(initialData) {
setSessionIssues(tempReport.sessionIssues)
}

if(tempReport.sessionFiles){
setSessionFiles(tempReport.sessionFiles)
}

let tempContentItems = {}
for(const key in tempReport.contentItems) {
tempContentItems[key] = tempReport.contentItems[key]
}

setContentItemCache(tempContentItems)
return tempReport
}

const handleNewReport = (data) => {
Expand Down Expand Up @@ -241,6 +268,10 @@ export default function App(initialData) {
}

const quickIssues = (severity) => {
if(severity === 'FILE'){
setNavigation('reviewFiles')
return
}
setInitialSeverity(severity)
setNavigation('fixIssues')
}
Expand Down Expand Up @@ -337,7 +368,10 @@ export default function App(initialData) {

return (
<div id="app-container"
className={`flex-column flex-grow-1 ${settings?.user?.roles?.font_size || 'font-medium'} ${settings?.user?.roles?.font_family || 'sans-serif'} ${settings?.user?.roles?.dark_mode ? 'dark-mode' : ''}`}>
className={`flex-column flex-grow-1 `
+ `${settings?.user?.roles?.font_size || settings.DEFAULT_USER_SETTINGS.FONT_SIZE} `
+ `${settings?.user?.roles?.font_family || settings.DEFAULT_USER_SETTINGS.FONT_FAMILY} `
+ `${settings?.user?.roles?.dark_mode ? 'dark-mode' : ''}`}>
{ !welcomeClosed ?
( <WelcomePage
t={t}
Expand All @@ -359,7 +393,7 @@ export default function App(initialData) {
{('summary' === navigation) &&
<HomePage
t={t}
settings={settings.ISSUE_STATE ? settings : Object.assign({}, settings, { ISSUE_STATE })}
settings={settings}
report={report}
hasNewReport={hasNewReport}
quickIssues={quickIssues}
Expand All @@ -371,7 +405,7 @@ export default function App(initialData) {
{('fixIssues' === navigation) &&
<FixIssuesPage
t={t}
settings={settings.ISSUE_STATE ? settings : Object.assign({}, settings, { ISSUE_STATE })}
settings={settings}
initialSeverity={initialSeverity}
initialSearchTerm={initialSearchTerm}
contentItemCache={contentItemCache}
Expand All @@ -386,6 +420,22 @@ export default function App(initialData) {
processServerError={processServerError}
/>
}
{('reviewFiles' === navigation) &&
<ReviewFilesPage
t={t}
settings={settings}
contentItemCache={contentItemCache}
addContentItemToCache={addContentItemToCache}
report={report}
sections={sections}
processNewReport={processNewReport}
addMessage={addMessage}
handleNavigation={handleNavigation}
sessionFiles={sessionFiles}
updateSessionFiles={updateSessionFiles}
processServerError={processServerError}
/>
}
{('reports' === navigation) &&
<ReportsPage
t={t}
Expand Down
Loading
Loading