Extend project settings with azure devops sdk
jan-machacek opened this issue · 4 comments
Hello everyone,
I have a question for you.
I have old vss extension of project settings and it worked well, but I try to rewrite it to react and azure devops extension sdk and when I put my hub into project setting or own hub group then i see page in menu but after click nothing is loaded, no progress indicator, nothing. If I put my hub into another place in devops (for example Borads) then I see my page, so I think, everythings is OK with it.
Is there any required settings, previlieges for show page with this sdk like project settings, hub in own hub group?
Have anyone same experience or can someone try it to place hub into project settings (ms.vss-web.project-admin-hub-group)? I want to know if it is only my fault, or not.
Thanks
JM
As I read in another ticket, placing a user settings into TFS settings is not possible anymore.
Own hub group is working good for me.
I have similar experience (nothing displayed) if I forget to call
await SDK.init();
await SDK.ready();
at start code of the hub.
The second reason could be that you have a bad definition of manifest (not aligned manifest file names and real file names). To debug this, the best is to watch the Network tab in browser's developer tool.
Thank you for your response.
It is strange, I cannot set it right to work.
I was using SDK.init() before in componentDidMount how it is in samples, After your message I change it to await SK.init() and await SDK.ready() and still same.
In which method of react component you calling these functions?
I watching debugger tool for errors or something. No Errors there and in network communication I see, that my page in own hub group is not loaded.
Thank you a lot for help.
Places where is used my hub, in Board it is show OK, in own hub nothing loaded.
-
I think that it will not be
SDK.init
issue. In this case, hub would not work at any place. I call these methods before component start, I main func. -
Do you have correct definitions of Hub group? Attaching parts of my sample hub definition.
{
"id": "scia-devops-group",
"type": "ms.vss-web.hub-group",
"description": "SCIA DevOps DEVE",
"targets": [
"ms.vss-web.project-hub-groups-collection"
],
"properties": {
"name": "SCIA DevOps-DEVE",
"icon": {
"dark": "img/DevOps.png",
"light": "img/DevOps.png"
}
}
},
{
"id": "deve-version-hub",
"type": "ms.vss-web.hub",
"targets": [
".scia-devops-group"
],
"properties": {
"name": "Deve versions-DEVE",
"order": 1,
"uri": "dist/DeveVersionHub/DeveVersionHub.html",
"icon": {
"dark": "img/DeveVersionHub-Dark.png",
"light": "img/DeveVersionHub-Light.png"
}
}
},
- You should also try to look into your .HTML file in your plugin package (it is normal ZIP) and see its reference to .JS file. You should check location of these files in plugin file system.
- You should also go to Network debugger and find GET for these files and check if its result codes are 200 OK.
Oh my.... I found mistake in my code now. I use "url" instead of "uri". All works now.
I try to run code in dist before and all works, so I know, that it is OK, but final package was wrong.
Thank you for your help a lot. It's funny that I send my codes to devops support team like first and they don't see it too :-)