mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-18 21:57:27 +08:00
Go CLI: add show users plan summary (#16463)
### Summary ``` RAGFlow(admin)> show users plan summary; +---------+----------------------------------------------------------------+ | field | value | +---------+----------------------------------------------------------------+ | command | show_users_plan_summary | | error | 'Show users plan summary' is implemented in enterprise edition | +---------+----------------------------------------------------------------+ ``` Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -2525,6 +2525,8 @@ func (p *Parser) parseAdminShowUsersCommands() (*Command, error) {
|
||||
return cmd, nil
|
||||
case TokenActivity:
|
||||
return p.parseAdminShowUsersActivity()
|
||||
case TokenPlan:
|
||||
return p.parseAdminShowUsersPlan()
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid command")
|
||||
}
|
||||
@@ -2581,6 +2583,21 @@ commandLoop:
|
||||
return cmd, nil
|
||||
}
|
||||
|
||||
func (p *Parser) parseAdminShowUsersPlan() (*Command, error) {
|
||||
p.nextToken() // consume PLAN
|
||||
|
||||
if p.curToken.Type != TokenSummary {
|
||||
return nil, fmt.Errorf("expected SUMMARY")
|
||||
}
|
||||
p.nextToken()
|
||||
|
||||
cmd := NewCommand("admin_show_users_plan_command")
|
||||
if p.curToken.Type == TokenSemicolon {
|
||||
p.nextToken()
|
||||
}
|
||||
return cmd, nil
|
||||
}
|
||||
|
||||
// LIST USERS;
|
||||
// LIST USERS ACTIVE 30 DAYS; // default 7 days
|
||||
// LIST USERS INACTIVE 30 DAYS; // default 7 days
|
||||
|
||||
Reference in New Issue
Block a user