bugfix
This commit is contained in:
parent
045eea4cd6
commit
d2d62acc26
@ -4,13 +4,12 @@
|
|||||||
"params": {
|
"params": {
|
||||||
"sortby":"id",
|
"sortby":"id",
|
||||||
"confidential_fields":["secretkey"],
|
"confidential_fields":["secretkey"],
|
||||||
"noedit":true,
|
|
||||||
"browserfields": {
|
"browserfields": {
|
||||||
"exclouded": ["id", "secretkey", "orgid" ],
|
"exclouded": ["id", "secretkey", "orgid" ],
|
||||||
"alters": {}
|
"alters": {}
|
||||||
},
|
},
|
||||||
"editexclouded": [
|
"editexclouded": [
|
||||||
|
"id", "secretkey", "orgid"
|
||||||
],
|
],
|
||||||
"toolbar":{
|
"toolbar":{
|
||||||
"tools":[
|
"tools":[
|
||||||
@ -22,6 +21,7 @@
|
|||||||
{
|
{
|
||||||
"name":"copy_apikey",
|
"name":"copy_apikey",
|
||||||
"label":"复制apikey",
|
"label":"复制apikey",
|
||||||
|
"selected_row":true,
|
||||||
"icon":"{{entire_url('/imgs/copy.svg')}}"
|
"icon":"{{entire_url('/imgs/copy.svg')}}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -7,7 +7,7 @@ async with db.sqlorContext(dbname) as sor:
|
|||||||
ns = {
|
ns = {
|
||||||
"id": params_kw.id,
|
"id": params_kw.id,
|
||||||
"orgid":orgid,
|
"orgid":orgid,
|
||||||
"userid":"userid
|
"userid":userid
|
||||||
}
|
}
|
||||||
sql = """select a.*,
|
sql = """select a.*,
|
||||||
b.apikey
|
b.apikey
|
||||||
@ -19,5 +19,42 @@ where a.id = b.dappid
|
|||||||
recs = await sor.sqlExe(sql, ns)
|
recs = await sor.sqlExe(sql, ns)
|
||||||
if len(recs):
|
if len(recs):
|
||||||
r = recs[0]
|
r = recs[0]
|
||||||
return UiMessage(title="copy apikey", message=f"appid={r.id}, apikey={r.apikey} secretkey={r.secretkey}")
|
return {
|
||||||
return UiError(title='copy apikey', message='copy apikey error')
|
"widgettype":"VBox",
|
||||||
|
"options":{
|
||||||
|
"height":"100%",
|
||||||
|
"width":"100%"
|
||||||
|
},
|
||||||
|
"subwidgets":[
|
||||||
|
{
|
||||||
|
"widgettype":"Text",
|
||||||
|
"options":{
|
||||||
|
"wrap":True,
|
||||||
|
"halign":"left",
|
||||||
|
"text":f"appid={r.dappid}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"widgettype":"Text",
|
||||||
|
"options":{
|
||||||
|
"wrap":True,
|
||||||
|
"halign":"left",
|
||||||
|
"text":f"apikey={r.apikey}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"widgettype":"Text",
|
||||||
|
"options":{
|
||||||
|
"wrap":True,
|
||||||
|
"halign":"left",
|
||||||
|
"text":f"secretkey={r.secretkey}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
"widgettype":"Text",
|
||||||
|
"options":{
|
||||||
|
"text":'copy apikey error'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user