added Flowr configuration
This commit is contained in:
@ -7,6 +7,7 @@ before_install:
|
||||
before_script:
|
||||
- cp .rspec.travis .rspec
|
||||
- cp config/action_mailer.yml.travis config/action_mailer.yml
|
||||
- cp config/code_ocean.yml.travis config/code_ocean.yml
|
||||
- cp config/database.yml.travis config/database.yml
|
||||
- cp config/secrets.yml.travis config/secrets.yml
|
||||
- psql --command='CREATE DATABASE travis_ci_test;' --username=postgres
|
||||
|
@ -17,7 +17,6 @@ $(function() {
|
||||
var active_frame;
|
||||
var running = false;
|
||||
|
||||
var flowrUrl = 'http://vm-teusner-webrtc.eaalab.hpi.uni-potsdam.de:3000/api/exceptioninfo?id=&lang=auto';
|
||||
var flowrResultHtml = '<div class="panel panel-default"><div id="{{headingId}}" role="tab" class="panel-heading"><h4 class="panel-title"><a data-toggle="collapse" data-parent="#flowrHint" href="#{{collapseId}}" aria-expanded="true" aria-controls="{{collapseId}}"></a></h4></div><div id="{{collapseId}}" role="tabpanel" aria-labelledby="{{headingId}}" class="panel-collapse collapse"><div class="panel-body"></div></div></div>';
|
||||
|
||||
var ajax = function(options) {
|
||||
@ -133,8 +132,12 @@ $(function() {
|
||||
event_source.addEventListener('info', storeContainerInformation);
|
||||
event_source.addEventListener('output', callback);
|
||||
event_source.addEventListener('start', callback);
|
||||
event_source.addEventListener('output', handleStderrOutputForFlowr);
|
||||
event_source.addEventListener('close', handleStderrOutputForFlowr);
|
||||
|
||||
if ($('#flowrHint').isPresent()) {
|
||||
event_source.addEventListener('output', handleStderrOutputForFlowr);
|
||||
event_source.addEventListener('close', handleStderrOutputForFlowr);
|
||||
}
|
||||
|
||||
event_source.addEventListener('status', function(event) {
|
||||
showStatus(JSON.parse(event.data));
|
||||
});
|
||||
@ -616,6 +619,7 @@ $(function() {
|
||||
|
||||
var stderrOutput = '';
|
||||
var handleStderrOutputForFlowr = function(event) {
|
||||
var flowrUrl = $('#flowrHint').data('url');
|
||||
var json = JSON.parse(event.data);
|
||||
|
||||
if (json.stderr) {
|
||||
|
@ -40,11 +40,10 @@ hr
|
||||
.panel-body
|
||||
#output
|
||||
pre = t('.no_output_yet')
|
||||
|
||||
#flowrHint.panel.panel-info(role='tab')
|
||||
.panel-heading = 'Gain more insights here'
|
||||
.panel-body
|
||||
|
||||
- if CodeOcean::Config.new(:code_ocean).read[:flowr][:enabled]
|
||||
#flowrHint.panel.panel-info data-url=CodeOcean::Config.new(:code_ocean).read[:flowr][:url] role='tab'
|
||||
.panel-heading = 'Gain more insights here'
|
||||
.panel-body
|
||||
#progress.tab-pane
|
||||
#results
|
||||
h2 = t('.results')
|
||||
|
14
config/code_ocean.yml.example
Normal file
14
config/code_ocean.yml.example
Normal file
@ -0,0 +1,14 @@
|
||||
default: &default
|
||||
flowr:
|
||||
enabled: false
|
||||
|
||||
development:
|
||||
flowr:
|
||||
enabled: true
|
||||
url: http://example.org:3000/api/exceptioninfo?id=&lang=auto
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
|
||||
test:
|
||||
<<: *default
|
3
config/code_ocean.yml.travis
Normal file
3
config/code_ocean.yml.travis
Normal file
@ -0,0 +1,3 @@
|
||||
test:
|
||||
flowr:
|
||||
enabled: false
|
@ -3,7 +3,7 @@ set :config_example_suffix, '.example'
|
||||
set :deploy_to, '/var/www/app'
|
||||
set :keep_releases, 3
|
||||
set :linked_dirs, %w(bin log public/uploads tmp/cache tmp/files tmp/pids tmp/sockets)
|
||||
set :linked_files, %w(config/action_mailer.yml config/database.yml config/secrets.yml config/sendmail.yml config/smtp.yml)
|
||||
set :linked_files, %w(config/action_mailer.yml config/code_ocean.yml config/database.yml config/secrets.yml config/sendmail.yml config/smtp.yml)
|
||||
set :log_level, :info
|
||||
set :puma_threads, [0, 16]
|
||||
set :repo_url, 'git@github.com:openHPI/codeocean.git'
|
||||
|
Reference in New Issue
Block a user