-
Notifications
You must be signed in to change notification settings - Fork 224
Add multi teams support and update seat management tab to suppoft filter when clicking a card. #177
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
base: main
Are you sure you want to change the base?
Add multi teams support and update seat management tab to suppoft filter when clicking a card. #177
Conversation
pull reqeust for new metric support
Add support for multiple teams in the metrics viewer. * **API Changes**: - Modify `getTeams` function in `src/api/GitHubApi.ts` to return team names. - Update `getTeamMetricsApi` to handle multiple teams. - Add `getMultipleTeamsMetricsApi` function to fetch metrics for multiple teams. * **Component Changes**: - Add a dropdown menu in `src/components/MainComponent.vue` to select multiple teams. - Update `setup` function to fetch and display metrics data for selected teams. - Add a new component `MultiTeamsMetricsViewer.vue` to display multi-teams metrics information. * **Configuration Changes**: - Add support for multiple teams configuration in `src/config.ts`. - Add a new boolean parameter `VUE_APP_SHOW_MULTIPLE_TEAMS` in `.env` and `src/config.ts`. * **Documentation**: - Update `README.md` to describe metrics for multiple teams and the new `VUE_APP_SHOW_MULTIPLE_TEAMS` parameter.
…etrics viewer (docker env and display rows)
…s and improve metrics fetching logic,so it support non-unicode team names.
…huang/copilot-metrics-viewer into add-multi-teams-support
…ys, and filter data when clicking cards
…ys, and filter data when clicking cards
…huang/copilot-metrics-viewer into add-multi-teams-support
I'll work on the merge |
Hi @DevOps-zhuang, I was trying to use multi teams support which is implemented in this branch before it gets merged into the main branch. While attempting to build a Docker image using the code from this branch, I encountered the following error:
Could you please look into this and suggest a resolution? Alternatively, let me know if any dependencies or configurations need to be updated for this feature to work seamlessly when building Docker images. Thanks & Regards, |
the merge is not complete on this, it needs more changes |
I think the issue is caused that this branch version is not using he Nuxt framework. I you needed, I can share my docker image so that you can use it quickly? Thanks.
Jun Qian.
发件人: Pardhusri Satish Babu Obulasetti ***@***.***>
发送时间: 2025年3月21日 17:39
收件人: github-copilot-resources/copilot-metrics-viewer ***@***.***>
抄送: Junqian Zhuang ***@***.***>; Mention ***@***.***>
主题: Re: [github-copilot-resources/copilot-metrics-viewer] Add multi teams support and update seat management tab to suppoft filter when clicking a card. (PR #177)
Hi @DevOps-zhuang<https://github.com/DevOps-zhuang>,
I was trying to use multi teams support which is implemented in this branch before it gets merged into the main branch. While attempting to build a Docker image using the code from this branch, I encountered the following error:
[nuxi] ERROR Nuxt Build Error: Could not resolve "../api/GitHubApi" from "app/components/MultiTeamsMetricsViewer.vue?vue&type=script&lang.ts"
10.89 file: /app/app/components/MultiTeamsMetricsViewer.vue?vue&type=script&lang.ts
10.89
10.89 file: app/components/MultiTeamsMetricsViewer.vue?vue&type=script&lang.ts
10.89 at getRollupError (node_modules/rollup/dist/es/shared/parseAst.js:396:41)
10.89 at error (node_modules/rollup/dist/es/shared/parseAst.js:392:42)
10.89 at ModuleLoader.handleInvalidResolvedId (node_modules/rollup/dist/es/shared/node-entry.js:20212:24)
10.89 at node_modules/rollup/dist/es/shared/node-entry.js:20172:26
Could you please look into this and suggest a resolution? Alternatively, let me know if any dependencies or configurations need to be updated for this feature to work seamlessly when building Docker images.
Thanks & Regards,
Satish
―
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AM4XDKDCF3N4YQBCDRH7LUT2VPMZTAVCNFSM6AAAAABZAGEWV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBSHAZDMMBVGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
[图像已被发件人删除。 paobulas]paobulas left a comment (github-copilot-resources/copilot-metrics-viewer#177)<#177 (comment)>
Hi @DevOps-zhuang<https://github.com/DevOps-zhuang>,
I was trying to use multi teams support which is implemented in this branch before it gets merged into the main branch. While attempting to build a Docker image using the code from this branch, I encountered the following error:
[nuxi] ERROR Nuxt Build Error: Could not resolve "../api/GitHubApi" from "app/components/MultiTeamsMetricsViewer.vue?vue&type=script&lang.ts"
10.89 file: /app/app/components/MultiTeamsMetricsViewer.vue?vue&type=script&lang.ts
10.89
10.89 file: app/components/MultiTeamsMetricsViewer.vue?vue&type=script&lang.ts
10.89 at getRollupError (node_modules/rollup/dist/es/shared/parseAst.js:396:41)
10.89 at error (node_modules/rollup/dist/es/shared/parseAst.js:392:42)
10.89 at ModuleLoader.handleInvalidResolvedId (node_modules/rollup/dist/es/shared/node-entry.js:20212:24)
10.89 at node_modules/rollup/dist/es/shared/node-entry.js:20172:26
Could you please look into this and suggest a resolution? Alternatively, let me know if any dependencies or configurations need to be updated for this feature to work seamlessly when building Docker images.
Thanks & Regards,
Satish
―
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AM4XDKDCF3N4YQBCDRH7LUT2VPMZTAVCNFSM6AAAAABZAGEWV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBSHAZDMMBVGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@DevOps-zhuang could you please share me the docker image? |
will send you
docker login -u metricviewer -p +zyKpRFjw8A/PnQY9Rh0uThb1Z0yzxxsNUCQdbIlCV+ACRAsWd2z copilotx.azurecr.io docker pull copilotx.azurecr.io/copilot/copilot-metrics-viewer:2025-0226-MultiTeamsSupport |
Hi @DevOps-zhuang, Thank you for sharing the Docker image. Unfortunately, I am unable to get any output from the web page when using your Docker image (copilotx.azurecr.io/copilot/copilot-metrics-viewer:2025-0226-MultiTeamsSupport). Docker output log:
Could you please help me resolve this issue? Or have I missed something here? |
Are u tying against organization? It support organization level, and the .env should be look like below:
The VUE_APP_SHOW_MULTIPLE_TEAMS=true
***@***.***
发件人: Pardhusri Satish Babu Obulasetti ***@***.***>
发送时间: 2025年3月28日 0:14
收件人: github-copilot-resources/copilot-metrics-viewer ***@***.***>
抄送: Junqian Zhuang ***@***.***>; Mention ***@***.***>
主题: Re: [github-copilot-resources/copilot-metrics-viewer] Add multi teams support and update seat management tab to suppoft filter when clicking a card. (PR #177)
Hi @DevOps-zhuang<https://github.com/DevOps-zhuang>,
Thank you for sharing the Docker image.
Unfortunately, I am unable to get any output from the web page when using your Docker image (copilotx.azurecr.io/copilot/copilot-metrics-viewer:2025-0226-MultiTeamsSupport).
Docker output log:
***@***.*** ~/workspace/GitHub-Copilot-Metrics/copilot-metrics-viewer-zhuang
% docker run -p 8080:80 --env-file ./.env copilotx.azurecr.io/copilot/copilot-metrics-viewer:2025-0226-MultiTeamsSupport
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/99-config-app.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2025/03/27 16:00:59 [notice] 1#1: using the "epoll" event method
2025/03/27 16:00:59 [notice] 1#1: nginx/1.27.2
2025/03/27 16:00:59 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14)
2025/03/27 16:00:59 [notice] 1#1: OS: Linux 6.8.0-1021-azure
2025/03/27 16:00:59 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2025/03/27 16:00:59 [notice] 1#1: start worker processes
2025/03/27 16:00:59 [notice] 1#1: start worker process 31
2025/03/27 16:00:59 [notice] 1#1: start worker process 32
2025/03/27 16:00:59 [notice] 1#1: start worker process 33
2025/03/27 16:00:59 [notice] 1#1: start worker process 34
2025/03/27 16:00:59 [notice] 1#1: start worker process 35
2025/03/27 16:00:59 [notice] 1#1: start worker process 36
2025/03/27 16:00:59 [notice] 1#1: start worker process 37
2025/03/27 16:00:59 [notice] 1#1: start worker process 38
2025/03/27 16:00:59 [notice] 1#1: start worker process 39
2025/03/27 16:00:59 [notice] 1#1: start worker process 40
2025/03/27 16:00:59 [notice] 1#1: start worker process 41
2025/03/27 16:00:59 [notice] 1#1: start worker process 42
172.17.0.1 - - [27/Mar/2025:16:01:05 +0000] "GET /assets/app-config.js HTTP/1.1" 200 447 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" "-"
172.17.0.1 - - [27/Mar/2025:16:02:03 +0000] "GET /assets/app-config.js HTTP/1.1" 304 0 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" "-"
172.17.0.1 - - [27/Mar/2025:16:07:07 +0000] "GET /assets/app-config.js HTTP/1.1" 304 0 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" "-"
172.17.0.1 - - [27/Mar/2025:16:08:25 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" "-"
172.17.0.1 - - [27/Mar/2025:16:08:25 +0000] "GET /assets/app-config.js HTTP/1.1" 304 0 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" "-"
Screenshot.from.2025-03-27.21-37-22.png (view on web)<https://github.com/user-attachments/assets/cae2cbcd-8f62-414d-89de-62c1ed67dc4e>
Could you please help me resolve this issue? Or have I missed something here?
―
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AM4XDKBBZT5DWOZEEDZYL3L2WQPVPAVCNFSM6AAAAABZAGEWV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJYGYYTMMZVGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
[图像已被发件人删除。 paobulas]paobulas left a comment (github-copilot-resources/copilot-metrics-viewer#177)<#177 (comment)>
Hi @DevOps-zhuang<https://github.com/DevOps-zhuang>,
Thank you for sharing the Docker image.
Unfortunately, I am unable to get any output from the web page when using your Docker image (copilotx.azurecr.io/copilot/copilot-metrics-viewer:2025-0226-MultiTeamsSupport).
Docker output log:
***@***.*** ~/workspace/GitHub-Copilot-Metrics/copilot-metrics-viewer-zhuang
% docker run -p 8080:80 --env-file ./.env copilotx.azurecr.io/copilot/copilot-metrics-viewer:2025-0226-MultiTeamsSupport
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/99-config-app.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2025/03/27 16:00:59 [notice] 1#1: using the "epoll" event method
2025/03/27 16:00:59 [notice] 1#1: nginx/1.27.2
2025/03/27 16:00:59 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14)
2025/03/27 16:00:59 [notice] 1#1: OS: Linux 6.8.0-1021-azure
2025/03/27 16:00:59 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2025/03/27 16:00:59 [notice] 1#1: start worker processes
2025/03/27 16:00:59 [notice] 1#1: start worker process 31
2025/03/27 16:00:59 [notice] 1#1: start worker process 32
2025/03/27 16:00:59 [notice] 1#1: start worker process 33
2025/03/27 16:00:59 [notice] 1#1: start worker process 34
2025/03/27 16:00:59 [notice] 1#1: start worker process 35
2025/03/27 16:00:59 [notice] 1#1: start worker process 36
2025/03/27 16:00:59 [notice] 1#1: start worker process 37
2025/03/27 16:00:59 [notice] 1#1: start worker process 38
2025/03/27 16:00:59 [notice] 1#1: start worker process 39
2025/03/27 16:00:59 [notice] 1#1: start worker process 40
2025/03/27 16:00:59 [notice] 1#1: start worker process 41
2025/03/27 16:00:59 [notice] 1#1: start worker process 42
172.17.0.1 - - [27/Mar/2025:16:01:05 +0000] "GET /assets/app-config.js HTTP/1.1" 200 447 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" "-"
172.17.0.1 - - [27/Mar/2025:16:02:03 +0000] "GET /assets/app-config.js HTTP/1.1" 304 0 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" "-"
172.17.0.1 - - [27/Mar/2025:16:07:07 +0000] "GET /assets/app-config.js HTTP/1.1" 304 0 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" "-"
172.17.0.1 - - [27/Mar/2025:16:08:25 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" "-"
172.17.0.1 - - [27/Mar/2025:16:08:25 +0000] "GET /assets/app-config.js HTTP/1.1" 304 0 "http://localhost:8080/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" "-"
Screenshot.from.2025-03-27.21-37-22.png (view on web)<https://github.com/user-attachments/assets/cae2cbcd-8f62-414d-89de-62c1ed67dc4e>
Could you please help me resolve this issue? Or have I missed something here?
―
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AM4XDKBBZT5DWOZEEDZYL3L2WQPVPAVCNFSM6AAAAABZAGEWV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONJYGYYTMMZVGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
…and loading states - Updated MultiTeamsMetricsViewer.vue to display organization name in the title and improved team selection logic. - Added loading state for metrics fetching and improved error handling. - Introduced API endpoint for fetching team metrics with support for mocked data. - Refactored team fetching logic to handle both configured and API-fetched teams. - Improved metrics calculation and display logic for better user experience. - Updated nuxt.config.ts to support environment variable overrides for configuration.
I am using it for organization only. Still I am unable to see any metrics. Please find my .env file details below:
|
@karpikpl @paobulas Thanks's for your support, I just update the latest code to support NUXT, it works on my machines now, can you check the latest code? the branch is same: |
@paobulas thanks's for your patience, for the docker image I provides, please use the old .env, which is like below. |
…pe,only show it when scope is not enterprise
docke image is also built based on this branch, I already tested it, it works. |
@DevOps-zhuang i tested changes from your branch and the data is displayed in table. However it was observed that panels below the table are not reflecting as per selection. |
Thanks, you found a bug! it worked in non-Nuxt version, and for Nuxt version, I need to do some changes, I am fixing it now, thanks for your test! |
…s when selecting teams.
… from GitHub API and improve error handling
…and improved filtering
…g and organization query extraction
…t,reuse existing code
@DevOps-zhuang I’m unable to find an API that lists teams in GitHub Enterprise to find Teams slug. Is this the reason to not support 'Multi-Teams' at enterprise level? Any idea if the API is in development? |
… improve display name logic,so when team is set in .env, it will displayed
but, there is one specified enterprise called dedicated enterprise/copilot standalone, with such enterprise, there is no organization at all. so teams are within enterprise level. I am considering adding support for it in future. need more design, since it takes effort to tell it is 'normal' enterprise or 'dedicated' enterprise. And, since we support Nuxt now, you can change the URL in the brower to fetch for more organization, even special team. like thanks for your test and observation! |
…fetch logic for team data retrieval,so for team/org/enterprise level, the behavior is similar now
…ation and enhance toolbar styling for better visibility
1, add teams support like multi-team dashboards.
2, for seat managemnet, display more cards and when click a card, it will filter the data, only show filter data in below tables.
This pull request introduces several changes to the project, focusing on adding support for multiple teams, improving error handling, and updating configurations. The most important changes include updates to environment variables, modifications to the Dockerfile, enhancements in API handling, and new components for multi-team metrics.
Environment Variable Updates:
.env
: UpdatedVUE_APP_GITHUB_ORG
toCopilotDemo
and addedVUE_APP_SHOW_MULTIPLE_TEAMS
to support multiple teams. [1] [2]README.md
: Documented the newVUE_APP_SHOW_MULTIPLE_TEAMS
environment variable.Dockerfile Modifications:
Dockerfile
: Changed the base image tonode:22
, added commands to update thecaniuse-lite
database, fix ESLint errors, and handle build errors.Dockerfile
: Added command to start the Nginx server.API Enhancements:
src/api/GitHubApi.ts
: Refactored API calls to handle multiple teams, added error handling, and improved the fetching of team metrics. [1] [2]Component Updates for Multi-Team Support:
src/components/MainComponent.vue
: Integrated a newMultiTeamsMetricsViewer
component and updated logic to handle multiple teams. [1] [2] [3] [4] [5] [6]src/components/MetricsViewer.vue
: Combined data by day for better visualization and updated charts accordingly. [1] [2]Minor Updates:
public/assets/app-config.js
: AddedVUE_APP_SHOW_MULTIPLE_TEAMS
to the configuration.src/App.vue
: Updated footer text and version number. [1] [2]src/api/MetricsToUsageConverter.ts
: Commented out debug logs.