Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0042a02
Added Quicklinks, Job status and system status to dashbaord
Jun 17, 2025
0106bb1
Merge branch 'feat/react-dashboard' into task/WP-1000
Jun 18, 2025
f903667
Merge branch 'feat/react-dashboard' into task/WP-1000
Jun 18, 2025
14b2c80
revert NPM package changes
Jun 18, 2025
812c343
Changed css file import error
Jun 18, 2025
3a51712
Changed Dashboard.spec.tsx for client query error
Jun 18, 2025
b1da8ae
Changed Dashboard.specs.ts
Jun 18, 2025
1fcdb01
Removed useQuery() from my files
Jun 18, 2025
91d0c10
Removed useQuery() from my files
Jun 18, 2025
51c8fd1
Removed unit tests
Jun 18, 2025
9acbc98
test cases issue padted
Jun 18, 2025
8b11918
Merge branch 'feat/react-dashboard' into task/WP-1000
Jun 18, 2025
0287861
Fix Tools & Applications navigation issue and added SU allocations di…
Jun 23, 2025
fc71cf5
Added SU allocations component on Dashbaord
Jun 24, 2025
14ef73c
Added user guide tutorials to Dashboard
Jun 26, 2025
bb4db54
changed Dashboard spec file
Jun 27, 2025
c52fbba
Made required changes to Dashboard and SUAllocationsCard files
Jun 27, 2025
322e52e
Fixed react unit tests and linting error
Jun 30, 2025
6dd374c
Fixed linting error
Jun 30, 2025
f7d2475
Fixed linting error
Jun 30, 2025
8c6cd55
Fixed linting error
Jun 30, 2025
3eb8be5
changed main.tsx for linting error
Jun 30, 2025
4d0a507
changed index.ts back to index.tsx
Jun 30, 2025
b63befa
format error fixed
Jun 30, 2025
b78308a
Merge branch 'feat/react-dashboard' of https://github.com/DesignSafe-…
Jul 2, 2025
7b5202f
merge feat/react-dashbaord and task/WP-1000
Jul 2, 2025
ad9dde4
format fix
Jul 2, 2025
c51a02c
changed index.tsx to index.ts
Jul 3, 2025
ac5a008
fixed import errors
Jul 3, 2025
f1e03e8
fixed import errors of Jobstatus
Jul 3, 2025
cf466b7
fixed import errors of Jobstatus.tsx
Jul 3, 2025
b8cc307
Solved all Linting errors
Jul 3, 2025
bf54369
Solved all Linting errors and finished linting format
Jul 3, 2025
f57c208
Added collapsible section function to recent jobs and allocations
Jul 7, 2025
bca7ecb
Merged feat/react-dashboard into Task/WP-1000 and resolved conflicts
Jul 11, 2025
7903532
Updated apps.ts
Jul 11, 2025
138a00c
Made suggested changes after code review
Jul 16, 2025
5220a45
Updated Dashboard.tsx to pass linting
Jul 16, 2025
a220aa6
Updated Dashboard.tsx to pass client side unit tests
Jul 16, 2025
9aede58
Updated Quicklinks to add icons
Jul 17, 2025
3c94d8d
Made suggested changes to follow best practices
Jul 24, 2025
0ce7d37
removed BrowserRouter import from main.tsx
Jul 24, 2025
7d3af80
Removed setupTests file
Jul 28, 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
1 change: 1 addition & 0 deletions client/modules/_hooks/src/workspace/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ export * from './usePostJobs';
export * from './types';
export * from './useGetAllocations';
export * from './useInteractiveModalContext';
export * from './useSUAllocations';
28 changes: 28 additions & 0 deletions client/modules/_hooks/src/workspace/useSUAllocations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { useQuery } from '@tanstack/react-query';
import apiClient from '../apiClient';

export type TSUAllocation = {
system: string;
host: string;
project_code: string;
awarded: number;
remaining: number;
expiration: string;
};

const getSUAllocations = async ({ signal }: { signal: AbortSignal }) => {
const res = await apiClient.get<{ allocations: TSUAllocation[] }>(
'/api/users/allocations/',
{ signal }
);
return res.data.allocations;
};

const suAllocationsQuery = () => ({
queryKey: ['dashboard', 'getSUAllocations'],
queryFn: ({ signal }: { signal: AbortSignal }) =>
getSUAllocations({ signal }),
staleTime: 5000,
});

export const useGetSUAllocations = () => useQuery(suAllocationsQuery());
333 changes: 333 additions & 0 deletions client/modules/dashboard/src/Dashboard/Dashboard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,336 @@
* .container {
* }
*/
/*Dashboard styling*/

.dashboardContainer {
display: flex;
gap: 2rem;
}

.middleSection {
flex: 2;
}

.sectionHeader {
cursor: pointer;
display: flex;
align-items: center;
gap: 0.5rem;
user-select: none;
}

.section {
margin-bottom: 1.5rem;
}

.verticalSeparator {
width: 1px;
background-color: #ccc;
margin-top: 2.5rem;
margin-bottom: 2rem;
height: auto;
min-height: 300px;
}

.rightPanel {
flex: 1.3;
padding-right: 1.5rem;
}

.statusCard {
background-color: #fff;
padding: 1.5rem;
border-radius: 8px;
border: 1px solid #e0e0e0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
margin-bottom: 1.5rem;
}

.statusTitle {
margin-bottom: 1rem;
}

.naText {
color: #999;
}
/*End of Dashboard styling*/
.sidebar {
background-color: #f5f7fa;
color: #333;
padding: 1.5rem;
border-radius: 8px;
width: 260px;
min-height: calc(100vh - 80px);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.sidebarTitle {
font-size: 1.55rem;
font-weight: 600;
margin-bottom: 1.2rem;
color: #2c3e50;
border-bottom: 1px solid #ddd;
padding-bottom: 0.4rem;
}

.sidebarLink {
display: block;
margin: 0.75rem 0;
color: #1f2d3d;
font-size: 1.5rem;
font-weight: 500;
text-decoration: none;
transition: all 0.2s ease;
}

.sidebarLink:hover {
color: #007bff;
text-decoration: underline;
padding-left: 5px;
}
.sidebar {
position: sticky;
top: 80px; /* after navbar */
}
.sidebarIcon {
margin-right: 8px;
vertical-align: middle;
}
/*for joblisting*/

.jobStatusContainer {
background-color: #ffffff;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 1.5rem;
margin-top: 2rem;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.03);
}

.jobStatusHeader {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}

.jobStatusHeader h2 {
font-size: 1.25rem;
margin: 0;
}

.viewAllLink {
font-size: 0.9rem;
color: #007bff;
text-decoration: none;
}

.viewAllLink:hover {
text-decoration: underline;
}

.jobsTableWrapper {
overflow-x: auto;
}
.limitedWidthTable {
max-width: 75%; /* or 800px, adjust as needed */
min-width: 750px;
}
.recentJobsCard {
max-width: 980px;
background: white;
padding: 16px;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recentJobsHeader {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}

.viewAllLink {
font-size: 14px;
color: #0073e6;
text-decoration: none;
}

.viewAllLink:hover {
text-decoration: underline;
}

.jobsTableWrapper {
max-width: 100%;
}
.header-details {
display: flex;
gap: 20px;
margin-top: 10px;
font-size: 12px;
color: #666;
}

.header-details dt {
font-weight: bold;
margin-right: 5px;
}

.header-details dd {
margin: 0;
}
/* Userguide css */
.userGuidesWrapper {
margin-top: 1.5rem;
padding: 1.5rem;
background-color: #fff;
border: 1px solid #e0e0e0;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.userGuidesHeading {
font-size: 16px;
font-weight: 600;
color: #222;
margin-bottom: 1.25rem;
border-bottom: 1px solid #ddd;
padding-bottom: 8px;
}

.videoGrid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem 1.2rem;
justify-items: center;
}

.videoCard,
.videoCardSingle {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}

.videoCardSingle {
grid-column: span 2;
margin-top: 1rem;
}

.videoThumbnail {
width: 100%;
max-width: 200px;
border-radius: 6px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.videoThumbnail:hover {
transform: scale(1.03);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.videoTitle {
margin-top: 8px;
font-size: 14px;
color: #0070c9;
font-weight: 500;
text-decoration: none;
}

.videoTitle:hover {
text-decoration: underline;
}
.youtubeIcon {
width: 14px;
height: 14px;
vertical-align: middle;
margin-right: 6px;
display: inline-block;
transform: translateY(-1px);
}
.headingRow {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}

.userGuidesHeading {
font-size: 16px;
font-weight: 600;
color: #222;
margin: 0;
}

.moreVideosLink {
font-size: 13px;
font-weight: 500;
color: #0070c9;
text-decoration: none;
transition: color 0.2s ease;
}

.moreVideosLink:hover {
text-decoration: underline;
color: #004a99;
}
/* jolistingwrapper.css*/

.jobActions {
padding-top: 15px;
}
.jobActions :is(a, button) + :is(a, button) {
margin-left: 15px;
}

.link:hover {
color: var(--global-color-accent--normal);
}
/*su card styling*/
.suCard {
border: 1px solid #ccc;
border-radius: 8px;
padding: 16px;
margin-bottom: 16px;
}

.suTitle {
margin-bottom: 12px;
}

.suUsername {
color: #2b6cb0;
}

.suSection {
margin-bottom: 12px;
}

.suHost {
font-weight: bold;
margin-bottom: 4px;
}

.suTable {
width: 100%;
border-collapse: collapse;
}

.suTheadRow {
background: #f5f5f5;
}

.suTh {
padding: 6px 8px;
border-bottom: 1px solid #ddd;
text-align: left;
}

.suTd {
padding: 6px 8px;
border-bottom: 1px solid #eee;
}
Loading
Loading