Skip to content
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

feat(manager): move and update metrics cards in the server view #2241

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

daniellacosse
Copy link
Contributor

@daniellacosse daniellacosse commented Oct 14, 2024

Screenshot 2024-10-16 at 2 03 59 PM

TODOs:

  • access key tab
  • localize strings
  • add api call to server (not finalized)

@@ -161,6 +161,28 @@ export class ShadowboxServer implements server.Server {
return usageMap;
}

async getTunnelTimeByLocation(): Promise<server.TunnelTimeSecondsByLocation> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be implemented once we finalize the endpoint in this PR: Jigsaw-Code/outline-server#1581

@daniellacosse daniellacosse changed the title feat(manager): move and update metrics cards in the server view feat(manager): [MISSING ENDPOINT] move and update metrics cards in the server view Oct 16, 2024
@daniellacosse daniellacosse marked this pull request as ready for review October 16, 2024 18:08
@daniellacosse daniellacosse requested review from fortuna and a team as code owners October 16, 2024 18:08
@daniellacosse daniellacosse changed the title feat(manager): [MISSING ENDPOINT] move and update metrics cards in the server view feat(manager): [MISSING ENDPOINT - DO NOT MERGE] move and update metrics cards in the server view Oct 16, 2024
Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very helpful to see how the API is used. I believe we will benefit a lot from merging the stats flows into one.

@@ -27,6 +27,17 @@
http-equiv="Content-Security-Policy"
content="default-src 'self' 'unsafe-inline' outline: data:; connect-src https: 'self'; frame-src https://s3.amazonaws.com/outline-vpn/ ss:"
/>

<style>
/* We declare this here to sidestep webpack */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean with sidestepping Webpack? Why do you need that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to figure out how to get this to work with webpack, but currently webpack wants to resolve the url link here but doesn't know how. This index.html isn't transformed by webpack so that's what I mean by "sidestepping"

@@ -1051,6 +1051,16 @@
"message": "Access keys",
"description": "This string appears within the server view as a header of a table column that displays server access keys."
},
"server_access_keys_tab": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we changing this? Can you keep the existing "Connections" for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's part of the set of changes that UX wanted! Do you want me to move it to a separate PR? It's behind a feature flag currently.

@@ -1099,6 +1109,22 @@
"message": "Metrics",
"description": "This string appears within the server view as a header of the section that displays server metrics."
},
"server_metrics_data_transferred": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should decouple the window size from the message. How do we do the current "/ last 30 days"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's currently hardcoded:

"server_data_transfer": {
"message": "Data transferred / last 30 days",
"description": "This string appears within the server view as the header of a card that displays the amount of data transferred by the server."
},
"server_data_used": {
"message": "Allowance used / last 30 days",
"description": "This string appears within the server view as the header of a card that displays the amount of data transferred by the server as a percentage of the total available data."
},

Would you be okay with me decoupling this when we add the ability for users to set their own time range?

server_manager/model/server.ts Outdated Show resolved Hide resolved
server_manager/www/app.ts Outdated Show resolved Hide resolved
server_manager/www/app.ts Outdated Show resolved Hide resolved
@daniellacosse daniellacosse force-pushed the daniellacosse/tunneltime/move_metrics branch from 55108a4 to ee8c388 Compare November 12, 2024 16:09
@github-actions github-actions bot added size/L and removed size/M labels Nov 12, 2024
Copy link
Contributor Author

@daniellacosse daniellacosse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with the new endpoint JSON: will merge methods next

@@ -1051,6 +1051,16 @@
"message": "Access keys",
"description": "This string appears within the server view as a header of a table column that displays server access keys."
},
"server_access_keys_tab": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's part of the set of changes that UX wanted! Do you want me to move it to a separate PR? It's behind a feature flag currently.

@@ -1099,6 +1109,22 @@
"message": "Metrics",
"description": "This string appears within the server view as a header of the section that displays server metrics."
},
"server_metrics_data_transferred": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's currently hardcoded:

"server_data_transfer": {
"message": "Data transferred / last 30 days",
"description": "This string appears within the server view as the header of a card that displays the amount of data transferred by the server."
},
"server_data_used": {
"message": "Allowance used / last 30 days",
"description": "This string appears within the server view as the header of a card that displays the amount of data transferred by the server as a percentage of the total available data."
},

Would you be okay with me decoupling this when we add the ability for users to set their own time range?

server_manager/www/app.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, Per-ASN breakdown was a significant gap during the Iran crisis. It's a confirmed need and and we put a lot of effort to implement it. It's more of a question of how, not whether we want to surface that.

I would like to see that surfaced somehow in this PR, to inform the UX design. We've discussed a simple table, which seems to work well.

@daniellacosse
Copy link
Contributor Author

As discussed offline, Per-ASN breakdown was a significant gap during the Iran crisis. It's a confirmed need and and we put a lot of effort to implement it. It's more of a question of how, not whether we want to surface that.

I would like to see that surfaced somehow in this PR, to inform the UX design. We've discussed a simple table, which seems to work well.

Sure thing, working on it!

@daniellacosse
Copy link
Contributor Author

As discussed offline, Per-ASN breakdown was a significant gap during the Iran crisis. It's a confirmed need and and we put a lot of effort to implement it. It's more of a question of how, not whether we want to surface that.

I would like to see that surfaced somehow in this PR, to inform the UX design. We've discussed a simple table, which seems to work well.

Here's an initial PR for a data table component: #2273

@daniellacosse daniellacosse changed the title feat(manager): [MISSING ENDPOINT - DO NOT MERGE] move and update metrics cards in the server view feat(manager): move and update metrics cards in the server view Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants