You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "bluewang (via GitHub)" <gi...@apache.org> on 2023/06/01 07:40:55 UTC
[GitHub] [inlong] bluewang opened a new pull request, #8139: [INLONG-8134][Dashboard] Group supports viewing resource details
bluewang opened a new pull request, #8139:
URL: https://github.com/apache/inlong/pull/8139
### Prepare a Pull Request
*(Change the title refer to the following example)*
- Title Example: [INLONG-XYZ][Component] Title of the pull request
*(The following *XYZ* should be replaced by the actual [GitHub Issue](https://github.com/apache/inlong/issues) number)*
### Verifying this change

--
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: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [inlong] healchow commented on a diff in pull request #8139: [INLONG-8134][Dashboard] Group supports viewing resource details
Posted by "healchow (via GitHub)" <gi...@apache.org>.
healchow commented on code in PR #8139:
URL: https://github.com/apache/inlong/pull/8139#discussion_r1215533894
##########
inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx:
##########
@@ -0,0 +1,172 @@
+/*
+ * 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 React, { useEffect, useMemo, forwardRef, useState } from 'react';
+import { Divider, Table } from 'antd';
+import FormGenerator, { useForm } from '@/ui/components/FormGenerator';
+import { useRequest } from '@/ui/hooks';
+import { useTranslation } from 'react-i18next';
+import { CommonInterface } from '../common';
+
+type Props = CommonInterface;
+
+const Comp = ({ inlongGroupId, isCreate }: Props, ref) => {
+ const { t } = useTranslation();
+
+ const [form] = useForm();
+
+ const title = [
+ {
+ label: 'Agent',
+ value: 'AGENT',
+ },
+ {
+ label: 'DataProxy',
+ value: 'DATAPROXY',
+ },
+ {
+ label: 'Pulsar',
+ value: 'PULSAR',
+ },
+ {
+ label: 'TubeMQ',
+ value: 'TUBEMQ',
+ },
+ {
+ label: 'SortZookeeper',
+ value: 'ZOOKEEPER',
+ },
+ {
+ label: 'DbsyncZk',
+ value: 'DBSYNC_ZK',
+ },
+ {
+ label: 'SortThive',
+ value: 'SORT_THIVE',
+ },
+ {
+ label: 'SortCK',
+ value: 'SORT_CK',
Review Comment:
Where are these cluster types used?
--
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: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [inlong] dockerzhang merged pull request #8139: [INLONG-8134][Dashboard] Group supports viewing resource details
Posted by "dockerzhang (via GitHub)" <gi...@apache.org>.
dockerzhang merged PR #8139:
URL: https://github.com/apache/inlong/pull/8139
--
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: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [inlong] leezng commented on a diff in pull request #8139: [INLONG-8134][Dashboard] Group supports viewing resource details
Posted by "leezng (via GitHub)" <gi...@apache.org>.
leezng commented on code in PR #8139:
URL: https://github.com/apache/inlong/pull/8139#discussion_r1217720529
##########
inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx:
##########
@@ -0,0 +1,138 @@
+/*
+ * 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 React, { useEffect, useMemo, forwardRef, useState } from 'react';
+import { Divider, Table } from 'antd';
+import FormGenerator, { useForm } from '@/ui/components/FormGenerator';
+import { useRequest } from '@/ui/hooks';
+import { useTranslation } from 'react-i18next';
+import { CommonInterface } from '../common';
+import { clusters } from '@/plugins/clusters';
+
+type Props = CommonInterface;
+
+const Comp = ({ inlongGroupId, isCreate }: Props, ref) => {
+ const { t } = useTranslation();
+
+ const [form] = useForm();
+
+ const isUpdate = useMemo(() => {
+ return !!inlongGroupId;
+ }, [inlongGroupId]);
+
+ const { data, run: getData } = useRequest(`/group/detail/${inlongGroupId}`, {
+ ready: isUpdate,
+ refreshDeps: [inlongGroupId],
+ formatResult: data => ({
+ ...data,
+ }),
+ });
+
+ useEffect(() => {
+ getData();
+ }, [getData]);
+
+ const formContent = item => {
+ let content = [];
+ if (data[item].constructor === Object) {
+ for (const key in data[item]) {
+ content.push({
+ label: key,
+ name: key,
+ type: 'text',
+ initialValue: data[item][key],
+ });
+ }
+ return content;
+ }
+ };
+
+ const dividerInfo = data => {
+ let info = [];
+ for (const item in data) {
+ if (data[item] !== null && item !== 'SortInfo' && item !== 'PULSAR') {
+ info.push(item);
+ }
+ }
+ return info;
+ };
+
+ return (
+ <div style={{ position: 'relative' }}>
+ {dividerInfo(data).map(item => {
+ return (
+ <>
+ <Divider orientation="left">
+ {clusters.find(c => c.value === item)?.label || item}{' '}
+ {t('pages.GroupDetail.Resource.Info')}
+ </Divider>
+ <FormGenerator
+ form={form}
+ content={formContent(item)}
+ initialValues={data}
+ useMaxWidth={1400}
+ col={12}
+ />
+ </>
+ );
+ })}
+ {data?.hasOwnProperty('PULSAR') && (
+ <Divider orientation="left" style={{ marginTop: 40 }}>
+ Pulsar {t('pages.GroupDetail.Resource.Info')}
+ </Divider>
+ )}
+ {data?.hasOwnProperty('PULSAR') && (
Review Comment:
Can this duplicate code be merged?
--
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: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [inlong] bluewang commented on a diff in pull request #8139: [INLONG-8134][Dashboard] Group supports viewing resource details
Posted by "bluewang (via GitHub)" <gi...@apache.org>.
bluewang commented on code in PR #8139:
URL: https://github.com/apache/inlong/pull/8139#discussion_r1217379940
##########
inlong-dashboard/src/ui/pages/GroupDetail/ResourceInfo/index.tsx:
##########
@@ -0,0 +1,172 @@
+/*
+ * 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 React, { useEffect, useMemo, forwardRef, useState } from 'react';
+import { Divider, Table } from 'antd';
+import FormGenerator, { useForm } from '@/ui/components/FormGenerator';
+import { useRequest } from '@/ui/hooks';
+import { useTranslation } from 'react-i18next';
+import { CommonInterface } from '../common';
+
+type Props = CommonInterface;
+
+const Comp = ({ inlongGroupId, isCreate }: Props, ref) => {
+ const { t } = useTranslation();
+
+ const [form] = useForm();
+
+ const title = [
+ {
+ label: 'Agent',
+ value: 'AGENT',
+ },
+ {
+ label: 'DataProxy',
+ value: 'DATAPROXY',
+ },
+ {
+ label: 'Pulsar',
+ value: 'PULSAR',
+ },
+ {
+ label: 'TubeMQ',
+ value: 'TUBEMQ',
+ },
+ {
+ label: 'SortZookeeper',
+ value: 'ZOOKEEPER',
+ },
+ {
+ label: 'DbsyncZk',
+ value: 'DBSYNC_ZK',
+ },
+ {
+ label: 'SortThive',
+ value: 'SORT_THIVE',
+ },
+ {
+ label: 'SortCK',
+ value: 'SORT_CK',
Review Comment:
> Where are these cluster types used?
used in this place

--
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: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org