liuxiran commented on a change in pull request #1434: URL: https://github.com/apache/apisix-dashboard/pull/1434#discussion_r571234600
########## File path: web/src/pages/ServerInfo/List.tsx ########## @@ -51,58 +53,84 @@ const ServerInfo: React.FC = () => { setData(list[0]); } }); + + fetchVersion().then(({ commit_hash, version }) => { + setCommitHash(commit_hash); + setDashboardVersion(version); + }) }, []); return ( - <PageContainer title={formatMessage({ id: 'page.serverinfo.pageContainer.title' })}> - <div className={styles.select}> - <Form form={form}> - <Form.Item wrapperCol={{ span: 5 }} style={{ marginBottom: 0 }} name="nodeId"> - <Select - placeholder={formatMessage({ id: 'page.serverinfo.select.placeholder' })} - onChange={(value) => { - setData( - nodeList.find((item) => { - return item.id === value; - }), - ); - }} - > - {nodeList.map((item) => ( - <Option key={item.hostname} value={item.id}> - {item.hostname} - </Option> - ))} + <PageContainer title={formatMessage({ id: 'page.systemStatus.pageContainer.title' })}> + <Card title={formatMessage({ id: 'page.systemStatus.dashboardInfo' })} bodyStyle={{ padding: 0 }} style={{ marginBottom: 15 }}> + <div className={styles.wrap} > + {nodeList.length > 0 && ( Review comment: just to make sure that wether the dashboard `git hash` `version` and `APISIX info` are Independent, which means: users will see the dashboard `git hash` and `version` no matter whether `server-info` plugin is enabled or not if so , IMHO, we should remove `nodeList.lenght > 0` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org