mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 21:15:59 +00:00
Merge branch 'master' into ai-assistant
This commit is contained in:
@@ -75,6 +75,7 @@
|
||||
"start:storage:built": "env-cmd -f env/storage/.env cross-env DEVMODE= BUILTWEBMODE=1 node dist/bundle.js --listen-api",
|
||||
"start:singleconn": "env-cmd node src/index.js --server localhost --user root --port 3307 --engine mysql@dbgate-plugin-mysql --password test --listen-api",
|
||||
"start:azure": "env-cmd -f env/azure/.env node src/index.js --listen-api",
|
||||
"start:e2e:team": "cross-env DEVWEB=1 DEVMODE=1 env-cmd -f ../../e2e-tests/env/team/.env node src/index.js --listen-api",
|
||||
"ts": "tsc",
|
||||
"build": "webpack",
|
||||
"build:doc": "jsdoc2md --template doctpl.hbs ./src/shell/* > ../../../dbgate.github.io/_docs/apidoc.md"
|
||||
|
||||
@@ -218,7 +218,7 @@ class LoginsProvider extends AuthProviderBase {
|
||||
};
|
||||
}
|
||||
|
||||
if (password == process.env[`LOGIN_PASSWORD_${login}`]) {
|
||||
if (password && password == process.env[`LOGIN_PASSWORD_${login}`]) {
|
||||
return {
|
||||
accessToken: jwt.sign(
|
||||
{
|
||||
|
||||
@@ -401,6 +401,10 @@ module.exports = {
|
||||
|
||||
structure_meta: true,
|
||||
async structure({ conid, database, modelTransFile = null }, req) {
|
||||
if (!conid || !database) {
|
||||
return {};
|
||||
}
|
||||
|
||||
testConnectionPermission(conid, req);
|
||||
if (conid == '__model') {
|
||||
const model = await importDbModel(database);
|
||||
|
||||
@@ -63,6 +63,12 @@ export function formatQueryWithoutParams(driver: EngineDriver, sql: string) {
|
||||
return dmp.s;
|
||||
}
|
||||
|
||||
export async function runQueryFmt(driver, conn, query, ...args) {
|
||||
const dmp = driver.createDumper();
|
||||
dmp.put(query, ...args);
|
||||
await driver.query(conn, dmp.s);
|
||||
}
|
||||
|
||||
export const driverBase = {
|
||||
analyserClass: null,
|
||||
dumperClass: SqlDumper,
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
{/if}
|
||||
|
||||
<div class="button">
|
||||
<FormStyledButton value="Log In" on:click={handleLogin} />
|
||||
<FormStyledButton value="Log Out" on:click={doLogout} />
|
||||
<FormStyledButton value="Log In" on:click={handleLogin} data-testid="NotLoggedPage_loginButton" />
|
||||
<FormStyledButton value="Log Out" on:click={doLogout} data-testid="NotLoggedPage_logoutButton" />
|
||||
</div>
|
||||
</div>
|
||||
</SpecialPageLayout>
|
||||
|
||||
@@ -97,6 +97,10 @@ await dbgateApi.deployDb(${JSON.stringify(
|
||||
title: 'Compare',
|
||||
icon: 'img compare',
|
||||
tabComponent: 'CompareModelTab',
|
||||
props: {
|
||||
conid: $currentDatabase?.connection?._id,
|
||||
database: $currentDatabase?.name,
|
||||
}
|
||||
},
|
||||
{
|
||||
editor: {
|
||||
|
||||
@@ -196,13 +196,17 @@
|
||||
title: 'Compare',
|
||||
icon: 'img compare',
|
||||
tabComponent: 'CompareModelTab',
|
||||
props: {
|
||||
conid: $currentDatabase?.connection?._id,
|
||||
database: $currentDatabase?.name,
|
||||
},
|
||||
},
|
||||
{
|
||||
editor: {
|
||||
sourceConid: _.get($currentDatabase, 'connection._id'),
|
||||
sourceDatabase: _.get($currentDatabase, 'name'),
|
||||
targetConid: _.get(connection, '_id'),
|
||||
targetDatabase: name,
|
||||
sourceConid: connection?._id,
|
||||
sourceDatabase: name,
|
||||
targetConid: $currentDatabase?.connection?._id,
|
||||
targetDatabase: $currentDatabase?.name,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</script>
|
||||
|
||||
<div class="button" class:disabled {title}>
|
||||
<div class="inner" class:disabled on:click={handleClick}>
|
||||
<div class="inner" class:disabled on:click={handleClick} data-testid={$$props['data-testid']}>
|
||||
<span class="icon" class:disabled><FontIcon {icon} /></span>
|
||||
<slot />
|
||||
{#if iconAfter}
|
||||
|
||||
@@ -22,7 +22,7 @@ const doServerPing = value => {
|
||||
}
|
||||
|
||||
apiCall('server-connections/ping', {
|
||||
conidArray,
|
||||
conidArray: _.compact(conidArray),
|
||||
strmid,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user