Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions src/components/instance/browse/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function NoPrimaryKeyMessage({ table }) {
<CardTitle>No Primary Key</CardTitle>
<i className="fa fa-warning mt-3" />
<span className="mt-3">
The table { `'${table}'` } does not have a primary key. The HarperDB Studio does not currently support tables wihtout a primary key defined. Please see the <a href="https://docs.harperdb.io/docs" target="_blank" rel="noreferrer">HarperDB documention</a> to see the standard HarperDB querying options.
The table { `'${table}'` } does not have a primary key. The HarperDB Studio does not currently support tables without a primary key defined. Please see the <a href="https://docs.harperdb.io/docs" target="_blank" rel="noreferrer">HarperDB documention</a> to see the standard HarperDB querying options.
</span>
</CardBody>
</Card>
Expand Down Expand Up @@ -92,7 +92,7 @@ function BrowseIndex() {
* FIXME: There is a fair amount of logic scattered throughout this
* page that could be put in a router-level validation function.
*
* Splitting the browse endpoint into /schema/ and /schema/table heirarchy
* Splitting the browse endpoint into /schema/ and /schema/table hierarchy
* might ease this.
*
*/
Expand Down Expand Up @@ -162,18 +162,16 @@ function BrowseIndex() {
onError={(error, componentStack) => addError({ error: { message: error.message, componentStack } })}
FallbackComponent={ErrorFallback}>
{
hasHashAttr ? (
schema && table && action === 'csv' && entities.activeTable ? (
<CSVUpload />
) : schema && table && action && entities.activeTable ? (
<JSONEditor newEntityAttributes={tableState.newEntityAttributes} hashAttribute={tableState.hashAttribute} />
) : schema && table && entities.activeTable ? (
<DataTable activeTable={entities.activeTable} tableState={tableState} setTableState={setTableState} />
) : (
<EmptyPrompt headline={emptyPromptMessage} icon={<i className="fa fa-exclamation-triangle text-warning" />} />
)
schema && table && action === 'csv' && entities.activeTable ? (
<CSVUpload />
) : schema && table && action && entities.activeTable ? (
<JSONEditor newEntityAttributes={tableState.newEntityAttributes} hashAttribute={tableState.hashAttribute} />
) : schema && table && entities.activeTable ? (
<DataTable activeTable={entities.activeTable} tableState={tableState} setTableState={setTableState} />
) : schema && table && !hasHashAttr ? (
<NoPrimaryKeyMessage />
) :
<NoPrimaryKeyMessage table={table} />
<EmptyPrompt headline={emptyPromptMessage} icon={<i className="fa fa-exclamation-triangle text-warning" />} />
}
</ErrorBoundary>
</Col>
Expand Down