mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 19:56:00 +00:00
refresh testid
This commit is contained in:
@@ -210,6 +210,10 @@
|
|||||||
'icon expand-all': 'mdi mdi-expand-all',
|
'icon expand-all': 'mdi mdi-expand-all',
|
||||||
'icon collapse-all': 'mdi mdi-collapse-all',
|
'icon collapse-all': 'mdi mdi-collapse-all',
|
||||||
|
|
||||||
|
'icon transaction': 'mdi mdi-code-json',
|
||||||
|
'icon commit': 'mdi mdi-check-circle',
|
||||||
|
'icon rollback': 'mdi mdi-close-circle',
|
||||||
|
|
||||||
'img ok': 'mdi mdi-check-circle color-icon-green',
|
'img ok': 'mdi mdi-check-circle color-icon-green',
|
||||||
'img ok-inv': 'mdi mdi-check-circle color-icon-inv-green',
|
'img ok-inv': 'mdi mdi-check-circle color-icon-inv-green',
|
||||||
'img alert': 'mdi mdi-alert-circle color-icon-blue',
|
'img alert': 'mdi mdi-alert-circle color-icon-blue',
|
||||||
|
|||||||
@@ -60,6 +60,32 @@
|
|||||||
getCurrentEditor() != null && !getCurrentEditor()?.isBusy() && getCurrentEditor()?.hasConnection(),
|
getCurrentEditor() != null && !getCurrentEditor()?.isBusy() && getCurrentEditor()?.hasConnection(),
|
||||||
onClick: () => getCurrentEditor().executeCurrent(),
|
onClick: () => getCurrentEditor().executeCurrent(),
|
||||||
});
|
});
|
||||||
|
registerCommand({
|
||||||
|
id: 'query.beginTransaction',
|
||||||
|
category: 'Query',
|
||||||
|
name: 'Begin transaction',
|
||||||
|
icon: 'icon transaction',
|
||||||
|
testEnabled: () => !!getCurrentEditor(),
|
||||||
|
onClick: () => getCurrentEditor().beginTransaction(),
|
||||||
|
});
|
||||||
|
registerCommand({
|
||||||
|
id: 'query.commitTransaction',
|
||||||
|
category: 'Query',
|
||||||
|
name: 'Commit transaction',
|
||||||
|
toolbarName: 'Commit',
|
||||||
|
icon: 'icon commit',
|
||||||
|
testEnabled: () => !!getCurrentEditor(),
|
||||||
|
onClick: () => getCurrentEditor().commitTransaction(),
|
||||||
|
});
|
||||||
|
registerCommand({
|
||||||
|
id: 'query.rollbackTransaction',
|
||||||
|
category: 'Query',
|
||||||
|
name: 'Rollback transaction',
|
||||||
|
toolbarName: 'Rollback',
|
||||||
|
icon: 'icon rollback',
|
||||||
|
testEnabled: () => !!getCurrentEditor(),
|
||||||
|
onClick: () => getCurrentEditor().rollbackTransaction(),
|
||||||
|
});
|
||||||
|
|
||||||
export const allowSwitchDatabase = props => true;
|
export const allowSwitchDatabase = props => true;
|
||||||
</script>
|
</script>
|
||||||
@@ -602,6 +628,9 @@
|
|||||||
>
|
>
|
||||||
AI Assistant
|
AI Assistant
|
||||||
</ToolStripCommandButton>
|
</ToolStripCommandButton>
|
||||||
|
<ToolStripCommandButton command="query.beginTransaction" data-testid="QueryTab_beginTransactionButton" />
|
||||||
|
<ToolStripCommandButton command="query.commitTransaction" data-testid="QueryTab_commitTransactionButton" />
|
||||||
|
<ToolStripCommandButton command="query.rollbackTransaction" data-testid="QueryTab_rollbackTransactionButton" />
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
</ToolStripContainer>
|
</ToolStripContainer>
|
||||||
|
|
||||||
|
|||||||
@@ -322,11 +322,13 @@
|
|||||||
buttonLabel={autoRefreshStarted ? `Refresh (every ${autoRefreshInterval}s)` : null}
|
buttonLabel={autoRefreshStarted ? `Refresh (every ${autoRefreshInterval}s)` : null}
|
||||||
commands={['dataGrid.refresh', ...createAutoRefreshMenu()]}
|
commands={['dataGrid.refresh', ...createAutoRefreshMenu()]}
|
||||||
hideDisabled
|
hideDisabled
|
||||||
|
data-testid="TableDataTab_refreshGrid"
|
||||||
/>
|
/>
|
||||||
<ToolStripCommandSplitButton
|
<ToolStripCommandSplitButton
|
||||||
buttonLabel={autoRefreshStarted ? `Refresh (every ${autoRefreshInterval}s)` : null}
|
buttonLabel={autoRefreshStarted ? `Refresh (every ${autoRefreshInterval}s)` : null}
|
||||||
commands={['dataForm.refresh', ...createAutoRefreshMenu()]}
|
commands={['dataForm.refresh', ...createAutoRefreshMenu()]}
|
||||||
hideDisabled
|
hideDisabled
|
||||||
|
data-testid="TableDataTab_refreshForm"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- <ToolStripCommandButton command="dataGrid.refresh" hideDisabled />
|
<!-- <ToolStripCommandButton command="dataGrid.refresh" hideDisabled />
|
||||||
|
|||||||
Reference in New Issue
Block a user