This is an automated email from the ASF dual-hosted git repository.

jshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new 577c16661 [#4964] web(ui): Support Hudi catalog on the Web (#5166)
577c16661 is described below

commit 577c16661bebcfb27766750ccae4100f4898215c
Author: Qian Xia <[email protected]>
AuthorDate: Mon Oct 21 13:58:54 2024 +0800

    [#4964] web(ui): Support Hudi catalog on the Web (#5166)
    
    ### What changes were proposed in this pull request?
    Support Hudi catalog on the Web
    <img width="1314" alt="image"
    
src="https://github.com/user-attachments/assets/a89e75b4-5d68-41a4-b710-e166e4f38a4a";>
    
    ### Why are the changes needed?
    N/A
    
    Fix: #4964
    
    ### Does this PR introduce _any_ user-facing change?
    N/A
    
    ### How was this patch tested?
    manually
---
 web/web/src/app/metalakes/metalake/MetalakeTree.js |  2 ++
 web/web/src/lib/icons/iconify-icons.css            |  5 ++++
 web/web/src/lib/icons/svg/hudi.svg                 | 30 ++++++++++++++++++++++
 web/web/src/lib/utils/initial.js                   | 19 ++++++++++++++
 4 files changed, 56 insertions(+)

diff --git a/web/web/src/app/metalakes/metalake/MetalakeTree.js 
b/web/web/src/app/metalakes/metalake/MetalakeTree.js
index 58b7c138b..74065f933 100644
--- a/web/web/src/app/metalakes/metalake/MetalakeTree.js
+++ b/web/web/src/app/metalakes/metalake/MetalakeTree.js
@@ -70,6 +70,8 @@ const MetalakeTree = props => {
             return 'custom-icons-doris'
           case 'lakehouse-paimon':
             return 'custom-icons-paimon'
+          case 'lakehouse-hudi':
+            return 'custom-icons-hudi'
           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 9fbd7ad75..f5803fdf9 100644
--- a/web/web/src/lib/icons/iconify-icons.css
+++ b/web/web/src/lib/icons/iconify-icons.css
@@ -19,6 +19,7 @@
 
 .custom-icons-doris,
 .custom-icons-hive,
+.custom-icons-hudi,
 .custom-icons-paimon {
   display: inline-block;
   width: 1em;
@@ -36,6 +37,10 @@
   background-image: url("data:image/svg+xml,%3Csvg 
xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 900' width='1000' 
height='900'%3E%3Cpath fill-rule='evenodd' stroke='%23fdee21' 
stroke-width='5.129' d='M596.797 
704.59v192.85h47.346v-88.632l9.767.183v88.45h47.881V704.59h-47.88v71.552h-9.768V704.59zm163.92
 0h-46.116v192.85h46.116zm7.55 0 36.429 
192.85h54.984l36.429-192.85h-48.951l-12.067 82.517c-1.006 3.16-4.402 3.16-5.009 
0l-12.06-82.52zm229.17 0h-91.538v192.85h91.538v-50.569l-50.89 [...]
 }
 
+.custom-icons-hudi {
+  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='%23FFF' 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 4 [...]
+}
+
 .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'/%3 [...]
 }
diff --git a/web/web/src/lib/icons/svg/hudi.svg 
b/web/web/src/lib/icons/svg/hudi.svg
new file mode 100644
index 000000000..8dfc3cb27
--- /dev/null
+++ b/web/web/src/lib/icons/svg/hudi.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"; width="1000" height="1000" viewBox="0 
0 2000 2000">
+  <g id="l65Z6PrNyXPHoWyqfb2ioux" fill="rgb(255,255,255)" style="transform: 
none;">
+    <g style="transform: none;">
+      <path id="pg3BNCSpi" d="M0 1000 l0 -1000 1000 0 1000 0 0 1000 0 1000 
-1000 0 -1000 0 0 -1000z m1529 553 c0 -5 -102 -212 -227 -461 l-228 -453 -22 46 
c-20 42 -25 45 -60 45 l-38 0 -54 -110 c-30 -61 -57 -110 -60 -110 -4 0 -470 924 
-470 933 0 1 59 1 130 -1 l130 -4 0 41 c0 23 -5 51 -10 62 -11 19 -2 19 450 19 
253 0 460 -3 459 -7z m290 -154 l103 -84 -47 -14 -47 -15 6 -111 c8 -127 -5 -191 
-56 -288 -82 -154 -302 -287 -433 -263 -32 6 -33 7 -23 45 l10 38 82 5 c102 7 177 
41 242 110 68 73 96 142 [...]
+    </g>
+  </g>
+  <g id="l4ISrBZ99c0JhgybN4n19ck" fill="rgb(0,179,239)" style="transform: 
none;">
+    <g style="transform: none;">
+      <path id="p7Z6YFxGZ" d="M600 1479 c0 -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 126 3 3 11 -4 19 -14 13 -18 14 -17 14 17 0 28 -46 129 -187 412 
-164 327 -191 375 -210 375 -13 0 -23 -5 -23 -11z"></path>
+      <path id="p1EBFuFvg5" d="M166 1284 c-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 -80 l-24 -79 -33 16 c-93 46 -163 143 
-188 264 -22 105 5 218 72 307 l26 33 -26 37 c-14 20 -35 48 -45 61 l-18 24 -47 
-59z"></path>
+    </g>
+  </g>
+  <g id="l3FOcDZejqb9IedW0GUPJgl" fill="rgb(0,78,127)" style="transform: 
none;">
+    <g style="transform: none;">
+      <path id="p2hKcJKZD" d="M596 1493 c6 -21 3 -22 -78 -26 l-83 -3 90 -2 90 
-2 198 -395 c108 -217 201 -395 205 -394 4 0 92 172 195 382 185 377 210 440 175 
452 -7 2 -189 6 -405 7 l-392 3 5 -22z"></path>
+      <path id="pr5eCnF2i" d="M1320 715 c0 -22 4 -25 35 -25 31 0 35 3 35 25 0 
22 -4 25 -35 25 -31 0 -35 -3 -35 -25z"></path>
+    </g>
+  </g>
+  <g id="l4X0vkAF0oiG3FiqwZsEHPn" fill="rgb(47,91,127)" style="transform: 
none;">
+    <g style="transform: none;">
+      <path id="pt5c96ejB" d="M577 1538 l28 -53 375 -3 c206 -1 378 -6 383 -11 
4 -4 -76 -177 -180 -384 l-187 -376 39 -81 39 -81 258 513 c141 282 257 516 257 
521 1 4 -233 7 -520 7 l-520 0 28 -52z"></path>
+    </g>
+  </g>
+  <g id="l3TOeBmblHmtVFhNvh8YWyt" fill="rgb(1,56,104)" style="transform: 
none;">
+    <g style="transform: none;">
+      <path id="pxcopblt3" d="M1616 1369 c-32 -110 -55 -203 -52 -206 2 -3 39 6 
80 20 l75 25 7 -35 c11 -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 
286 l-6 100 70 23 c38 12 69 24 69 25 0 3 -272 224 -316 258 -8 6 -29 -54 -68 
-193z"></path>
+    </g>
+  </g>
+</svg>
\ 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 8d85779ab..e916fcd5e 100644
--- a/web/web/src/lib/utils/initial.js
+++ b/web/web/src/lib/utils/initial.js
@@ -274,5 +274,24 @@ export const providers = [
         hide: 'simple'
       }
     ]
+  },
+  {
+    label: 'Apache Hudi',
+    value: 'lakehouse-hudi',
+    defaultProps: [
+      {
+        key: 'catalog-backend',
+        value: 'hms',
+        defaultValue: 'hms',
+        required: true,
+        description: 'Apache Hudi catalog type choose properties'
+      },
+      {
+        key: 'uri',
+        value: '',
+        required: true,
+        description: 'Apache Hudi catalog uri config'
+      }
+    ]
   }
 ]

Reply via email to