Add remote browser pages and website sync
Enable managed remote browser custom pages with login autofill and add website sync workflows so external admin surfaces can be handled inside SmartUp. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import json
|
||||
import sys
|
||||
import logging
|
||||
from app.services.upstream_client import UpstreamClient
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
def main():
|
||||
client = UpstreamClient(
|
||||
base_url="http://170.106.100.210:55555",
|
||||
api_prefix="",
|
||||
auth_type="bearer",
|
||||
auth_config={"token": ""}, # We don't have token, but /api/group/ in some new-api may be open, or fail with 401
|
||||
timeout=10.0,
|
||||
)
|
||||
try:
|
||||
groups = client.get_available_groups("/api/group/")
|
||||
print("Groups:", groups)
|
||||
except Exception as e:
|
||||
print("Groups Error:", e)
|
||||
|
||||
try:
|
||||
rates = client.get_group_rates("/api/option/?key=GroupRatio")
|
||||
print("Rates:", rates)
|
||||
except Exception as e:
|
||||
print("Rates Error:", e)
|
||||
|
||||
try:
|
||||
from app.services.upstream_client import _extract_rates_map, _unwrap_list
|
||||
print("Unwrapped Groups:", _unwrap_list(groups))
|
||||
print("Extracted Rates:", _extract_rates_map(rates))
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user