mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-08 02:39:22 +00:00
feat: 添加 临时 password (#8035)
* perf: 添加 template password * perf: 修改id * perf: 修改 翻译 * perf: 修改 tmp token * perf: 修改 token Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -31,6 +31,8 @@ def combine_seq(s1, s2, callback=None):
|
||||
|
||||
|
||||
def get_logger(name=''):
|
||||
if '/' in name:
|
||||
name = os.path.basename(name).replace('.py', '')
|
||||
return logging.getLogger('jumpserver.%s' % name)
|
||||
|
||||
|
||||
|
@@ -40,27 +40,3 @@ def random_string(length, lower=True, upper=True, digit=True, special_char=False
|
||||
|
||||
password = ''.join(password)
|
||||
return password
|
||||
|
||||
|
||||
# def strTimeProp(start, end, prop, fmt):
|
||||
# time_start = time.mktime(time.strptime(start, fmt))
|
||||
# time_end = time.mktime(time.strptime(end, fmt))
|
||||
# ptime = time_start + prop * (time_end - time_start)
|
||||
# return int(ptime)
|
||||
#
|
||||
#
|
||||
# def randomTimestamp(start, end, fmt='%Y-%m-%d %H:%M:%S'):
|
||||
# return strTimeProp(start, end, random.random(), fmt)
|
||||
#
|
||||
#
|
||||
# def randomDate(start, end, frmt='%Y-%m-%d %H:%M:%S'):
|
||||
# return time.strftime(frmt, time.localtime(strTimeProp(start, end, random.random(), frmt)))
|
||||
#
|
||||
#
|
||||
# def randomTimestampList(start, end, n, frmt='%Y-%m-%d %H:%M:%S'):
|
||||
# return [randomTimestamp(start, end, frmt) for _ in range(n)]
|
||||
#
|
||||
#
|
||||
# def randomDateList(start, end, n, frmt='%Y-%m-%d %H:%M:%S'):
|
||||
# return [randomDate(start, end, frmt) for _ in range(n)]
|
||||
|
||||
|
Reference in New Issue
Block a user