fix(connection-dialog): 修复新建连接对话框中 Spark 图标显示为默认图标#3337
Merged
Conversation
iconTypeMap 中 spark 被错误映射为图片文件名 'spark-logo.png' 而非类型键名 'spark', 导致 DatabaseIcon 组件将连字符转为下划线后无法匹配 assetIcons 中的键, 回退显示默认数据库图标。driverProfiles.spark.icon 同样修正。
t8y2
approved these changes
Jul 13, 2026
Owner
|
Thanks for the contribution! Merged in 8de5bec, will be released in the next version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
点击左上角「新建连接」时,Apache Spark 显示为默认数据库图标,而非 Spark logo。驱动管理和左侧侧边栏中 Spark 图标显示正常。
原因
ConnectionDialog.vue中的iconTypeMap将spark错误映射为图片文件名"spark-logo.png",而其他所有条目映射的都是类型键名(如hive: "hive"、db2: "db2")。当
"spark-logo.png"被传给DatabaseIcon组件作为db-type时,组件内部的标准化逻辑将连字符转为下划线变为"spark_logo.png",在assetIcons中查不到此键,回退渲染默认数据库图标。修复
iconTypeMap中spark: "spark-logo.png"改为spark: "spark"driverProfiles.spark.icon同步修正"spark-logo.png"改为"spark"遵循现有规范:
iconTypeMap的值为类型键名,由DatabaseIcon统一负责查找实际图片文件。