Skip to content

Commit e0668f2

Browse files
authored
Merge pull request #251 from qianmoQ/1.22.0-SNAPSHOT
Support ElasticSearch (query and data source management)
2 parents e419f52 + 5893d22 commit e0668f2

33 files changed

Lines changed: 372 additions & 72 deletions

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,13 @@ DBM can query data from any SQL-speaking datastore or data engine (ClickHouse an
9191
Here are some of the major database solutions that are supported:
9292

9393
<p align="center">
94-
<img src="./src/shared/assets/integrate/clickhouse.png" alt="ClickHouse" class="a" width="133" height="34" />
95-
<img src="./src/shared/assets/integrate/trino.png" alt="Trino" class="a" width="46" height="46"/>
96-
<img src="./src/shared/assets/integrate/presto.png" alt="Presto" class="a" width="152" height="46"/>
97-
<img src="./src/shared/assets/integrate/mysql.png" alt="MySQL" class="a" width="auto" height="50"/>
98-
<img src="./src/shared/assets/integrate/postgresql.png" alt="PostgreSQL" class="a" width="auto" height="50"/>
99-
<img src="./src/shared/assets/integrate/druid.png" alt="Druid" class="a" width="auto" height="34"/>
94+
<a href="https://clickhouse.com" target="_blank"><img src="./src/shared/assets/integrate/clickhouse.png" alt="ClickHouse" class="a" width="133" height="34" /></a>
95+
<a href="https://trino.io" target="_blank"><img src="./src/shared/assets/integrate/trino.png" alt="Trino" class="a" width="46" height="46"/></a>
96+
<a href="https://prestodb.io" target="_blank"><img src="./src/shared/assets/integrate/presto.png" alt="Presto" class="a" width="152" height="46"/></a>
97+
<a href="https://www.mysql.com" target="_blank"><img src="./src/shared/assets/integrate/mysql.png" alt="MySQL" class="a" width="auto" height="50"/></a>
98+
<a href="https://www.postgresql.org" target="_blank"><img src="./src/shared/assets/integrate/postgresql.png" alt="PostgreSQL" class="a" width="auto" height="50"/></a>
99+
<a href="https://druid.apache.org" target="_blank"><img src="./src/shared/assets/integrate/druid.png" alt="Druid" class="a" width="auto" height="34"/></a>
100+
<a href="https://www.elastic.co/cn/elasticsearch" target="_blank"><img src="./src/shared/assets/integrate/elasticsearch.svg" alt="ElasticSearch" class="a" width="auto" height="34"/></a>
100101
</p>
101102

102103
## Features

docs/docs/download.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ The current Trino release is version <img src="https://img.shields.io/github/v/r
9191
* **Source Code**: [Code](https://github.com/trinodb/trino)
9292
* **YouTube channel** [YouTube channel](https://www.youtube.com/c/trinodb)
9393

94-
- __Druid__
94+
- __Apache Druid__
9595

9696
---
9797

98-
* **Documentation**: [trino.io](https://druid.apache.org/docs/latest/design/)
98+
* **Documentation**: [druid.apache.org](https://druid.apache.org/docs/latest/design/)
9999
* **Issues**: [GitHub issues](https://github.com/apache/druid/issues)
100100
* **Source Code**: [Code](https://github.com/apache/druid)
101101
* **Meetups** [Meetups](https://www.meetup.com/topics/apache-druid/)

electron-builder.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,20 @@ releaseInfo:
1818
1919
---
2020
21-
- Support custom file names for downloading result data
22-
- Add multiple editor theme
21+
- Support the new editor to delete the data table shortcut menu
2322
2423
#### Dependencies
2524
2625
---
2726
28-
- Bump eslint-plugin-jsdoc from 35.3.2 to 39.3.3
29-
- Bump angular-highcharts from 13.0.1 to 14.1.5
30-
- Bump karma-jasmine-html-reporter from 1.7.0 to 2.0.0
31-
3227
#### MySQL
3328
3429
---
3530
36-
- Support metadata management to build data tables [issues-180](https://github.com/EdurtIO/dbm/issues/180)
37-
- Support metadata management to filter tables [issues-180](https://github.com/EdurtIO/dbm/issues/180)
38-
- Support metadata management to show database ddl [issues-180](https://github.com/EdurtIO/dbm/issues/180)
39-
- Support metadata management to delete database [issues-180](https://github.com/EdurtIO/dbm/issues/180)
40-
- Support metadata management to preview table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
41-
- Support metadata management to show table ddl [issues-180](https://github.com/EdurtIO/dbm/issues/180)
42-
- Support metadata management to delete table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
43-
- Support metadata management to rename table, truncate table [issues-180](https://github.com/EdurtIO/dbm/issues/180)
44-
- Support metadata management to preview column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
45-
- Support metadata management to create column, delete column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
46-
- Support metadata management to rename column [issues-180](https://github.com/EdurtIO/dbm/issues/180)
47-
- Support metadata management to add column comment [issues-180](https://github.com/EdurtIO/dbm/issues/180)
48-
4931
#### PostgreSQL
5032
5133
---
5234
53-
- Supports quick query
54-
- Support metadata management menu server related operations
55-
- Supports metadata management of disk usage
56-
5735
directories:
5836
output: ./release
5937

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"name": "dbm",
3-
"version": "1.21.0",
3+
"version": "1.22.0-SNAPSHOT",
44
"author": "qianmoQ <shicheng@ttxit.com>",
5-
"description": "DataBase GUI",
5+
"description": "Full platform database management tool, supports ClickHouse, Presto, Trino, MySQL, PostgreSQL...",
66
"github": "https://github.com/EdurtIO/dbm.git",
77
"homepage": "https://dbm.edurt.io",
88
"keywords": [
99
"angular",
1010
"angular 12",
11+
"angular 14",
1112
"electron",
1213
"typescript",
1314
"windows",
@@ -17,7 +18,9 @@
1718
"clickhouse",
1819
"trino",
1920
"presto",
20-
"mysql"
21+
"mysql",
22+
"apache druid",
23+
"postgresql"
2124
],
2225
"publish": [
2326
{

src/renderer/app/layout/layout.module.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ import { PrestoService } from "@renderer/services/presto.service";
1717
import { FactoryService } from "@renderer/services/factory.service";
1818
import { MySQLService } from "@renderer/services/plugin/mysql.service";
1919
import { PostgresqlService } from "@renderer/services/plugin/postgresql.service";
20+
import { PluginFactory } from "@renderer/factory/plugin.factory";
21+
import { PluginToken } from "@renderer/token/plugin.token";
22+
import { ClickHousePlugin } from "@renderer/plugin/clickhouse.plugin";
23+
import { ElasticsearchPlugin } from "@renderer/plugin/elasticsearch.plugin";
2024

2125
const httpLoaderFactory = (http: HttpClient): TranslateHttpLoader =>
2226
new TranslateHttpLoader(http, './renderer/assets/i18n/', '.json');
@@ -48,7 +52,10 @@ const httpLoaderFactory = (http: HttpClient): TranslateHttpLoader =>
4852
PrestoService,
4953
FactoryService,
5054
MySQLService,
51-
PostgresqlService
55+
PostgresqlService,
56+
PluginFactory,
57+
{provide: PluginToken, useClass: ClickHousePlugin, multi: true},
58+
{provide: PluginToken, useClass: ElasticsearchPlugin, multi: true}
5259
]
5360
})
5461
export class LayoutModule {

src/renderer/app/pages/management/datasource/datasource.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@
112112
<div *ngFor="let engine of sourceTypes" [nzSpan]="24" nz-col>
113113
<app-component-antd-drivider [description]="engine.description" [title]="engine.name">
114114
</app-component-antd-drivider>
115-
<div *ngIf="engine.engines; else notHasEngines" [nzGutter]="[8, 8]" nz-row>
116-
<div *ngFor="let value of engine.engines" [nzSpan]="6" nz-col>
115+
<div *ngIf="engine.engines; else notHasEngines" [nzGutter]="[3, 20]" nz-row>
116+
<div *ngFor="let value of engine.engines" [nzSpan]="6" nz-col style="text-align: center;">
117117
<div class="">
118118
<nz-radio-group [(ngModel)]="formInfo.type" (ngModelChange)="handlerChange(value)">
119119
<label [nzValue]="value.name" nz-radio-button>

src/renderer/app/pages/management/datasource/datasource.module.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ import {
2727
DatasourcePostgresqlComponent
2828
} from "@renderer/components/datasource/postgresql/datasource.postgresql.component";
2929
import { DatasourceDruidComponent } from "@renderer/components/datasource/druid/datasource.druid.component";
30+
import {
31+
DatasourceElasticSearchComponent
32+
} from "@renderer/components/datasource/elasticsearch/datasource.elasticsearch.component";
3033

3134
const DATASOURCE_ROUTES: Routes = [
3235
{path: '', component: DatasourceComponent}
@@ -53,7 +56,8 @@ const DATASOURCE_ROUTES: Routes = [
5356
DatasourceMysqlComponent,
5457
DatasourceDeleteComponent,
5558
DatasourcePostgresqlComponent,
56-
DatasourceDruidComponent
59+
DatasourceDruidComponent,
60+
DatasourceElasticSearchComponent
5761
],
5862
providers: [
5963
DatasourceService,

src/renderer/app/pages/management/metadata/metadata.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ export class MetadataComponent extends BaseComponent implements OnInit {
5656
configModel.title = k.alias;
5757
configModel.type = TypeEnum.disk;
5858
configModel.disabled = k.status ? false : true;
59-
if (k.type === DatabaseEnum.presto || k.type === DatabaseEnum.trino || k.type === DatabaseEnum.druid) {
59+
if (k.type === DatabaseEnum.presto || k.type === DatabaseEnum.trino || k.type === DatabaseEnum.druid
60+
|| k.type === DatabaseEnum.elasticsearch) {
6061
configModel.isLeaf = true;
6162
}
62-
if (k.type === DatabaseEnum.druid) {
63+
if (k.type === DatabaseEnum.druid || k.type === DatabaseEnum.elasticsearch) {
6364
configModel.disabled = true;
6465
}
6566
if (configModel.disabled) {

src/renderer/app/pages/monitor/connection/monitor.connection.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class MonitorConnectionComponent extends BaseComponent implements OnDestr
3030
super();
3131
this.datasourceService.getAll().then(response => {
3232
this.dataSources = response.map(item => {
33-
if (item.type === DatabaseEnum.postgresql || item.type === DatabaseEnum.druid) {
33+
if (item.type === DatabaseEnum.postgresql || item.type === DatabaseEnum.druid || item.type === DatabaseEnum.elasticsearch) {
3434
item.status = false;
3535
}
3636
return item;

src/renderer/app/pages/monitor/mutations/monitor.mutations.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export class MonitorMutationsComponent extends BaseComponent implements OnDestro
3535
if (item.type === DatabaseEnum.trino || item.type === DatabaseEnum.presto
3636
|| item.type === DatabaseEnum.mysql
3737
|| item.type === DatabaseEnum.postgresql
38-
|| item.type === DatabaseEnum.druid) {
38+
|| item.type === DatabaseEnum.druid
39+
|| item.type === DatabaseEnum.elasticsearch) {
3940
item.status = false;
4041
}
4142
return item;

0 commit comments

Comments
 (0)