update
This commit is contained in:
1 parent
0690285147
commit
5618cd2738
154 files changed
+5021
-3161
No files matched your search
@@ -1,8 +1,8 @@
|
||||
package seed
|
||||
|
||||
import (
|
||||
snmppkg "ezops/pkg/snmp"
|
||||
"ezops/model"
|
||||
snmppkg "ezops/pkg/snmp"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/gorm"
|
||||
@@ -20,7 +20,7 @@ func SeedSNMPTemplates(db *gorm.DB) {
|
||||
Name: bt.Name, Description: bt.Description,
|
||||
DeviceType: bt.DeviceType, Vendor: bt.Vendor,
|
||||
IsDefault: bt.Vendor == "H3C" && bt.DeviceType == "switch",
|
||||
IsSystem: true, Status: 1,
|
||||
IsSystem: true, Status: 1,
|
||||
}
|
||||
if err := db.Create(&tpl).Error; err != nil {
|
||||
zap.L().Warn("seed snmp template failed", zap.String("name", bt.Name), zap.Error(err))
|
||||
@@ -39,4 +39,4 @@ func SeedSNMPTemplates(db *gorm.DB) {
|
||||
}
|
||||
zap.L().Info("seeded snmp template", zap.String("name", bt.Name), zap.Int("oids", len(bt.OIDs)))
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user