Skip to content

Commit f3cd8e1

Browse files
committed
remove debug code in Alerts.jsx
1 parent 24225e4 commit f3cd8e1

File tree

1 file changed

+1
-21
lines changed
  • extensions/skyportal/static/js/components

1 file changed

+1
-21
lines changed

extensions/skyportal/static/js/components/Alerts.jsx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ const Alerts = () => {
211211
object_id: objectId,
212212
});
213213
} else if (ra && dec) {
214-
if (!["arcsec", "arcmin", "deg", "ra"].includes(radius_unit)) {
214+
if (!["arcsec", "arcmin", "deg", "rad"].includes(radius_unit)) {
215215
radius_unit = "arcsec";
216216
}
217217
if (Number.isNaN(radius)) {
@@ -263,16 +263,6 @@ const Alerts = () => {
263263
rows = alerts.map((a) => makeRow(a));
264264
}
265265

266-
// DEBUG: we only have 1 alert in the testing instance, so we duplicate the row to have 20 alerts
267-
if (rows.length > 0) {
268-
rows = Array(20).fill(rows[0]);
269-
rows = rows.map((row, i) => {
270-
const newRow = { ...row };
271-
newRow.jd = row.jd + i;
272-
return newRow;
273-
});
274-
}
275-
276266
if (groupByObj === true && rows.length > 0) {
277267
// first find the unique objectIds
278268
const uniqueObjectIds = Array.from(
@@ -293,18 +283,8 @@ const Alerts = () => {
293283
const separation = greatCircleDistance(ra, dec, row.ra, row.dec);
294284
return { ...row, separation };
295285
});
296-
297-
// // DEBUG: clone the rows to have 3 alerts, and increase the separation by 1 arcsec
298-
// rows = Array(3).fill(rows[0]);
299-
// rows = rows.map((row, i) => {
300-
// const newRow = { ...row };
301-
// newRow.separation = row.separation + i;
302-
// return newRow;
303-
// });
304286
}
305287

306-
console.log(rows);
307-
308288
const handleSaveDialogClose = () => {
309289
if (!saving) {
310290
setRowsToSave([]);

0 commit comments

Comments
 (0)