From 0dc36d5c25e15e7c67984b1289656d0979afaa30 Mon Sep 17 00:00:00 2001 From: George Zografos Date: Wed, 13 Aug 2014 01:43:41 +0300 Subject: [PATCH 1/7] Added package management. --- .gitignore | 3 +++ MANIFEST.in | 4 ++++ README.md | 6 +++++- setup.py | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 MANIFEST.in create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 634e621..846097d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +dist/ +build/ +*.egg-info/ *.pyc ._* *.sqlite3 diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..5d9fe0e --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include LICENSE.md +include README.md +recursive-include pydash/static * +recursive-include pydash/templates * diff --git a/README.md b/README.md index 3be045b..9e02e75 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,11 @@ __[View Demo](http://pydash.hostechs.com/)__ Installation ============ -Clone the repository to your pc and copy the pydash folder to your django application. +Clone the repository to your pc and, assuming that ``pip`` is installed, run the +following commands: + +* `` python setup.py sdist `` +* `` pip install dist/django-pydash-app-*.tar.gz `` Make sure that ``django.contrib.auth`` is installed and working. diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e17ac72 --- /dev/null +++ b/setup.py @@ -0,0 +1,33 @@ +import os +from setuptools import setup + +README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() + +# allow setup.py to be run from any path +os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) + +setup( + name='django-pydash-app', + version='1.4.4', + packages=['pydash'], + include_package_data=True, + license='MIT', + description='A reusable django app for monitoring your linux server.', + long_description='', + url='https://github.com/k3oni/pydash-django-app', + author='Florian N.', + author_email='michaelneagu@gmail.com', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Environment :: Web Environment' + 'Framework :: Django', + 'Intended Audience :: System Administrators', + 'License :: OSI Approved :: MIT License', + 'Operating System :: POSIX :: Linux', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + 'Topic :: Internet :: WWW/HTTP', + 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', + ], +) From e4d1a56b8300375733b7948d186b1fc37044307e Mon Sep 17 00:00:00 2001 From: Florian N Date: Tue, 12 Aug 2014 22:13:00 -0400 Subject: [PATCH 2/7] Update README.md Add contributors --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9e02e75..c464c85 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,10 @@ License **[MIT](https://github.com/k3oni/pydash-django-app/blob/master/LICENSE.md)** +Contributors +============ +George Zografos - george.p.zografos@gmail.com + Credits ======= From 975d7f4fcb2ac19c81c731c5a31a0376a74f3462 Mon Sep 17 00:00:00 2001 From: Florian N Date: Tue, 12 Aug 2014 22:30:36 -0400 Subject: [PATCH 3/7] Create README.rst --- README.rst | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..c8b6740 --- /dev/null +++ b/README.rst @@ -0,0 +1,111 @@ +pyDash - v1.4.4 +=============== + +A reusable django app for monitoring your linux server. + +Supported Python versions: + +- Python 2.x + +Requirements: + +- Django >= 1.5 + +Installation +============ + +Clone the repository to your pc and, assuming that ``pip`` is installed, +run the following commands: + +- ``python setup.py sdist`` +- ``pip install dist/django-pydash-app-*.tar.gz`` + +Make sure that ``django.contrib.auth`` is installed and working. + +Open your project’s ``settings.py`` and add ``pydash`` to +``INSTALLED_APPS``: + +:: + + INSTALLED_APPS = ( + 'pydash', + ) + +Open your project’s ``urls.py`` and include the ``pydash`` urls. + +:: + + urlpatterns = patterns('', + (r'^pydash/', include('pydash.urls')), + ) + +Make sure ``AppDirectoriesFinder`` is enabled in your +``STATICFILES_FINDERS``: + +:: + + STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + ) + +Before deploying to a live server, run the following command in order to +collect the static files stored in pydash’s directory: + +:: + + $ python manage.py collectstatic + +Settings +======== + +There are 3 different refresh settings which are measured in +``miliseconds``: + +:: + + TIME_JS_REFRESH = 30000 #30 seconds + TIME_JS_REFRESH_LONG = 120000 #120 seconds + TIME_JS_REFRESH_NET = 2000 #2 seconds + +If you wish to override the default settings, simply set those fields +with the new values in your application’s ``settings.py`` file. + +The refresh settings for each table are as follows: + +:: + + Memory Usage - TIME_JS_REFRESH + Load Average - TIME_JS_REFRESH + CPU Usage - TIME_JS_REFRESH + Traffic Usage - TIME_JS_REFRESH_NET + Disk Reads/Writes - TIME_JS_REFRESH_NET + Uptime - TIME_JS_REFRESH_LONG + Disk Usage - TIME_JS_REFRESH_LONG + Online Users - TIME_JS_REFRESH_LONG + Processes - TIME_JS_REFRESH_LONG + Netstat - TIME_JS_REFRESH_LONG + +Remote data retrieval +===================== + +pyDash allows you to retrieve data remotely. + +Data is returned in JSON and can be easily retrieved as long as the user +agent has been authenticated by the web application. + +pyDash has a list of short URLs which you can use to retrieve the +specific data: + +:: + + /info/uptime/ - Uptime + /info/platform/hostname/ - Hostname + /info/platform/osname/ - OS Name + /info/platform/kernel/ - Kernel + /info/getcpus/cpucount/ - Number of CPU cores + /info/getcpu + +Issues +====== + +Report any issues/bugs at `https://github.com/k3oni/pydash-django-app `_ From 6a66a133983d1ac06d9037ce00fa90e882d5965a Mon Sep 17 00:00:00 2001 From: Florian N Date: Tue, 12 Aug 2014 22:44:54 -0400 Subject: [PATCH 4/7] Update README.rst --- README.rst | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/README.rst b/README.rst index c8b6740..dcf9502 100644 --- a/README.rst +++ b/README.rst @@ -11,6 +11,15 @@ Requirements: - Django >= 1.5 + +`View Demo `_ + +:: + + user: admin + pass: admin + + Installation ============ @@ -105,7 +114,37 @@ specific data: /info/getcpus/cpucount/ - Number of CPU cores /info/getcpu +OS Support +========== + +pyDash was tested and runs under the following OSes: + +- Centos +- Fedora +- Ubuntu +- Debian +- Raspbian +- Pidora +- Arch Linux + +It might work under others, but it hasn’t been tested yet. + +Contributors +============ + +George Zografos - george.p.zografos@gmail.com + +License +======= + +`MIT `_ + Issues ====== Report any issues/bugs at `https://github.com/k3oni/pydash-django-app `_ + +Credits +======= + +`Dashboard Template `_, `Bootstrap `_, `Font Awesome `_ From ddc17f2a27f588c9a8cd20957a8551d175bc9d8b Mon Sep 17 00:00:00 2001 From: Florian N Date: Tue, 12 Aug 2014 22:46:33 -0400 Subject: [PATCH 5/7] Delete README.md --- README.md | 145 ------------------------------------------------------ 1 file changed, 145 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index c464c85..0000000 --- a/README.md +++ /dev/null @@ -1,145 +0,0 @@ -pyDash - v1.4.4 [![Follow @hostechs](https://dev.twitter.com/sites/default/files/images_documentation/bird_blue_32.png)](https://twitter.com/hostechs) [![View Profile](https://dlc1-s.licdn.com/sites/default/files/InBug-30px-R.png)](http://www.linkedin.com/in/hostechs/) -====== - - -[![Flattr this](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/2630601/k3onipydash-on-GitHub "Flattr this") - - -A reusable django app for monitoring your linux server. - - -Supported Python versions: - - - Python 2.x - -__[View Demo](http://pydash.hostechs.com/)__ - - user: admin - pass: admin - - -![pyDash](https://www.yaktab.com/en/2btxew) - - -Installation -============ - -Clone the repository to your pc and, assuming that ``pip`` is installed, run the -following commands: - -* `` python setup.py sdist `` -* `` pip install dist/django-pydash-app-*.tar.gz `` - -Make sure that ``django.contrib.auth`` is installed and working. - -Open your project's ``settings.py`` and add ``pydash`` to ``INSTALLED_APPS``: - - INSTALLED_APPS = ( - 'pydash', - ) - -Open your project's ``urls.py`` and include the ``pydash`` urls. - - urlpatterns = patterns('', - (r'^pydash/', include('pydash.urls')), - ) - -Make sure ``AppDirectoriesFinder`` is enabled in your ``STATICFILES_FINDERS``: - - STATICFILES_FINDERS = ( - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - ) - -Before deploying to a live server, run the following command in order to collect the static files stored in pydash's directory: - - $ python manage.py collectstatic - - -Settings -======== - -There are 3 different refresh settings which are measured in `miliseconds`: - - TIME_JS_REFRESH = 30000 #30 seconds - TIME_JS_REFRESH_LONG = 120000 #120 seconds - TIME_JS_REFRESH_NET = 2000 #2 seconds - -If you wish to override the default settings, simply set those fields with the new values in your application's ``settings.py`` file. - -The refresh settings for each table are as follows: - - Memory Usage - TIME_JS_REFRESH - Load Average - TIME_JS_REFRESH - CPU Usage - TIME_JS_REFRESH - Traffic Usage - TIME_JS_REFRESH_NET - Disk Reads/Writes - TIME_JS_REFRESH_NET - Uptime - TIME_JS_REFRESH_LONG - Disk Usage - TIME_JS_REFRESH_LONG - Online Users - TIME_JS_REFRESH_LONG - Processes - TIME_JS_REFRESH_LONG - Netstat - TIME_JS_REFRESH_LONG - - -Remote data retrieval -===================== - -pyDash allows you to retrieve data remotely. - -Data is returned in JSON and can be easily retrieved as long as the user agent has been authenticated by the web application. For more information about how sessions are managed in Django, please click [here](https://docs.djangoproject.com/en/1.6/topics/http/sessions/). - -pyDash has a list of short URLs which you can use to retrieve the specific data: - - /info/uptime/ - Uptime - /info/platform/hostname/ - Hostname - /info/platform/osname/ - OS Name - /info/platform/kernel/ - Kernel - /info/getcpus/cpucount/ - Number of CPU cores - /info/getcpus/cputype/ - Type/Name of CPU - /info/memory/ - Memory Usage - /info/cpuusage/ - CPU Usage in percentage(%), free and used - /info/getdisk/ - Disk Usage - /info/getusers/ - Online Users - /info/getips/ - IP Addresses - /info/gettraffic/ - Internet Traffic - /info/getdiskio/ - Disk Reads/Writes - /info/proc/ - Running Processes - /info/loadaverage/ - Load Average - /info/getnetstat/ - Netstat - -To see the format of the JSON returned, you can access any of the URLs from your browser, e.g. `http://demo.pydash.net/info/uptime/` . - - -OS Support -========== - -pyDash was tested and runs under the following OSes: - - - Centos - - Fedora - - Ubuntu - - Debian - - Raspbian - - Pidora - - Arch Linux - - -It might work under others, but it hasn't been tested yet. - - - -License -======= - -**[MIT](https://github.com/k3oni/pydash-django-app/blob/master/LICENSE.md)** - - -Contributors -============ -George Zografos - george.p.zografos@gmail.com - - -Credits -======= -[Dashboard Template](http://www.egrappler.com/templatevamp-free-twitter-bootstrap-admin-template/), -[Bootstrap](http://getbootstrap.com/), -[Font Awesome](http://fontawesome.io/) From d51cb7329d03dc0cd698fcd67c1a5daf965c1baf Mon Sep 17 00:00:00 2001 From: Florian N Date: Tue, 12 Aug 2014 22:48:35 -0400 Subject: [PATCH 6/7] Update setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e17ac72..e506779 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ import os from setuptools import setup -README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() +README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) @@ -13,7 +13,7 @@ setup( include_package_data=True, license='MIT', description='A reusable django app for monitoring your linux server.', - long_description='', + long_description=README, url='https://github.com/k3oni/pydash-django-app', author='Florian N.', author_email='michaelneagu@gmail.com', From 2074c1f8c3fdae30834dac006234e095020db917 Mon Sep 17 00:00:00 2001 From: Florian N Date: Tue, 12 Aug 2014 22:54:24 -0400 Subject: [PATCH 7/7] Update MANIFEST.in --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 5d9fe0e..f570f8d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ include LICENSE.md -include README.md +include README.rst recursive-include pydash/static * recursive-include pydash/templates *