mirror of https://github.com/kubevela/velaux.git
Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
|
9c8cc5d816 | |
|
0d00d92f55 | |
|
021024e4af | |
|
d9b7ae102f | |
|
8e11f93ed7 |
|
@ -11,9 +11,11 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: thehanimo/pr-title-checker@v1.4.2
|
- uses: thehanimo/pr-title-checker@v1.4.2
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
pass_on_octokit_error: true
|
pass_on_octokit_error: true
|
||||||
configuration_path: ".github/pr-title-checker-config.json"
|
configuration_path: '.github/pr-title-checker-config.json'
|
||||||
|
|
|
@ -54,7 +54,7 @@ jobs:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Cache Go Dependencies
|
- name: Cache Go Dependencies
|
||||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .work/pkg
|
path: .work/pkg
|
||||||
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
|
||||||
|
|
|
@ -14,6 +14,8 @@ const HelmValueShow: React.FC<Props> = (props: Props) => {
|
||||||
const [valueFile, setValueFile] = React.useState<string>('values.yaml');
|
const [valueFile, setValueFile] = React.useState<string>('values.yaml');
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog
|
||||||
|
style={{ width: '60vw' }}
|
||||||
|
closeMode={["close", "mask"]}
|
||||||
className={'helmValueDialog'}
|
className={'helmValueDialog'}
|
||||||
overflowScroll={true}
|
overflowScroll={true}
|
||||||
visible={true}
|
visible={true}
|
||||||
|
|
|
@ -109,7 +109,7 @@ class EditPlatFormUserDialog extends Component<Props, State> {
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
pattern: checkName,
|
pattern: checkName,
|
||||||
message: <Translation>You must input a valid name</Translation>,
|
message: <Translation>You must input a valid name with alphanumeric character only</Translation>,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})}
|
})}
|
||||||
|
@ -139,7 +139,7 @@ class EditPlatFormUserDialog extends Component<Props, State> {
|
||||||
pattern: checkUserPassword,
|
pattern: checkUserPassword,
|
||||||
message: (
|
message: (
|
||||||
<Translation>
|
<Translation>
|
||||||
Password should be 8-16 bits and contain at least one number and one letter
|
Password must be alphanumeric, contain at least one letter and one number, and be 8-16 characters long
|
||||||
</Translation>
|
</Translation>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
@ -329,6 +329,7 @@
|
||||||
"Only support github repo url(master branch)": "仅支持 GitHub repo(主分支) 链接",
|
"Only support github repo url(master branch)": "仅支持 GitHub repo(主分支) 链接",
|
||||||
"Are you sure to delete?": "确认要删除吗?",
|
"Are you sure to delete?": "确认要删除吗?",
|
||||||
"Please enter a valid name": "请输入一个有效的名称",
|
"Please enter a valid name": "请输入一个有效的名称",
|
||||||
|
"Please enter a valid name having alphanumeric characters only": "请输入仅包含字母数字字符的有效名称",
|
||||||
"This addon is experimental, please don't use it in production": "本插件是试用性,请不要在生产环境中使用",
|
"This addon is experimental, please don't use it in production": "本插件是试用性,请不要在生产环境中使用",
|
||||||
"Dependencies": "依赖",
|
"Dependencies": "依赖",
|
||||||
"Enable the addon to obtain the following extension capabilities": "启用插件以使用如下扩展能力",
|
"Enable the addon to obtain the following extension capabilities": "启用插件以使用如下扩展能力",
|
||||||
|
@ -534,6 +535,7 @@
|
||||||
"Environment binding deleted successfully": "成功移除环境绑定",
|
"Environment binding deleted successfully": "成功移除环境绑定",
|
||||||
"Retry": "重试",
|
"Retry": "重试",
|
||||||
"Password should be 8-16 bits and contain at least one number and one letter": "密码应为8-16位, 并至少包含一个数字和一个字母",
|
"Password should be 8-16 bits and contain at least one number and one letter": "密码应为8-16位, 并至少包含一个数字和一个字母",
|
||||||
|
"Password must be alphanumeric, contain at least one letter and one number, and be 8-16 characters long": "密码必须是字母数字,至少包含一个字母和一个数字,长度为 8-16 个字符",
|
||||||
"Please input a valid email": "请输入有效的电子邮件地址",
|
"Please input a valid email": "请输入有效的电子邮件地址",
|
||||||
"Please input a email": "请输入电子邮箱地址",
|
"Please input a email": "请输入电子邮箱地址",
|
||||||
"User updated successfully": "用户更新成功",
|
"User updated successfully": "用户更新成功",
|
||||||
|
@ -652,4 +654,4 @@
|
||||||
"Click me to open the dex login page": "点击我打开 Dex 登录页面",
|
"Click me to open the dex login page": "点击我打开 Dex 登录页面",
|
||||||
"Setting the default projects for the dex login user": "设置 Dex 登录用户的默认项目",
|
"Setting the default projects for the dex login user": "设置 Dex 登录用户的默认项目",
|
||||||
"Join Time": "加入时间"
|
"Join Time": "加入时间"
|
||||||
}
|
}
|
||||||
|
|
|
@ -517,7 +517,7 @@ class AddonDetailDialog extends React.Component<Props, State> {
|
||||||
schema
|
schema
|
||||||
? [
|
? [
|
||||||
<Button
|
<Button
|
||||||
style={{ marginTop: '-12px', alignItems: 'center', display: 'flex' }}
|
style={{ alignItems: 'center', display: 'flex' }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (propertiesMode === 'native') {
|
if (propertiesMode === 'native') {
|
||||||
this.setState({ propertiesMode: 'code' });
|
this.setState({ propertiesMode: 'code' });
|
||||||
|
|
|
@ -195,14 +195,28 @@ class TraitDialog extends React.Component<Props, State> {
|
||||||
.then((re) => {
|
.then((re) => {
|
||||||
if (re) {
|
if (re) {
|
||||||
this.setState({ definitionDetail: re, definitionLoading: false });
|
this.setState({ definitionDetail: re, definitionLoading: false });
|
||||||
if (callback) {
|
this.setDefaultProperties(re)
|
||||||
callback();
|
if (callback) {
|
||||||
}
|
callback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => this.setState({ definitionLoading: false }));
|
.catch(() => this.setState({ definitionLoading: false }));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
setDefaultProperties = (definitionDetail: any) => {
|
||||||
|
const properties = definitionDetail.schema?.properties;
|
||||||
|
if (properties) {
|
||||||
|
const defaultValues: Record<string, any> = {};
|
||||||
|
for (const key in properties) {
|
||||||
|
if (properties[key].default !== undefined) {
|
||||||
|
defaultValues[key] = properties[key].default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.field.setValues({ properties: defaultValues });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
handleTypeChange = (value: string) => {
|
handleTypeChange = (value: string) => {
|
||||||
this.removeProperties();
|
this.removeProperties();
|
||||||
this.field.setValues({ type: value });
|
this.field.setValues({ type: value });
|
||||||
|
|
|
@ -55,7 +55,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onClose = () => {
|
onClose = () => {
|
||||||
this.props.onClose();
|
this.props.onClose();
|
||||||
this.resetField();
|
this.resetField();
|
||||||
|
@ -69,13 +69,13 @@ class AddClusterDialog extends React.Component<Props, State> {
|
||||||
}
|
}
|
||||||
if (editMode) {
|
if (editMode) {
|
||||||
updateCluster({
|
updateCluster({
|
||||||
name: cluster.name,
|
name: cluster?.name,
|
||||||
alias: values.alias,
|
alias: values.alias,
|
||||||
icon: cluster.icon,
|
icon: cluster?.icon,
|
||||||
description: values.description,
|
description: values.description,
|
||||||
dashboardURL: values.dashboardURL,
|
dashboardURL: values.dashboardURL,
|
||||||
kubeConfig: values.kubeConfig,
|
kubeConfig: values.kubeConfig,
|
||||||
labels: cluster.labels,
|
labels: cluster?.labels,
|
||||||
}).then((re: any) => {
|
}).then((re: any) => {
|
||||||
if (re) {
|
if (re) {
|
||||||
Message.success(<Translation>cluster update success</Translation>);
|
Message.success(<Translation>cluster update success</Translation>);
|
||||||
|
@ -140,7 +140,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
||||||
};
|
};
|
||||||
const init = this.field.init;
|
const init = this.field.init;
|
||||||
const values: { kubeConfig: string } = this.field.getValues();
|
const values: { kubeConfig: string } = this.field.getValues();
|
||||||
const valueInfo = cluster.kubeConfig || values.kubeConfig || '';
|
const valueInfo = cluster?.kubeConfig || values.kubeConfig || '';
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog
|
||||||
locale={locale().Dialog}
|
locale={locale().Dialog}
|
||||||
|
@ -170,7 +170,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
||||||
name="name"
|
name="name"
|
||||||
disabled={editMode}
|
disabled={editMode}
|
||||||
{...init('name', {
|
{...init('name', {
|
||||||
initValue: cluster.name,
|
initValue: cluster?.name || editClusterName,
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -187,7 +187,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
||||||
<Input
|
<Input
|
||||||
name="alias"
|
name="alias"
|
||||||
{...init('alias', {
|
{...init('alias', {
|
||||||
initValue: cluster.alias,
|
initValue: cluster?.alias,
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
minLength: 2,
|
minLength: 2,
|
||||||
|
@ -204,10 +204,10 @@ class AddClusterDialog extends React.Component<Props, State> {
|
||||||
<Col span={12} style={{ padding: '0 8px' }}>
|
<Col span={12} style={{ padding: '0 8px' }}>
|
||||||
<FormItem label={<Translation>Description</Translation>}>
|
<FormItem label={<Translation>Description</Translation>}>
|
||||||
<Input
|
<Input
|
||||||
defaultValue={cluster.description}
|
defaultValue={cluster?.description}
|
||||||
name="description"
|
name="description"
|
||||||
{...init('description', {
|
{...init('description', {
|
||||||
initValue: cluster.description,
|
initValue: cluster?.description,
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
maxLength: 256,
|
maxLength: 256,
|
||||||
|
@ -223,7 +223,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
||||||
<Input
|
<Input
|
||||||
name="dashboardURL"
|
name="dashboardURL"
|
||||||
{...init('dashboardURL', {
|
{...init('dashboardURL', {
|
||||||
initValue: cluster.dashboardURL,
|
initValue: cluster?.dashboardURL,
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: false,
|
required: false,
|
||||||
|
@ -252,7 +252,7 @@ class AddClusterDialog extends React.Component<Props, State> {
|
||||||
language={'yaml'}
|
language={'yaml'}
|
||||||
readOnly={false}
|
readOnly={false}
|
||||||
{...init('kubeConfig', {
|
{...init('kubeConfig', {
|
||||||
initValue: cluster.kubeConfig,
|
initValue: cluster?.kubeConfig,
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
|
|
@ -168,7 +168,7 @@ class CreateUser extends React.Component<Props, State> {
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
pattern: checkName,
|
pattern: checkName,
|
||||||
message: <Translation>Please enter a valid name</Translation>,
|
message: <Translation>Please enter a valid name having alphanumeric characters only</Translation>,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})}
|
})}
|
||||||
|
@ -209,7 +209,7 @@ class CreateUser extends React.Component<Props, State> {
|
||||||
pattern: checkUserPassword,
|
pattern: checkUserPassword,
|
||||||
message: (
|
message: (
|
||||||
<Translation>
|
<Translation>
|
||||||
Password should be 8-16 bits and contain at least one number and one letter
|
Password must be alphanumeric, contain at least one letter and one number, and be 8-16 characters long
|
||||||
</Translation>
|
</Translation>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
@ -117,7 +117,7 @@ class ResetPassword extends React.Component<Props, State> {
|
||||||
pattern: checkUserPassword,
|
pattern: checkUserPassword,
|
||||||
message: (
|
message: (
|
||||||
<Translation>
|
<Translation>
|
||||||
Password should be 8-16 bits and contain at least one number and one letter
|
Password must be alphanumeric, contain at least one letter and one number, and be 8-16 characters long
|
||||||
</Translation>
|
</Translation>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue