コード例 #1
0
ファイル: test_core.py プロジェクト: binRick/supervise-web
    def test_run_file(self):
        self._create_test_daemon(1)
        dir_name = 'test_daemon_1'

        self.assertLess(23, len(run_file(dir_name)))
        run_file(dir_name, content='some new content')

        self.assertEqual('some new content', run_file(dir_name))
コード例 #2
0
ファイル: app.py プロジェクト: binRick/supervise-web
def _details(daemon_id):
    return render_template('_details.html',
                           daemon_id=daemon_id,
                           run_file_content=core.run_file(daemon_id),
                           run_user_file_content=core.run_file(daemon_id, run_user=True),
                           run_log_file=core.log_file_locations(daemon_id, 'run_log')[0],
                           daemon_log_file=core.log_file_locations(daemon_id, 'daemon_log')[0],
                           autostart=core.daemon_autostart(daemon_id))
コード例 #3
0
def _details(daemon_id):
    return render_template(
        '_details.html',
        daemon_id=daemon_id,
        run_file_content=core.run_file(daemon_id),
        run_user_file_content=core.run_file(daemon_id, run_user=True),
        run_log_file=core.log_file_locations(daemon_id, 'run_log')[0],
        daemon_log_file=core.log_file_locations(daemon_id, 'daemon_log')[0],
        autostart=core.daemon_autostart(daemon_id))
コード例 #4
0
ファイル: app.py プロジェクト: binRick/supervise-web
def daemon_action_save_file(daemon_id):
    filename = request.form['filename']
    content = request.form['content']
    if filename == 'run':
        core.run_file(daemon_id, content)
    elif filename == 'run-user':
        core.run_file(daemon_id, content, run_user=True)
    else:
        abort(405)
    return Response(status=204)
コード例 #5
0
def daemon_action_save_file(daemon_id):
    filename = request.form['filename']
    content = request.form['content']
    if filename == 'run':
        core.run_file(daemon_id, content)
    elif filename == 'run-user':
        core.run_file(daemon_id, content, run_user=True)
    else:
        abort(405)
    return Response(status=204)