This commit is contained in:
simonzhangsz committed 2023-10-11 10:24:33 +08:00
1 parent 08b3a775f1
commit c6962cf537
5 files changed
+216 -22

No files matched your search

+14 -3
View File
@@ -1630,9 +1630,20 @@ func IsPermissionAllowed(token, method, module, dbname, tbname, pack string) (bo
}
type NeLicense struct {
NeType string `json:"neType" xorm:"ne_type"`
NeID string `json:"neID" xorm:"ne_id"`
Capability int `json:"capability"`
NeType string `json:"neType" xorm:"ne_type"`
NeID string `json:"neID" xorm:"ne_id"`
SerialNo string `json:"serialNo" xorm:"serial_no"`
Capcity int `json:"capcity" xorm:"capcity"`
Used int `json:"used" xorm:"used"`
FeatureEnabled string `json:"featureEnabled" xorm:"feature_enabled"`
ExpirationDate string `json:"expirationDate" xorm:"expiration_date"`
Status string `json:"status" xorm:"status"`
Path string `json:"path" xorm:"path"`
FileName string `json:"file_name" xorm:"file_name"`
Comment string `json:"comment" xorm:"comment"`
CreatedAt string `json:"createdAt" xorm:"-"`
UpdatedAt string `json:"updatedAt" xorm:"-"`
DeletedAt string `json:"deletedAt" xorm:"-"`
}
func XormAdjustmentNeLicense(neType, neID string, value int) (int64, error) {
+4 -10
View File
@@ -220,17 +220,11 @@ func init() {
Register("PATCH", cm.CustomUriSoftwareNE, cm.RollBackSoftwareToNF, nil)
// License management
Register("GET", cm.LicenseUri, cm.ExportCmFromNF, nil)
Register("POST", cm.LicenseUri, cm.ImportCmToNF, nil)
Register("DELETE", cm.LicenseUri, cm.ImportCmToNF, nil)
Register("POST", cm.UriLicense, cm.UploadLicenseFileData, nil)
Register("POST", cm.UriLicenseExt, cm.UploadLicenseFileData, nil)
Register("POST", cm.NeLicenseUri, cm.ExportCmFromNF, nil)
Register("PUT", cm.NeLicenseUri, cm.ImportCmToNF, nil)
Register("PATCH", cm.NeLicenseUri, cm.ImportCmToNF, nil)
Register("POST", cm.CustomNeLicenseUri, cm.ExportCmFromNF, nil)
Register("PUT", cm.CustomNeLicenseUri, cm.ImportCmToNF, nil)
Register("PATCH", cm.CustomNeLicenseUri, cm.ImportCmToNF, nil)
Register("POST", cm.CustomUriLicense, cm.UploadLicenseFileData, nil)
Register("POST", cm.CustomUriLicenseExt, cm.UploadLicenseFileData, nil)
// Trace management
Register("POST", trace.UriTraceTask, trace.PostTraceTaskToNF, nil)