We are trying to create a handful of widgets so I've created a new extension to house them, WidgetLibrary. I'm starting off with a widget called hyc so I added an entrypoint for it using q2 tecton (see WidgetLibrary.py config below) and added a path to the router inside of extension.py (snippets below).
When I try to go to https://stack.q2developer.com/sdk/unify/ardent/uux.aspx#/extension/WidgetLibrary/Main I can view the default form from Main. But if I go to https://stack.q2developer.com/sdk/unify/ardent/uux.aspx#/extension/WidgetLibrary/hyc I get a 404
2023-08-09T19:57:54.282 tornado.access WARNING 404 GET /WidgetLibrary/assets/hyc?tct-id=WidgetLibrary_hyc_widget.WidgetLibrary.hyc&tct-maxHeight=&tct-maxWidth=&tct-outlet-name=WidgetLibrary_hyc_widget (127.0.0.1) 2.39ms
A similar thing occurs if I try to view the widget on a position on a page (like activityCenter.top). If I use Main it shows up but if I use hyc I get an endless spinner and a 404 in the terminal. Any idea how I can fix this?
FEATURE = {
"core": False,
"modules": {
"Main": {
"overpanel": False,
"primary": True,
"navigable": True,
"formPostAuth": False,
"url": "{BASE_URL}/index.html",
"meta": {
"type": {
"shape": "Content",
"context": "None",
"overpanelReady": False
}
}
},
"hyc": {
"overpanel": False,
"primary": False,
"navigable": True,
"formPostAuth": False,
"url": "{BASE_URL}/hyc",
"meta": {
"type": {
"shape": "Content",
"context": "None",
"overpanelReady": True
}
}
}
}
}
router.update({
'default': self.default,
'submit': self.submit,
'hyc': self.hyc_widget
})
......
async def hyc_widget(self):
template = self.get_template('hyc_widget.html.jinja2', {})
...... #more code here
return html;
Try this out:
https://stack.q2developer.com/sdk/unify/ardent/uux.aspx?widget_location=dashboard.top&widget_name=WidgetLibrary.hyc
— Alan Perse 3 years agoThat isn't working. I just get the spinner and a 404. If I switch it to WidgetLibrary.Main that works for Main but I can't get it to work for hyc.
— Todd Culbertson 3 years agoHave you tried changing hyc_widget to just hyc? Just another thought. I had issues with widgets, but it was a year ago. I want to say the naming of the route needed to be the same as the url.
— Alan Perse 3 years agoI have tried that but it did not help. I just tried it again and removed all "hyc_widget" from the code and replaced with just "hyc". I am still getting the same 404. 2023-08-10T16:01:11.007 tornado.access WARNING 404 GET /WidgetLibrary/assets/hyc?tct-id=WidgetLibrary_hyc_widget.WidgetLibrary.hyc&tct-maxHeight=&tct-maxWidth=&tct-outlet-name=WidgetLibrary_hyc_widget (127.0.0.1) 1.49ms
— Todd Culbertson 3 years ago