Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion agent/app/dto/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type MysqlDBCreate struct {
From string `json:"from" validate:"required,oneof=local remote"`
Database string `json:"database" validate:"required"`
Format string `json:"format" validate:"required,oneof=utf8mb4 utf8 gbk big5"`
Collation string `json:"collation" validate:"required"`
Collation string `json:"collation"`
Username string `json:"username" validate:"required"`
Password string `json:"password" validate:"required"`
Permission string `json:"permission" validate:"required"`
Expand Down
2 changes: 1 addition & 1 deletion agent/app/model/database_mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type DatabaseMysql struct {
From string `json:"from" gorm:"not null;default:local"`
MysqlName string `json:"mysqlName" gorm:"not null"`
Format string `json:"format" gorm:"not null"`
Collation string `json:"collation" gorm:"not null"`
Collation string `json:"collation"`
Username string `json:"username" gorm:"not null"`
Password string `json:"password" gorm:"not null"`
Permission string `json:"permission" gorm:"not null"`
Expand Down
9 changes: 3 additions & 6 deletions agent/app/service/container_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,8 @@ func (u *ContainerService) CreateNetwork(req dto.NetworkCreate) error {
return err
}
defer client.Close()
var (
ipams []network.IPAMConfig
enableV6 bool
)
var ipams []network.IPAMConfig

if req.Ipv4 {
var itemIpam network.IPAMConfig
if len(req.AuxAddress) != 0 {
Expand All @@ -141,7 +139,6 @@ func (u *ContainerService) CreateNetwork(req dto.NetworkCreate) error {
ipams = append(ipams, itemIpam)
}
if req.Ipv6 {
enableV6 = true
var itemIpam network.IPAMConfig
if len(req.AuxAddress) != 0 {
itemIpam.AuxAddress = make(map[string]string)
Expand All @@ -162,7 +159,7 @@ func (u *ContainerService) CreateNetwork(req dto.NetworkCreate) error {
}

options := network.CreateOptions{
EnableIPv6: &enableV6,
EnableIPv6: &req.Ipv6,
Driver: req.Driver,
Options: stringsToMap(req.Options),
Labels: stringsToMap(req.Labels),
Expand Down
2 changes: 1 addition & 1 deletion agent/init/migration/migrations/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ var AddGPUMonitor = &gormigrate.Migration{
}

var UpdateDatabaseMysql = &gormigrate.Migration{
ID: "20251124-update-database-mysql",
ID: "20251125-update-database-mysql",
Migrate: func(tx *gorm.DB) error {
return tx.AutoMigrate(&model.Database{})
},
Expand Down
4 changes: 0 additions & 4 deletions frontend/src/views/container/container/inspect/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,6 @@ const acceptParams = (props: DialogProps): void => {
inspectData.value = props.data;
}
rawJson.value = JSON.stringify(inspectData.value, null, 2);

if (!ports.value.length) {
ports.value = Object.keys(inspectData.value?.Config?.ExposedPorts || {});
}
} catch (e) {
console.error('Failed to parse inspect data:', e);
}
Expand Down
Loading