Skip to content

Commit

Permalink
feat: add source creation message
Browse files Browse the repository at this point in the history
closes #1165
  • Loading branch information
ogiorgis authored and xgaia committed Feb 28, 2025
1 parent 4d03b30 commit dd74161
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mainapp/src/Component/SourcesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const SourcesTable = () => {

const [snackOpen, setSnackOpen] = useState(false);
const [snackMessages, setSnackMessages] = useState(new Set());
const [snackSeverity, setSnackSeverity] = useState<"warning" | "error" | undefined>(undefined);
const [snackSeverity, setSnackSeverity] = useState<"info" | "warning" | "error" | undefined>(undefined);

const [openModal, setOpenModal] = useState(false);
const [editModal, setEditModal] = useState(false);
Expand Down Expand Up @@ -89,6 +89,9 @@ const SourcesTable = () => {
window.Config.sources = reformatSource(receivedSources);
updateModel({ type: "sources", payload: success(receivedSources) });
void writeLog(me, "ConfigEditor", editModal ? "edit" : "create", source.name);
setSnackSeverity("info");
setSnackMessages(new Set([`source ${source.name} is created`]));
setSnackOpen(true);
} else {
updateModel({ type: "sources", payload: failure(response.message as string) });
}
Expand Down

1 comment on commit dd74161

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jest Coverage Comment

Summary

Lines Statements Branches Functions
Coverage: 76%
76.4% (476/623) 73.91% (187/253) 81.81% (99/121)
Coverage Report (76%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files76.473.9181.8176.28 
   config.js10096.551001004
   profiles.js94.5697.0594.7395.23133, 161–163
   sources.js62.9954.767562.6936, 64, 93, 143, 147, 150, 173, 219–229, 238–252, 260–270, 279–293
   tools.js41.0821.9555.5541.2685–86, 123–130, 142–174, 187–206, 231–238, 255, 265–269, 285, 297–352
   userData.js81.576410081.3335, 43, 50, 71–72, 85–86, 99–100, 111, 118–119, 127–128
   users.js95.996.879596.61239–240, 261–262
   utils.js10088.8810010016, 42

Please sign in to comment.