Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
0453618
feat: added draft catalog step
alvarobernal2412 Mar 25, 2025
c73cd63
feat(dashboard): added empty dashboard form
alvarobernal2412 Apr 17, 2025
0493542
Merge branch 'multi-step-form' into enhance-dashboard-module
alvarobernal2412 Apr 19, 2025
dd52840
feat(catalog): enhanced controls creation step
alvarobernal2412 Apr 19, 2025
0014d7c
feat(panel): added panel creation form
alvarobernal2412 Apr 21, 2025
18d34a9
feat(multi-step): added catalog recovery
alvarobernal2412 Apr 21, 2025
97b6a59
refactor: rewrite calendar component for react-day-picker v9
ferferga Apr 21, 2025
80ac95c
Merge remote-tracking branch 'origin/fix-reactdarypicker-v9-shadcn' i…
alvarobernal2412 Apr 21, 2025
0c910bd
Merge remote-tracking branch 'origin' into enhance-dashboard-module
alvarobernal2412 Apr 21, 2025
49bceef
Merge branch 'main' into enhance-dashboard-module
alvarobernal2412 May 14, 2025
2368a76
feat(catalog): added edit functionality
alvarobernal2412 May 14, 2025
fa2c653
refactor(dashboard): simplified panel model
alvarobernal2412 May 14, 2025
49498c3
feat(panel): enhanced SQL query builder and form UI
alvarobernal2412 May 19, 2025
084da52
feat(panel): improved panel preview functionality
alvarobernal2412 May 19, 2025
277b038
feat(dashboard): added new panel types and restructure options
alvarobernal2412 May 19, 2025
8b5cc56
refactor(dashboard): clean up code and improve type handling
alvarobernal2412 May 19, 2025
e45c46c
feat(dashboard): simplify dashboard configuration UI
alvarobernal2412 May 19, 2025
5a48271
feat(dashboard): integrated panel creation in multi-step-form
alvarobernal2412 May 20, 2025
dd18dd3
feat: improve dashboard draft handling
alvarobernal2412 May 21, 2025
a14a0af
fix: enhance control error handling
alvarobernal2412 May 21, 2025
e275b27
fix: improve panel handling
alvarobernal2412 May 21, 2025
f5b9e72
Merge branch 'main' into enhance-dashboard-module
alvarobernal2412 Jun 25, 2025
6abbf60
chore(deps): update npm (development)
renovate[bot] Jun 25, 2025
8feb351
feat: added wip mashup testing button
tirirote Jun 26, 2025
72ea5e2
feat: added wip mashup testing button
tirirote Jun 26, 2025
32f15f2
Merge branch 'feature/mashup-test-button' into feature/mashup-test-b…
tirirote Jun 27, 2025
582884c
feat: added full wip testing button
tirirote Jul 1, 2025
0105b78
wip(panels): added panel card
alvarobernal2412 Jul 3, 2025
41e1023
feat: added wip changes for the testing button
tirirote Jul 21, 2025
9f671eb
feat: replace modal mashup testing with dedicated page
alvarobernal2412 Jul 22, 2025
94916c6
Merge branch 'enhance-dashboard-module' into feature/mashup-test-button
alvarobernal2412 Jul 22, 2025
4d898d2
feat: add IndexedDB utility for mashup test persistence
alvarobernal2412 Jul 22, 2025
e714940
feat: add custom hook for mashup test management
alvarobernal2412 Jul 22, 2025
ba5f2d0
feat: add reusable components for test results display
alvarobernal2412 Jul 22, 2025
d6af37c
refactor: update control forms to integrate with test persistence
alvarobernal2412 Jul 22, 2025
a65edb4
feat: enhance mashup pages with persistent test results
alvarobernal2412 Jul 22, 2025
73d7681
Merge branch 'main' into feature/mashup-test-button
alvarobernal2412 Jul 22, 2025
8087471
feat: updated forms input feedback
tirirote Jul 23, 2025
f4c5254
fix: fixed input feedback for catalog wizard
tirirote Jul 23, 2025
097291d
chore: minor updates on the UI
tirirote Jul 23, 2025
4fcb18d
fix: unified ui styles and layout
tirirote Jul 23, 2025
ada26d7
fix: minor ui bug fixe
tirirote Jul 23, 2025
cfacf00
chore: improved ui feedback
tirirote Jul 24, 2025
dc9b39f
chore: reverted branch to previous commit
tirirote Jul 24, 2025
f95bfdf
Merge branch 'feature/mashup-test-button' of https://github.com/statu…
tirirote Jul 29, 2025
7f2049e
Revert "chore: reverted branch to previous commit"
tirirote Jul 29, 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
613 changes: 323 additions & 290 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
],
"dependencies": {
"@hookform/resolvers": "5.1.1",
"@radix-ui/react-popover": "^1.0.0",
"@tanstack/react-table": "8.21.3",
"ahooks": "3.9.0",
"axios": "1.10.0",
Expand All @@ -42,6 +43,7 @@
"react-router-dom": "7.6.3",
"sonner": "2.0.6",
"tailwind-merge": "3.3.1",
"uuid": "11.1.0",
"zod": "3.25.74"
},
"devDependencies": {
Expand All @@ -67,4 +69,4 @@
"unocss-preset-animations": "1.2.1",
"vite": "7.0.2"
}
}
}
Binary file modified public/favicon.ico
Binary file not shown.
6 changes: 5 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { ControlDetails } from '@/pages/app/ControlDetails';
import { ComputationDetails } from '@/pages/app/ComputationDetails';
import { CatalogWizard } from './pages/app/catalog/CatalogWizard.jsx';
import { Mashups } from '@/pages/app/Mashups';
import { ControlCreationAndTestPage } from '@/pages/app/mashups/ControlCreationAndTestPage';
import { Scopes } from '@/pages/app/Scopes';
import { Dashboards } from '@/pages/app/Dashboards';
import { DashboardDetails } from '@/pages/app/dashboard/DashboardDetails';
Expand Down Expand Up @@ -60,7 +61,10 @@ function App() {
<Route path="folders/:id" element={<FolderDetails />} />
</Route>
<Route path="scopes" element={<Scopes />} />
<Route path="mashups" element={<Mashups />} />
<Route path="mashups">
<Route index element={<Mashups />} />
<Route path="control-test" element={<ControlCreationAndTestPage />} />
</Route>
<Route path="secrets" element={<Secrets />} />
<Route path="editor">
<Route index element={<Editor />} />
Expand Down
36 changes: 23 additions & 13 deletions src/components/auth-provider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const AuthProvider = ({ children }) => {
// Ref to store the interceptor references for cleanup
const axiosInterceptorRef = useRef(null);
const nodeRedInterceptorRef = useRef(null);

// Handle node token change
useEffect(() => {
if (nodeRedToken) {
Expand All @@ -31,30 +31,30 @@ export const AuthProvider = ({ children }) => {
// Refresh token on app boot
useEffect(() => {
void refreshUserToken();

// Configure interceptors if authenticated
if (isAuthenticated) {
setupInterceptors();
}

// Cleanup interceptors on unmount
return () => {
cleanupInterceptors();
};
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

/**
* Configures the interceptors for axios and nodeRed clients
*/
const setupInterceptors = () => {
cleanupInterceptors();

axiosInterceptorRef.current = axiosClient.interceptors.response.use(
response => response,
axiosLogoutInterceptor
);

nodeRedInterceptorRef.current = nodeRedClient.interceptors.response.use(
response => response,
axiosLogoutInterceptor
Expand All @@ -69,7 +69,7 @@ export const AuthProvider = ({ children }) => {
axiosClient.interceptors.response.eject(axiosInterceptorRef.current);
axiosInterceptorRef.current = null;
}

if (nodeRedInterceptorRef.current !== null) {
nodeRedClient.interceptors.response.eject(nodeRedInterceptorRef.current);
nodeRedInterceptorRef.current = null;
Expand Down Expand Up @@ -135,16 +135,16 @@ export const AuthProvider = ({ children }) => {

try {
const refreshed = await refreshUserToken();

if (!refreshed) {
throw new Error('Token refresh failed');
}

// Update the original request with the new access token
if (userData?.accessToken) {
originalRequest.headers['Authorization'] = `Bearer ${userData.accessToken}`;
}

processQueue(null);
return axiosClient(originalRequest);
} catch (err) {
Expand All @@ -156,11 +156,19 @@ export const AuthProvider = ({ children }) => {
isRefreshing = false;
}
}

// If the request has already been retried, reject the promise
return Promise.reject(error);
};
})();
})();


const encodeToBase64 = (str) => {
const encoder = new TextEncoder();
const data = encoder.encode(str);
const binaryString = String.fromCharCode.apply(null, data)
return btoa(binaryString);
};

/**
* Logs in with a registered user
Expand All @@ -169,8 +177,10 @@ export const AuthProvider = ({ children }) => {
* @param {string} credentials.password - Password
* @returns {Promise} - Promise with the response
*/
async function authenticate ({ username, password }) {
async function authenticate({ username, password }) {
const basicAuth = encodeToBase64(`${username}:${password}`);
const { message: _, ...userData } = await apiClient.post('/users/signIn', { username, password });
userData.basicAuth = basicAuth;
setUserData(userData);
setupInterceptors();
};
Expand Down
Loading