-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: master
Are you sure you want to change the base?
Conversation
@@ -161,6 +161,28 @@ export class ShadowboxServer implements server.Server { | |||
return usageMap; | |||
} | |||
|
|||
async getTunnelTimeByLocation(): Promise<server.TunnelTimeSecondsByLocation> { |
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.
This will be implemented once we finalize the endpoint in this PR: Jigsaw-Code/outline-server#1581
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.
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 */ |
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.
What do you mean with sidestepping Webpack? Why do you need that?
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.
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": { |
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.
Why are we changing this? Can you keep the existing "Connections" for now?
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.
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": { |
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.
We should decouple the window size from the message. How do we do the current "/ last 30 days"?
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.
It's currently hardcoded:
outline-apps/server_manager/messages/master_messages.json
Lines 1068 to 1075 in ab29f2c
"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?
55108a4
to
ee8c388
Compare
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.
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": { |
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.
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": { |
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.
It's currently hardcoded:
outline-apps/server_manager/messages/master_messages.json
Lines 1068 to 1075 in ab29f2c
"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?
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.
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! |
Here's an initial PR for a data table component: #2273 |
TODOs: