mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
Merge pull request #13559 from dataease/pr@dev-v2@perf_login_validate
Pr@dev v2@perf login validate
This commit is contained in:
commit
7a87a511ce
13
core/core-frontend/public/svg/relation-dataset.svg
Normal file
13
core/core-frontend/public/svg/relation-dataset.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<svg width="200" height="32" viewBox="0 0 200 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.5" y="0.5" width="199" height="31" rx="3.5" fill="white"/>
|
||||
<rect x="0.5" y="0.5" width="199" height="31" rx="3.5" stroke="#DEE0E3"/>
|
||||
<g clip-path="url(#clip0_20303_369744)">
|
||||
<path d="M12 10C12 8.34315 13.5985 7 15.5702 7H26.4298C28.4015 7 30 8.34315 30 10V22C30 23.6569 28.4015 25 26.4298 25H15.5702C13.5985 25 12 23.6569 12 22V10Z" fill="#14C0FF"/>
|
||||
<path d="M15.5 13.822C15.5 13.626 15.6146 13.448 15.7931 13.3669L20.7931 11.0941C20.9246 11.0344 21.0754 11.0344 21.2069 11.0941L26.2069 13.3669C26.3854 13.448 26.5 13.626 26.5 13.822V18.6911C26.5 18.8805 26.393 19.0536 26.2236 19.1383L21.2236 21.6383C21.0828 21.7087 20.9172 21.7087 20.7764 21.6383L15.7764 19.1383C15.607 19.0536 15.5 18.8805 15.5 18.6911V13.822ZM24.6089 13.739L21 12.0985L17.3716 13.7478L20.98 15.3022L24.6089 13.739ZM21.5 16.167V20.3821L25.5 18.3821V14.4439L21.5 16.167ZM16.5 14.4612V18.3821L20.5 20.3821V16.1843L16.5 14.4612Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_20303_369744">
|
||||
<rect width="18" height="18" fill="white" transform="translate(12 7)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
18
core/core-frontend/public/svg/relation-ds.svg
Normal file
18
core/core-frontend/public/svg/relation-ds.svg
Normal file
@ -0,0 +1,18 @@
|
||||
<svg width="200" height="32" viewBox="0 0 200 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.5" y="0.5" width="199" height="31" rx="3.5" fill="white"/>
|
||||
<rect x="0.5" y="0.5" width="199" height="31" rx="3.5" stroke="#DEE0E3"/>
|
||||
<g clip-path="url(#clip0_20267_340220)">
|
||||
<path d="M12 10C12 8.34315 13.4653 7 15.2727 7H26.7273C28.5347 7 30 8.34315 30 10V22C30 23.6569 28.5347 25 26.7273 25H15.2727C13.4653 25 12 23.6569 12 22V10Z" fill="#7F3BF5"/>
|
||||
<g clip-path="url(#clip1_20267_340220)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.4559 19.9766C25.7406 19.7522 26 19.426 26 19V13C26 12.574 25.7406 12.2478 25.4559 12.0234C25.1655 11.7946 24.7764 11.6104 24.3401 11.465C23.4623 11.1724 22.2814 11 21 11C19.7186 11 18.5377 11.1724 17.6599 11.465C17.2236 11.6104 16.8345 11.7946 16.5441 12.0234C16.2594 12.2478 16 12.574 16 13V19C16 19.426 16.2594 19.7522 16.5441 19.9766C16.8345 20.2054 17.2236 20.3896 17.6599 20.535C18.5377 20.8276 19.7186 21 21 21C22.2814 21 23.4623 20.8276 24.3401 20.535C24.7764 20.3896 25.1655 20.2054 25.4559 19.9766ZM17 12.9999C17.0003 12.4476 18.791 12 21 12C23.2091 12 25 12.4477 25 13C25 13.5523 23.2091 14 21 14C18.7909 14 17 13.5523 17 13C17 13 17 13 17 13C17 12.9999 17 12.9999 17 12.9999ZM24.3401 14.535C24.5767 14.4561 24.7994 14.3659 25 14.2633V16.0001C25 16.0007 24.9999 16.0029 24.9985 16.0076C24.9968 16.0132 24.9926 16.0242 24.9825 16.0407C24.9612 16.0753 24.918 16.1273 24.8369 16.1912C24.6718 16.3213 24.4019 16.4603 24.0239 16.5863C23.273 16.8366 22.2039 17 21 17C19.7961 17 18.727 16.8366 17.9761 16.5863C17.5981 16.4603 17.3282 16.3213 17.1631 16.1912C17.082 16.1273 17.0388 16.0753 17.0175 16.0407C17.0074 16.0242 17.0032 16.0132 17.0015 16.0076C17.0001 16.0029 17 16.0006 17 16V14.2633C17.2006 14.3659 17.4233 14.4561 17.6599 14.535C18.5377 14.8276 19.7186 15 21 15C22.2814 15 23.4623 14.8276 24.3401 14.535ZM24.3401 17.535C24.5767 17.4561 24.7994 17.3659 25 17.2633V19C25 19.0005 25 19.0026 24.9985 19.0076C24.9968 19.0132 24.9926 19.0242 24.9825 19.0407C24.9612 19.0753 24.918 19.1273 24.8369 19.1912C24.6718 19.3213 24.4019 19.4603 24.0239 19.5863C23.273 19.8366 22.2039 20 21 20C19.7961 20 18.727 19.8366 17.9761 19.5863C17.5981 19.4603 17.3282 19.3213 17.1631 19.1912C17.082 19.1273 17.0388 19.0753 17.0175 19.0407C17.0074 19.0242 17.0032 19.0132 17.0015 19.0076C17 19.0026 17 19.0004 17 19V17.2633C17.2006 17.3659 17.4233 17.4561 17.6599 17.535C18.5377 17.8276 19.7186 18 21 18C22.2814 18 23.4623 17.8276 24.3401 17.535Z" fill="white"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_20267_340220">
|
||||
<rect width="18" height="18" fill="white" transform="translate(12 7)"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_20267_340220">
|
||||
<rect width="12" height="12" fill="white" transform="translate(15 10)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
6
core/core-frontend/public/svg/relation-panel.svg
Normal file
6
core/core-frontend/public/svg/relation-panel.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg width="200" height="32" viewBox="0 0 200 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.5" y="0.5" width="199" height="31" rx="3.5" fill="white"/>
|
||||
<rect x="0.5" y="0.5" width="199" height="31" rx="3.5" stroke="#DEE0E3"/>
|
||||
<path d="M12 10C12 8.34315 13.5985 7 15.5702 7H26.4298C28.4015 7 30 8.34315 30 10V22C30 23.6569 28.4015 25 26.4298 25H15.5702C13.5985 25 12 23.6569 12 22V10Z" fill="#3370FF"/>
|
||||
<path d="M16.25 20V15.7727C16.25 15.484 16.4899 15.25 16.7857 15.25H19V11.5263C19 11.2356 19.2559 11 19.5715 11H22.4286C22.7442 11 23 11.2356 23 11.5263V14H25.2143C25.5102 14 25.75 14.2239 25.75 14.5V20H26.2499C26.388 20 26.4999 20.1119 26.4999 20.25V20.75C26.4999 20.8881 26.388 21 26.2499 21H15.7499C15.6119 21 15.4999 20.8881 15.4999 20.75V20.25C15.4999 20.1119 15.6119 20 15.7499 20H16.25ZM24.75 20V15H23V20H24.75ZM22 20V12H20V20H22ZM19 20V16.25H17.25V20H19Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 904 B |
8
core/core-frontend/public/svg/relation-screen.svg
Normal file
8
core/core-frontend/public/svg/relation-screen.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<svg width="200" height="32" viewBox="0 0 200 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.5" y="0.5" width="199" height="31" rx="3.5" fill="white"/>
|
||||
<rect x="0.5" y="0.5" width="199" height="31" rx="3.5" stroke="#DEE0E3"/>
|
||||
<path d="M12 10C12 8.34315 13.5985 7 15.5702 7H26.4298C28.4015 7 30 8.34315 30 10V22C30 23.6569 28.4015 25 26.4298 25H15.5702C13.5985 25 12 23.6569 12 22V10Z" fill="#00D6B9"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 12V18H25V12H17ZM16 11.5C16 11.2237 16.225 11 16.5 11H25.5C25.775 11 26 11.2237 26 11.5V18.5C26 18.7763 25.775 19 25.5 19H16.5C16.225 19 16 18.7763 16 18.5V11.5Z" fill="white"/>
|
||||
<path d="M22.7192 13.3965L23.4262 14.1035L21.0587 16.471L19.9042 15.3167L19.1035 16.1177L18.3965 15.4105L19.9042 13.9027L21.0585 15.057L22.7192 13.3965Z" fill="white"/>
|
||||
<path d="M23.5 20H18.5V21H23.5V20Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 875 B |
@ -4090,6 +4090,7 @@ export default {
|
||||
folder: '文件夹',
|
||||
del_folder_tips: '删除后,此文件夹下的所有资源都会被删除,请谨慎操作。',
|
||||
sync_to_org: '迁移至目标组织',
|
||||
sync_org_placeholder: '请选择目标组织'
|
||||
sync_org_placeholder: '请选择目标组织',
|
||||
relation_picture: '血缘关系图'
|
||||
}
|
||||
}
|
||||
|
@ -51,42 +51,10 @@ const state = reactive({
|
||||
},
|
||||
footContent: ''
|
||||
})
|
||||
const checkUsername = (rule: any, value: any, callback: any) => {
|
||||
if (!value || activeName.value === 'ldap') {
|
||||
return callback()
|
||||
}
|
||||
const pattern = /^[a-zA-Z0-9][a-zA-Z0-9\@._-]*$/
|
||||
const reg = new RegExp(pattern)
|
||||
if (!reg.test(value)) {
|
||||
const msg = t('user.user_name_pattern_error')
|
||||
callback(new Error(msg))
|
||||
}
|
||||
return callback()
|
||||
}
|
||||
|
||||
const validatePwd = (rule: any, value: any, callback: any) => {
|
||||
if (!value || activeName.value === 'ldap') {
|
||||
return callback()
|
||||
}
|
||||
const pattern =
|
||||
/^.*(?=.{6,20})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[~!@#$%^&*()_+\-\={}|":<>?`[\];',.\/])[a-zA-Z0-9~!@#$%^&*()_+\-\={}|":<>?`[\];',.\/]*$/
|
||||
const regep = new RegExp(pattern)
|
||||
if (!regep.test(value)) {
|
||||
const msg = t('user.pwd_pattern_error')
|
||||
callback(new Error(msg))
|
||||
}
|
||||
return callback()
|
||||
}
|
||||
|
||||
const rules = reactive<FormRules>({
|
||||
username: [
|
||||
{ required: true, message: t('common.required'), trigger: 'blur' },
|
||||
{ required: true, validator: checkUsername, trigger: 'blur' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: t('common.required'), trigger: 'blur' },
|
||||
{ required: true, validator: validatePwd, trigger: 'blur' }
|
||||
]
|
||||
username: [{ required: true, message: t('common.required'), trigger: 'blur' }],
|
||||
password: [{ required: true, message: t('common.required'), trigger: 'blur' }]
|
||||
})
|
||||
|
||||
const activeName = ref('simple')
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 8ac18a900ac4744d62ff3c7e4ee6ec3c8fb82933
|
||||
Subproject commit 315fa62982d6f322fb3dddf641882251f1572c79
|
@ -1,9 +1,7 @@
|
||||
package io.dataease.api.free;
|
||||
|
||||
import io.dataease.api.free.dto.FreeBatchDelRequest;
|
||||
import io.dataease.api.free.dto.FreeBatchSyncRequest;
|
||||
import io.dataease.api.free.dto.FreeQueryRequest;
|
||||
import io.dataease.api.free.dto.FreeSyncRequest;
|
||||
import io.dataease.api.free.dto.*;
|
||||
import io.dataease.api.free.vo.FreeRelationVO;
|
||||
import io.dataease.api.free.vo.FreeVO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -26,4 +24,7 @@ public interface FreeApi {
|
||||
|
||||
@PostMapping("/deleteBatch")
|
||||
void deleteBatch(@RequestBody FreeBatchDelRequest request);
|
||||
|
||||
@PostMapping("/relation")
|
||||
FreeRelationVO relation(@RequestBody FreeRelationRequest request);
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.dataease.api.free.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class FreeRelationCategory implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 2235520960613140213L;
|
||||
|
||||
private String name;
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package io.dataease.api.free.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
public class FreeRelationLink implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 8574916923164645781L;
|
||||
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long source;
|
||||
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long target;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package io.dataease.api.free.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class FreeRelationNode implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 5396869322229400707L;
|
||||
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer category;
|
||||
|
||||
private Integer x;
|
||||
|
||||
private Integer y;
|
||||
|
||||
public FreeRelationNode(Long id, String name, Integer category) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.category = category;
|
||||
this.x = 0;
|
||||
this.y = 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package io.dataease.api.free.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class FreeRelationRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -316612770549936486L;
|
||||
|
||||
private Long id;
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package io.dataease.api.free.vo;
|
||||
|
||||
import io.dataease.api.free.dto.FreeRelationCategory;
|
||||
import io.dataease.api.free.dto.FreeRelationLink;
|
||||
import io.dataease.api.free.dto.FreeRelationNode;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
public class FreeRelationVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 7087187548660162237L;
|
||||
|
||||
private List<FreeRelationCategory> categories;
|
||||
|
||||
private List<FreeRelationLink> links;
|
||||
|
||||
private List<FreeRelationNode> nodes;
|
||||
}
|
Loading…
Reference in New Issue
Block a user