+
+
+ setTab('Subsystem')}>
+ Subsystem
+
+ setTab('Objects')}>
+ Objects
+
+ setTab('Records')}>
+ Records
+
+ setTab('Generics')}>
+ Generics
+
+
+ {tab !== 'Subsystem' && (
+
+
+ {tab === 'Subsystem' && (
+ act('toggle_saving')}
+ />
+ }
+ >
+
+
+
+ {statusText}
+
+
+
+
+ {savingText}
+
+
+
+ {data.objects_tracked}
+
+
+ {data.generics_cached}
+
+
+ {data.records_cached}
+
+
+
+ )}
+
+ {tab === 'Objects' && (
+ setObjectsSearch(value)}
+ style={{ width: '18rem' }}
+ />
+ }
+ >
+
+ This panel displays database content and requires a manual refresh. Expired objects are excluded.
+
+ {data.objects.length === 0 && (
+ Nothing to display.
+ )}
+ {data.objects.length > 0 && filteredObjectTypes.length === 0 && (
+ No tracked objects match the current filter.
+ )}
+ {filteredObjectTypes.map((type) => (
+
+
+
+ Name
+ Position
+ Jump
+ Create date
+ Expire date
+ Edit
+
+ {filteredObjectGroups[type].map((object) => (
+
+ {object.name}
+ {getObjectPosition(object)}
+
+
+ {object.created_at || 'This round'}
+ {object.expires_at || 'To be determined'}
+
+
+
+ ))}
+
+
+ ))}
+
+ )}
+
+ {tab === 'Records' && (
+ setRecordsSearch(value)}
+ style={{ width: '18rem' }}
+ />
+ }
+ >
+
+ This panel displays database content (up to 1000 rows) and requires a manual refresh.
+
+ {data.records.length === 0 && (
+ Nothing to display.
+ )}
+ {data.records.length > 0 && filteredRecordGroups.length === 0 && (
+ No history records match the current filter.
+ )}
+ {filteredRecordGroups.map((group) => (
+ count + (attributeGroup.records?.length || 0), 0),
+ )}
+ >
+ {group.description && (
+
+ {group.description}
+
+ )}
+ {group.requires_attribute ? (
+ group.attributes.map((attributeGroup) => (
+
+
+
+
+ Created at
+ Game ID
+ Value
+
+ {(attributeGroup.records || []).map((record, index) => (
+
+ {record.created_at}
+ {record.game_id}
+ {record.value}
+
+ ))}
+
+
+
+ ))
+ ) : (
+
+
+ Created at
+ Game ID
+ Value
+
+ {(group.attributes[0]?.records || []).map((record, index) => (
+
+ {record.created_at}
+ {record.game_id}
+ {record.value}
+
+ ))}
+
+ )}
+
+ ))}
+
+ )}
+
+ {tab === 'Generics' && (
+ setGenericsSearch(value)}
+ style={{ width: '18rem' }}
+ />
+ }
+ >
+
+ This panel displays database content and requires a manual refresh.
+
+ {data.generics.length === 0 && (
+ Nothing to display.
+ )}
+ {data.generics.length > 0 && filteredGenericGroups.length === 0 && (
+ No persistent generics match the current filter.
+ )}
+ {filteredGenericGroups.map((group) => (
+
+ {group.description && (
+
+ {group.description}
+
+ )}
+ {group.requires_attribute ? (
+ group.attributes.map((attributeGroup) => (
+
+
+
+
+
+
+ {attributeGroup.created_at || 'This round'}
+
+
+ {attributeGroup.expires_at || 'To be determined'}
+
+
+
+
+
+
+ {attributeGroup.json}
+
+
+
+
+ ))
+ ) : (
+
+
+
+
+
+ {group.attributes[0]?.created_at || 'This round'}
+
+
+ {group.attributes[0]?.expires_at || 'To be determined'}
+
+
+
+
+
+
+ {group.attributes[0]?.json}
+
+
+
+ )}
+
+ ))}
+
+ )}
+
+