-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ant Design Table changes #127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zitrosolrac @jverswijver Submitting initial review. Nice work guys!
for comp_name, comp in ( | ||
grid["component_templates"] | ||
if "component_templates" in grid | ||
else grid["components"] | ||
).items(): | ||
if re.match( | ||
r"^(table|metadata|plot|file|slider|dropdown-query).*$", | ||
r"^(table|djtable|metadata|plot|file|slider|dropdown-query).*$", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r"^(table|djtable|metadata|plot|file|slider|dropdown-query).*$", | |
r"^(table|antd-table|metadata|plot|file|slider|dropdown-query).*$", |
@@ -322,6 +348,7 @@ def dj_query_route(self): | |||
"basicquery": BasicQuery, | |||
"plot:plotly:stored_json": PlotPlotlyStoredjsonComponent, | |||
"table": TableComponent, | |||
"djtable": TableComponent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"djtable": TableComponent, | |
"antd-table": TableComponent, |
@@ -287,12 +306,19 @@ def __init__(self, *args, **kwargs): | |||
|
|||
def dj_query_route(self): | |||
fetch_metadata = self.fetch_metadata | |||
print(request.args, flush=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print(request.args, flush=True) |
if type(o) is UUID: | ||
return str(o) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if type(o) is UUID: | |
return str(o) | |
if type(o) is UUID: | |
return str(o) | |
if type(o) is str and o == "NaN": | |
return None |
return json.JSONEncoder.default(self, o) | ||
|
||
@classmethod | ||
def dumps(cls, obj): | ||
return json.dumps(obj, cls=cls) | ||
return json.dumps(obj, cls=cls).replace("NaN", "null") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return json.dumps(obj, cls=cls).replace("NaN", "null") | |
return json.dumps(obj, cls=cls) |
@@ -77,7 +80,7 @@ def __init__(self, name, component_config, static_config, jwt_payload: dict): | |||
self.vm_list = [ | |||
dj.VirtualModule( | |||
s, | |||
s, | |||
s.replace("__DASH__", "-"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double _
-> -
might be a bit easier to work with though the user would need to know this...
s.replace("__DASH__", "-"), | |
s.replace("__", "-"), |
Nice work @zitrosolrac. 🤝 Since @jverswijver is cleaning this up and including your commits, I'll go ahead and close this since the other supersedes this. |
No description provided.