Compare commits

...

5 Commits
v1.9.4 ... main

Author SHA1 Message Date
am6737 9c8cc5d816
fix: Prevent crashes when accessing cluster details (#911)
- Added optional chaining to safely access cluster details in `AddClusterDialog`.

This fix addresses the issue where the page crashes when trying to load details for an inaccessible cluster.

Signed-off-by: am6737 <1359816810@qq.com>
2025-03-13 09:43:00 +05:30
am6737 0d00d92f55
fix: Set default values for traits in VelaUX (#913)
Added `setDefaultProperties` to ensure default values are correctly set for traits like "cpuscaler", "hpa", "resource", and "k8s-update-strategy".

Signed-off-by: am6737 <1359816810@qq.com>
2025-03-13 09:40:29 +05:30
PushparajShetty 021024e4af
Fix: Modified error message for invalid pwd and username (#918)
* Modified error message for invalid pwd and username

Signed-off-by: viskumar <viskumar@guidewire.com>

* changed the actions/cache version to v4

Signed-off-by: Vibhor Chinda <vibhorchinda@gmail.com>

* Fix: permission for PR labeling

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

---------

Signed-off-by: viskumar <viskumar@guidewire.com>
Signed-off-by: Vibhor Chinda <vibhorchinda@gmail.com>
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
Co-authored-by: viskumar <viskumar@guidewire.com>
Co-authored-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-03-13 09:26:50 +05:30
am6737 d9b7ae102f
feat: improve Helm charts values.yaml popup (#909)
- Added custom width (60vw) to Helm values.yaml dialog for better visibility.
- Enabled close modes: 'close' and 'mask' to improve user experience.

Closes #851

Signed-off-by: am6737 <1359816810@qq.com>
2024-10-10 13:36:59 +08:00
am6737 8e11f93ed7
Fix(addons): Align Button with Title in AddonDetailDialog (#915)
Signed-off-by: am6737 <1359816810@qq.com>
2024-10-09 18:24:09 +08:00
10 changed files with 43 additions and 23 deletions

View File

@ -11,9 +11,11 @@ on:
jobs:
check:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: thehanimo/pr-title-checker@v1.4.2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: true
configuration_path: ".github/pr-title-checker-config.json"
configuration_path: '.github/pr-title-checker-config.json'

View File

@ -54,7 +54,7 @@ jobs:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
uses: actions/cache@v4
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}

View File

@ -14,6 +14,8 @@ const HelmValueShow: React.FC<Props> = (props: Props) => {
const [valueFile, setValueFile] = React.useState<string>('values.yaml');
return (
<Dialog
style={{ width: '60vw' }}
closeMode={["close", "mask"]}
className={'helmValueDialog'}
overflowScroll={true}
visible={true}

View File

@ -109,7 +109,7 @@ class EditPlatFormUserDialog extends Component<Props, State> {
{
required: true,
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,
message: (
<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>
),
},

View File

@ -329,6 +329,7 @@
"Only support github repo urlmaster branch": "仅支持 GitHub repo主分支 链接",
"Are you sure to delete?": "确认要删除吗?",
"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": "本插件是试用性,请不要在生产环境中使用",
"Dependencies": "依赖",
"Enable the addon to obtain the following extension capabilities": "启用插件以使用如下扩展能力",
@ -534,6 +535,7 @@
"Environment binding deleted successfully": "成功移除环境绑定",
"Retry": "重试",
"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 email": "请输入电子邮箱地址",
"User updated successfully": "用户更新成功",
@ -652,4 +654,4 @@
"Click me to open the dex login page": "点击我打开 Dex 登录页面",
"Setting the default projects for the dex login user": "设置 Dex 登录用户的默认项目",
"Join Time": "加入时间"
}
}

View File

@ -517,7 +517,7 @@ class AddonDetailDialog extends React.Component<Props, State> {
schema
? [
<Button
style={{ marginTop: '-12px', alignItems: 'center', display: 'flex' }}
style={{ alignItems: 'center', display: 'flex' }}
onClick={() => {
if (propertiesMode === 'native') {
this.setState({ propertiesMode: 'code' });

View File

@ -195,14 +195,28 @@ class TraitDialog extends React.Component<Props, State> {
.then((re) => {
if (re) {
this.setState({ definitionDetail: re, definitionLoading: false });
if (callback) {
callback();
}
this.setDefaultProperties(re)
if (callback) {
callback();
}
}
})
.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) => {
this.removeProperties();
this.field.setValues({ type: value });

View File

@ -55,7 +55,7 @@ class AddClusterDialog extends React.Component<Props, State> {
});
}
};
onClose = () => {
this.props.onClose();
this.resetField();
@ -69,13 +69,13 @@ class AddClusterDialog extends React.Component<Props, State> {
}
if (editMode) {
updateCluster({
name: cluster.name,
name: cluster?.name,
alias: values.alias,
icon: cluster.icon,
icon: cluster?.icon,
description: values.description,
dashboardURL: values.dashboardURL,
kubeConfig: values.kubeConfig,
labels: cluster.labels,
labels: cluster?.labels,
}).then((re: any) => {
if (re) {
Message.success(<Translation>cluster update success</Translation>);
@ -140,7 +140,7 @@ class AddClusterDialog extends React.Component<Props, State> {
};
const init = this.field.init;
const values: { kubeConfig: string } = this.field.getValues();
const valueInfo = cluster.kubeConfig || values.kubeConfig || '';
const valueInfo = cluster?.kubeConfig || values.kubeConfig || '';
return (
<Dialog
locale={locale().Dialog}
@ -170,7 +170,7 @@ class AddClusterDialog extends React.Component<Props, State> {
name="name"
disabled={editMode}
{...init('name', {
initValue: cluster.name,
initValue: cluster?.name || editClusterName,
rules: [
{
required: true,
@ -187,7 +187,7 @@ class AddClusterDialog extends React.Component<Props, State> {
<Input
name="alias"
{...init('alias', {
initValue: cluster.alias,
initValue: cluster?.alias,
rules: [
{
minLength: 2,
@ -204,10 +204,10 @@ class AddClusterDialog extends React.Component<Props, State> {
<Col span={12} style={{ padding: '0 8px' }}>
<FormItem label={<Translation>Description</Translation>}>
<Input
defaultValue={cluster.description}
defaultValue={cluster?.description}
name="description"
{...init('description', {
initValue: cluster.description,
initValue: cluster?.description,
rules: [
{
maxLength: 256,
@ -223,7 +223,7 @@ class AddClusterDialog extends React.Component<Props, State> {
<Input
name="dashboardURL"
{...init('dashboardURL', {
initValue: cluster.dashboardURL,
initValue: cluster?.dashboardURL,
rules: [
{
required: false,
@ -252,7 +252,7 @@ class AddClusterDialog extends React.Component<Props, State> {
language={'yaml'}
readOnly={false}
{...init('kubeConfig', {
initValue: cluster.kubeConfig,
initValue: cluster?.kubeConfig,
rules: [
{
required: true,

View File

@ -168,7 +168,7 @@ class CreateUser extends React.Component<Props, State> {
{
required: true,
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,
message: (
<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>
),
},

View File

@ -117,7 +117,7 @@ class ResetPassword extends React.Component<Props, State> {
pattern: checkUserPassword,
message: (
<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>
),
},