This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 278
/
constants.js
69 lines (63 loc) 路 2.17 KB
/
constants.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
export const DIALECTS = {
MYSQL: 'mysql',
MARIADB: 'mariadb',
POSTGRES: 'postgres',
REDSHIFT: 'redshift',
ELASTICSEARCH: 'elasticsearch',
MSSQL: 'mssql',
SQLITE: 'sqlite',
S3: 's3',
APACHE_DRILL: 'apache drill'
};
export const CONNECTION_CONFIG = {
[DIALECTS.MYSQL]: ['username', 'password', 'host', 'port', 'database'],
[DIALECTS.MARIADB]: ['username', 'password', 'host', 'port', 'database'],
[DIALECTS.MSSQL]: ['username', 'password', 'host', 'port', 'database'],
[DIALECTS.POSTGRES]: ['username', 'password', 'host', 'port', 'database'],
[DIALECTS.REDSHIFT]: ['username', 'password', 'host', 'port', 'database'],
[DIALECTS.SQLITE]: ['storage'],
// TODO - What are the actual elasticsearch connection options?
[DIALECTS.ELASTICSEARCH]: ['username', 'password', 'host', 'port'],
[DIALECTS.S3]: ['bucket', 'accessKeyId', 'secretAccessKey'],
[DIALECTS.APACHE_DRILL]: [
'host',
'port',
'bucket',
'accessKeyId',
'secretAccessKey'
] // TODO - password for apache drill?
};
// TODO - Combine this with the CONNECTION_CONFIG
export const CONNECTION_OPTIONS = {
[DIALECTS.MYSQL]: [{'ssl': 'SSL enabled'}],
[DIALECTS.MARIADB]: [{'ssl': 'SSL enabled'}],
[DIALECTS.MSSQL]: [{'ssl': 'SSL enabled'}],
[DIALECTS.POSTGRES]: [{'ssl': 'SSL enabled'}],
[DIALECTS.REDSHIFT]: [{'ssl': 'SSL enabled'}],
[DIALECTS.ELASTICSEARCH]: [],
[DIALECTS.SQLITE]: [],
[DIALECTS.S3]: [],
[DIALECTS.APACHE_DRILL]: []
};
export const LOGOS = {
[DIALECTS.REDSHIFT]: 'images/redshift-logo.png',
[DIALECTS.POSTGRES]: 'images/postgres-logo.png',
[DIALECTS.ELASTICSEARCH]: 'images/elastic-logo.png',
[DIALECTS.MYSQL]: 'images/mysql-logo.png',
[DIALECTS.MARIADB]: 'images/mariadb-logo.png',
[DIALECTS.MSSQL]: 'images/mssql-logo.png',
[DIALECTS.SQLITE]: 'images/sqlite-logo.png',
[DIALECTS.S3]: 'images/s3-logo.png',
[DIALECTS.APACHE_DRILL]: 'images/apache_drill-logo.png'
};
export const INITIAL_CONNECTIONS = {
username: '',
password: '',
database: '',
index: '',
doc: '',
dialect: DIALECTS.MYSQL,
port: '',
host: '',
ssl: false
};