From 5c417581d25bc4c67cf2fa91f2badc95880f5ffd Mon Sep 17 00:00:00 2001 From: Qian Xia Date: Tue, 29 Oct 2024 16:05:27 +0800 Subject: [PATCH] [#5270] UI(oceanbase-catalog): Support OceanBase-CE JDBC catalog on the Web UI (#5272) ### What changes were proposed in this pull request? Support OceanBase-CE JDBC catalog on the Web UI image ### Why are the changes needed? N/A Fix: #5270 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? N/A --------- Co-authored-by: yuanoOo --- .../app/metalakes/metalake/MetalakeTree.js | 2 ++ web/web/src/lib/icons/iconify-icons.css | 5 ++++ web/web/src/lib/icons/svg/oceanbase.svg | 18 ++++++++++++ web/web/src/lib/utils/initial.js | 28 +++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 web/web/src/lib/icons/svg/oceanbase.svg diff --git a/web/web/src/app/metalakes/metalake/MetalakeTree.js b/web/web/src/app/metalakes/metalake/MetalakeTree.js index 9f17480df0..e6b6ea0c39 100644 --- a/web/web/src/app/metalakes/metalake/MetalakeTree.js +++ b/web/web/src/app/metalakes/metalake/MetalakeTree.js @@ -72,6 +72,8 @@ const MetalakeTree = props => { return 'custom-icons-paimon' case 'lakehouse-hudi': return 'custom-icons-hudi' + case 'jdbc-oceanbase': + return 'custom-icons-oceanbase' default: return 'bx:book' } diff --git a/web/web/src/lib/icons/iconify-icons.css b/web/web/src/lib/icons/iconify-icons.css index 465c988093..cb1c5b4386 100644 --- a/web/web/src/lib/icons/iconify-icons.css +++ b/web/web/src/lib/icons/iconify-icons.css @@ -20,6 +20,7 @@ .custom-icons-doris, .custom-icons-hive, .custom-icons-hudi, +.custom-icons-oceanbase, .custom-icons-paimon { display: inline-block; width: 1em; @@ -41,6 +42,10 @@ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2000 2000' width='2000' height='2000'%3E%3Cpath fill='transparent' d='M0 1000V0h2000v2000H0zm1529 553c0-5-102-212-227-461l-228-453-22 46c-20 42-25 45-60 45h-38l-54-110c-30-61-57-110-60-110-4 0-470 924-470 933 0 1 59 1 130-1l130-4v41c0 23-5 51-10 62-11 19-2 19 450 19 253 0 460-3 459-7m290-154 103-84-47-14-47-15 6-111c8-127-5-191-56-288-82-154-302-287-433-263-32 6-33 7-23 45l10 38 82 5c102 7 177 41 242 110 68 73 96 142 102 254 2 50 2 108-2 128-6 31-11 36-35 36-16 0-47-7-70-15-39-13-42-13-37 3 3 9 19 67 36 127 17 61 34 118 36 128 4 12 10 15 17 9 7-5 59-46 116-93M232 1248c13-19 11-27-19-87-66-129-67-286-3-418 46-94 146-173 218-173 27 0 31 4 42 48 7 26 16 50 19 54 7 8 171-204 171-220 0-6-243-92-263-92-3 0-2 12 3 26 6 14 10 42 10 62 0 34-5 39-48 63-225 125-326 365-249 588 24 68 83 171 98 171 4 0 13-10 21-22'/%3E%3Cpath fill='%2300B3EF' d='M600 1479c0-9-36-10-132-5-73 3-138 3-144-1-8-6 71-173 248-526 226-453 261-517 274-506 9 7 43 67 76 133 33 67 62 123 65 126s11-4 19-14c13-18 14-17 14 17 0 28-46 129-187 412-164 327-191 375-210 375-13 0-23-5-23-11m-434-195c-148-189-149-478-2-665 38-48 165-147 206-161 9-3 6-24-10-76-12-40-20-75-18-77 5-5 369 114 381 124 7 7-230 331-242 331-4 0-19-36-32-80l-24-79-33 16c-93 46-163 143-188 264-22 105 5 218 72 307l26 33-26 37c-14 20-35 48-45 61l-18 24z'/%3E%3Cpath fill='%23004E7F' d='M596 1493c6-21 3-22-78-26l-83-3 90-2 90-2 198-395c108-217 201-395 205-394 4 0 92 172 195 382 185 377 210 440 175 452-7 2-189 6-405 7l-392 3zm724-778c0-22 4-25 35-25s35 3 35 25-4 25-35 25-35-3-35-25'/%3E%3Cpath fill='%232F5B7F' d='m577 1538 28-53 375-3c206-1 378-6 383-11 4-4-76-177-180-384L996 711l39-81 39-81 258 513c141 282 257 516 257 521 1 4-233 7-520 7H549z'/%3E%3Cpath fill='%23013868' d='M1616 1369c-32-110-55-203-52-206 2-3 39 6 80 20l75 25 7-35c11-57-4-161-30-219-51-111-162-195-277-210-30-4-57-12-61-18-5-8-8-7-8 2 0 6-11 12-24 12-20 0-25-8-41-65-9-36-15-68-12-71 13-13 131-16 189-4 142 27 286 138 352 270 47 95 60 163 53 286l-6 100 70 23c38 12 69 24 69 25 0 3-272 224-316 258-8 6-29-54-68-193'/%3E%3C/svg%3E"); } +.custom-icons-oceanbase { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2800 2800' width='2800' height='2800'%3E%3Cpath fill='%230181FD' d='M338 1933c-17-4-18-31-18-383v-378l148 5c251 9 542-36 827-127 222-71 357-103 560-135 136-22 427-38 548-30l107 7v764l-159-4c-163-4-323 7-478 33-83 14-374 94-418 115-21 10-164 47-280 74-104 23-245 44-380 56-118 10-423 12-457 3'/%3E%3Cpath fill='%2307C846' d='M1509 2094c-27-70-66-200-63-206 7-11 251-88 348-109 215-48 552-73 679-53l37 7v247l-132-6c-279-14-552 33-845 143-7 3-18-8-24-23'/%3E%3Cpath fill='%23FFA005' d='M320 970V838l33 6c84 17 219 18 362 1 142-16 378-59 400-73 5-4 52-21 103-38 108-35 97-43 137 91 15 50 30 95 32 101 7 18-229 94-407 132-156 32-179 34-412 39l-248 5z'/%3E%3C/svg%3E"); +} + .custom-icons-paimon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 218.61 218.61' width='218.61' height='218.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-2{fill:%230163e1}%3C/style%3E%3C/defs%3E%3Cg id='svgID0'%3E%3Cpath d='M55.63 111.28a35.01 35.01 0 00-21.95-21.65l-12.74-4.26h80.4c19.85-7.47 43.6-13.02 72.56-17.39l19.6-3.48 13.7-3.85C189.3 24.7 152.19 0 109.3 0 48.94 0 0 48.94 0 109.3c0 20.41 2.93 39.59 17.2 58.79 8.15-17.84 23.42-40.44 38.43-56.82Z' class='cls-2'/%3E%3Cpath d='M182.4 72.57A430.5 430.5 0 0023.48 177c20.02 25.34 51.02 41.61 85.82 41.61 60.37 0 109.3-48.94 109.3-109.3 0-16.36-3.6-31.88-10.04-45.81l-26.17 9.08Z' class='cls-2'/%3E%3Cpath fill='%23e7e7e7' d='m182.4 72.57 26.17-9.08c-.44-.95-.9-1.9-1.36-2.84l-13.7 3.85-17.66 1.02c-29.79 2.42-54.8 8.05-86.19 19.85H20.94l9 3.87c9.89 3.88 22.18 12 25.69 22.04-16.77 16.69-30.7 39.55-38.43 56.82 2.46 4.13 5.32 7.62 8.29 11.37 48.68-53.33 96.8-84.37 156.91-106.89Z'/%3E%3C/g%3E%3C/svg%3E"); } diff --git a/web/web/src/lib/icons/svg/oceanbase.svg b/web/web/src/lib/icons/svg/oceanbase.svg new file mode 100644 index 0000000000..e140dd1e9d --- /dev/null +++ b/web/web/src/lib/icons/svg/oceanbase.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/web/src/lib/utils/initial.js b/web/web/src/lib/utils/initial.js index 3517ecd2ec..8629bcd186 100644 --- a/web/web/src/lib/utils/initial.js +++ b/web/web/src/lib/utils/initial.js @@ -308,5 +308,33 @@ export const providers = [ description: 'Apache Hudi catalog uri config' } ] + }, + { + label: 'OceanBase', + value: 'jdbc-oceanbase', + defaultProps: [ + { + key: 'jdbc-driver', + value: '', + required: true, + description: 'e.g. com.mysql.jdbc.Driver or com.mysql.cj.jdbc.Driver or com.oceanbase.jdbc.Driver' + }, + { + key: 'jdbc-url', + value: '', + required: true, + description: 'e.g. jdbc:mysql://localhost:2881 or jdbc:oceanbase://localhost:2881' + }, + { + key: 'jdbc-user', + value: '', + required: true + }, + { + key: 'jdbc-password', + value: '', + required: true + } + ] } ]