Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
fix: point to cloud.jina.ai logs url
Browse files Browse the repository at this point in the history
  • Loading branch information
deepankarm committed May 18, 2023
1 parent 51f6df7 commit 9cce41c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lcserve/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
DEFAULT_TIMEOUT = 120
ServingGatewayConfigFile = 'servinggateway_config.yml'
JCloudConfigFile = 'jcloud_config.yml'
# TODO: this needs to be pulled from Jina Wolf API dynamically after the issue has been fixed on the API side
APP_LOGS_URL = "[dashboards.wolf.jina.ai](https://dashboard.wolf.jina.ai/d/flow/flow-monitor?var-flow={flow}&var-datasource=thanos&orgId=2&from=now-24h&to=now&viewPanel=85)"
APP_LOGS_URL = "[https://cloud.jina.ai/](https://cloud.jina.ai/user/flows?action=detail&id={app_id}&tab=logs)"


def syncify(f):
Expand Down Expand Up @@ -816,14 +815,13 @@ def _replace_wss_with_https(endpoint: str):

status: Dict = app_status['status']
endpoint = _get_endpoint(status)
flow_namespace = app_id.split("-")[-1]

_add_row('App ID', app_id, bold_key=True, bold_value=True)
_add_row('Phase', status.get('phase', ''))
_add_row('Endpoint', endpoint)
_add_row(
'App logs',
Markdown(APP_LOGS_URL.format(flow=flow_namespace), justify='center'),
Markdown(APP_LOGS_URL.format(app_id=app_id), justify='center'),
)
_add_row('Swagger UI', _replace_wss_with_https(f'{endpoint}/docs'))
_add_row('OpenAPI JSON', _replace_wss_with_https(f'{endpoint}/openapi.json'))
Expand Down

0 comments on commit 9cce41c

Please sign in to comment.