Skip to content

Commit

Permalink
get dashboard minimally running again
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Mar 7, 2019
1 parent effcd67 commit 006adc8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions dashboard.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/ruby

require 'rubygems'
require 'wunderbar/job-control'
require 'time'
require 'yaml'

$home = $HOME.sub(/\/?$/, '/')
$HOME ||= ENV['HOME']

$home = $HOME.sub(/\/?$/, '/').untaint
home_re = /(\$HOME|\~)\//

$dashboard = File.join(File.dirname(__FILE__), 'dashboard.yml')
Expand Down Expand Up @@ -336,9 +337,9 @@ def self.checkdepot(job, status, static=false)
_input :name=>'args'
_input :type=>'submit', :value=>'submit'

if File.exist? "#$HOME/.awdwr"
if File.exist? "#$home/.awdwr"
_h2 'Overrides'
_pre File.read("#$HOME/.awdwr")
_pre File.read("#$home/.awdwr")
end
end

Expand Down Expand Up @@ -381,6 +382,11 @@ def self.checkdepot(job, status, static=false)
_config config
_active active + log
end

Dir["#{__dir__}/*.js"].each do |file|
_file "/#{File.basename(file)}", content: File.read(file)
end

__END__
ENV['SCRIPT_FILENAME'] ||= __FILE__
$dashboard = File.join(File.dirname(ENV['SCRIPT_FILENAME']), 'dashboard.yml')

0 comments on commit 006adc8

Please sign in to comment.