admin screenshots

This commit is contained in:
SPRINX0\prochazka
2025-01-31 10:32:52 +01:00
parent cd90b53627
commit cdd1c34bc2
12 changed files with 333 additions and 10 deletions

34
e2e-tests/init/team.js Normal file
View File

@@ -0,0 +1,34 @@
const dbgateApi = require('dbgate-api');
dbgateApi.initializeApiEnvironment();
const dbgatePluginMysql = require('dbgate-plugin-mysql');
dbgateApi.registerPlugins(dbgatePluginMysql);
async function initStorageDatabase() {
await dbgateApi.executeQuery({
connection: {
server: process.env.STORAGE_SERVER,
user: process.env.STORAGE_USER,
password: process.env.STORAGE_PASSWORD,
port: process.env.STORAGE_PORT,
engine: process.env.STORAGE_ENGINE,
},
sql: `drop database if exists ${process.env.STORAGE_DATABASE}`,
});
await dbgateApi.executeQuery({
connection: {
server: process.env.STORAGE_SERVER,
user: process.env.STORAGE_USER,
password: process.env.STORAGE_PASSWORD,
port: process.env.STORAGE_PORT,
engine: process.env.STORAGE_ENGINE,
},
sql: `create database ${process.env.STORAGE_DATABASE}`,
});
}
async function run() {
await initStorageDatabase();
}
dbgateApi.runScript(run);