- 增加资源备注功能
- 修改全部弹窗居中显示
This commit is contained in:
parent
552b91619f
commit
4085677c5a
@ -97,6 +97,10 @@ func AssetUpdateEndpoint(c echo.Context) error {
|
|||||||
item.Tags = "-"
|
item.Tags = "-"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if item.Description == "" {
|
||||||
|
item.Description = "-"
|
||||||
|
}
|
||||||
|
|
||||||
model.UpdateAssetById(&item, id)
|
model.UpdateAssetById(&item, id)
|
||||||
|
|
||||||
return Success(c, nil)
|
return Success(c, nil)
|
||||||
|
@ -128,6 +128,7 @@ class LoginForm extends Component {
|
|||||||
|
|
||||||
<Modal title="双因素认证" visible={this.state.totpModalVisible} confirmLoading={this.state.confirmLoading}
|
<Modal title="双因素认证" visible={this.state.totpModalVisible} confirmLoading={this.state.confirmLoading}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
this.formRef.current
|
this.formRef.current
|
||||||
.validateFields()
|
.validateFields()
|
||||||
|
@ -621,6 +621,7 @@ class Access extends Component {
|
|||||||
title="剪贴板"
|
title="剪贴板"
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
visible={this.state.clipboardVisible}
|
visible={this.state.clipboardVisible}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
this.clipboardFormRef.current
|
this.clipboardFormRef.current
|
||||||
.validateFields()
|
.validateFields()
|
||||||
|
@ -709,6 +709,7 @@ class Asset extends Component {
|
|||||||
</Text>}
|
</Text>}
|
||||||
visible={this.state.changeOwnerModalVisible}
|
visible={this.state.changeOwnerModalVisible}
|
||||||
confirmLoading={this.state.changeOwnerConfirmLoading}
|
confirmLoading={this.state.changeOwnerConfirmLoading}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
changeOwnerConfirmLoading: true
|
changeOwnerConfirmLoading: true
|
||||||
@ -771,6 +772,7 @@ class Asset extends Component {
|
|||||||
</Text>}
|
</Text>}
|
||||||
visible={this.state.changeSharerModalVisible}
|
visible={this.state.changeSharerModalVisible}
|
||||||
confirmLoading={this.state.changeSharerConfirmLoading}
|
confirmLoading={this.state.changeSharerConfirmLoading}
|
||||||
|
centered={true}
|
||||||
onOk={async () => {
|
onOk={async () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
changeSharerConfirmLoading: true
|
changeSharerConfirmLoading: true
|
||||||
|
@ -98,6 +98,7 @@ const AssetModal = function ({title, visible, handleOk, handleCancel, confirmLoa
|
|||||||
title={title}
|
title={title}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
form
|
form
|
||||||
.validateFields()
|
.validateFields()
|
||||||
@ -137,7 +138,7 @@ const AssetModal = function ({title, visible, handleOk, handleCancel, confirmLoa
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item label="端口号" name='port' rules={[{required: true, message: '请输入资产端口'}]}>
|
<Form.Item label="端口号" name='port' rules={[{required: true, message: '请输入资产端口'}]}>
|
||||||
<InputNumber min={1} max={65535}/>
|
<InputNumber min={1} max={65535} placeholder='TCP端口'/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
<Form.Item label="账户类型" name='accountType' rules={[{required: true, message: '请选择接账户类型'}]}>
|
<Form.Item label="账户类型" name='accountType' rules={[{required: true, message: '请选择接账户类型'}]}>
|
||||||
@ -198,7 +199,7 @@ const AssetModal = function ({title, visible, handleOk, handleCancel, confirmLoa
|
|||||||
}
|
}
|
||||||
|
|
||||||
<Form.Item label="标签" name='tags'>
|
<Form.Item label="标签" name='tags'>
|
||||||
<Select mode="tags" placeholder="请选择标签">
|
<Select mode="tags" placeholder="标签可以更加方便的检索资产">
|
||||||
{tags.map(tag => {
|
{tags.map(tag => {
|
||||||
if (tag === '-') {
|
if (tag === '-') {
|
||||||
return undefined;
|
return undefined;
|
||||||
@ -207,6 +208,10 @@ const AssetModal = function ({title, visible, handleOk, handleCancel, confirmLoa
|
|||||||
})}
|
})}
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
<Form.Item label="备注" name='description'>
|
||||||
|
<TextArea rows={4} placeholder='关于资产的一些信息您可以写在这里'/>
|
||||||
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
)
|
)
|
||||||
|
@ -644,6 +644,7 @@ class DynamicCommand extends Component {
|
|||||||
<Modal
|
<Modal
|
||||||
title="选择资产"
|
title="选择资产"
|
||||||
visible={this.state.assetsVisible}
|
visible={this.state.assetsVisible}
|
||||||
|
centered={true}
|
||||||
onOk={this.executeCommand}
|
onOk={this.executeCommand}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -671,6 +672,7 @@ class DynamicCommand extends Component {
|
|||||||
</Text>}
|
</Text>}
|
||||||
visible={this.state.changeOwnerModalVisible}
|
visible={this.state.changeOwnerModalVisible}
|
||||||
confirmLoading={this.state.changeOwnerConfirmLoading}
|
confirmLoading={this.state.changeOwnerConfirmLoading}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
changeOwnerConfirmLoading: true
|
changeOwnerConfirmLoading: true
|
||||||
@ -731,6 +733,7 @@ class DynamicCommand extends Component {
|
|||||||
style={{color: '#1890ff'}}>{this.state.selected['name']}</strong>」的授权人
|
style={{color: '#1890ff'}}>{this.state.selected['name']}</strong>」的授权人
|
||||||
</Text>}
|
</Text>}
|
||||||
visible={this.state.changeSharerModalVisible}
|
visible={this.state.changeSharerModalVisible}
|
||||||
|
centered={true}
|
||||||
confirmLoading={this.state.changeSharerConfirmLoading}
|
confirmLoading={this.state.changeSharerConfirmLoading}
|
||||||
onOk={async () => {
|
onOk={async () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -21,6 +21,7 @@ const DynamicCommandModal = ({title, visible, handleOk, handleCancel, confirmLoa
|
|||||||
title={title}
|
title={title}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
form
|
form
|
||||||
.validateFields()
|
.validateFields()
|
||||||
|
@ -587,6 +587,7 @@ class Credential extends Component {
|
|||||||
</Text>}
|
</Text>}
|
||||||
visible={this.state.changeOwnerModalVisible}
|
visible={this.state.changeOwnerModalVisible}
|
||||||
confirmLoading={this.state.changeOwnerConfirmLoading}
|
confirmLoading={this.state.changeOwnerConfirmLoading}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
changeOwnerConfirmLoading: true
|
changeOwnerConfirmLoading: true
|
||||||
@ -645,6 +646,7 @@ class Credential extends Component {
|
|||||||
</Text>}
|
</Text>}
|
||||||
visible={this.state.changeSharerModalVisible}
|
visible={this.state.changeSharerModalVisible}
|
||||||
confirmLoading={this.state.changeSharerConfirmLoading}
|
confirmLoading={this.state.changeSharerConfirmLoading}
|
||||||
|
centered={true}
|
||||||
onOk={async () => {
|
onOk={async () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
changeSharerConfirmLoading: true
|
changeSharerConfirmLoading: true
|
||||||
|
@ -47,7 +47,7 @@ const CredentialModal = ({title, visible, handleOk, handleCancel, confirmLoading
|
|||||||
title={title}
|
title={title}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
form
|
form
|
||||||
.validateFields()
|
.validateFields()
|
||||||
|
@ -479,10 +479,9 @@ class OfflineSession extends Component {
|
|||||||
<Modal
|
<Modal
|
||||||
className='monitor'
|
className='monitor'
|
||||||
title="会话回放"
|
title="会话回放"
|
||||||
centered
|
centered={true}
|
||||||
visible={this.state.playbackVisible}
|
visible={this.state.playbackVisible}
|
||||||
onCancel={this.hidePlayback}
|
onCancel={this.hidePlayback}
|
||||||
|
|
||||||
width={window.innerWidth * 0.8}
|
width={window.innerWidth * 0.8}
|
||||||
footer={null}
|
footer={null}
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
|
@ -475,7 +475,7 @@ class OnlineSession extends Component {
|
|||||||
<Modal
|
<Modal
|
||||||
className='monitor'
|
className='monitor'
|
||||||
title={this.state.sessionTitle}
|
title={this.state.sessionTitle}
|
||||||
centered
|
centered={true}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
visible={this.state.accessVisible}
|
visible={this.state.accessVisible}
|
||||||
footer={null}
|
footer={null}
|
||||||
|
@ -590,6 +590,7 @@ class User extends Component {
|
|||||||
width={window.innerWidth * 0.8}
|
width={window.innerWidth * 0.8}
|
||||||
title='已授权资产'
|
title='已授权资产'
|
||||||
visible={this.state.assetVisible}
|
visible={this.state.assetVisible}
|
||||||
|
centered={true}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
@ -610,6 +611,7 @@ class User extends Component {
|
|||||||
<Modal title="修改密码" visible={this.state.changePasswordVisible}
|
<Modal title="修改密码" visible={this.state.changePasswordVisible}
|
||||||
confirmLoading={this.state.changePasswordConfirmLoading}
|
confirmLoading={this.state.changePasswordConfirmLoading}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
this.changePasswordFormRef.current
|
this.changePasswordFormRef.current
|
||||||
.validateFields()
|
.validateFields()
|
||||||
|
@ -435,6 +435,7 @@ class UserGroup extends Component {
|
|||||||
title='已授权资产'
|
title='已授权资产'
|
||||||
visible={this.state.assetVisible}
|
visible={this.state.assetVisible}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
centered={true}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ const UserGroupModal = ({
|
|||||||
visible={visible}
|
visible={visible}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
destroyOnClose={true}
|
destroyOnClose={true}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
form
|
form
|
||||||
.validateFields()
|
.validateFields()
|
||||||
|
@ -15,6 +15,7 @@ const UserModal = ({title, visible, handleOk, handleCancel, confirmLoading, mode
|
|||||||
title={title}
|
title={title}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
centered={true}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
form
|
form
|
||||||
.validateFields()
|
.validateFields()
|
||||||
|
Loading…
Reference in New Issue
Block a user