mirror of
https://github.com/bellingcat/sugartrail.git
synced 2026-06-08 03:28:31 +03:00
revert
This commit is contained in:
@@ -151,25 +151,25 @@
|
|||||||
"navigation_button = widgets.Button(description='Update', disabled=True)\n",
|
"navigation_button = widgets.Button(description='Update', disabled=True)\n",
|
||||||
"navigation_button.on_click(lambda bt: config_network()) \n",
|
"navigation_button.on_click(lambda bt: config_network()) \n",
|
||||||
"\n",
|
"\n",
|
||||||
"def init_network(bt):\n",
|
"def init_network():\n",
|
||||||
" init_button.disabled=True\n",
|
" init_button.disabled=True\n",
|
||||||
" company_id = company_text.value # Capture the latest value of company_text\n",
|
" response = sugartrail.api.get_company(str(company_text.value))\n",
|
||||||
" response = sugartrail.api.get_company(str(company_id))\n",
|
|
||||||
" company_text.disabled=True\n",
|
" company_text.disabled=True\n",
|
||||||
" if response:\n",
|
" if response:\n",
|
||||||
" network.company_id = company_id\n",
|
" network.company_id = str(company_text.value)\n",
|
||||||
" init_status.value = u'\\u2705: Initialisation successful for ' + str(response['company_name']) \n",
|
" init_status.value = u'\\u2705: Initialisation successful for ' + str(response['company_name']) \n",
|
||||||
" init_button.button_style='success'\n",
|
" init_button.button_style='success'\n",
|
||||||
" navigation_button.disabled = False\n",
|
" navigation_button.disabled = False\n",
|
||||||
" depth_selector.disabled = False\n",
|
" depth_selector.disabled = False\n",
|
||||||
" generate_network_button.disabled = False\n",
|
" generate_network_button.disabled = False\n",
|
||||||
" logger.debug(f\"Company number entered: {company_id}\") # Log the captured value\n",
|
" logger.debug(f\"Company number entered: {str(company_text.value)}\")\n",
|
||||||
|
" \n",
|
||||||
" else:\n",
|
" else:\n",
|
||||||
" init_button.disabled=False\n",
|
" init_button.disabled=False\n",
|
||||||
" company_text.disabled=False\n",
|
" company_text.disabled=False\n",
|
||||||
" init_status.value = u'\\u274c: Initialisation Failed. No records for company: ' + company_id\n",
|
" init_status.value = u'\\u274c: Initialisation Failed. No records for company: ' + str(company_text.value)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"display(company_text, init_button, init_status)\n"
|
"display(company_text, init_button, init_status)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user