mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-10 01:17:59 +03:00
removed nonused tool
This commit is contained in:
parent
194e232252
commit
952322556c
@ -1,757 +0,0 @@
|
||||
{
|
||||
"metadata": {
|
||||
"name": "",
|
||||
"signature": "sha256:229db3f9737c56e76d4edea1eae84b07d1acd301ecfb4eed6b4fadf15cce4793"
|
||||
},
|
||||
"nbformat": 3,
|
||||
"nbformat_minor": 0,
|
||||
"worksheets": [
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"cd .."
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stdout",
|
||||
"text": [
|
||||
"/home/dkmaster/projects/uds/openuds/server/src\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 3
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"from django import setup\n",
|
||||
"\n",
|
||||
"setup()\n"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.services.ServiceProviderFactory:Adding provider HyperVPlatform as <class 'uds.services.HyperV_enterprise.HyperVProvider.Provider'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.services.ServiceProviderFactory:Adding provider oVirtPlatform as <class 'uds.services.OVirt.OVirtProvider.Provider'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.services.ServiceProviderFactory:Adding provider PhysicalMachinesServiceProvider as <class 'uds.services.PhysicalMachines.ServiceProvider.PhysicalMachinesProvider'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.services.ServiceProviderFactory:Adding provider SampleProvider as <class 'uds.services.Sample.SampleProvider.Provider'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.services.ServiceProviderFactory:Adding provider TestProvider as <class 'uds.services.TestService_enterprise.TestProvider.TestProvider'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.services.ServiceProviderFactory:Adding provider VmwareVCServiceProvider as <class 'uds.services.Vmware_enterprise.ServiceProviderVC.VmwareVCServiceProvider'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.services.ServiceProviderFactory:Adding provider XenPlatform as <class 'uds.services.Xen.XenProvider.Provider'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.osmanagers.OSManagersFactory:Adding OS Manager LinuxManager as <class 'uds.osmanagers.LinuxOsManager.LinuxOsManager.LinuxOsManager'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.osmanagers.OSManagersFactory:Adding OS Manager LinRandomPasswordManager as <class 'uds.osmanagers.LinuxOsManager.LinuxRandomPassOsManager.LinuxRandomPassManager'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.osmanagers.OSManagersFactory:Adding OS Manager WindowsManager as <class 'uds.osmanagers.WindowsOsManager.WindowsOsManager.WindowsOsManager'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.osmanagers.OSManagersFactory:Adding OS Manager WinDomainManager as <class 'uds.osmanagers.WindowsOsManager.WinDomainOsManager.WinDomainOsManager'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.osmanagers.OSManagersFactory:Adding OS Manager WinRandomPasswordManager as <class 'uds.osmanagers.WindowsOsManager.WinRandomPassOsManager.WinRandomPassManager'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.osmanagers.OSManagersFactory:Adding OS Manager LinuxManager as <class 'uds.osmanagers.LinuxOsManager.LinuxOsManager.LinuxOsManager'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.osmanagers.OSManagersFactory:Adding OS Manager WindowsManager as <class 'uds.osmanagers.WindowsOsManager.WindowsOsManager.WindowsOsManager'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.transports.TransportsFactory:Adding transport HTML5RDPTransport as <class 'uds.transports.HTML5RDP.HTML5RDP.HTML5RDPTransport'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.transports.TransportsFactory:Adding transport NXTransport as <class 'uds.transports.NX.NXTransport.NXTransport'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.transports.TransportsFactory:Adding transport TSNXTransport as <class 'uds.transports.NX.TSNXTransport.TSNXTransport'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.transports.TransportsFactory:Adding transport RDPTransport as <class 'uds.transports.RDP.RDPTransport.RDPTransport'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.transports.TransportsFactory:Adding transport TSRDPTransport as <class 'uds.transports.RDP.TSRDPTransport.TSRDPTransport'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.transports.TransportsFactory:Adding transport RGSTransport as <class 'uds.transports.RGS_enterprise.RGSTransport.RGSTransport'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.core.transports.TransportsFactory:Adding transport TRGSTransport as <class 'uds.transports.RGS_enterprise.TRGSTransport.TRGSTransport'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.dispatchers:Dispatchers initialized\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.plugins:Initializing plugins\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Loading Handlers\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.actor.Actor'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.actor.Actor'> for method actor in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.users_groups.Users'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.users_groups.Users'> for method users in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.users_groups.Groups'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.users_groups.Groups'> for method groups in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.services.Services'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.services.Services'> for method services in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.user_services.CachedService'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.user_services.CachedService'> for method cachedservice in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.user_services.Groups'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.user_services.Groups'> for method groups in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.user_services.Transports'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.user_services.Transports'> for method transports in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.user_services.Publications'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.user_services.Publications'> for method publications in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.authenticators.Authenticators'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.authenticators.Authenticators'> for method authenticators in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.images.Images'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.images.Images'> for method images in path gallery\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.networks.Networks'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.networks.Networks'> for method networks in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.osmanagers.OsManagers'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.osmanagers.OsManagers'> for method osmanagers in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.providers.Providers'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.providers.Providers'> for method providers in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.services_pools.ServicesPools'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.services_pools.ServicesPools'> for method servicespools in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.transports.Transports'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.transports.Transports'> for method transports in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.reports.Reports'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.reports.Reports'> for method reports in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.cache.Cache'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.cache.Cache'> for method cache in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.client.Client'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.client.Client'> for method client in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.config.Config'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.config.Config'> for method config in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.connection.Connection'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.connection.Connection'> for method connection in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.gui_callback.Callback'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.gui_callback.Callback'> for method callback in path gui\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.login_logout.Login'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.login_logout.Login'> for method login in path auth\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.login_logout.Logout'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.login_logout.Logout'> for method logout in path auth\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.login_logout.Auths'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.login_logout.Auths'> for method auths in path auth\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.permissions.Permissions'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.permissions.Permissions'> for method permissions in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.system.System'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.system.System'> for method system in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Found class <class 'uds.REST.methods.tickets.Tickets'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds.REST:Adding handler <class 'uds.REST.methods.tickets.Tickets'> for method tickets in path None\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"output_type": "stream",
|
||||
"stream": "stderr",
|
||||
"text": [
|
||||
"DEBUG:uds:Initializing app (ready) ***************\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 4
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"from django.template.defaultfilters import date\n",
|
||||
"from django.utils.formats import get_format\n",
|
||||
"\n",
|
||||
"import datetime\n",
|
||||
"\n",
|
||||
"date(datetime.datetime.now(), get_format('SHORT_DATETIME_FORMAT'))"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"metadata": {},
|
||||
"output_type": "pyout",
|
||||
"prompt_number": 5,
|
||||
"text": [
|
||||
"u'05/05/2015 5:59 a.m.'"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 5
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"# execute from django home\n",
|
||||
"from __future__ import unicode_literals\n",
|
||||
"\n",
|
||||
"from django.utils.translation import ugettext, ugettext_noop as _\n",
|
||||
"from django.utils import formats\n",
|
||||
"import django.template.defaultfilters as filters\n",
|
||||
"\n",
|
||||
"from uds.core.util.stats import events\n",
|
||||
"\n",
|
||||
"import datetime\n",
|
||||
"import cairo\n",
|
||||
"import pycha.line\n",
|
||||
"\n",
|
||||
"from PIL import Image as PILImage\n",
|
||||
"import StringIO\n",
|
||||
"\n",
|
||||
"# Width & heighth\n",
|
||||
"width, height = 1920, 1080\n",
|
||||
"# x axis label format\n",
|
||||
"\n",
|
||||
"start, end, samplingPoints = 1420066800, 1451516400, 64\n",
|
||||
"\n",
|
||||
"if end - start > 3600*24*2:\n",
|
||||
" xLabelFormat = formats.get_format('SHORT_DATE_FORMAT')\n",
|
||||
"else:\n",
|
||||
" xLabelFormat = formats.get_format('SHORT_DATETIME_FORMAT')\n",
|
||||
"\n",
|
||||
"samplingIntervals = []\n",
|
||||
"prevVal = None\n",
|
||||
"for val in range(start, end, (end - start) / (samplingPoints + 1)):\n",
|
||||
" if prevVal is None:\n",
|
||||
" prevVal = val\n",
|
||||
" continue\n",
|
||||
" samplingIntervals.append((prevVal, val))\n",
|
||||
" prevVal = val\n",
|
||||
"\n",
|
||||
"data = []\n",
|
||||
"for interval in samplingIntervals:\n",
|
||||
" key = (interval[0] + interval[1]) / 2\n",
|
||||
" data.append((key, events.statsManager().getEvents(events.OT_AUTHENTICATOR, events.ET_LOGIN, since=interval[0], to=interval[1]).count())) # @UndefinedVariable\n",
|
||||
"\n",
|
||||
"surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)\n",
|
||||
"\n",
|
||||
"dataset = (('Users access to UDS', data),)\n",
|
||||
"\n",
|
||||
"options = {\n",
|
||||
" 'encoding': 'utf-8',\n",
|
||||
" 'axis': {\n",
|
||||
" 'x': {\n",
|
||||
" 'ticks': [dict(v=i, label=filters.date(datetime.datetime.fromtimestamp(i), xLabelFormat)) for i in range(start, end, (end-start)/11)],\n",
|
||||
" 'range': (start, end),\n",
|
||||
" 'showLines': True,\n",
|
||||
" },\n",
|
||||
" 'y': {\n",
|
||||
" 'tickCount': 10,\n",
|
||||
" 'showLines': True,\n",
|
||||
" },\n",
|
||||
" 'tickFontSize': 16,\n",
|
||||
" },\n",
|
||||
" 'background': {\n",
|
||||
" 'chartColor': '#ffffff',\n",
|
||||
" 'baseColor': '#ffffff',\n",
|
||||
" 'lineColor': '#187FF2'\n",
|
||||
" },\n",
|
||||
" 'colorScheme': {\n",
|
||||
" 'name': 'gradient',\n",
|
||||
" 'args': {\n",
|
||||
" 'initialColor': '#B8CA16',\n",
|
||||
" },\n",
|
||||
" },\n",
|
||||
" 'legend': {\n",
|
||||
" 'hide': False,\n",
|
||||
" 'legendFontSize': 16,\n",
|
||||
" 'position': {\n",
|
||||
" 'left': 48,\n",
|
||||
" 'bottom': 8,\n",
|
||||
" }\n",
|
||||
" },\n",
|
||||
" 'padding': {\n",
|
||||
" 'left': 48,\n",
|
||||
" 'top': 16,\n",
|
||||
" 'right': 48,\n",
|
||||
" 'bottom': 48,\n",
|
||||
" },\n",
|
||||
" 'title': _('Users usage of UDS')\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"chart = pycha.line.LineChart(surface, options)\n",
|
||||
"chart.addDataset(dataset)\n",
|
||||
"chart.render()\n",
|
||||
"\n",
|
||||
"output = StringIO.StringIO()\n",
|
||||
"\n",
|
||||
"surface.write_to_png(output)\n",
|
||||
"\n",
|
||||
"im = PILImage.frombuffer(\"RGBA\",( surface.get_width(),surface.get_height() ),surface.get_data(),\"raw\",\"BGRA\",0,1)\n",
|
||||
"#im.save('/tmp/out2.png')\n",
|
||||
"\n",
|
||||
"#surface.write_to_png('/tmp/out.png')"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"prompt_number": 69
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"collapsed": false,
|
||||
"input": [
|
||||
"im.size"
|
||||
],
|
||||
"language": "python",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "NameError",
|
||||
"evalue": "name 'im' is not defined",
|
||||
"output_type": "pyerr",
|
||||
"traceback": [
|
||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
|
||||
"\u001b[0;32m<ipython-input-1-4e3749252673>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mim\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msize\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
||||
"\u001b[0;31mNameError\u001b[0m: name 'im' is not defined"
|
||||
]
|
||||
}
|
||||
],
|
||||
"prompt_number": 1
|
||||
}
|
||||
],
|
||||
"metadata": {}
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user