feat: 仪表盘成本统计数据驱动化 — CloudAccount新增MonthlyCost字段 + dashboard实时聚合云账号月费用
This commit is contained in:
1 parent
a1237587f6
commit
5db69e8abc
5 files changed
+84
-26
No files matched your search
@@ -122,10 +122,10 @@ func generateServers(db *gorm.DB) error {
|
||||
|
||||
func generateCloudAccounts(db *gorm.DB) error {
|
||||
accounts := []models.CloudAccount{
|
||||
{Name: "阿里云主账号", Provider: "aliyun", Status: "active"},
|
||||
{Name: "腾讯云主账号", Provider: "tencent", Status: "active"},
|
||||
{Name: "AWS 账号", Provider: "aws", Status: "active"},
|
||||
{Name: "华为云账号", Provider: "huawei", Status: "inactive"},
|
||||
{Name: "阿里云主账号", Provider: "aliyun", Status: "active", MonthlyCost: 28500},
|
||||
{Name: "腾讯云主账号", Provider: "tencent", Status: "active", MonthlyCost: 15800},
|
||||
{Name: "AWS 账号", Provider: "aws", Status: "active", MonthlyCost: 42000},
|
||||
{Name: "华为云账号", Provider: "huawei", Status: "inactive", MonthlyCost: 8900},
|
||||
}
|
||||
for i := range accounts {
|
||||
accounts[i].AccessKey = "LTAI" + randomString(16)
|
||||
|
||||
Reference in new issue
Block a user