display the namespace on add,edit,detail configuration page #(9827) (#9845)
* display the namespace on add,edit,detail configuration page and resolve junit test problem #(9827) * delete duplicate UT code --------- Co-authored-by: githubcheng2978 <yeliang.cheng@freemud.com>
This commit is contained in:
parent
0c9f08130e
commit
e736455713
@ -262,6 +262,7 @@ const I18N_CONF = {
|
|||||||
sourceIp: 'Source IP',
|
sourceIp: 'Source IP',
|
||||||
configureContent: 'Configuration Content',
|
configureContent: 'Configuration Content',
|
||||||
back: 'Back',
|
back: 'Back',
|
||||||
|
namespace: 'Namespace',
|
||||||
},
|
},
|
||||||
DashboardCard: {
|
DashboardCard: {
|
||||||
importantReminder0: 'Important reminder',
|
importantReminder0: 'Important reminder',
|
||||||
@ -385,6 +386,7 @@ const I18N_CONF = {
|
|||||||
confirmSyanx: 'The configuration information may has a syntax error. Are you sure to submit?',
|
confirmSyanx: 'The configuration information may has a syntax error. Are you sure to submit?',
|
||||||
dataIdExists: 'Configuration already exists. Enter a new Data ID and Group name.',
|
dataIdExists: 'Configuration already exists. Enter a new Data ID and Group name.',
|
||||||
dataRequired: 'Data cannot be empty, submission failed',
|
dataRequired: 'Data cannot be empty, submission failed',
|
||||||
|
namespace: 'Namespace',
|
||||||
},
|
},
|
||||||
CloneDialog: {
|
CloneDialog: {
|
||||||
terminate: 'Terminate',
|
terminate: 'Terminate',
|
||||||
@ -446,6 +448,7 @@ const I18N_CONF = {
|
|||||||
dialogCurrentArea: 'Current Value',
|
dialogCurrentArea: 'Current Value',
|
||||||
dialogOriginalArea: 'Original Value',
|
dialogOriginalArea: 'Original Value',
|
||||||
publishFailed403: 'Publish failed. No operation permission',
|
publishFailed403: 'Publish failed. No operation permission',
|
||||||
|
namespace: 'Namespace',
|
||||||
},
|
},
|
||||||
EditorNameSpace: {
|
EditorNameSpace: {
|
||||||
notice: 'Notice',
|
notice: 'Notice',
|
||||||
@ -544,6 +547,7 @@ const I18N_CONF = {
|
|||||||
groupInput: 'Please Enter Group',
|
groupInput: 'Please Enter Group',
|
||||||
namespaceSelect: 'Please Select namespace',
|
namespaceSelect: 'Please Select namespace',
|
||||||
configNotFind: 'The Configuration is not found, Please select again',
|
configNotFind: 'The Configuration is not found, Please select again',
|
||||||
|
namespace: 'Namespace',
|
||||||
},
|
},
|
||||||
ConfigRollback: {
|
ConfigRollback: {
|
||||||
rollBack: 'Roll Back',
|
rollBack: 'Roll Back',
|
||||||
@ -561,6 +565,7 @@ const I18N_CONF = {
|
|||||||
update: 'Update',
|
update: 'Update',
|
||||||
insert: 'Insert',
|
insert: 'Insert',
|
||||||
additionalRollbackMessage: 'This operation will delete the below config!',
|
additionalRollbackMessage: 'This operation will delete the below config!',
|
||||||
|
namespace: 'Namespace',
|
||||||
},
|
},
|
||||||
UserManagement: {
|
UserManagement: {
|
||||||
userManagement: 'User Management',
|
userManagement: 'User Management',
|
||||||
|
@ -260,6 +260,7 @@ const I18N_CONF = {
|
|||||||
operator: '操作人',
|
operator: '操作人',
|
||||||
sourceIp: '来源 IP',
|
sourceIp: '来源 IP',
|
||||||
back: '返回',
|
back: '返回',
|
||||||
|
namespace: '命名空间',
|
||||||
},
|
},
|
||||||
DashboardCard: {
|
DashboardCard: {
|
||||||
importantReminder0: '重要提醒',
|
importantReminder0: '重要提醒',
|
||||||
@ -381,6 +382,7 @@ const I18N_CONF = {
|
|||||||
confirmSyanx: '配置信息可能有语法错误, 确定提交吗?',
|
confirmSyanx: '配置信息可能有语法错误, 确定提交吗?',
|
||||||
dataIdExists: '配置已存在, 试试别的dataid和group的组合吧',
|
dataIdExists: '配置已存在, 试试别的dataid和group的组合吧',
|
||||||
dataRequired: '数据不能为空, 提交失败',
|
dataRequired: '数据不能为空, 提交失败',
|
||||||
|
namespace: '命名空间',
|
||||||
},
|
},
|
||||||
CloneDialog: {
|
CloneDialog: {
|
||||||
terminate: '终止克隆',
|
terminate: '终止克隆',
|
||||||
@ -442,6 +444,7 @@ const I18N_CONF = {
|
|||||||
dialogCurrentArea: '当前值',
|
dialogCurrentArea: '当前值',
|
||||||
dialogOriginalArea: '原始值',
|
dialogOriginalArea: '原始值',
|
||||||
publishFailed403: '发布失败,请检查是否有权限',
|
publishFailed403: '发布失败,请检查是否有权限',
|
||||||
|
namespace: '命名空间',
|
||||||
},
|
},
|
||||||
EditorNameSpace: {
|
EditorNameSpace: {
|
||||||
notice: '提示',
|
notice: '提示',
|
||||||
@ -539,6 +542,7 @@ const I18N_CONF = {
|
|||||||
groupInput: '请输入Group',
|
groupInput: '请输入Group',
|
||||||
namespaceSelect: '请选择命名空间',
|
namespaceSelect: '请选择命名空间',
|
||||||
configNotFind: '未查询到指定配置,请重新选择',
|
configNotFind: '未查询到指定配置,请重新选择',
|
||||||
|
namespace: '命名空间',
|
||||||
},
|
},
|
||||||
ConfigRollback: {
|
ConfigRollback: {
|
||||||
rollBack: '回滚配置',
|
rollBack: '回滚配置',
|
||||||
@ -556,6 +560,7 @@ const I18N_CONF = {
|
|||||||
update: '更新',
|
update: '更新',
|
||||||
insert: '插入',
|
insert: '插入',
|
||||||
additionalRollbackMessage: '此操作将删除以下配置!',
|
additionalRollbackMessage: '此操作将删除以下配置!',
|
||||||
|
namespace: '命名空间',
|
||||||
},
|
},
|
||||||
UserManagement: {
|
UserManagement: {
|
||||||
userManagement: '用户管理',
|
userManagement: '用户管理',
|
||||||
|
@ -318,6 +318,9 @@ class ConfigDetail extends React.Component {
|
|||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
<Form inline={false} field={this.field} {...formItemLayout}>
|
<Form inline={false} field={this.field} {...formItemLayout}>
|
||||||
|
<FormItem label={locale.namespace} required>
|
||||||
|
<p>{this.tenant}</p>
|
||||||
|
</FormItem>
|
||||||
<FormItem label={'Data ID'} required>
|
<FormItem label={'Data ID'} required>
|
||||||
<Input htmlType={'text'} readOnly {...init('dataId')} />
|
<Input htmlType={'text'} readOnly {...init('dataId')} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
@ -613,6 +613,9 @@ class ConfigEditor extends React.Component {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<Form field={this.field}>
|
<Form field={this.field}>
|
||||||
|
<FormItem label={locale.namespace} required>
|
||||||
|
<p>{this.tenant}</p>
|
||||||
|
</FormItem>
|
||||||
<FormItem label="Data ID" {...formItemLayout}>
|
<FormItem label="Data ID" {...formItemLayout}>
|
||||||
<Input
|
<Input
|
||||||
disabled
|
disabled
|
||||||
|
@ -92,6 +92,7 @@ class ConfigEditor extends React.Component {
|
|||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const isNewConfig = !getParams('dataId');
|
const isNewConfig = !getParams('dataId');
|
||||||
const group = getParams('group').trim();
|
const group = getParams('group').trim();
|
||||||
|
this.tenant = getParams('namespace') || '';
|
||||||
this.setState({ isNewConfig }, () => {
|
this.setState({ isNewConfig }, () => {
|
||||||
if (!isNewConfig) {
|
if (!isNewConfig) {
|
||||||
this.changeForm(
|
this.changeForm(
|
||||||
@ -493,6 +494,9 @@ class ConfigEditor extends React.Component {
|
|||||||
</Tab>
|
</Tab>
|
||||||
)}
|
)}
|
||||||
<Form className="new-config-form" {...formItemLayout}>
|
<Form className="new-config-form" {...formItemLayout}>
|
||||||
|
<Form.Item label={locale.namespace} required>
|
||||||
|
<p>{this.tenant}</p>
|
||||||
|
</Form.Item>
|
||||||
<Form.Item label="Data ID" required {...dataIdError}>
|
<Form.Item label="Data ID" required {...dataIdError}>
|
||||||
<Input
|
<Input
|
||||||
value={form.dataId}
|
value={form.dataId}
|
||||||
|
@ -196,6 +196,9 @@ class ConfigRollback extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<h1>{locale.configurationRollback}</h1>
|
<h1>{locale.configurationRollback}</h1>
|
||||||
<Form field={this.field}>
|
<Form field={this.field}>
|
||||||
|
<FormItem label={locale.namespace} required {...formItemLayout}>
|
||||||
|
<p>{this.tenant}</p>
|
||||||
|
</FormItem>
|
||||||
<FormItem label="Data ID" required {...formItemLayout}>
|
<FormItem label="Data ID" required {...formItemLayout}>
|
||||||
<Input htmlType="text" readOnly {...init('dataId')} />
|
<Input htmlType="text" readOnly {...init('dataId')} />
|
||||||
<div style={{ marginTop: 10 }}>
|
<div style={{ marginTop: 10 }}>
|
||||||
|
@ -113,6 +113,9 @@ class HistoryDetail extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<h1>{locale.historyDetails}</h1>
|
<h1>{locale.historyDetails}</h1>
|
||||||
<Form field={this.field}>
|
<Form field={this.field}>
|
||||||
|
<Form.Item label={locale.namespace} required {...formItemLayout}>
|
||||||
|
<p>{this.tenant}</p>
|
||||||
|
</Form.Item>
|
||||||
<Form.Item label="Data ID" required {...formItemLayout}>
|
<Form.Item label="Data ID" required {...formItemLayout}>
|
||||||
<Input htmlType="text" readOnly {...init('dataId')} />
|
<Input htmlType="text" readOnly {...init('dataId')} />
|
||||||
<div style={{ marginTop: 10 }}>
|
<div style={{ marginTop: 10 }}>
|
||||||
|
@ -471,6 +471,9 @@ class NewConfig extends React.Component {
|
|||||||
>
|
>
|
||||||
<h1>{locale.newListing}</h1>
|
<h1>{locale.newListing}</h1>
|
||||||
<Form className="new-config-form" field={this.field} {...formItemLayout}>
|
<Form className="new-config-form" field={this.field} {...formItemLayout}>
|
||||||
|
<Form.Item label={locale.namespace} required>
|
||||||
|
<p>{this.tenant}</p>
|
||||||
|
</Form.Item>
|
||||||
<FormItem label={'Data ID'} required>
|
<FormItem label={'Data ID'} required>
|
||||||
<Input
|
<Input
|
||||||
{...init('dataId', {
|
{...init('dataId', {
|
||||||
|
Loading…
Reference in New Issue
Block a user