mirror of
https://github.com/itsdave-de/msp_remoteadmin.git
synced 2025-05-06 20:35:12 +02:00
try get document with python
This commit is contained in:
parent
894335f2c5
commit
88fbad4fcd
@ -17,7 +17,7 @@ function connect_remote(frm, type) {
|
||||
frappe.call({
|
||||
method: "msp_remoteadmin.tools.create_session",
|
||||
args: {
|
||||
doc: frm.doc,
|
||||
name: frm.doc.name,
|
||||
protocol: type
|
||||
},
|
||||
callback: function (r) {
|
||||
|
@ -11,7 +11,7 @@ PROTOCOL_PORT = {
|
||||
}
|
||||
|
||||
@frappe.whitelist()
|
||||
def create_session(doc, protocol):
|
||||
def create_session(name, protocol):
|
||||
guaca_config = frappe.get_single('Remote Connections Settings')
|
||||
guacamole_url = f'{guaca_config.guacamole_server}/api/tokens'
|
||||
auth = {
|
||||
@ -30,6 +30,8 @@ def create_session(doc, protocol):
|
||||
token = None
|
||||
if token:
|
||||
print(f"Token: {token}")
|
||||
# Get values from IT Object
|
||||
doc = frappe.get_doc('IT Object', name)
|
||||
# Get credentials from IT User Account
|
||||
print(f"Values from form: {doc}")
|
||||
print(f"Type: {type(doc.get('link'))}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user