mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
@@ -60,7 +60,7 @@ type ServerConfig {
|
||||
supportsConnectionBrowser: Boolean
|
||||
supportsWorkspaces: Boolean
|
||||
|
||||
supportedLanguages: [ ServerLanguage ]!
|
||||
supportedLanguages: [ ServerLanguage! ]!
|
||||
services: [ WebServiceConfig ]
|
||||
productConfiguration: Object!
|
||||
}
|
||||
@@ -73,7 +73,7 @@ type SessionInfo {
|
||||
cacheExpired: Boolean!
|
||||
|
||||
serverMessages: [ ServerMessage ]
|
||||
connections: [ ConnectionInfo ]!
|
||||
connections: [ ConnectionInfo! ]!
|
||||
}
|
||||
|
||||
####################################################
|
||||
@@ -183,7 +183,7 @@ type ConnectionInfo {
|
||||
clientVersion: String
|
||||
|
||||
# Supported features (provided etc)
|
||||
features: [ String! ]
|
||||
features: [ String! ]!
|
||||
}
|
||||
|
||||
type LogEntry {
|
||||
@@ -199,30 +199,30 @@ type LogEntry {
|
||||
|
||||
extend type Query {
|
||||
# Returns server config
|
||||
serverConfig: ServerConfig
|
||||
serverConfig: ServerConfig!
|
||||
|
||||
# Returns session state ( initialize if not )
|
||||
sessionState: SessionInfo
|
||||
sessionState: SessionInfo!
|
||||
|
||||
# Session permissions
|
||||
sessionPermissions: [ID]!
|
||||
|
||||
# Get driver info
|
||||
driverList( id: ID ): [ DriverInfo! ]
|
||||
driverList( id: ID ): [ DriverInfo! ]!
|
||||
|
||||
# Get list of predefined data sources
|
||||
dataSourceList: [ DataSourceInfo! ]
|
||||
dataSourceList: [ DataSourceInfo! ]!
|
||||
|
||||
# Return connection state
|
||||
connectionState( id: ID! ): ConnectionInfo
|
||||
connectionState( id: ID! ): ConnectionInfo!
|
||||
|
||||
readSessionLog(maxEntries: Int, clearEntries: Boolean): [ LogEntry! ]
|
||||
readSessionLog(maxEntries: Int, clearEntries: Boolean): [ LogEntry! ]!
|
||||
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
# Initialize session
|
||||
openSession: SessionInfo
|
||||
openSession: SessionInfo!
|
||||
|
||||
# Destroy session
|
||||
closeSession: Boolean
|
||||
@@ -234,13 +234,13 @@ extend type Mutation {
|
||||
changeSessionLanguage(locale: String): Boolean
|
||||
|
||||
# Create new connection
|
||||
createConnection( config: ConnectionConfig! ): ConnectionInfo
|
||||
createConnection( config: ConnectionConfig! ): ConnectionInfo!
|
||||
|
||||
# Test connection configuration. Returns remote server version
|
||||
testConnection( config: ConnectionConfig! ): ConnectionInfo
|
||||
testConnection( config: ConnectionConfig! ): ConnectionInfo!
|
||||
|
||||
# Connect to database
|
||||
openConnection( config: ConnectionConfig! ): ConnectionInfo
|
||||
openConnection( config: ConnectionConfig! ): ConnectionInfo!
|
||||
|
||||
# Disconnect from database
|
||||
closeConnection( id: ID! ): Boolean!
|
||||
|
||||
@@ -29,7 +29,7 @@ type ObjectPropertyInfo {
|
||||
# Default property value
|
||||
defaultValue: Object
|
||||
# Supported features (system, hidden, inherited, foreign, expensive, etc)
|
||||
features: [ String! ]
|
||||
features: [ String! ]!
|
||||
}
|
||||
|
||||
input ObjectPropertyFilter {
|
||||
@@ -94,10 +94,8 @@ type NavigatorNodeInfo {
|
||||
}
|
||||
|
||||
type DatabaseStructContainers {
|
||||
|
||||
catalogList: [ DatabaseObjectInfo! ]!
|
||||
schemaList: [ DatabaseObjectInfo! ]!
|
||||
|
||||
}
|
||||
|
||||
####################################################
|
||||
@@ -111,9 +109,9 @@ extend type Query {
|
||||
parentPath: ID!,
|
||||
offset: Int,
|
||||
limit: Int,
|
||||
onlyFolders: Boolean): [ NavigatorNodeInfo! ]
|
||||
onlyFolders: Boolean): [ NavigatorNodeInfo! ]!
|
||||
|
||||
navNodeInfo( nodePath: ID! ): NavigatorNodeInfo
|
||||
navNodeInfo( nodePath: ID! ): NavigatorNodeInfo!
|
||||
|
||||
navRefreshNode( nodePath: ID! ): Boolean
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ type SQLExecuteInfo {
|
||||
|
||||
statusMessage: String
|
||||
duration: Int
|
||||
results: [ SQLQueryResults! ]
|
||||
results: [ SQLQueryResults! ]!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
|
||||
@@ -46,7 +46,7 @@ type UserAuthInfo {
|
||||
|
||||
extend type Query {
|
||||
|
||||
authLogin(provider: ID!, credentials: Object!): UserAuthInfo
|
||||
authLogin(provider: ID!, credentials: Object!): UserAuthInfo!
|
||||
|
||||
authLogout: Boolean
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ input DataTransferParameters {
|
||||
extend type Query {
|
||||
|
||||
# Available transfer processors
|
||||
dataTransferAvailableStreamProcessors: [ DataTransferProcessorInfo ]
|
||||
dataTransferAvailableStreamProcessors: [ DataTransferProcessorInfo! ]!
|
||||
|
||||
dataTransferExportDataFromContainer(
|
||||
connectionId: ID!,
|
||||
|
||||
+4
-1
@@ -76,12 +76,15 @@ module.exports = {
|
||||
'no-restricted-globals': 'off',
|
||||
'no-useless-constructor': 'off',
|
||||
'max-classes-per-file': 'off',
|
||||
'arrow-body-style': ['error', 'as-needed'],
|
||||
'function-call-argument-newline': ['error', 'consistent'],
|
||||
'max-len': [
|
||||
'error',
|
||||
{
|
||||
code: 120,
|
||||
ignoreTrailingComments: true,
|
||||
ignoreStrings: true
|
||||
ignoreStrings: true,
|
||||
ignoreTemplateLiterals: true
|
||||
}
|
||||
],
|
||||
'lines-between-class-members': 'off',
|
||||
|
||||
+1
-2
@@ -41,7 +41,6 @@
|
||||
"@graphql-codegen/typescript-graphql-files-modules": "^1.8.0",
|
||||
"@graphql-codegen/typescript-graphql-request": "^1.8.1",
|
||||
"@graphql-codegen/typescript-operations": "^1.8.1",
|
||||
"@types/graphql": "^14.5.0",
|
||||
"@types/jest": "^24.0.23",
|
||||
"@types/node": "^12.7.8",
|
||||
"@types/react": "^16.9.34",
|
||||
@@ -69,7 +68,7 @@
|
||||
"extract-css-chunks-webpack-plugin": "^4.7.1",
|
||||
"file-loader": "^5.0.2",
|
||||
"fork-ts-checker-webpack-plugin": "^4.0.5",
|
||||
"graphql": "^14.5.8",
|
||||
"graphql": "^15.0.0",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"http-proxy-middleware": "^0.20.0",
|
||||
"lerna": "^3.19.0",
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
"@material/ripple": "^4.0.0",
|
||||
"@material/theme": "^4.0.0",
|
||||
"@material/typography": "^4.0.0",
|
||||
"graphql": "^14.5.8",
|
||||
"graphql-request": "^1.8.2",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"react": "^16.13.1",
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
"@material/ripple": "^4.0.0",
|
||||
"@material/theme": "^4.0.0",
|
||||
"@material/typography": "^4.0.0",
|
||||
"graphql": "^14.5.8",
|
||||
"graphql-request": "^1.8.2",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"react": "^16.13.1",
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
*/
|
||||
|
||||
import { observer } from 'mobx-react';
|
||||
import { useEffect } from 'react';
|
||||
import { useTabState, Tab as BaseTab, TabList } from 'reakit/Tab';
|
||||
import {
|
||||
useTabState, Tab as BaseTab, TabList
|
||||
} from 'reakit/Tab';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { SubmittingForm, ErrorMessage } from '@dbeaver/core/blocks';
|
||||
@@ -102,7 +103,6 @@ export const AuthDialog: DialogComponent<null, null> = observer(
|
||||
selectedId: controller.provider?.id,
|
||||
});
|
||||
tab.selectedId = controller.provider?.id || null;
|
||||
useEffect(() => controller.selectProvider(tab.selectedId!), [tab.selectedId]);
|
||||
|
||||
return styled(useStyles(styles))(
|
||||
<CommonDialogWrapper
|
||||
@@ -111,7 +111,15 @@ export const AuthDialog: DialogComponent<null, null> = observer(
|
||||
header={(
|
||||
<TabList {...tab} aria-label="My tabs">
|
||||
{controller.providers.map(provider => (
|
||||
<BaseTab {...tab} key={provider.id} type='button' stopId={provider.id}>{provider.label}</BaseTab>
|
||||
<BaseTab
|
||||
{...tab}
|
||||
key={provider.id}
|
||||
type='button'
|
||||
stopId={provider.id}
|
||||
onClick={() => controller.selectProvider(provider.id)}
|
||||
>
|
||||
{provider.label}
|
||||
</BaseTab>
|
||||
))}
|
||||
</TabList>
|
||||
)}
|
||||
@@ -131,6 +139,7 @@ export const AuthDialog: DialogComponent<null, null> = observer(
|
||||
authenticate={controller.isAuthenticating}
|
||||
/>
|
||||
)}
|
||||
{!controller.provider && <>Select available provider</>}
|
||||
</SubmittingForm>
|
||||
{controller.error.responseMessage && (
|
||||
<ErrorMessage
|
||||
|
||||
@@ -74,6 +74,9 @@ export class AuthDialogController implements IInitializableController, IDestruct
|
||||
}
|
||||
|
||||
selectProvider = (providerId: string) => {
|
||||
if (providerId === this.provider?.id) {
|
||||
return;
|
||||
}
|
||||
this.provider = this.authProviderService
|
||||
.providers.data.find(provider => provider.id === providerId) || null;
|
||||
this.credentials = {};
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
"@material/ripple": "^4.0.0",
|
||||
"@material/theme": "^4.0.0",
|
||||
"@material/typography": "^4.0.0",
|
||||
"graphql": "^14.5.8",
|
||||
"graphql-request": "^1.8.2",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"react": "^16.13.1",
|
||||
|
||||
@@ -11,16 +11,21 @@ documents:
|
||||
generates:
|
||||
src/sdk/sdk.ts:
|
||||
plugins:
|
||||
- add: '/* eslint-disable */'
|
||||
- add: '/* eslint-disable max-len */'
|
||||
- typescript
|
||||
- typescript-operations
|
||||
- typescript-graphql-request
|
||||
config:
|
||||
skipTypename: true
|
||||
documentMode : 'string'
|
||||
avoidOptionals:
|
||||
field: false
|
||||
inputValue: false
|
||||
object: false
|
||||
maybeValue: T
|
||||
scalars:
|
||||
Object: any
|
||||
Object: "{ [key: string]: any }"
|
||||
DateTime: any
|
||||
hooks:
|
||||
afterAllFileWrite:
|
||||
- prettier --write --config ../../.prettierrc.js
|
||||
- eslint --fix
|
||||
|
||||
@@ -4,14 +4,6 @@ const path = require('path');
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
|
||||
module.exports = (env, argv) => merge(commonConfig(env, argv), {
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
// rewrite imports for unnecessary work in `web/src/libs/sdk.ts`
|
||||
'graphql-tag': path.join(__dirname, '../../fix-gql.js'),
|
||||
graphql: path.join(__dirname, '../../fix-gql.js'),
|
||||
},
|
||||
},
|
||||
context: path.resolve(__dirname, '../../src'),
|
||||
plugins: [
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
/**
|
||||
* rewrite imports for unnecessary work in `webapp/packages/core/src/libs/sdk.ts`
|
||||
*/
|
||||
module.exports = strings => strings[0]
|
||||
module.exports.print = v => v
|
||||
@@ -36,8 +36,6 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"go-split": "^1.3.2",
|
||||
"graphql": "^14.5.8",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"react": "^16.13.1",
|
||||
|
||||
@@ -11,10 +11,12 @@ import { ServerError } from './sdk';
|
||||
export class ServerInternalError extends Error implements ServerError {
|
||||
readonly errorCode?: string;
|
||||
readonly stackTrace?: string;
|
||||
readonly causedBy?: ServerError;
|
||||
|
||||
constructor(error: ServerError) {
|
||||
super(error.message);
|
||||
this.errorCode = error.errorCode;
|
||||
this.stackTrace = error.stackTrace;
|
||||
this.causedBy = error.causedBy;
|
||||
}
|
||||
}
|
||||
|
||||
+1355
-2073
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,6 @@
|
||||
"@material/ripple": "^4.0.0",
|
||||
"@material/theme": "^4.0.0",
|
||||
"@material/typography": "^4.0.0",
|
||||
"graphql": "^14.5.8",
|
||||
"graphql-request": "^1.8.2",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"react": "^16.13.1",
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
"@material/ripple": "^4.0.0",
|
||||
"@material/theme": "^4.0.0",
|
||||
"@material/typography": "^4.0.0",
|
||||
"graphql": "^14.5.8",
|
||||
"graphql-request": "^1.8.2",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"react": "^16.13.1",
|
||||
|
||||
@@ -11,10 +11,6 @@ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
module.exports = (env, argv) => merge(commonConfig(env, argv), {
|
||||
resolve: {
|
||||
alias: {
|
||||
// // rewrite imports for unnecessary work in `web/src/libs/sdk.ts`
|
||||
'graphql-tag': path.join(__dirname, '../../fix-gql.js'),
|
||||
graphql: path.join(__dirname, '../../fix-gql.js'),
|
||||
|
||||
react: 'preact/compat',
|
||||
react$: 'preact/compat',
|
||||
'react-dom': 'preact/compat',
|
||||
|
||||
@@ -50,10 +50,6 @@ module.exports = (env, argv) => merge(commonConfig(env, argv), {
|
||||
"@dbeaver/core/product": path.resolve(__dirname, "../../../core/src/product"),
|
||||
"@dbeaver/core/plugin": path.resolve(__dirname, "../../../core/src/plugin"),
|
||||
|
||||
// rewrite imports for unnecessary work in `web/src/libs/sdk.ts`
|
||||
'graphql-tag': path.join(__dirname, '../../fix-gql.js'),
|
||||
graphql: path.join(__dirname, '../../fix-gql.js'),
|
||||
|
||||
react: 'preact/compat',
|
||||
react$: 'preact/compat',
|
||||
'react-dom': 'preact/compat',
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
/**
|
||||
* rewrite imports for unnecessary work in `webapp/packages/core/src/libs/sdk.ts`
|
||||
*/
|
||||
module.exports = strings => strings[0]
|
||||
module.exports.print = v => v
|
||||
@@ -19,9 +19,6 @@
|
||||
"@material/ripple": "^4.0.0",
|
||||
"@material/theme": "^4.0.0",
|
||||
"@material/typography": "^4.0.0",
|
||||
"graphql": "^14.5.8",
|
||||
"graphql-request": "^1.8.2",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"react": "^16.13.1",
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
"@material/ripple": "^4.0.0",
|
||||
"@material/theme": "^4.0.0",
|
||||
"@material/typography": "^4.0.0",
|
||||
"graphql": "^14.5.8",
|
||||
"graphql-request": "^1.8.2",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"react": "^16.13.1",
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
"peerDependencies": {
|
||||
"@dbeaver/core": "^0.1.0",
|
||||
"@dbeaver/data-viewer-plugin": "^0.1.0",
|
||||
"graphql": "^14.5.8",
|
||||
"graphql-request": "^1.8.2",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"react": "^16.13.1",
|
||||
|
||||
+2
-16
@@ -2681,13 +2681,6 @@
|
||||
"@types/minimatch" "*"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/graphql@^14.5.0":
|
||||
version "14.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-14.5.0.tgz#a545fb3bc8013a3547cf2f07f5e13a33642b75d6"
|
||||
integrity sha512-MOkzsEp1Jk5bXuAsHsUi6BVv0zCO+7/2PTiZMXWDSsMXvNU6w/PLMQT2vHn8hy2i0JqojPz1Sz6rsFjHtsU0lA==
|
||||
dependencies:
|
||||
graphql "*"
|
||||
|
||||
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff"
|
||||
@@ -7101,18 +7094,11 @@ graphql-tools@5.0.0:
|
||||
tslib "^1.11.1"
|
||||
uuid "^7.0.3"
|
||||
|
||||
graphql@*:
|
||||
graphql@^15.0.0:
|
||||
version "15.0.0"
|
||||
resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.0.0.tgz#042a5eb5e2506a2e2111ce41eb446a8e570b8be9"
|
||||
integrity sha512-ZyVO1xIF9F+4cxfkdhOJINM+51B06Friuv4M66W7HzUOeFd+vNzUn4vtswYINPi6sysjf1M2Ri/rwZALqgwbaQ==
|
||||
|
||||
graphql@^14.5.8:
|
||||
version "14.6.0"
|
||||
resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.6.0.tgz#57822297111e874ea12f5cd4419616930cd83e49"
|
||||
integrity sha512-VKzfvHEKybTKjQVpTFrA5yUq2S9ihcZvfJAtsDBBCuV6wauPu1xl/f9ehgVf0FcEJJs4vz6ysb/ZMkGigQZseg==
|
||||
dependencies:
|
||||
iterall "^1.2.2"
|
||||
|
||||
handle-thing@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e"
|
||||
@@ -8176,7 +8162,7 @@ isstream@~0.1.2:
|
||||
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
|
||||
integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
|
||||
|
||||
iterall@^1.2.2, iterall@^1.3.0:
|
||||
iterall@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea"
|
||||
integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==
|
||||
|
||||
Reference in New Issue
Block a user