Re: [PR] [#4362] feat(web): Add GitHub stars and forks number for WebUI [gravitino]

2024-11-21 Thread via GitHub


LauraXia123 commented on PR #5567:
URL: https://github.com/apache/gravitino/pull/5567#issuecomment-2490465749

   Thank you very much for your contribution. LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] [#4362] feat(web): Add GitHub stars and forks number for WebUI [gravitino]

2024-11-21 Thread via GitHub


xunliu merged PR #5567:
URL: https://github.com/apache/gravitino/pull/5567


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] [#4362] feat(web): Add GitHub stars and forks number for WebUI [gravitino]

2024-11-20 Thread via GitHub


LauraXia123 commented on code in PR #5567:
URL: https://github.com/apache/gravitino/pull/5567#discussion_r1851251962


##
web/web/src/app/rootLayout/AppBar.js:
##
@@ -38,9 +38,11 @@ import {
 } from '@mui/material'
 
 import clsx from 'clsx'
+import axios from 'axios'

Review Comment:
   ```suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] [#4362] feat(web): Add GitHub stars and forks number for WebUI [gravitino]

2024-11-20 Thread via GitHub


SZL741023 commented on code in PR #5567:
URL: https://github.com/apache/gravitino/pull/5567#discussion_r1850076747


##
web/web/src/lib/api/github/index.js:
##
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { defHttp } from '@/lib/utils/axios'
+import { ContentTypeEnum } from '@/lib/enums/httpEnum'
+
+const githubApis = {
+  headers: {
+'Content-Type': ContentTypeEnum.JSON,
+Accept: 'application/vnd.github+json'
+  },

Review Comment:
   Done.
   Thanks for suggestion.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] [#4362] feat(web): Add GitHub stars and forks number for WebUI [gravitino]

2024-11-19 Thread via GitHub


SZL741023 commented on code in PR #5567:
URL: https://github.com/apache/gravitino/pull/5567#discussion_r1849443633


##
web/web/src/app/rootLayout/AppBar.js:
##
@@ -64,6 +66,7 @@ const AppBar = () => {
 const metalakeItems = store.metalakes.map(i => i.name)
 setMetalakes(metalakeItems)
 // eslint-disable-next-line react-hooks/exhaustive-deps
+axios.get('/')

Review Comment:
   For testing axios function, I forget to remove it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] [#4362] feat(web): Add GitHub stars and forks number for WebUI [gravitino]

2024-11-19 Thread via GitHub


LauraXia123 commented on code in PR #5567:
URL: https://github.com/apache/gravitino/pull/5567#discussion_r1846046848


##
web/web/src/app/rootLayout/GitHubInfo.js:
##
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import Link from 'next/link'
+import Image from 'next/image'
+import { Box, Typography } from '@mui/material'
+import { Star } from '@mui/icons-material'
+
+const GitHubInfo = ({ stars, forks, username, repository }) => {
+  const githubUrl = `https://github.com/${username}/${repository}`
+  const githubForkUrl = `https://github.com/${username}/${repository}/fork`
+  const githubLogoUrl = (process.env.NEXT_PUBLIC_BASE_PATH ?? '') + 
'/icons/github-mark.svg'
+  const forkLogoUrl = (process.env.NEXT_PUBLIC_BASE_PATH ?? '') + 
'/icons/git-fork.svg'
+
+  return (
+
+  
+
+  
+  
+
+  
+http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { defHttp } from '@/lib/utils/axios'
+import { ContentTypeEnum } from '@/lib/enums/httpEnum'
+
+const githubApis = {
+  headers: {
+'Content-Type': ContentTypeEnum.JSON,
+Accept: 'application/vnd.github+json'
+  },

Review Comment:
   The `headers` here can be removed.



##
web/web/src/app/rootLayout/AppBar.js:
##
@@ -64,6 +66,7 @@ const AppBar = () => {
 const metalakeItems = store.metalakes.map(i => i.name)
 setMetalakes(metalakeItems)
 // eslint-disable-next-line react-hooks/exhaustive-deps
+axios.get('/')

Review Comment:
   What is this request for?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] [#4362] feat(web): Add GitHub stars and forks number for WebUI [gravitino]

2024-11-19 Thread via GitHub


SZL741023 commented on code in PR #5567:
URL: https://github.com/apache/gravitino/pull/5567#discussion_r1849443633


##
web/web/src/app/rootLayout/AppBar.js:
##
@@ -64,6 +66,7 @@ const AppBar = () => {
 const metalakeItems = store.metalakes.map(i => i.name)
 setMetalakes(metalakeItems)
 // eslint-disable-next-line react-hooks/exhaustive-deps
+axios.get('/')

Review Comment:
   For testing axios function, I forget to remove it.
   I will remove it later.
   thx 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] [#4362] feat(web): Add GitHub stars and forks number for WebUI [gravitino]

2024-11-19 Thread via GitHub


SZL741023 commented on code in PR #5567:
URL: https://github.com/apache/gravitino/pull/5567#discussion_r1849443943


##
web/web/src/lib/api/github/index.js:
##
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { defHttp } from '@/lib/utils/axios'
+import { ContentTypeEnum } from '@/lib/enums/httpEnum'
+
+const githubApis = {
+  headers: {
+'Content-Type': ContentTypeEnum.JSON,
+Accept: 'application/vnd.github+json'
+  },

Review Comment:
   OK, I will remove it later.
   thx



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]