-
Notifications
You must be signed in to change notification settings - Fork 611
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
add user usage detail in nodes #233
Conversation
wow , you make my idea and did it really fast , i didn't you could do this at short time. |
it's working like clockwork! great job on the changes. |
this feature is not difficult to implement |
+2065 lines.... |
Hello again, I'm going to make some changes in user_usages table |
Can you add period choose ? |
OK |
@SaintShit because the master and slave node are very similar, can let master be used as node 0(nodeid=0) to simplify statistics? |
Finish the current pull request first, and I will try implement it later. |
WOW Great Job! |
I think the way you implemented this is OK |
I was thinking about the best way to upsert to NodeUserUsages table, looks like we have no way except checking the not existing rows before the update query. I'm going to merge the current changes and then debug these. |
I think we can cache the key(username + "|" + node_id),it check only once |
I test is now |
Hmmm right, let's see if the current changes works well in large scale or not, if not, we'll add Redis. it will be used in other parts of code too ;D |
I do check in my compute, it is ok. func 'reset_all_users_data_usage' is not clear the nodes and system stat, so I think it will not affect the nodes usages |
|
Yes, used_traffic has been reset, but node usages has not been reset. I'll check this now |
Now node_usages will reset too |
I have a question is, why when cleaning all users uages , do we not clean system usage and nodes usage in node table ? |
Actually they're not the total usage of users, they are the amount of data that has passed through the outbounds. why should we reset them? |
for example, hire vps in linode or other cloud sever, there have usage limitation in one month, usually reset at next month, so I can see how usage used in current period. |
so, we can add a feature to reset system usage, or a reset option for each node. is this gonna solve this? |
yes, I think we can add this feature in node setting panel. also, we can add two another feature:
|
Yay, just made this issue. |
add usage detail icon in left-bottom

toggle show usage in nodes.

node usages(in menu list)
