pingsutw commented on a change in pull request #871: URL: https://github.com/apache/submarine/pull/871#discussion_r786398511
########## File path: submarine-sdk/pysubmarine/submarine/cli/notebook/command.py ########## @@ -15,24 +15,132 @@ under the License. """ +import json +import time + import click +from rich.console import Console +from rich.json import JSON as richJSON +from rich.panel import Panel +from rich.table import Table + +from submarine.cli.config.config import loadConfig +from submarine.client.api.notebook_client import NotebookClient +from submarine.client.exceptions import ApiException + +submarineCliConfig = loadConfig() +if submarineCliConfig is None: + exit(1) +notebookClient = NotebookClient( + host="http://{}:{}".format( + submarineCliConfig.connection.hostname, submarineCliConfig.connection.port + ) +) + +POLLING_INTERVAL = 1 # sec +TIMEOUT = 30 # sec @click.command("notebook") def list_notebook(): """List notebooks""" - click.echo("list notebook!") + COLS_TO_SHOW = ["Name", "ID", "Environment", "Resources", "Status"] + console = Console() + # using user_id hard coded in SysUserRestApi.java Review comment: add the link in the comment. https://github.com/apache/submarine/blob/5040068d7214a46c52ba87e10e9fa64411293cf7/submarine-server/server-core/src/main/java/org/apache/submarine/server/workbench/rest/SysUserRestApi.java#L228 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
