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