mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-23 01:01:31 +03:00
Merge pull request #1099 from nicolargo/revert-1098-feature/change-def-username-realm
Revert "add option to change default username and realm"
This commit is contained in:
commit
8e3241bab1
@ -212,10 +212,6 @@ Examples of use:
|
|||||||
help='define a client/server username')
|
help='define a client/server username')
|
||||||
parser.add_argument('--password', action='store_true', default=False, dest='password_prompt',
|
parser.add_argument('--password', action='store_true', default=False, dest='password_prompt',
|
||||||
help='define a client/server password')
|
help='define a client/server password')
|
||||||
parser.add_argument('--username-default', default=self.username, dest='username_default',
|
|
||||||
help='this option will be ignored if --username is specified')
|
|
||||||
parser.add_argument('--realm', default='glances', dest='realm',
|
|
||||||
help='used by Glances in web server mode when authentication is enabled')
|
|
||||||
parser.add_argument('--snmp-community', default='public', dest='snmp_community',
|
parser.add_argument('--snmp-community', default='public', dest='snmp_community',
|
||||||
help='SNMP community')
|
help='SNMP community')
|
||||||
parser.add_argument('--snmp-port', default=161, type=int,
|
parser.add_argument('--snmp-port', default=161, type=int,
|
||||||
@ -316,7 +312,7 @@ Examples of use:
|
|||||||
description='Enter the Glances server username: ')
|
description='Enter the Glances server username: ')
|
||||||
else:
|
else:
|
||||||
# Default user name is 'glances'
|
# Default user name is 'glances'
|
||||||
args.username = args.username_default
|
args.username = self.username
|
||||||
|
|
||||||
if args.password_prompt:
|
if args.password_prompt:
|
||||||
# Interactive or file password
|
# Interactive or file password
|
||||||
|
@ -65,7 +65,7 @@ class GlancesBottle(object):
|
|||||||
self._app.install(EnableCors())
|
self._app.install(EnableCors())
|
||||||
# Password
|
# Password
|
||||||
if args.password != '':
|
if args.password != '':
|
||||||
self._app.install(auth_basic(self.check_auth, realm=args.realm))
|
self._app.install(auth_basic(self.check_auth))
|
||||||
# Define routes
|
# Define routes
|
||||||
self._route()
|
self._route()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user