diff --git a/go-client/pkg/awaken/awaken_darwin.go b/go-client/pkg/awaken/awaken_darwin.go index 7c38cf1c..f766383d 100755 --- a/go-client/pkg/awaken/awaken_darwin.go +++ b/go-client/pkg/awaken/awaken_darwin.go @@ -162,6 +162,16 @@ func awakenDBCommand(r *Rouse, cfg *config.AppConfig) (*exec.Cmd, error) { if r.Protocol == "oracle" { connectMap["dbname"] = r.getUserName() } + if appItem.Name == "dbx" { + switch r.Protocol { + case "postgresql": + connectMap["protocol"] = "postgres" + case "sqlserver": + connectMap["protocol"] = "mssql" + default: + connectMap["protocol"] = r.Protocol + } + } if appItem.IsInternal { var argFormat string switch r.Protocol { @@ -190,7 +200,7 @@ func awakenDBCommand(r *Rouse, cfg *config.AppConfig) (*exec.Cmd, error) { return nil, fmt.Errorf("No database application configured or found (selected path: %s, reason: %v)", appItem.Path, err) } } - if r.Protocol == "sqlserver" { + if r.Protocol == "sqlserver" && appItem.Name != "dbx" { connectMap["protocol"] = "mssql_jdbc_ms_new" } commands := getCommandFromArgs(connectMap, appItem.ArgFormat) diff --git a/go-client/pkg/awaken/awaken_linux.go b/go-client/pkg/awaken/awaken_linux.go index 96d1272e..6667144d 100755 --- a/go-client/pkg/awaken/awaken_linux.go +++ b/go-client/pkg/awaken/awaken_linux.go @@ -304,6 +304,16 @@ func awakenDBCommand(r *Rouse, cfg *config.AppConfig) (*exec.Cmd, error) { if r.Protocol == "oracle" { connectMap["dbname"] = r.getUserName() } + if appItem.Name == "dbx" { + switch r.Protocol { + case "postgresql": + connectMap["protocol"] = "postgres" + case "sqlserver": + connectMap["protocol"] = "mssql" + default: + connectMap["protocol"] = r.Protocol + } + } if appItem.IsInternal { var argFormat string switch r.Protocol { diff --git a/go-client/pkg/awaken/awaken_windows.go b/go-client/pkg/awaken/awaken_windows.go index 194a70f2..db15985e 100755 --- a/go-client/pkg/awaken/awaken_windows.go +++ b/go-client/pkg/awaken/awaken_windows.go @@ -338,6 +338,16 @@ func handleDB(r *Rouse, cfg *config.AppConfig) (*exec.Cmd, error) { connectMap["library"] = "SQLOLEDB" } } + if appItem.Name == "dbx" { + switch r.Protocol { + case "postgresql": + connectMap["protocol"] = "postgres" + case "sqlserver": + connectMap["protocol"] = "mssql" + default: + connectMap["protocol"] = r.Protocol + } + } if r.Protocol == "redis" && appItem.Name == "resp" { var conList []map[string]string ss := make(map[string]string) diff --git a/plugins/linux/index.json b/plugins/linux/index.json index ddac8400..fe925e6a 100644 --- a/plugins/linux/index.json +++ b/plugins/linux/index.json @@ -1,6 +1,11 @@ { "version": 1, "plugins": [ + { + "id": "linux.dbx", + "name": "dbx", + "category": "databases" + }, { "id": "linux.dbeaver", "name": "dbeaver", diff --git a/plugins/linux/linux.dbx/connect.json b/plugins/linux/linux.dbx/connect.json new file mode 100644 index 00000000..b7997b39 --- /dev/null +++ b/plugins/linux/linux.dbx/connect.json @@ -0,0 +1,17 @@ +{ + "platform": "linux", + "match_first": [], + "is_default": false, + "is_set": false, + "is_internal": false, + "executable": { + "type": "user_path", + "default": "", + "required": true + }, + "launch": { + "type": "args", + "template": "dbx://connection/new?name={name}&type={protocol}&user={username}&password={value}&database={dbname}&host={host}&port={port}&one_time=true" + }, + "display_name": "DBX" +} diff --git a/plugins/linux/linux.dbx/icon.png b/plugins/linux/linux.dbx/icon.png new file mode 100644 index 00000000..23c91bcf Binary files /dev/null and b/plugins/linux/linux.dbx/icon.png differ diff --git a/plugins/linux/linux.dbx/manifest.json b/plugins/linux/linux.dbx/manifest.json new file mode 100644 index 00000000..f0fad375 --- /dev/null +++ b/plugins/linux/linux.dbx/manifest.json @@ -0,0 +1,24 @@ +{ + "id": "linux.dbx", + "name": "dbx", + "display_name": "DBX", + "version": "1.0.0", + "min_client_version": "4.0.0", + "author": "JumpServer", + "homepage": "https://github.com/jumpserver/clients", + "download_url": "https://dbxio.com/cn", + "category": "databases", + "protocols": [ + "mariadb", + "mysql", + "oracle", + "postgresql", + "sqlserver", + "redis" + ], + "builtin": true, + "comment": { + "zh": "DBX 是一个开源、轻量的数据库与数据基础设施工作台。它把连接管理、对象浏览、SQL 编辑、数据修改、结构工具、专项控制台和自动化入口放在同一个工作区中,支持 70+ 种数据库及数据系统。\n\n!!!手动下载安装,点击保存启用!!!", + "en": "DBX is an open-source, lightweight workspace for databases and data infrastructure. It brings connection management, object browsing, SQL editing, data changes, schema tools, specialized consoles, and automation into one interface across more than 70 databases and data systems.\n\n!!!Manually download and install, click Save to activate!!!" + } +} diff --git a/plugins/macos/index.json b/plugins/macos/index.json index c2a8537b..484d08ad 100644 --- a/plugins/macos/index.json +++ b/plugins/macos/index.json @@ -11,6 +11,11 @@ "name": "dbeaver", "category": "databases" }, + { + "id": "macos.dbx", + "name": "dbx", + "category": "databases" + }, { "id": "macos.iterm", "name": "iterm", diff --git a/plugins/macos/macos.dbx/connect.json b/plugins/macos/macos.dbx/connect.json new file mode 100644 index 00000000..e71eb3b7 --- /dev/null +++ b/plugins/macos/macos.dbx/connect.json @@ -0,0 +1,17 @@ +{ + "platform": "macos", + "match_first": [], + "is_default": false, + "is_set": false, + "is_internal": false, + "executable": { + "type": "user_path", + "default": "/Applications/DBX.app/Contents/MacOS/dbx", + "required": false + }, + "launch": { + "type": "args", + "template": "dbx://connection/new?name={name}&type={protocol}&user={username}&password={value}&database={dbname}&host={host}&port={port}&one_time=true" + }, + "display_name": "DBX" +} diff --git a/plugins/macos/macos.dbx/icon.png b/plugins/macos/macos.dbx/icon.png new file mode 100644 index 00000000..23c91bcf Binary files /dev/null and b/plugins/macos/macos.dbx/icon.png differ diff --git a/plugins/macos/macos.dbx/manifest.json b/plugins/macos/macos.dbx/manifest.json new file mode 100644 index 00000000..b1a3fa72 --- /dev/null +++ b/plugins/macos/macos.dbx/manifest.json @@ -0,0 +1,24 @@ +{ + "id": "macos.dbx", + "name": "dbx", + "display_name": "DBX", + "version": "1.0.0", + "min_client_version": "4.0.0", + "author": "JumpServer", + "homepage": "https://github.com/jumpserver/clients", + "download_url": "https://dbxio.com/cn", + "category": "databases", + "protocols": [ + "mariadb", + "mysql", + "oracle", + "postgresql", + "sqlserver", + "redis" + ], + "builtin": true, + "comment": { + "zh": "DBX 是一个开源、轻量的数据库与数据基础设施工作台。它把连接管理、对象浏览、SQL 编辑、数据修改、结构工具、专项控制台和自动化入口放在同一个工作区中,支持 70+ 种数据库及数据系统。\n\n!!!手动下载安装,点击保存启用!!!", + "en": "DBX is an open-source, lightweight workspace for databases and data infrastructure. It brings connection management, object browsing, SQL editing, data changes, schema tools, specialized consoles, and automation into one interface across more than 70 databases and data systems.\n\n!!!Manually download and install, click Save to activate!!!" + } +} diff --git a/plugins/windows/index.json b/plugins/windows/index.json index 0ee9b49d..7d66c57e 100644 --- a/plugins/windows/index.json +++ b/plugins/windows/index.json @@ -11,6 +11,11 @@ "name": "dbeaver", "category": "databases" }, + { + "id": "windows.dbx", + "name": "dbx", + "category": "databases" + }, { "id": "windows.mobaxterm", "name": "mobaxterm", diff --git a/plugins/windows/windows.dbx/connect.json b/plugins/windows/windows.dbx/connect.json new file mode 100644 index 00000000..7c3738e9 --- /dev/null +++ b/plugins/windows/windows.dbx/connect.json @@ -0,0 +1,17 @@ +{ + "platform": "windows", + "match_first": [], + "is_default": false, + "is_set": false, + "is_internal": false, + "executable": { + "type": "user_path", + "default": "", + "required": true + }, + "launch": { + "type": "args", + "template": "dbx://connection/new?name={name}&type={protocol}&user={username}&password={value}&database={dbname}&host={host}&port={port}&one_time=true" + }, + "display_name": "DBX" +} diff --git a/plugins/windows/windows.dbx/icon.png b/plugins/windows/windows.dbx/icon.png new file mode 100644 index 00000000..23c91bcf Binary files /dev/null and b/plugins/windows/windows.dbx/icon.png differ diff --git a/plugins/windows/windows.dbx/manifest.json b/plugins/windows/windows.dbx/manifest.json new file mode 100644 index 00000000..2329b29a --- /dev/null +++ b/plugins/windows/windows.dbx/manifest.json @@ -0,0 +1,24 @@ +{ + "id": "windows.dbx", + "name": "dbx", + "display_name": "DBX", + "version": "1.0.0", + "min_client_version": "4.0.0", + "author": "JumpServer", + "homepage": "https://github.com/jumpserver/clients", + "download_url": "https://dbxio.com/cn", + "category": "databases", + "protocols": [ + "mariadb", + "mysql", + "oracle", + "postgresql", + "sqlserver", + "redis" + ], + "builtin": true, + "comment": { + "zh": "DBX 是一个开源、轻量的数据库与数据基础设施工作台。它把连接管理、对象浏览、SQL 编辑、数据修改、结构工具、专项控制台和自动化入口放在同一个工作区中,支持 70+ 种数据库及数据系统。\n\n!!!手动下载安装,点击保存启用!!!", + "en": "DBX is an open-source, lightweight workspace for databases and data infrastructure. It brings connection management, object browsing, SQL editing, data changes, schema tools, specialized consoles, and automation into one interface across more than 70 databases and data systems.\n\n!!!Manually download and install, click Save to activate!!!" + } +} diff --git a/ui/assets/images/dbx.png b/ui/assets/images/dbx.png new file mode 100644 index 00000000..23c91bcf Binary files /dev/null and b/ui/assets/images/dbx.png differ diff --git a/ui/components/SettingItems/settingItems.vue b/ui/components/SettingItems/settingItems.vue index 0096c471..adb6ef6d 100644 --- a/ui/components/SettingItems/settingItems.vue +++ b/ui/components/SettingItems/settingItems.vue @@ -21,6 +21,7 @@ const { setAppConfig } = useSettingManager(); const imagesMap: Record = { iterm: getImageByName("item2"), dbeaver: getImageByName("dbeaver"), + dbx: getImageByName("dbx"), heidisql: getImageByName("heidisql"), mstsc: getImageByName("mstsc"), terminal: getImageByName("terminal"),