Skip to content

Commit a807748

Browse files
Remove the use of the explorer endpoint (#710)
* Replace occurences of /explorer. Also fix type issue when searching in history menu * Bump to 6.2
1 parent 4fbe1a2 commit a807748

File tree

2 files changed

+8
-33
lines changed

2 files changed

+8
-33
lines changed

apps/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
__version__ = "6.1"
15+
__version__ = "6.2"

index.py

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,11 @@ def update_search_history_menu(timestamp, history):
424424
] + [
425425
dmc.MenuItem(
426426
item,
427-
id={"type": "search_bar_completion", "index": 1000 + i, "text": item},
427+
id={
428+
"type": "search_bar_completion",
429+
"index": 1000 + i,
430+
"text": str(item),
431+
},
428432
)
429433
for i, item in enumerate(history[::-1])
430434
]
@@ -1155,7 +1159,7 @@ def results(n_submit, n_clicks, s_n_clicks, searchurl, value, history, show_tabl
11551159
"partial" if query.get("partial") else "exact", query["object"]
11561160
)
11571161
pdf = request_api(
1158-
"/api/v1/explorer",
1162+
"/api/v1/objects",
11591163
json={
11601164
"objectId": query["object"],
11611165
},
@@ -1217,7 +1221,7 @@ def results(n_submit, n_clicks, s_n_clicks, searchurl, value, history, show_tabl
12171221

12181222
payload["window"] = window
12191223

1220-
pdf = request_api("/api/v1/explorer", json=payload)
1224+
pdf = request_api("/api/v1/conesearch", json=payload)
12211225

12221226
colnames_to_display = {
12231227
"i:objectId": "objectId",
@@ -1253,35 +1257,6 @@ def results(n_submit, n_clicks, s_n_clicks, searchurl, value, history, show_tabl
12531257

12541258
pdf = request_api("/api/v1/latests", json=payload)
12551259

1256-
elif query["action"] == "daterange":
1257-
# Date range search
1258-
msg = "Objects in date range"
1259-
1260-
payload = {}
1261-
1262-
if "after" in query["params"]:
1263-
startdate = isoify_time(query["params"]["after"])
1264-
1265-
msg += " after {}".format(startdate)
1266-
1267-
payload["startdate"] = startdate
1268-
1269-
if "before" in query["params"]:
1270-
stopdate = isoify_time(query["params"]["before"])
1271-
1272-
msg += " before {}".format(stopdate)
1273-
1274-
payload["stopdate"] = stopdate
1275-
1276-
elif "window" in query["params"]:
1277-
window = query["params"]["window"]
1278-
1279-
msg += " window {} days".format(window)
1280-
1281-
payload["window"] = window
1282-
1283-
pdf = request_api("/api/v1/explorer", json=payload)
1284-
12851260
elif query["action"] == "anomaly":
12861261
# Anomaly search
12871262
n_last = int(query["params"].get("last", 100))

0 commit comments

Comments
 (0)