do not find description

Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
runzexia
2019-05-09 18:09:48 +08:00
parent 8bf5ae0910
commit 96f2641e8b

View File

@@ -308,10 +308,6 @@ func GetProjectCredential(projectId, credentialId, domain, getContent string) (*
value, _ := selection.Attr("value")
response.Id = value
})
doc.Find("input[name*=description]").Each(func(i int, selection *goquery.Selection) {
value, _ := selection.Attr("value")
response.Description = value
})
response.KubeconfigCredential = content
case CredentialTypeUsernamePassword:
content := &UsernamePasswordCredential{}
@@ -324,10 +320,6 @@ func GetProjectCredential(projectId, credentialId, domain, getContent string) (*
value, _ := selection.Attr("value")
response.Id = value
})
doc.Find("input[name*=description]").Each(func(i int, selection *goquery.Selection) {
value, _ := selection.Attr("value")
response.Description = value
})
response.UsernamePasswordCredential = content
case CredentialTypeSsh:
content := &SshCredential{}
@@ -340,10 +332,6 @@ func GetProjectCredential(projectId, credentialId, domain, getContent string) (*
value, _ := selection.Attr("value")
response.Id = value
})
doc.Find("input[name*=description]").Each(func(i int, selection *goquery.Selection) {
value, _ := selection.Attr("value")
response.Description = value
})
doc.Find("textarea[name*=privateKey]").Each(func(i int, selection *goquery.Selection) {
value := selection.Text()
content.PrivateKey = value