Date: Thu, 6 Aug 2015 20:58:49 GMT From: kczekirda@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r289315 - soc2015/kczekirda/www Message-ID: <201508062058.t76KwnkQ074558@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kczekirda Date: Thu Aug 6 20:58:48 2015 New Revision: 289315 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=289315 Log: tasks management - take task and changee task status funcions Modified: soc2015/kczekirda/www/menu.py Modified: soc2015/kczekirda/www/menu.py ============================================================================== --- soc2015/kczekirda/www/menu.py Thu Aug 6 19:53:41 2015 (r289314) +++ soc2015/kczekirda/www/menu.py Thu Aug 6 20:58:48 2015 (r289315) @@ -116,7 +116,23 @@ return redirect('/admin') else: return template(delete_task_tpl,revision=revision) - + +@route('/admin/change_status/:revision/:new_status', method='GET') +def change_status(revision,new_status): + conn = sqlite3.connect(database) + c = conn.cursor() + c.execute("UPDATE tasks SET status = ? WHERE revision LIKE ?", (new_status,revision)) + conn.commit() + return redirect('/admin') + +@route('/admin/take_task/:revision/:host', method='GET') +def take_task(revision,host): + conn = sqlite3.connect(database) + c = conn.cursor() + c.execute("UPDATE tasks SET host = ? WHERE revision LIKE ?", (host,revision)) + conn.commit() + return redirect('/admin') + @route('/menu/:mac', method='GET') def static(mac): conn = sqlite3.connect(database)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508062058.t76KwnkQ074558>