Skip to content

Commit

Permalink
Merge pull request #243 from EdurtIO/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
qianmoQ authored Jul 24, 2022
2 parents caf9103 + c394aad commit e419f52
Show file tree
Hide file tree
Showing 71 changed files with 1,229 additions and 95 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
[中文](http://dbm-zh.edurt.io/) <br />
[English](https://dbm.edurt.io/)

## Security

---

[![OSCS Status](https://www.oscs1024.com/platform/badge/qianmoQ/dbm.git.svg?size=small)](https://www.murphysec.com/dr/jv6PXUWIeGXUsjTRup)

## Contributors

---
Expand Down Expand Up @@ -90,6 +96,7 @@ Here are some of the major database solutions that are supported:
<img src="./src/shared/assets/integrate/presto.png" alt="Presto" class="a" width="152" height="46"/>
<img src="./src/shared/assets/integrate/mysql.png" alt="MySQL" class="a" width="auto" height="50"/>
<img src="./src/shared/assets/integrate/postgresql.png" alt="PostgreSQL" class="a" width="auto" height="50"/>
<img src="./src/shared/assets/integrate/druid.png" alt="Druid" class="a" width="auto" height="34"/>
</p>

## Features
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/docs/assets/integrate/Druid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/docs/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,13 @@ The current Trino release is version <img src="https://img.shields.io/github/v/r
* **Issues**: [GitHub issues](https://github.com/trinodb/trino/issues)
* **Source Code**: [Code](https://github.com/trinodb/trino)
* **YouTube channel** [YouTube channel](https://www.youtube.com/c/trinodb)

- __Druid__

---

* **Documentation**: [trino.io](https://druid.apache.org/docs/latest/design/)
* **Issues**: [GitHub issues](https://github.com/apache/druid/issues)
* **Source Code**: [Code](https://github.com/apache/druid)
* **Meetups** [Meetups](https://www.meetup.com/topics/apache-druid/)
</div>
57 changes: 57 additions & 0 deletions docs/docs/reference/management/datasource/druid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
template: overrides/main.html
---

!!! note "Apache Druid"

It is mainly used to describe how the software builds the Apache Druid data source for subsequent operations.

!!! warning "System requirements"

\>= `1.21.0`

### Supported Versions

---

| Version | Tested? |
|----------|---------------------------------------------|
| `0.23.x` | :material-checkbox-marked-circle:{.success} |

!!! note "Supported versions"

Most versions have been tested, please submit issues for non-adapted versions.

### Created a Source

---

After entering the data source management page, click the Add data source button.

![img.png](../../../assets/images/others/management/datasource/druid/img.png)

Select the Apache Druid icon in the `Basic` type (The last one).

After selecting the type, click the `Next` button at the bottom to configure the relevant information.

![img_1.png](../../../assets/images/others/management/datasource/druid/img_1.png)

!!! note "Supported protocols"

- [x] `HTTP`

#### HTTP Protocol

---

!!! note "HTTP Protocol"

Use the HTTP interface provided by Apache Druid to connect to the service.

| Parameter | Description | Required | Unique | Default |
|-----------|-----------------------------------------------------------------------------------------------------|----------|--------|---------|
| `Alias` | The alias of the data source, which will be displayed later in the selected data source on the page | Yes | Yes | |
| `Host` | The host of the Apache Druid server | Yes | Yes | |
| `Port` | The port of the Apache Druid server | Yes | Yes | `8123` |

When we have configured the above parameters, click the `Test` button at the bottom. If the service can be accessed normally, the `OK` button can be used. Click it and it will be saved.
66 changes: 66 additions & 0 deletions docs/docs/release/1.21.0-20220725.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
template: overrides/main.html
icon: material/gesture-tap-button
---

DBM Version for `1.21.0` is released!

Release Time: `2022-07-25`

#### General

---

- Add a new code editor layout
- Fix the style of the tree menu on the left side of metadata management is confused
- The new query dynamically loads the service according to the plug-in

#### Security

---

- Upgrade moment to `2.29.4`
- Upgrade dexie to `3.2.2`
- Fix some dependent version security

#### Dependencies

---

- Bump rxjs from 6.6.7 to 7.5.6

#### ClickHouse

---

- Support `MaterializedPostgreSQL` database engine

#### Trino & Presto

---

- Support the currently stopped running process [issues-158](https://github.com/EdurtIO/dbm/issues/158)

#### MySQL

---

- Support the currently stopped running process [issues-180](https://github.com/EdurtIO/dbm/issues/180)

#### PostgreSQL

---

- Support metadata management to create database, filter database
- Support metadata management to create table
- Support metadata management to delete database

#### Apache Druid

---

- Support Druid (query and data source management)

---

- @qianmoQ
11 changes: 11 additions & 0 deletions docs/material/overrides/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ <h1 class="font-center">Supported Databases</h1>
PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads.
</div>
</li>
<li>
<div class="font-center">
<span class="twemoji">
<img src="/assets/integrate/Druid.svg" width="30" height="100" />
</span>
<strong class="font-center">Apache Druid</strong>
</div>
<div class="top-margin">
Druid is a high performance real-time analytics database. Druid's main value add is to reduce time to insight and action.
</div>
</li>
</ul>
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ theme:
- content.code.annotate
- content.tabs.link
# - header.autohide
# - navigation.expand
- navigation.expand
- navigation.indexes
# - navigation.instant
- navigation.sections
Expand Down Expand Up @@ -132,6 +132,7 @@ plugins:
Datasource_Presto_Trino: Presto & Trino (Experimental)
Datasource_ClickHouse: ClickHouse
Datasource_PostgreSQL: PostgreSQL (Experimental)
Datasource_Druid: Druid (Experimental)
zh:
Home: 主页
Documentation: 文档
Expand All @@ -154,6 +155,7 @@ plugins:
Datasource_Presto_Trino: Presto & Trino (Experimental)
Datasource_ClickHouse: ClickHouse
Datasource_PostgreSQL: PostgreSQL (Experimental)
Datasource_Druid: Druid (Experimental)
- redirects:
redirect_maps:
release-latest.md: release/1.20.0-20220706.md
Expand All @@ -172,13 +174,15 @@ nav:
- Datasource_Presto_Trino: reference/management/datasource/presto_trino.md
- Datasource_MySQL: reference/management/datasource/mysql.md
- Datasource_PostgreSQL: reference/management/datasource/postgresql.md
- Datasource_Druid: reference/management/datasource/druid.md
- Monitor:
- Processor: reference/monitor/monitor-processor.md
- Connection: reference/monitor/monitor_connection.md
- Mutations: reference/monitor/monitor_mutations.md
- Query: reference/monitor/monitor_query.md
- Release Note:
- 1.20.0 (latest): release/1.20.0-20220706.md
- 1.21.0 (latest): release/1.21.0-20220725.md
- 1.20.0: release/1.20.0-20220706.md
- 1.19.0: release/1.19.0-20220623.md
- 1.18.0: release/1.18.0-20220610.md
- 1.17.0: release/1.17.0-20220529.md
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# IN THE SOFTWARE.

# Direct dependencies
mkdocs>=1.2.2
mkdocs>=1.3.0
Pygments>=2.4
markdown>=3.2
pymdown-extensions>=7.0
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dbm",
"version": "1.20.0",
"version": "1.21.0",
"author": "qianmoQ <[email protected]>",
"description": "DataBase GUI",
"github": "https://github.com/EdurtIO/dbm.git",
Expand Down Expand Up @@ -58,17 +58,19 @@
"codemirror": "^5.64.0",
"conventional-changelog-cli": "^2.1.1",
"css-loader": "^6.7.1",
"dexie": "^3.2.1",
"dexie": "3.2.2",
"electron-ssh2": "^0.1.2",
"electron-updater": "^4.6.1",
"export-to-csv": "^0.2.1",
"font-awesome": "^4.7.0",
"highcharts": "^9.3.2",
"jsstore": "^4.3.8",
"lodash": "^4.17.21",
"moment": "^2.29.2",
"moment": "2.29.4",
"monaco-editor": "^0.33.0",
"mysql": "^2.18.1",
"ng-zorro-antd": "13.3.1",
"ngx-ace-wrapper": "^12.0.0",
"ngx-clipboard": "^14.0.2",
"ngx-easy-table": "^15.2.0",
"ngx-ellipsis": "^3.1.6",
Expand All @@ -78,7 +80,7 @@
"pg": "^8.7.3",
"presto-stream-client": "^1.0.15",
"promise-timeout": "^1.3.0",
"rxjs": "~6.6.0",
"rxjs": "^7.5.6",
"sass-loader": "^12.3.0",
"sql-formatter": "^4.0.2",
"ts-md5": "^1.2.10",
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/app/layout/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</a>
</div>
<ul nz-menu nzMode="horizontal">
<li nz-submenu [nzTitle]="betaQueryTitle"></li>
<li nz-submenu [nzTitle]="queryMenuItemTitle">
<ul>
<li nz-menu-item>
Expand Down Expand Up @@ -115,6 +116,13 @@
<ng-template #githubItemTitle>
<i class="fa fa-github"></i>&nbsp;{{'common.github'|translate}}
</ng-template>
<ng-template #betaQueryTitle>
<nz-ribbon nzColor="#f50" [nzText]="'beta'">
<a [routerLink]="['/query/beta']" class="dropdown-item">
<i nz-icon nzType="console-sql" nzTheme="outline"></i> {{'common.query'|translate}}
</a>
</nz-ribbon>
</ng-template>
</nz-header>
<nz-modal [(nzVisible)]="dialog.update" [nzTitle]="modalTitle" [nzContent]="modalContent" [nzFooter]="modalFooter"
(nzOnCancel)="handlerUpdate(false)" [nzMaskClosable]="false" [nzClosable]="false" nzWidth="80%">
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/app/layout/layout.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<router-outlet></router-outlet>
</div>
</nz-content>
<nz-footer>Design ©2021 Implement By EdurtIO</nz-footer>
<!-- <nz-footer>Design ©2021 Implement By EdurtIO</nz-footer>-->
</nz-layout>
<nz-modal *ngIf="visible" [(nzVisible)]="visible" nzTitle="{{'common.migrte'|translate}}"
nzWidth="70%" (nzOnCancel)="handlerMigrateShow(false)">
Expand Down
7 changes: 1 addition & 6 deletions src/renderer/app/layout/layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,13 @@ import { NzMessageService } from 'ng-zorro-antd/message';
}
nz-content {
padding: 0 10px;
padding: 0 10px 10px 10px;
}
nz-footer {
text-align: center;
}
.inner-content {
padding: 24px;
min-height: 280px;
}
.ant-layout {
background-color: #ffffff;
}
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/app/layout/layout.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const LAYOUT_ROUTES: Routes = [
path: 'home',
loadChildren: () => import('../pages/home/home.module').then(m => m.HomeModule)
},
{
path: 'query/beta',
loadChildren: () => import('../pages/query/beta/query.beta.module').then(m => m.QueryBetaModule)
},
{
path: 'query',
children: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { DatasourceDeleteComponent } from "@renderer/components/datasource/delet
import {
DatasourcePostgresqlComponent
} from "@renderer/components/datasource/postgresql/datasource.postgresql.component";
import { DatasourceDruidComponent } from "@renderer/components/datasource/druid/datasource.druid.component";

const DATASOURCE_ROUTES: Routes = [
{path: '', component: DatasourceComponent}
Expand All @@ -51,7 +52,8 @@ const DATASOURCE_ROUTES: Routes = [
DatasourceTrinoComponent,
DatasourceMysqlComponent,
DatasourceDeleteComponent,
DatasourcePostgresqlComponent
DatasourcePostgresqlComponent,
DatasourceDruidComponent
],
providers: [
DatasourceService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
[nzTreeTemplate]="nzTreeTemplate">
</nz-tree>
<ng-template #nzTreeTemplate let-node let-origin="origin">
<span (contextmenu)="handlerContextMenu($event, menu, origin)">
<i class="fa fa-{{origin.type}}"></i>&nbsp;{{origin.title}}
<em *ngIf="origin?.children" class="f50">({{origin?.children.length}})</em>
</span>
<i (contextmenu)="handlerContextMenu($event, menu, origin)"
class="fa fa-{{origin.type}}">&nbsp;{{origin.title}}&nbsp;<em *ngIf="origin?.children"
class="f50">({{origin?.children.length}})</em></i>
</ng-template>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ export class MetadataComponent extends BaseComponent implements OnInit {
configModel.title = k.alias;
configModel.type = TypeEnum.disk;
configModel.disabled = k.status ? false : true;
if (k.type === DatabaseEnum.presto || k.type === DatabaseEnum.trino || k.type === DatabaseEnum.postgresql) {
if (k.type === DatabaseEnum.presto || k.type === DatabaseEnum.trino || k.type === DatabaseEnum.druid) {
configModel.isLeaf = true;
}
if (k.type === DatabaseEnum.druid) {
configModel.disabled = true;
}
if (configModel.disabled) {
configModel.isLeaf = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class MonitorConnectionComponent extends BaseComponent implements OnDestr
super();
this.datasourceService.getAll().then(response => {
this.dataSources = response.map(item => {
if (item.type === DatabaseEnum.postgresql) {
if (item.type === DatabaseEnum.postgresql || item.type === DatabaseEnum.druid) {
item.status = false;
}
return item;
Expand Down
Loading

0 comments on commit e419f52

Please sign in to comment.