mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Added a few "pretty" enhacements...
This commit is contained in:
parent
3e87c90c67
commit
de5e7380c4
@ -70,7 +70,7 @@ class ServicesUsage(DetailHandler):
|
||||
'user_id': ''
|
||||
}
|
||||
else:
|
||||
owner = item.user.fullUsername
|
||||
owner = item.user.pretty_name
|
||||
owner_info = {
|
||||
'auth_id': item.user.manager.uuid,
|
||||
'user_id': item.user.uuid
|
||||
|
@ -91,7 +91,7 @@ class AssignedService(DetailHandler):
|
||||
'user_id': ''
|
||||
}
|
||||
else:
|
||||
owner = item.user.fullUsername
|
||||
owner = item.user.pretty_name
|
||||
owner_info = {
|
||||
'auth_id': item.user.manager.uuid,
|
||||
'user_id': item.user.uuid
|
||||
|
@ -88,6 +88,10 @@ class User(UUIDModel):
|
||||
'''
|
||||
return self.getManager().getForAuth(self.name)
|
||||
|
||||
@property
|
||||
def pretty_name(self):
|
||||
return self.name + '@' + self.manager.name
|
||||
|
||||
def getManager(self):
|
||||
'''
|
||||
Returns the authenticator object that owns this user.
|
||||
@ -168,10 +172,6 @@ class User(UUIDModel):
|
||||
# This group matches
|
||||
yield g
|
||||
|
||||
@property
|
||||
def fullUsername(self):
|
||||
return self.manager.name + "\\" + self.name
|
||||
|
||||
def __str__(self):
|
||||
return u"User {0}(id:{1}) from auth {2}".format(self.name, self.id, self.manager.name)
|
||||
|
||||
|
@ -226,7 +226,7 @@ gui.providers.link = (event) ->
|
||||
|
||||
onData: (data) ->
|
||||
$.each data, (index, value) ->
|
||||
value.owner = gui.fastLink(value.owner, "#{value.owner_info.auth_id},u#{value.owner_info.user_id}", 'gui.providers.fastLink', 'goAuthLink')
|
||||
value.owner = gui.fastLink(value.owner.replace /@/, '<span class="text-danger">@</span>', "#{value.owner_info.auth_id},u#{value.owner_info.user_id}", 'gui.providers.fastLink', 'goAuthLink')
|
||||
value.pool = gui.fastLink(value.pool, value.pool_id, 'gui.providers.fastLink', 'goPoolLink')
|
||||
|
||||
buttons: [
|
||||
|
@ -360,7 +360,7 @@ gui.servicesPools.link = (event) ->
|
||||
|
||||
onData: (data) ->
|
||||
$.each data, (undefined_, value) ->
|
||||
value.group_name = gui.fastLink("#{value.auth_name}\\#{value.name}", "#{value.auth_id},g#{value.id}", 'gui.servicesPools.fastLink', 'goAuthLink')
|
||||
value.group_name = gui.fastLink("#{value.name}<span class='text-danger'>@</span>#{value.auth_name}", "#{value.auth_id},g#{value.id}", 'gui.servicesPools.fastLink', 'goAuthLink')
|
||||
return
|
||||
|
||||
return
|
||||
@ -407,7 +407,7 @@ gui.servicesPools.link = (event) ->
|
||||
value.in_use = gettext('Yes')
|
||||
else
|
||||
value.in_use = gettext('No')
|
||||
value.owner = gui.fastLink(value.owner, "#{value.owner_info.auth_id},u#{value.owner_info.user_id}", 'gui.servicesPools.fastLink', 'goAuthLink')
|
||||
value.owner = gui.fastLink(value.owner.replace /@/, '<span class="text-danger">@</span>', "#{value.owner_info.auth_id},u#{value.owner_info.user_id}", 'gui.servicesPools.fastLink', 'goAuthLink')
|
||||
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user