diff --git a/app/class_view.rb b/app/class_view.rb index 24f48d4..23eccbf 100644 --- a/app/class_view.rb +++ b/app/class_view.rb @@ -4,11 +4,10 @@ class ClassView required_param :classes, type: Hash def render - div class: "row" do - classes.each do |k , clas| - div :class => "col-md-1" do - k.span - clas.span + div :class => "row" do + classes.each do |name , clas| + div :class => "row" do + clas.name.span end end end diff --git a/app/debugger.rb b/app/debugger.rb index 73a816e..a8626c2 100644 --- a/app/debugger.rb +++ b/app/debugger.rb @@ -1,13 +1,17 @@ require 'opal' require 'opal-jquery' +require "opal/parser" require "json" require 'opal-react' +require "salama" require "class_view" require "register_view" require "source_view" require "block_view" +Virtual.machine.boot + Document.ready? do # Document.ready? is a opal-jquery method. React.render( React.create_element( Debugger), Element['#content'] ) end @@ -29,20 +33,27 @@ class Debugger # end def render - div do - ClassView classes: { :class1 => "Object"} - div :class => "row" do - div :class => "col-md-4" do - "Future one" + div :class => "container" do + div :class => :row do + div :class => "col-md-1" do + ClassView classes: Virtual.machine.space.classes end - div :class => "col-md-4" do - "Future two" - end - div :class => "col-md-4" do - BlockView block: [ "block 1" , "block 2"] + div :class => "col-md-11" do + div :class => "row" do + div :class => "col-md-4" do + "Future one" + end + div :class => "col-md-4" do + "Future two" + end + div :class => "col-md-4" do + BlockView block: [ "block 1" , "block 2"] + end + end + RegisterView registers: ["r1" , "r2"] end end - RegisterView registers: ["r1" , "r2"] end + end end diff --git a/config.ru b/config.ru index c6ad4af..bf54dd0 100644 --- a/config.ru +++ b/config.ru @@ -1,6 +1,8 @@ # config.ru require 'bundler' Bundler.require +Opal.use_gem "salama" +Opal.use_gem "salama-arm" require "react/source"