Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/routes_connectors.py +18 -0
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
- web/src/connectors/DatabasesTab.tsx +3 -2
RELEASES.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": []
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "4eeece1f8",
|
| 3 |
"releases": []
|
| 4 |
}
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
4eeece1f8
|
api/routes_connectors.py
CHANGED
|
@@ -4751,8 +4751,25 @@ def connector_detail(rt, user, uname, is_admin, connector_key, *, databases_offs
|
|
| 4751 |
# question about a PERSON and a table, not about an administrator flag alone.
|
| 4752 |
databases = _detail_databases(rt, bool(is_admin), key, uname=str(uname or ""),
|
| 4753 |
page=page, fields=fields, user=user)
|
|
|
|
| 4754 |
if key == "amazon_sp":
|
| 4755 |
databases = _screen_amazon_database_rows(databases)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4756 |
budget.check()
|
| 4757 |
overview = _detail_overview(row, databases, graph)
|
| 4758 |
if page is not None and page.total:
|
|
@@ -4767,6 +4784,7 @@ def connector_detail(rt, user, uname, is_admin, connector_key, *, databases_offs
|
|
| 4767 |
return _safe_connector_status(key, {"overview": overview,
|
| 4768 |
"keychain": keychain,
|
| 4769 |
"databases": databases,
|
|
|
|
| 4770 |
**({"databasesPage": page.dto()} if page is not None else {}),
|
| 4771 |
**({"relationshipsPath": f"/connectors/{key}/relationships"}
|
| 4772 |
if fields == "summary" else {}),
|
|
|
|
| 4751 |
# question about a PERSON and a table, not about an administrator flag alone.
|
| 4752 |
databases = _detail_databases(rt, bool(is_admin), key, uname=str(uname or ""),
|
| 4753 |
page=page, fields=fields, user=user)
|
| 4754 |
+
amazon_first_load = {}
|
| 4755 |
if key == "amazon_sp":
|
| 4756 |
databases = _screen_amazon_database_rows(databases)
|
| 4757 |
+
if is_admin and fields == "summary":
|
| 4758 |
+
# Share only guarded connection facts; full detail keeps the legacy row shape.
|
| 4759 |
+
load = next((sync["firstLoad"] for database in databases
|
| 4760 |
+
if isinstance(sync := database.get("sync"), dict)
|
| 4761 |
+
and isinstance(sync.get("firstLoad"), dict)), None)
|
| 4762 |
+
if load is not None:
|
| 4763 |
+
amazon_first_load = {"amazonFirstLoad": load}
|
| 4764 |
+
for database in databases:
|
| 4765 |
+
sync = database.get("sync")
|
| 4766 |
+
if not isinstance(sync, dict):
|
| 4767 |
+
continue
|
| 4768 |
+
if sync.get("firstLoad") == load:
|
| 4769 |
+
del sync["firstLoad"]
|
| 4770 |
+
else:
|
| 4771 |
+
# Explicit null prevents a declaration from inheriting connection state.
|
| 4772 |
+
sync.setdefault("firstLoad", None)
|
| 4773 |
budget.check()
|
| 4774 |
overview = _detail_overview(row, databases, graph)
|
| 4775 |
if page is not None and page.total:
|
|
|
|
| 4784 |
return _safe_connector_status(key, {"overview": overview,
|
| 4785 |
"keychain": keychain,
|
| 4786 |
"databases": databases,
|
| 4787 |
+
**amazon_first_load,
|
| 4788 |
**({"databasesPage": page.dto()} if page is not None else {}),
|
| 4789 |
**({"relationshipsPath": f"/connectors/{key}/relationships"}
|
| 4790 |
if fields == "summary" else {}),
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
e3ef0bb54f910d3276751842565889877ef864b7a40e50f86c1aa2c1f38fe9e2
|
web/src/connectors/DatabasesTab.tsx
CHANGED
|
@@ -334,7 +334,8 @@ export function parseAmazonSyncStates(value: unknown): Record<string, AmazonTabl
|
|
| 334 |
continue;
|
| 335 |
}
|
| 336 |
const state = syncObject(database.sync);
|
| 337 |
-
const load = syncObject(
|
|
|
|
| 338 |
const remaining = syncCount(load.remaining);
|
| 339 |
const etaSeconds = syncCount(load.etaSeconds);
|
| 340 |
const cause = syncText(load.cause);
|
|
@@ -484,7 +485,7 @@ function amazonRefusalReason(reason: string, status = ""): string {
|
|
| 484 |
export function AmazonFirstLoadNotice({ states, databaseNames }: {
|
| 485 |
states: Record<string, AmazonTableSync | null>; databaseNames: Record<string, string>;
|
| 486 |
}) {
|
| 487 |
-
//
|
| 488 |
const load = Object.values(states).find((state) => state?.firstLoad)?.firstLoad;
|
| 489 |
if (!load || (load.remaining <= 0 && !load.needsAttention)) return null;
|
| 490 |
const refusedNames = [...new Set((load.refused ?? []).map((item) =>
|
|
|
|
| 334 |
continue;
|
| 335 |
}
|
| 336 |
const state = syncObject(database.sync);
|
| 337 |
+
const load = syncObject(Object.prototype.hasOwnProperty.call(state, "firstLoad")
|
| 338 |
+
? state.firstLoad : payload.amazonFirstLoad);
|
| 339 |
const remaining = syncCount(load.remaining);
|
| 340 |
const etaSeconds = syncCount(load.etaSeconds);
|
| 341 |
const cause = syncText(load.cause);
|
|
|
|
| 485 |
export function AmazonFirstLoadNotice({ states, databaseNames }: {
|
| 486 |
states: Record<string, AmazonTableSync | null>; databaseNames: Record<string, string>;
|
| 487 |
}) {
|
| 488 |
+
// The parser restores shared connection facts for the existing notice and row chips.
|
| 489 |
const load = Object.values(states).find((state) => state?.firstLoad)?.firstLoad;
|
| 490 |
if (!load || (load.remaining <= 0 && !load.needsAttention)) return null;
|
| 491 |
const refusedNames = [...new Set((load.refused ?? []).map((item) =>
|