diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0a0a93f..db49794 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,7 +2,6 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. # protect_from_forgery with: :exception - helper_method :volume_mount, :volume_unmount, :volume_create, :volume_delete, :volume_start, :volume_stop def get_conf @config = Hash.new diff --git a/app/controllers/node_controller.rb b/app/controllers/node_controller.rb new file mode 100644 index 0000000..fde0bb2 --- /dev/null +++ b/app/controllers/node_controller.rb @@ -0,0 +1,15 @@ +class NodeController < ApplicationController + def index + @hosts = Array.new + + if get_hosts.blank? + flash[:danger] = "Check Server" + else + @hosts = get_hosts + end + end + + def get_hosts + return ['2', 'aaa', 'bbb', 'ccc'] + end +end diff --git a/app/controllers/peer_controller.rb b/app/controllers/peer_controller.rb deleted file mode 100644 index dbc890a..0000000 --- a/app/controllers/peer_controller.rb +++ /dev/null @@ -1,20 +0,0 @@ -class PeerController < ApplicationController - def index - @hosts = Array.new - - if get_hosts.blank? - flash[:danger] = "Check Server" - else - @hosts = get_hosts - - end - end - - def get_hosts - file_str = `cat ` + @hostfile_path - hosts_str = file_str.split("hosts:")[1] - return hosts_str.split("\n") - end - - @hostfile_path = "../../../configure.conf" -end diff --git a/app/helpers/volumn_helper.rb b/app/helpers/volumn_helper.rb deleted file mode 100644 index 70f2631..0000000 --- a/app/helpers/volumn_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module VolumnHelper -end diff --git a/app/views/node/index.html.erb b/app/views/node/index.html.erb new file mode 100644 index 0000000..edcd1bb --- /dev/null +++ b/app/views/node/index.html.erb @@ -0,0 +1,62 @@ + +
+ +
+

Peer

+
+
+
+ +
+ +
+
+
+
+

Hover rows Try hovering over the rows

+ +
+
+
+ + + + + + + + + + + + <%@hosts.each do |t|%> + + + + + + + + <%end%> + +
#Host NameIP AddressStatusUUID
1MarkOtto@mdotmp
+
+
+
+
+
+ diff --git a/app/views/partials/_sidenav.html.erb b/app/views/partials/_sidenav.html.erb index 04bb361..7eab2f1 100644 --- a/app/views/partials/_sidenav.html.erb +++ b/app/views/partials/_sidenav.html.erb @@ -27,17 +27,7 @@
  • Node
  • diff --git a/app/views/peer/index.html.erb b/app/views/peer/index.html.erb deleted file mode 100644 index 2ab1d22..0000000 --- a/app/views/peer/index.html.erb +++ /dev/null @@ -1,77 +0,0 @@ - - -
    - -
    - -
    -

    Peer

    -
    - -
    -
    - -
    - -
    -
    -
    -
    -

    Hover rows Try hovering over the rows

    - -
    -
    -
    - - - - - - - - - - - - - <%@hosts.each do |t|%> - - - - - - - - - <%end%> - -
    #Host NameIP AddressStatusUUID
    1MarkOtto@mdo
    -
    -
    -
    - -
    -
    -
    - \ No newline at end of file diff --git a/app/views/volume/index.html.erb b/app/views/volume/index.html.erb index 0e5095a..ae1a795 100644 --- a/app/views/volume/index.html.erb +++ b/app/views/volume/index.html.erb @@ -93,10 +93,10 @@