You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yuluo-yx (via GitHub)" <gi...@apache.org> on 2026/09/04 23:37:43 UTC
[PR] feat: add cloud credential usage inventory [rocketmq-dashboard]
yuluo-yx opened a new pull request, #3170:
URL: https://github.com/apache/rocketmq-dashboard/pull/3170
## Summary\n\n- add an on-demand credential-to-instance usage inventory\n- surface unused credentials, vendor mismatches, and orphan credential references\n- support filtering and CSV export without AccessKey or SecretKey fields\n\n## Verification\n\n- `npm test -- --run src/pages/settings/__tests__/cloudCredentialUsage.test.ts src/pages/settings/__tests__/CloudCredentialTab.test.tsx` (17 tests)\n- `npm run lint` (0 errors; 10 pre-existing warnings)\n- `npm run build`\n- scope audit: 751 additions, 4 deletions across 5 files\n\nFixes #3169
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add cloud credential usage inventory [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #3170: feat: add cloud credential usage inventory
URL: https://github.com/apache/rocketmq-dashboard/pull/3170
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add cloud credential usage inventory [rocketmq-dashboard]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on code in PR #3170:
URL: https://github.com/apache/rocketmq-dashboard/pull/3170#discussion_r3938843611
##########
web/src/pages/settings/CloudCredentialUsageDrawer.tsx:
##########
@@ -0,0 +1,360 @@
+/*
+ * 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.
+ */
+
+import { useCallback, useMemo, useState } from 'react';
+import {
+ Alert,
+ Button,
+ Card,
+ Col,
+ Drawer,
+ Empty,
+ Flex,
+ Input,
+ Row,
+ Select,
+ Space,
+ Statistic,
+ Table,
+ Tabs,
+ Tag,
+ Typography,
+ message,
+} from 'antd';
+import { DownloadOutlined, ReloadOutlined } from '@ant-design/icons';
+import type { ColumnsType } from 'antd/es/table';
+import { listCloudCredentials } from '../../api/cloudCredential';
+import type { CloudCredential } from '../../api/cloudCredential';
+import { listInstances } from '../../api/instance';
+import type { InstanceVendor } from '../../api/instance';
+import { useLang } from '../../i18n/LangContext';
+import { buildCsv, downloadCsv } from '../../utils/download';
+import {
+ buildCredentialUsageReport,
+ credentialUsageCsvRows,
+ filterCredentialUsageRows,
+} from './cloudCredentialUsage';
+import type {
+ CredentialUsageRow,
+ CredentialUsageStatus,
+ OrphanCredentialReference,
+} from './cloudCredentialUsage';
+
+const CREDENTIAL_PAGE_SIZE = 100;
+const MAX_CREDENTIAL_PAGES = 100;
+
+interface Props {
+ open: boolean;
+ onClose: () => void;
+}
+
+const loadAllCredentials = async () => {
+ const credentials: CloudCredential[] = [];
Review Comment:
Consider adding a progress indicator or warning when loading large credential sets (up to 10,000). Users may wonder if the operation is stuck on slow connections.
##########
web/src/pages/settings/CloudCredentialUsageDrawer.tsx:
##########
@@ -0,0 +1,360 @@
+/*
+ * 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.
+ */
+
+import { useCallback, useMemo, useState } from 'react';
+import {
+ Alert,
+ Button,
+ Card,
+ Col,
+ Drawer,
+ Empty,
+ Flex,
+ Input,
+ Row,
+ Select,
+ Space,
+ Statistic,
+ Table,
+ Tabs,
+ Tag,
+ Typography,
+ message,
+} from 'antd';
+import { DownloadOutlined, ReloadOutlined } from '@ant-design/icons';
+import type { ColumnsType } from 'antd/es/table';
+import { listCloudCredentials } from '../../api/cloudCredential';
+import type { CloudCredential } from '../../api/cloudCredential';
+import { listInstances } from '../../api/instance';
+import type { InstanceVendor } from '../../api/instance';
+import { useLang } from '../../i18n/LangContext';
+import { buildCsv, downloadCsv } from '../../utils/download';
+import {
+ buildCredentialUsageReport,
+ credentialUsageCsvRows,
+ filterCredentialUsageRows,
+} from './cloudCredentialUsage';
+import type {
+ CredentialUsageRow,
+ CredentialUsageStatus,
+ OrphanCredentialReference,
+} from './cloudCredentialUsage';
+
+const CREDENTIAL_PAGE_SIZE = 100;
+const MAX_CREDENTIAL_PAGES = 100;
+
+interface Props {
+ open: boolean;
+ onClose: () => void;
+}
+
+const loadAllCredentials = async () => {
+ const credentials: CloudCredential[] = [];
+ for (let page = 1; page <= MAX_CREDENTIAL_PAGES; page += 1) {
+ const result = await listCloudCredentials(undefined, undefined, page, CREDENTIAL_PAGE_SIZE);
+ credentials.push(...result.items);
+ if (credentials.length >= result.total || result.items.length < CREDENTIAL_PAGE_SIZE) {
+ return credentials;
+ }
+ }
Review Comment:
The error message credential page limit exceeded is developer-facing. Consider a user-friendly message.
--
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@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: add cloud credential usage inventory [rocketmq-dashboard]
Posted by "yuluo-yx (via GitHub)" <gi...@apache.org>.
yuluo-yx commented on PR #3170:
URL: https://github.com/apache/rocketmq-dashboard/pull/3170#issuecomment-5658708414
@lizhimins,if you have times,pls take a look 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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org