Spaces:
Running
Running
Khushal-kreeda
commited on
Commit
·
826a975
1
Parent(s):
56bf851
fix: ui enhancements
Browse files- src/App.css +30 -11
- src/App.js +0 -5
- src/components/DataViewer.js +29 -23
- src/components/Step1.js +0 -7
- src/components/Step2.js +1 -6
- src/components/Step3.js +1 -21
- src/components/Step4.js +64 -87
- src/components/TroubleshootingGuide.js +343 -87
- src/utils/apiService.js +2 -8
- src/utils/config.js +2 -2
src/App.css
CHANGED
@@ -711,7 +711,8 @@
|
|
711 |
font-weight: 600;
|
712 |
}
|
713 |
|
714 |
-
|
|
|
715 |
width: 100%;
|
716 |
max-height: 400px;
|
717 |
overflow: auto;
|
@@ -719,13 +720,18 @@
|
|
719 |
border-radius: 8px;
|
720 |
box-shadow: var(--shadow-md);
|
721 |
background: var(--bg-secondary);
|
|
|
|
|
|
|
|
|
722 |
}
|
723 |
|
724 |
.data-table-scrollable {
|
725 |
width: 100%;
|
726 |
border-collapse: collapse;
|
727 |
font-size: 0.8rem;
|
728 |
-
min-width: 600px; /*
|
|
|
729 |
}
|
730 |
|
731 |
.data-table-scrollable th,
|
@@ -738,7 +744,8 @@
|
|
738 |
overflow: hidden;
|
739 |
text-overflow: ellipsis;
|
740 |
max-width: 200px; /* Limit column width */
|
741 |
-
min-width:
|
|
|
742 |
}
|
743 |
|
744 |
.data-table-scrollable th {
|
@@ -772,25 +779,37 @@
|
|
772 |
}
|
773 |
|
774 |
/* Custom scrollbar for the data table container */
|
775 |
-
.data-table-container::-webkit-scrollbar
|
776 |
-
|
777 |
-
|
|
|
778 |
}
|
779 |
|
780 |
-
.data-table-container::-webkit-scrollbar-track
|
|
|
781 |
background: var(--bg-tertiary);
|
782 |
-
border-radius:
|
|
|
783 |
}
|
784 |
|
785 |
-
.data-table-container::-webkit-scrollbar-thumb
|
|
|
786 |
background: var(--border-light);
|
787 |
-
border-radius:
|
|
|
|
|
788 |
}
|
789 |
|
790 |
-
.data-table-container::-webkit-scrollbar-thumb:hover
|
|
|
791 |
background: var(--primary-color);
|
792 |
}
|
793 |
|
|
|
|
|
|
|
|
|
|
|
794 |
/* Legacy data-table styles for backward compatibility */
|
795 |
.data-table {
|
796 |
width: 100%;
|
|
|
711 |
font-weight: 600;
|
712 |
}
|
713 |
|
714 |
+
/* Data table container for Step2 preview - specific class to avoid conflicts */
|
715 |
+
.step2-data-table-container {
|
716 |
width: 100%;
|
717 |
max-height: 400px;
|
718 |
overflow: auto;
|
|
|
720 |
border-radius: 8px;
|
721 |
box-shadow: var(--shadow-md);
|
722 |
background: var(--bg-secondary);
|
723 |
+
position: relative;
|
724 |
+
/* Ensure scrolling works properly */
|
725 |
+
scrollbar-width: thin;
|
726 |
+
scrollbar-color: var(--border-light) var(--bg-tertiary);
|
727 |
}
|
728 |
|
729 |
.data-table-scrollable {
|
730 |
width: 100%;
|
731 |
border-collapse: collapse;
|
732 |
font-size: 0.8rem;
|
733 |
+
min-width: 600px; /* Increased minimum width to ensure horizontal scrolling */
|
734 |
+
table-layout: auto; /* Allow flexible column sizing */
|
735 |
}
|
736 |
|
737 |
.data-table-scrollable th,
|
|
|
744 |
overflow: hidden;
|
745 |
text-overflow: ellipsis;
|
746 |
max-width: 200px; /* Limit column width */
|
747 |
+
min-width: 120px; /* Increased minimum column width */
|
748 |
+
vertical-align: top;
|
749 |
}
|
750 |
|
751 |
.data-table-scrollable th {
|
|
|
779 |
}
|
780 |
|
781 |
/* Custom scrollbar for the data table container */
|
782 |
+
.data-table-container::-webkit-scrollbar,
|
783 |
+
.step2-data-table-container::-webkit-scrollbar {
|
784 |
+
width: 12px;
|
785 |
+
height: 12px;
|
786 |
}
|
787 |
|
788 |
+
.data-table-container::-webkit-scrollbar-track,
|
789 |
+
.step2-data-table-container::-webkit-scrollbar-track {
|
790 |
background: var(--bg-tertiary);
|
791 |
+
border-radius: 6px;
|
792 |
+
margin: 2px;
|
793 |
}
|
794 |
|
795 |
+
.data-table-container::-webkit-scrollbar-thumb,
|
796 |
+
.step2-data-table-container::-webkit-scrollbar-thumb {
|
797 |
background: var(--border-light);
|
798 |
+
border-radius: 6px;
|
799 |
+
border: 2px solid var(--bg-tertiary);
|
800 |
+
min-height: 20px;
|
801 |
}
|
802 |
|
803 |
+
.data-table-container::-webkit-scrollbar-thumb:hover,
|
804 |
+
.step2-data-table-container::-webkit-scrollbar-thumb:hover {
|
805 |
background: var(--primary-color);
|
806 |
}
|
807 |
|
808 |
+
.data-table-container::-webkit-scrollbar-corner,
|
809 |
+
.step2-data-table-container::-webkit-scrollbar-corner {
|
810 |
+
background: var(--bg-tertiary);
|
811 |
+
}
|
812 |
+
|
813 |
/* Legacy data-table styles for backward compatibility */
|
814 |
.data-table {
|
815 |
width: 100%;
|
src/App.js
CHANGED
@@ -10,17 +10,12 @@ import { ApiService } from "./utils/apiService";
|
|
10 |
// Make ApiService available globally for debugging
|
11 |
if (process.env.NODE_ENV === "development") {
|
12 |
window.ApiService = ApiService;
|
13 |
-
console.log("[Debug] ApiService is available globally as window.ApiService");
|
14 |
}
|
15 |
|
16 |
function App() {
|
17 |
const [apiKey, setApiKey] = useState("");
|
18 |
const [isApiKeyValid, setIsApiKeyValid] = useState(false); // Explicitly initialized to false
|
19 |
|
20 |
-
// Debug log when API key validity changes
|
21 |
-
useEffect(() => {
|
22 |
-
console.log("[App] API key validity changed:", isApiKeyValid);
|
23 |
-
}, [isApiKeyValid]);
|
24 |
const [uploadedFile, setUploadedFile] = useState(null);
|
25 |
const [s3Link, setS3Link] = useState("");
|
26 |
const [fileMetadata, setFileMetadata] = useState({
|
|
|
10 |
// Make ApiService available globally for debugging
|
11 |
if (process.env.NODE_ENV === "development") {
|
12 |
window.ApiService = ApiService;
|
|
|
13 |
}
|
14 |
|
15 |
function App() {
|
16 |
const [apiKey, setApiKey] = useState("");
|
17 |
const [isApiKeyValid, setIsApiKeyValid] = useState(false); // Explicitly initialized to false
|
18 |
|
|
|
|
|
|
|
|
|
19 |
const [uploadedFile, setUploadedFile] = useState(null);
|
20 |
const [s3Link, setS3Link] = useState("");
|
21 |
const [fileMetadata, setFileMetadata] = useState({
|
src/components/DataViewer.js
CHANGED
@@ -91,7 +91,6 @@ const DataViewer = ({ s3Url, onDownload, showPreviewOnly = false }) => {
|
|
91 |
throw new Error("No valid data rows found in the file");
|
92 |
}
|
93 |
} catch (err) {
|
94 |
-
console.error("Error fetching data:", err);
|
95 |
setError(err.message);
|
96 |
debugLog("Error fetching data:", err);
|
97 |
} finally {
|
@@ -207,15 +206,18 @@ const DataViewer = ({ s3Url, onDownload, showPreviewOnly = false }) => {
|
|
207 |
textAlign: "left",
|
208 |
}}
|
209 |
>
|
210 |
-
|
211 |
-
<
|
212 |
-
|
213 |
-
|
|
|
|
|
214 |
<li>
|
215 |
The preview may fail due to browser security restrictions
|
216 |
</li>
|
217 |
<li>
|
218 |
-
Your generated data is still available and ready
|
|
|
219 |
</li>
|
220 |
</ul>
|
221 |
</div>
|
@@ -225,21 +227,23 @@ const DataViewer = ({ s3Url, onDownload, showPreviewOnly = false }) => {
|
|
225 |
className="error-actions"
|
226 |
style={{ marginTop: "1.5rem", textAlign: "center" }}
|
227 |
>
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
|
|
239 |
<button
|
240 |
className="btn btn-secondary"
|
241 |
onClick={() => fetchData()}
|
242 |
-
style={{ marginLeft: "0.75rem" }}
|
243 |
>
|
244 |
🔄 Try Preview Again
|
245 |
</button>
|
@@ -289,11 +293,13 @@ const DataViewer = ({ s3Url, onDownload, showPreviewOnly = false }) => {
|
|
289 |
<p>The generated file appears to be empty.</p>
|
290 |
</div>
|
291 |
</div>
|
292 |
-
|
293 |
-
<
|
294 |
-
|
295 |
-
|
296 |
-
|
|
|
|
|
297 |
</div>
|
298 |
);
|
299 |
}
|
|
|
91 |
throw new Error("No valid data rows found in the file");
|
92 |
}
|
93 |
} catch (err) {
|
|
|
94 |
setError(err.message);
|
95 |
debugLog("Error fetching data:", err);
|
96 |
} finally {
|
|
|
206 |
textAlign: "left",
|
207 |
}}
|
208 |
>
|
209 |
+
{!showPreviewOnly && (
|
210 |
+
<li>
|
211 |
+
<strong>Download the file directly</strong> using the button
|
212 |
+
below
|
213 |
+
</li>
|
214 |
+
)}
|
215 |
<li>
|
216 |
The preview may fail due to browser security restrictions
|
217 |
</li>
|
218 |
<li>
|
219 |
+
Your generated data is still available and ready
|
220 |
+
{showPreviewOnly ? "" : " to download"}
|
221 |
</li>
|
222 |
</ul>
|
223 |
</div>
|
|
|
227 |
className="error-actions"
|
228 |
style={{ marginTop: "1.5rem", textAlign: "center" }}
|
229 |
>
|
230 |
+
{!showPreviewOnly && (
|
231 |
+
<button
|
232 |
+
className="btn btn-primary btn-large"
|
233 |
+
onClick={handleDownload}
|
234 |
+
style={{
|
235 |
+
marginRight: "0.75rem",
|
236 |
+
padding: "12px 24px",
|
237 |
+
fontSize: "1rem",
|
238 |
+
}}
|
239 |
+
>
|
240 |
+
📥 Download Generated Data
|
241 |
+
</button>
|
242 |
+
)}
|
243 |
<button
|
244 |
className="btn btn-secondary"
|
245 |
onClick={() => fetchData()}
|
246 |
+
style={{ marginLeft: showPreviewOnly ? "0" : "0.75rem" }}
|
247 |
>
|
248 |
🔄 Try Preview Again
|
249 |
</button>
|
|
|
293 |
<p>The generated file appears to be empty.</p>
|
294 |
</div>
|
295 |
</div>
|
296 |
+
{!showPreviewOnly && (
|
297 |
+
<div className="download-section" style={{ marginTop: "1rem" }}>
|
298 |
+
<button className="btn btn-primary" onClick={handleDownload}>
|
299 |
+
📥 Download File
|
300 |
+
</button>
|
301 |
+
</div>
|
302 |
+
)}
|
303 |
</div>
|
304 |
);
|
305 |
}
|
src/components/Step1.js
CHANGED
@@ -43,13 +43,6 @@ const Step1 = ({
|
|
43 |
});
|
44 |
|
45 |
const isValid = result.success && result.data && result.data.isValid;
|
46 |
-
console.log("[Step1] Validation result details:", {
|
47 |
-
result,
|
48 |
-
isValid,
|
49 |
-
success: result.success,
|
50 |
-
hasData: !!result.data,
|
51 |
-
dataIsValid: result.data?.isValid,
|
52 |
-
});
|
53 |
|
54 |
setIsApiKeyValid(isValid);
|
55 |
setValidationMessage(
|
|
|
43 |
});
|
44 |
|
45 |
const isValid = result.success && result.data && result.data.isValid;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
setIsApiKeyValid(isValid);
|
48 |
setValidationMessage(
|
src/components/Step2.js
CHANGED
@@ -131,11 +131,6 @@ const Step2 = ({
|
|
131 |
});
|
132 |
} catch (error) {
|
133 |
debugLog("File upload failed", error);
|
134 |
-
console.error("File upload error details:", {
|
135 |
-
error: error,
|
136 |
-
message: error.message,
|
137 |
-
stack: error.stack,
|
138 |
-
});
|
139 |
|
140 |
// More specific error messages
|
141 |
let errorMessage = "Failed to upload file. Please try again.";
|
@@ -202,7 +197,7 @@ const Step2 = ({
|
|
202 |
📊 Data Preview ({csvData.length} rows total, showing first{" "}
|
203 |
{previewData.length})
|
204 |
</h4>
|
205 |
-
<div className="data-table-container">
|
206 |
<table className="data-table-scrollable">
|
207 |
<thead>
|
208 |
<tr>
|
|
|
131 |
});
|
132 |
} catch (error) {
|
133 |
debugLog("File upload failed", error);
|
|
|
|
|
|
|
|
|
|
|
134 |
|
135 |
// More specific error messages
|
136 |
let errorMessage = "Failed to upload file. Please try again.";
|
|
|
197 |
📊 Data Preview ({csvData.length} rows total, showing first{" "}
|
198 |
{previewData.length})
|
199 |
</h4>
|
200 |
+
<div className="step2-data-table-container">
|
201 |
<table className="data-table-scrollable">
|
202 |
<thead>
|
203 |
<tr>
|
src/components/Step3.js
CHANGED
@@ -110,26 +110,6 @@ const Step3 = ({
|
|
110 |
</div>
|
111 |
|
112 |
<div className="step-body">
|
113 |
-
{!enabled && (
|
114 |
-
<div
|
115 |
-
className="status-message warning"
|
116 |
-
style={{ marginBottom: "1.5rem" }}
|
117 |
-
>
|
118 |
-
<div className="status-message-icon">⚠️</div>
|
119 |
-
<div className="status-message-content">
|
120 |
-
<h4>Prerequisites Required</h4>
|
121 |
-
<p>
|
122 |
-
Please complete the previous steps before configuring data
|
123 |
-
generation settings.
|
124 |
-
</p>
|
125 |
-
<div style={{ marginTop: "0.5rem", fontSize: "0.875rem" }}>
|
126 |
-
<div>• {isApiKeyValid ? "✅" : "❌"} API Key Validation</div>
|
127 |
-
<div>• {uploadedFile && s3Link ? "✅" : "❌"} File Upload</div>
|
128 |
-
</div>
|
129 |
-
</div>
|
130 |
-
</div>
|
131 |
-
)}
|
132 |
-
|
133 |
<div className="config-section">
|
134 |
<h3>
|
135 |
<span className="config-icon">📊</span>
|
@@ -181,7 +161,7 @@ const Step3 = ({
|
|
181 |
</h3>
|
182 |
<div
|
183 |
style={{
|
184 |
-
display: "flex",
|
185 |
flexWrap: "wrap",
|
186 |
gap: "0.5rem",
|
187 |
marginTop: "1rem",
|
|
|
110 |
</div>
|
111 |
|
112 |
<div className="step-body">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
<div className="config-section">
|
114 |
<h3>
|
115 |
<span className="config-icon">📊</span>
|
|
|
161 |
</h3>
|
162 |
<div
|
163 |
style={{
|
164 |
+
display: "flex",
|
165 |
flexWrap: "wrap",
|
166 |
gap: "0.5rem",
|
167 |
marginTop: "1rem",
|
src/components/Step4.js
CHANGED
@@ -216,30 +216,6 @@ const Step4 = ({
|
|
216 |
<div className="step-body">
|
217 |
{!generatedDataLink && !isGenerating && !hasError && (
|
218 |
<div className="generate-section">
|
219 |
-
{!enabled && (
|
220 |
-
<div
|
221 |
-
className="status-message warning"
|
222 |
-
style={{ marginBottom: "1.5rem" }}
|
223 |
-
>
|
224 |
-
<div className="status-message-icon">⚠️</div>
|
225 |
-
<div className="status-message-content">
|
226 |
-
<h4>Prerequisites Required</h4>
|
227 |
-
<p>
|
228 |
-
Please complete all previous steps before generating
|
229 |
-
synthetic data.
|
230 |
-
</p>
|
231 |
-
<div style={{ marginTop: "0.5rem", fontSize: "0.875rem" }}>
|
232 |
-
<div>• {apiKey ? "✅" : "❌"} API Key Validation</div>
|
233 |
-
<div>• {s3Link ? "✅" : "❌"} File Upload</div>
|
234 |
-
<div>
|
235 |
-
• {generationConfig.targetColumn ? "✅" : "❌"}{" "}
|
236 |
-
Configuration
|
237 |
-
</div>
|
238 |
-
</div>
|
239 |
-
</div>
|
240 |
-
</div>
|
241 |
-
)}
|
242 |
-
|
243 |
<div
|
244 |
className={`status-message ${
|
245 |
isReadyForGeneration ? "info" : "warning"
|
@@ -411,58 +387,78 @@ const Step4 = ({
|
|
411 |
|
412 |
{generatedDataLink && !isGenerating && (
|
413 |
<div className="results-section">
|
414 |
-
<div
|
|
|
|
|
|
|
415 |
<div className="status-message-icon">🎉</div>
|
416 |
<div className="status-message-content">
|
417 |
<h4>Generation Complete!</h4>
|
418 |
-
<p
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
>
|
423 |
-
<div className="success-stat">
|
424 |
-
<span className="success-label">📊 Target Column:</span>
|
425 |
-
<span className="success-value">
|
426 |
-
{generationConfig.targetColumn}
|
427 |
-
</span>
|
428 |
-
</div>
|
429 |
-
<div className="success-stat">
|
430 |
-
<span className="success-label">📈 Rows Generated:</span>
|
431 |
-
<span className="success-value">
|
432 |
-
{generationConfig.numRows}
|
433 |
-
</span>
|
434 |
-
</div>
|
435 |
-
</div>
|
436 |
</div>
|
437 |
</div>
|
438 |
|
439 |
<div
|
440 |
-
className="
|
441 |
-
style={{ marginTop: "1.5rem"
|
442 |
>
|
443 |
-
<
|
444 |
-
className="
|
445 |
-
|
446 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
>
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
|
455 |
-
|
456 |
-
<h4
|
457 |
-
style={{ marginBottom: "1rem", color: "var(--text-primary)" }}
|
458 |
-
>
|
459 |
-
📊 Data Preview
|
460 |
-
</h4>
|
461 |
-
<DataViewer
|
462 |
-
s3Url={generatedDataLink}
|
463 |
-
onDownload={handleDownload}
|
464 |
-
showPreviewOnly={true}
|
465 |
-
/>
|
466 |
|
467 |
<div
|
468 |
className="preview-info"
|
@@ -476,29 +472,10 @@ const Step4 = ({
|
|
476 |
textAlign: "center",
|
477 |
}}
|
478 |
>
|
479 |
-
💡
|
480 |
-
|
481 |
-
your file.
|
482 |
</div>
|
483 |
</div>
|
484 |
-
|
485 |
-
<div
|
486 |
-
className="generate-new-section"
|
487 |
-
style={{ marginTop: "2rem", textAlign: "center" }}
|
488 |
-
>
|
489 |
-
<button
|
490 |
-
className="btn btn-secondary"
|
491 |
-
onClick={() => {
|
492 |
-
setGeneratedDataLink("");
|
493 |
-
setGenerationProgress(0);
|
494 |
-
setGenerationStatus("");
|
495 |
-
setHasError(false);
|
496 |
-
setErrorMessage("");
|
497 |
-
}}
|
498 |
-
>
|
499 |
-
🔄 Generate New Data
|
500 |
-
</button>
|
501 |
-
</div>
|
502 |
</div>
|
503 |
)}
|
504 |
</div>
|
|
|
216 |
<div className="step-body">
|
217 |
{!generatedDataLink && !isGenerating && !hasError && (
|
218 |
<div className="generate-section">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
<div
|
220 |
className={`status-message ${
|
221 |
isReadyForGeneration ? "info" : "warning"
|
|
|
387 |
|
388 |
{generatedDataLink && !isGenerating && (
|
389 |
<div className="results-section">
|
390 |
+
<div
|
391 |
+
className="status-message success"
|
392 |
+
style={{ marginBottom: "1.5rem" }}
|
393 |
+
>
|
394 |
<div className="status-message-icon">🎉</div>
|
395 |
<div className="status-message-content">
|
396 |
<h4>Generation Complete!</h4>
|
397 |
+
<p style={{ margin: "0.5rem 0" }}>
|
398 |
+
Successfully generated {generationConfig.numRows} rows of
|
399 |
+
synthetic data targeting the{" "}
|
400 |
+
<strong>{generationConfig.targetColumn}</strong> column.
|
401 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
</div>
|
403 |
</div>
|
404 |
|
405 |
<div
|
406 |
+
className="data-preview-section"
|
407 |
+
style={{ marginTop: "1.5rem" }}
|
408 |
>
|
409 |
+
<div
|
410 |
+
className="preview-header"
|
411 |
+
style={{
|
412 |
+
display: "flex",
|
413 |
+
justifyContent: "space-between",
|
414 |
+
alignItems: "center",
|
415 |
+
marginBottom: "1rem",
|
416 |
+
flexWrap: "wrap",
|
417 |
+
gap: "1rem",
|
418 |
+
}}
|
419 |
>
|
420 |
+
<h4 style={{ margin: 0, color: "var(--text-primary)" }}>
|
421 |
+
📊 Data Preview
|
422 |
+
</h4>
|
423 |
+
<div
|
424 |
+
className="action-buttons"
|
425 |
+
style={{
|
426 |
+
display: "flex",
|
427 |
+
gap: "0.75rem",
|
428 |
+
flexWrap: "wrap",
|
429 |
+
}}
|
430 |
+
>
|
431 |
+
<button
|
432 |
+
className="btn btn-success"
|
433 |
+
onClick={handleDownload}
|
434 |
+
title="Download the generated synthetic data file"
|
435 |
+
>
|
436 |
+
📥 Download
|
437 |
+
</button>
|
438 |
+
<button
|
439 |
+
className="btn btn-outline"
|
440 |
+
onClick={handleCopyLink}
|
441 |
+
title="Copy download link to clipboard"
|
442 |
+
>
|
443 |
+
📋 Copy Link
|
444 |
+
</button>
|
445 |
+
<button
|
446 |
+
className="btn btn-secondary"
|
447 |
+
onClick={() => {
|
448 |
+
setGeneratedDataLink("");
|
449 |
+
setGenerationProgress(0);
|
450 |
+
setGenerationStatus("");
|
451 |
+
setHasError(false);
|
452 |
+
setErrorMessage("");
|
453 |
+
}}
|
454 |
+
title="Generate new synthetic data with different parameters"
|
455 |
+
>
|
456 |
+
🔄 New Generation
|
457 |
+
</button>
|
458 |
+
</div>
|
459 |
+
</div>
|
460 |
|
461 |
+
<DataViewer s3Url={generatedDataLink} showPreviewOnly={true} />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
|
463 |
<div
|
464 |
className="preview-info"
|
|
|
472 |
textAlign: "center",
|
473 |
}}
|
474 |
>
|
475 |
+
💡 Showing preview of first few rows. Download the complete file
|
476 |
+
({generationConfig.numRows} rows) using the button above.
|
|
|
477 |
</div>
|
478 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
</div>
|
480 |
)}
|
481 |
</div>
|
src/components/TroubleshootingGuide.js
CHANGED
@@ -2,111 +2,367 @@ import React, { useState } from "react";
|
|
2 |
|
3 |
const TroubleshootingGuide = ({ generatedDataLink, onDownload }) => {
|
4 |
const [isExpanded, setIsExpanded] = useState(false);
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
style={{
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}}
|
34 |
>
|
35 |
-
<
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
style={{ marginBottom: "1rem" }}
|
42 |
>
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<div
|
54 |
-
className="troubleshooting-section"
|
55 |
-
style={{ marginBottom: "1rem" }}
|
56 |
>
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
<li>
|
61 |
-
Try right-clicking the download button and select "Open in new
|
62 |
-
tab"
|
63 |
-
</li>
|
64 |
-
<li>Copy the link and paste it in a new browser tab</li>
|
65 |
-
</ul>
|
66 |
-
</div>
|
67 |
|
|
|
68 |
<div
|
69 |
-
className="troubleshooting-
|
70 |
-
style={{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
>
|
72 |
-
<strong>🔗 Direct download link:</strong>
|
73 |
<div
|
74 |
style={{
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
wordBreak: "break-all",
|
82 |
-
border: "1px solid var(--border-color)",
|
83 |
}}
|
84 |
>
|
85 |
-
{
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
92 |
>
|
93 |
-
|
94 |
-
</
|
95 |
</div>
|
96 |
-
</div>
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
</div>
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
);
|
111 |
};
|
112 |
|
|
|
2 |
|
3 |
const TroubleshootingGuide = ({ generatedDataLink, onDownload }) => {
|
4 |
const [isExpanded, setIsExpanded] = useState(false);
|
5 |
+
const [copySuccess, setCopySuccess] = useState(false);
|
6 |
|
7 |
+
const handleCopyLink = async () => {
|
8 |
+
try {
|
9 |
+
await navigator.clipboard.writeText(generatedDataLink);
|
10 |
+
setCopySuccess(true);
|
11 |
+
setTimeout(() => setCopySuccess(false), 2000);
|
12 |
+
} catch (err) {
|
13 |
+
console.error("Failed to copy: ", err);
|
14 |
+
}
|
15 |
+
};
|
16 |
+
|
17 |
+
// Add keyframes for animations
|
18 |
+
const keyframes = `
|
19 |
+
@keyframes fadeInUp {
|
20 |
+
from {
|
21 |
+
opacity: 0;
|
22 |
+
transform: translateY(20px);
|
23 |
+
}
|
24 |
+
to {
|
25 |
+
opacity: 1;
|
26 |
+
transform: translateY(0);
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
@keyframes pulse {
|
31 |
+
0%, 100% {
|
32 |
+
transform: scale(1);
|
33 |
+
}
|
34 |
+
50% {
|
35 |
+
transform: scale(1.05);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
`;
|
39 |
|
40 |
+
return (
|
41 |
+
<>
|
42 |
+
<style>{keyframes}</style>
|
43 |
+
<div className="troubleshooting-guide" style={{ marginTop: "2rem" }}>
|
44 |
+
<button
|
45 |
+
className="btn btn-outline btn-small"
|
46 |
+
onClick={() => setIsExpanded(!isExpanded)}
|
47 |
style={{
|
48 |
+
display: "flex",
|
49 |
+
alignItems: "center",
|
50 |
+
justifyContent: "center",
|
51 |
+
gap: "0.75rem",
|
52 |
+
fontSize: "0.9rem",
|
53 |
+
padding: "0.75rem 1.5rem",
|
54 |
+
borderRadius: "12px",
|
55 |
+
background: isExpanded
|
56 |
+
? "linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1))"
|
57 |
+
: "var(--bg-secondary)",
|
58 |
+
border: isExpanded
|
59 |
+
? "2px solid rgba(59, 130, 246, 0.3)"
|
60 |
+
: "2px solid var(--border-color)",
|
61 |
+
transition: "all 0.3s ease",
|
62 |
+
boxShadow: isExpanded
|
63 |
+
? "0 4px 12px rgba(59, 130, 246, 0.15)"
|
64 |
+
: "0 2px 4px rgba(0, 0, 0, 0.1)",
|
65 |
+
fontWeight: "600",
|
66 |
+
color: "var(--text-primary)",
|
67 |
}}
|
68 |
>
|
69 |
+
<span
|
70 |
+
style={{
|
71 |
+
fontSize: "1.1rem",
|
72 |
+
transition: "transform 0.3s ease",
|
73 |
+
transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
|
74 |
+
}}
|
|
|
75 |
>
|
76 |
+
{isExpanded ? "🔼" : "🔼"}
|
77 |
+
</span>
|
78 |
+
Troubleshooting Guide
|
79 |
+
<span
|
80 |
+
style={{
|
81 |
+
fontSize: "0.75rem",
|
82 |
+
opacity: 0.7,
|
83 |
+
fontWeight: "normal",
|
84 |
+
}}
|
|
|
|
|
|
|
|
|
85 |
>
|
86 |
+
{isExpanded ? "Click to hide" : "Need help?"}
|
87 |
+
</span>
|
88 |
+
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
+
{isExpanded && (
|
91 |
<div
|
92 |
+
className="troubleshooting-content"
|
93 |
+
style={{
|
94 |
+
marginTop: "1.5rem",
|
95 |
+
padding: "2rem",
|
96 |
+
background:
|
97 |
+
"linear-gradient(135deg, var(--bg-tertiary), rgba(255, 255, 255, 0.02))",
|
98 |
+
borderRadius: "16px",
|
99 |
+
border: "1px solid rgba(255, 255, 255, 0.1)",
|
100 |
+
fontSize: "0.9rem",
|
101 |
+
lineHeight: "1.7",
|
102 |
+
boxShadow: "0 8px 32px rgba(0, 0, 0, 0.1)",
|
103 |
+
backdropFilter: "blur(10px)",
|
104 |
+
animation: "fadeInUp 0.4s ease-out",
|
105 |
+
}}
|
106 |
>
|
|
|
107 |
<div
|
108 |
style={{
|
109 |
+
display: "flex",
|
110 |
+
alignItems: "center",
|
111 |
+
gap: "0.75rem",
|
112 |
+
marginBottom: "1.5rem",
|
113 |
+
paddingBottom: "1rem",
|
114 |
+
borderBottom: "2px solid rgba(255, 255, 255, 0.1)",
|
|
|
|
|
115 |
}}
|
116 |
>
|
117 |
+
<span style={{ fontSize: "1.5rem" }}>🛠️</span>
|
118 |
+
<h5
|
119 |
+
style={{
|
120 |
+
margin: 0,
|
121 |
+
color: "var(--text-primary)",
|
122 |
+
fontSize: "1.1rem",
|
123 |
+
fontWeight: "700",
|
124 |
+
background: "linear-gradient(135deg, #3b82f6, #9333ea)",
|
125 |
+
backgroundClip: "text",
|
126 |
+
WebkitBackgroundClip: "text",
|
127 |
+
WebkitTextFillColor: "transparent",
|
128 |
+
}}
|
129 |
>
|
130 |
+
Common Issues and Solutions
|
131 |
+
</h5>
|
132 |
</div>
|
|
|
133 |
|
134 |
+
<div
|
135 |
+
className="troubleshooting-sections"
|
136 |
+
style={{
|
137 |
+
display: "flex",
|
138 |
+
flexDirection: "column",
|
139 |
+
gap: "1.5rem",
|
140 |
+
}}
|
141 |
+
>
|
142 |
+
<div
|
143 |
+
className="troubleshooting-section"
|
144 |
+
style={{
|
145 |
+
padding: "1.25rem",
|
146 |
+
background: "rgba(59, 130, 246, 0.05)",
|
147 |
+
borderRadius: "12px",
|
148 |
+
border: "1px solid rgba(59, 130, 246, 0.2)",
|
149 |
+
borderLeft: "4px solid #3b82f6",
|
150 |
+
}}
|
151 |
+
>
|
152 |
+
<div
|
153 |
+
style={{
|
154 |
+
display: "flex",
|
155 |
+
alignItems: "center",
|
156 |
+
gap: "0.5rem",
|
157 |
+
marginBottom: "0.75rem",
|
158 |
+
}}
|
159 |
+
>
|
160 |
+
<span style={{ fontSize: "1.2rem" }}>📱</span>
|
161 |
+
<strong
|
162 |
+
style={{ color: "var(--text-primary)", fontSize: "1rem" }}
|
163 |
+
>
|
164 |
+
Preview not working?
|
165 |
+
</strong>
|
166 |
+
</div>
|
167 |
+
<ul
|
168 |
+
style={{
|
169 |
+
margin: 0,
|
170 |
+
paddingLeft: "1.5rem",
|
171 |
+
color: "var(--text-secondary)",
|
172 |
+
}}
|
173 |
+
>
|
174 |
+
<li style={{ marginBottom: "0.5rem" }}>
|
175 |
+
<span style={{ color: "#10b981", fontWeight: "600" }}>
|
176 |
+
✓
|
177 |
+
</span>{" "}
|
178 |
+
This is normal! Browser security prevents previewing some
|
179 |
+
files
|
180 |
+
</li>
|
181 |
+
<li style={{ marginBottom: "0.5rem" }}>
|
182 |
+
<span style={{ color: "#10b981", fontWeight: "600" }}>
|
183 |
+
✓
|
184 |
+
</span>{" "}
|
185 |
+
Your data has been generated successfully
|
186 |
+
</li>
|
187 |
+
<li>
|
188 |
+
<span style={{ color: "#3b82f6", fontWeight: "600" }}>
|
189 |
+
→
|
190 |
+
</span>{" "}
|
191 |
+
Click the download button to get your file
|
192 |
+
</li>
|
193 |
+
</ul>
|
194 |
+
</div>
|
195 |
+
|
196 |
+
<div
|
197 |
+
className="troubleshooting-section"
|
198 |
+
style={{
|
199 |
+
padding: "1.25rem",
|
200 |
+
background: "rgba(245, 158, 11, 0.05)",
|
201 |
+
borderRadius: "12px",
|
202 |
+
border: "1px solid rgba(245, 158, 11, 0.2)",
|
203 |
+
borderLeft: "4px solid #f59e0b",
|
204 |
+
}}
|
205 |
+
>
|
206 |
+
<div
|
207 |
+
style={{
|
208 |
+
display: "flex",
|
209 |
+
alignItems: "center",
|
210 |
+
gap: "0.5rem",
|
211 |
+
marginBottom: "0.75rem",
|
212 |
+
}}
|
213 |
+
>
|
214 |
+
<span style={{ fontSize: "1.2rem" }}>💾</span>
|
215 |
+
<strong
|
216 |
+
style={{ color: "var(--text-primary)", fontSize: "1rem" }}
|
217 |
+
>
|
218 |
+
Download not working?
|
219 |
+
</strong>
|
220 |
+
</div>
|
221 |
+
<ul
|
222 |
+
style={{
|
223 |
+
margin: 0,
|
224 |
+
paddingLeft: "1.5rem",
|
225 |
+
color: "var(--text-secondary)",
|
226 |
+
}}
|
227 |
+
>
|
228 |
+
<li style={{ marginBottom: "0.5rem" }}>
|
229 |
+
Check if your browser blocked popups
|
230 |
+
</li>
|
231 |
+
<li style={{ marginBottom: "0.5rem" }}>
|
232 |
+
Try right-clicking the download button and select "Open in
|
233 |
+
new tab"
|
234 |
+
</li>
|
235 |
+
<li>Copy the link and paste it in a new browser tab</li>
|
236 |
+
</ul>
|
237 |
+
</div>
|
238 |
+
|
239 |
+
<div
|
240 |
+
className="troubleshooting-section"
|
241 |
+
style={{
|
242 |
+
padding: "1.25rem",
|
243 |
+
background: "rgba(147, 51, 234, 0.05)",
|
244 |
+
borderRadius: "12px",
|
245 |
+
border: "1px solid rgba(147, 51, 234, 0.2)",
|
246 |
+
borderLeft: "4px solid #9333ea",
|
247 |
+
}}
|
248 |
+
>
|
249 |
+
<div
|
250 |
+
style={{
|
251 |
+
display: "flex",
|
252 |
+
alignItems: "center",
|
253 |
+
gap: "0.5rem",
|
254 |
+
marginBottom: "0.75rem",
|
255 |
+
}}
|
256 |
+
>
|
257 |
+
<span style={{ fontSize: "1.2rem" }}>🔗</span>
|
258 |
+
<strong
|
259 |
+
style={{ color: "var(--text-primary)", fontSize: "1rem" }}
|
260 |
+
>
|
261 |
+
Direct download link:
|
262 |
+
</strong>
|
263 |
+
</div>
|
264 |
+
<div
|
265 |
+
style={{
|
266 |
+
marginTop: "0.75rem",
|
267 |
+
padding: "1rem",
|
268 |
+
background: "rgba(0, 0, 0, 0.3)",
|
269 |
+
borderRadius: "8px",
|
270 |
+
fontFamily:
|
271 |
+
"Monaco, 'Cascadia Code', 'Roboto Mono', monospace",
|
272 |
+
fontSize: "0.8rem",
|
273 |
+
wordBreak: "break-all",
|
274 |
+
border: "1px solid rgba(255, 255, 255, 0.1)",
|
275 |
+
color: "#e5e7eb",
|
276 |
+
position: "relative",
|
277 |
+
overflow: "hidden",
|
278 |
+
}}
|
279 |
+
>
|
280 |
+
<div
|
281 |
+
style={{
|
282 |
+
position: "absolute",
|
283 |
+
top: 0,
|
284 |
+
left: 0,
|
285 |
+
right: 0,
|
286 |
+
height: "2px",
|
287 |
+
background:
|
288 |
+
"linear-gradient(90deg, #3b82f6, #9333ea, #10b981)",
|
289 |
+
}}
|
290 |
+
/>
|
291 |
+
{generatedDataLink}
|
292 |
+
</div>
|
293 |
+
<div style={{ marginTop: "1rem", textAlign: "center" }}>
|
294 |
+
<button
|
295 |
+
className="btn btn-small"
|
296 |
+
onClick={handleCopyLink}
|
297 |
+
style={{
|
298 |
+
fontSize: "0.85rem",
|
299 |
+
padding: "0.5rem 1rem",
|
300 |
+
borderRadius: "8px",
|
301 |
+
background: copySuccess
|
302 |
+
? "linear-gradient(135deg, #10b981, #059669)"
|
303 |
+
: "linear-gradient(135deg, #3b82f6, #2563eb)",
|
304 |
+
border: "none",
|
305 |
+
color: "white",
|
306 |
+
fontWeight: "600",
|
307 |
+
transition: "all 0.3s ease",
|
308 |
+
transform: copySuccess ? "scale(1.05)" : "scale(1)",
|
309 |
+
boxShadow: "0 4px 12px rgba(59, 130, 246, 0.3)",
|
310 |
+
}}
|
311 |
+
>
|
312 |
+
{copySuccess ? "✅ Copied!" : "📋 Copy Link"}
|
313 |
+
</button>
|
314 |
+
</div>
|
315 |
+
</div>
|
316 |
+
|
317 |
+
<div
|
318 |
+
className="troubleshooting-section"
|
319 |
+
style={{
|
320 |
+
padding: "1.25rem",
|
321 |
+
background: "rgba(239, 68, 68, 0.05)",
|
322 |
+
borderRadius: "12px",
|
323 |
+
border: "1px solid rgba(239, 68, 68, 0.2)",
|
324 |
+
borderLeft: "4px solid #ef4444",
|
325 |
+
}}
|
326 |
+
>
|
327 |
+
<div
|
328 |
+
style={{
|
329 |
+
display: "flex",
|
330 |
+
alignItems: "center",
|
331 |
+
gap: "0.5rem",
|
332 |
+
marginBottom: "0.75rem",
|
333 |
+
}}
|
334 |
+
>
|
335 |
+
<span style={{ fontSize: "1.2rem" }}>❓</span>
|
336 |
+
<strong
|
337 |
+
style={{ color: "var(--text-primary)", fontSize: "1rem" }}
|
338 |
+
>
|
339 |
+
Still having issues?
|
340 |
+
</strong>
|
341 |
+
</div>
|
342 |
+
<ul
|
343 |
+
style={{
|
344 |
+
margin: 0,
|
345 |
+
paddingLeft: "1.5rem",
|
346 |
+
color: "var(--text-secondary)",
|
347 |
+
}}
|
348 |
+
>
|
349 |
+
<li style={{ marginBottom: "0.5rem" }}>
|
350 |
+
Try using a different browser (Chrome, Firefox, Safari)
|
351 |
+
</li>
|
352 |
+
<li style={{ marginBottom: "0.5rem" }}>
|
353 |
+
Disable browser extensions temporarily
|
354 |
+
</li>
|
355 |
+
<li style={{ marginBottom: "0.5rem" }}>
|
356 |
+
Check if your antivirus is blocking downloads
|
357 |
+
</li>
|
358 |
+
<li>Contact support if problems persist</li>
|
359 |
+
</ul>
|
360 |
+
</div>
|
361 |
+
</div>
|
362 |
</div>
|
363 |
+
)}
|
364 |
+
</div>
|
365 |
+
</>
|
366 |
);
|
367 |
};
|
368 |
|
src/utils/apiService.js
CHANGED
@@ -24,7 +24,6 @@ const getS3Client = () => {
|
|
24 |
const error = new Error(
|
25 |
"AWS credentials not configured. Please set REACT_APP_AWS_ACCESS_KEY_ID and REACT_APP_AWS_SECRET_ACCESS_KEY"
|
26 |
);
|
27 |
-
console.error("[AWS Error] Missing credentials:", error);
|
28 |
throw error;
|
29 |
}
|
30 |
|
@@ -40,7 +39,6 @@ const getS3Client = () => {
|
|
40 |
debugLog("S3 client created successfully");
|
41 |
return client;
|
42 |
} catch (error) {
|
43 |
-
console.error("[AWS Error] Error creating S3 client:", error);
|
44 |
debugLog("Error creating S3 client:", error);
|
45 |
throw error;
|
46 |
}
|
@@ -97,16 +95,12 @@ export class ApiService {
|
|
97 |
|
98 |
// Validate AWS Access Key format
|
99 |
if (!config.awsAccessKeyId.startsWith("AKIA")) {
|
100 |
-
|
101 |
-
"[AWS Connection] Access Key does not start with AKIA - this might be invalid"
|
102 |
-
);
|
103 |
}
|
104 |
|
105 |
// Validate Secret Key length (should be 40 characters)
|
106 |
if (config.awsSecretAccessKey.length !== 40) {
|
107 |
-
|
108 |
-
"[AWS Connection] Secret Key length is not 40 characters - this might be invalid"
|
109 |
-
);
|
110 |
}
|
111 |
|
112 |
if (!config.s3BucketName) {
|
|
|
24 |
const error = new Error(
|
25 |
"AWS credentials not configured. Please set REACT_APP_AWS_ACCESS_KEY_ID and REACT_APP_AWS_SECRET_ACCESS_KEY"
|
26 |
);
|
|
|
27 |
throw error;
|
28 |
}
|
29 |
|
|
|
39 |
debugLog("S3 client created successfully");
|
40 |
return client;
|
41 |
} catch (error) {
|
|
|
42 |
debugLog("Error creating S3 client:", error);
|
43 |
throw error;
|
44 |
}
|
|
|
95 |
|
96 |
// Validate AWS Access Key format
|
97 |
if (!config.awsAccessKeyId.startsWith("AKIA")) {
|
98 |
+
// Access Key validation warning removed
|
|
|
|
|
99 |
}
|
100 |
|
101 |
// Validate Secret Key length (should be 40 characters)
|
102 |
if (config.awsSecretAccessKey.length !== 40) {
|
103 |
+
// Secret Key validation warning removed
|
|
|
|
|
104 |
}
|
105 |
|
106 |
if (!config.s3BucketName) {
|
src/utils/config.js
CHANGED
@@ -63,7 +63,7 @@ export const getGenerationUrl = () => `${config.apiBaseUrl}/ai/execute`;
|
|
63 |
// Debug logging utility
|
64 |
export const debugLog = (message, data = null) => {
|
65 |
if (config.debugMode || process.env.NODE_ENV === "development") {
|
66 |
-
|
67 |
}
|
68 |
};
|
69 |
|
@@ -81,7 +81,7 @@ const validateConfig = () => {
|
|
81 |
);
|
82 |
|
83 |
if (missing.length > 0) {
|
84 |
-
|
85 |
}
|
86 |
};
|
87 |
|
|
|
63 |
// Debug logging utility
|
64 |
export const debugLog = (message, data = null) => {
|
65 |
if (config.debugMode || process.env.NODE_ENV === "development") {
|
66 |
+
// Debug logging disabled
|
67 |
}
|
68 |
};
|
69 |
|
|
|
81 |
);
|
82 |
|
83 |
if (missing.length > 0) {
|
84 |
+
// Environment variables validation warning removed
|
85 |
}
|
86 |
};
|
87 |
|