Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v6.1.0 release #1449

Merged
merged 19 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: image Permissions
Signed-off-by: songyg <[email protected]>
  • Loading branch information
songyg committed Dec 31, 2024
commit 1b21eb4879bc8bfb894c5f0203ccaeb44597853a
2 changes: 1 addition & 1 deletion src/components/CodeDemoForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class Index extends PureComponent {
if (!err && onSubmit) {
if(!isService){
fieldsValue.k8s_app="appCodeDemo"
fieldsValue.is_demo = true
fieldsValue.is_demo = false
}
if(archInfo && archInfo.length != 2 && archInfo.length != 0){
fieldsValue.arch = archInfo[0]
Expand Down
2 changes: 1 addition & 1 deletion src/components/ImageCmdDemoForm /index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default class Index extends PureComponent {
if (!err && onSubmit) {
if (!isService) {
fieldsValue.k8s_app = "appDockerDemo"
fieldsValue.is_demo = true
fieldsValue.is_demo = false
}
if (archInfo && archInfo.length != 2 && archInfo.length != 0) {
fieldsValue.arch = archInfo[0]
Expand Down
2 changes: 1 addition & 1 deletion src/components/ImageNameForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default class Index extends PureComponent {
const group_id = globalUtil.getGroupID()
if(group_id){
this.setState({
creatComPermission: role.queryPermissionsInfo(this.props.currentTeamPermissionsInfo?.team, 'app_overview', `app_${globalUtil.getAppID() || group_id}`)
creatComPermission: role.queryPermissionsInfo(this.props.currentTeamPermissionsInfo?.team, 'app_overview', `app_${group_id}`)
})
}
if (handleType && handleType === 'Service') {
Expand Down
1 change: 1 addition & 0 deletions src/locales/en-US/versionUpdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const versionUpdata = {
'versionUpdata_6_1.platform': 'Operating System/Architecture',
'versionUpdata_6_1.status': 'Status',
'versionUpdata_6_1.updated_at.title': 'Last push',
'versionUpdata_6_1.updated.time': 'Updated Time',
'versionUpdata_6_1.action': 'Action',
'versionUpdata_6_1.size.GB': 'GB',
'versionUpdata_6_1.os': 'Operating System/Architecture',
Expand Down
1 change: 1 addition & 0 deletions src/locales/zh-CN/versionUpdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const versionUpdata = {
'versionUpdata_6_1.platform': '操作系统/架构',
'versionUpdata_6_1.status': '状态',
'versionUpdata_6_1.updated_at.title': '最近一次推送',
'versionUpdata_6_1.updated.time': '更新时间',
'versionUpdata_6_1.action': '操作',
'versionUpdata_6_1.size.GB': 'GB',
'versionUpdata_6_1.os': '操作系统/架构',
Expand Down
34 changes: 22 additions & 12 deletions src/pages/TeamDashboard/TeamBasicInfo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export default class index extends Component {
this.setState({
addGroup: false
}, () => {
newRole.refreshPermissionsInfo()
notification.success({
message: formatMessage({ id: 'versionUpdata_6_1.createSuccess' })
})
Expand Down Expand Up @@ -278,16 +279,16 @@ export default class index extends Component {
<Tooltip placement="topLeft" title={item.group_name}>
<div className={styles.appTitle}>{item.group_name}</div>
</Tooltip>
<div className={styles.value}>
<div className={styles.statusText} style={{ background: globalUtil.appStatusColor(item.status) }}>
{globalUtil.appStatusText(item.status)}
</div>
<div className={styles.component}><FormattedMessage id="teamOverview.component.name" />: {item.services_num}<FormattedMessage id="unit.entries" /></div>
<div className={styles.statusText} style={{ background: globalUtil.appStatusColor(item.status) }}>
{globalUtil.appStatusText(item.status)}
</div>
<div className={styles.updateTime}>
{item.update_time &&
moment(item.update_time).fromNow()}
<FormattedMessage id="teamOverview.update" />
<div className={styles.bottomBox}>
<div className={styles.component}><FormattedMessage id="teamOverview.component.name" />: {item.services_num}<FormattedMessage id="unit.entries" /></div>
<div className={styles.updateTime}>
{item.update_time &&
moment(item.update_time).fromNow()}
<FormattedMessage id="teamOverview.update" />
</div>
</div>
<div className={styles.btn}>
{isAppCreate && (
Expand Down Expand Up @@ -410,7 +411,7 @@ export default class index extends Component {
}
},
{
title: formatMessage({ id: 'versionUpdata_6_1.updated_at.title' }),
title: formatMessage({ id: 'versionUpdata_6_1.updated.time' }),
dataIndex: 'update_time',
key: 'update_time',
render: (text, record) => {
Expand Down Expand Up @@ -574,8 +575,17 @@ export default class index extends Component {
</div>
</>
) : (
<div style={{ paddingTop: '96px' }}>
<Empty />
// 空列表做成可点击的效果指引用户去创建应用
<div
className={styles.appListEmpty}
onClick={() => {
this.setState({
addGroup: true,
});
}}>
<Empty
description={'开始部署您的应用'}
/>
</div>
)}
</Card>
Expand Down
45 changes: 28 additions & 17 deletions src/pages/TeamDashboard/TeamBasicInfo/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -218,30 +218,25 @@
overflow: hidden;
text-overflow: ellipsis;
}
.value{
.statusText {
width: 62px;
margin-top: 16px;
padding: 2px 0px;
color: #fff;
text-align: center;
border-radius: 20px;
font-weight: 500;
}
.bottomBox {
display: flex;
justify-content: flex-start;
justify-content: space-between;
align-items: center;
margin-top: 16px;
gap: 16px;
.statusText {
width: 62px;
padding: 2px 0px;
color: #fff;
text-align: center;
border-radius: 20px;
font-weight: 500;
}
.component {
>div {
color: #717179;
font-size: 14px;
}
}
.updateTime {
color: #717179;
font-size: 14px;
margin-top: 16px;
}
.btn{
color: #717179;
position: absolute;
Expand Down Expand Up @@ -314,4 +309,20 @@
justify-content: flex-end;
margin-top: auto;
padding: 45px 16px 0 0;
}
.appListEmpty {
display: flex;
justify-content: center;
align-items: center;
height: 380px;
width: 100%;
font-size: 16px;
border: 1px dashed #e8e8e8;
border-radius: 5px;
color: @rbd-content-color-secondary;
cursor: pointer;
}
.appListEmpty:hover {
border: 1px dashed @primary-color;
background-color: #f4f4f4;
}
4 changes: 2 additions & 2 deletions src/services/createApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function createAppByCode(body = {}) {
k8s_component_name: body.k8s_component_name,
k8s_component_name: body.k8s_component_name,
k8s_app: body.k8s_app || '',
is_demo: body.is_demo || false,
is_demo: false,
arch: body.arch,
}
}
Expand Down Expand Up @@ -216,7 +216,7 @@ export async function createAppByDockerrun(body = {}) {
password: body.password,
k8s_component_name: body.k8s_component_name,
k8s_app: body.k8s_app || '',
is_demo: body.is_demo || false,
is_demo: false,
arch: body.arch,
}
}
Expand Down