add volumn info

This commit is contained in:
bee0005 2016-08-20 06:58:04 +00:00
parent fa9d65b9b8
commit c4f1675cc2
8 changed files with 83 additions and 7 deletions

View File

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the volumn controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,5 @@
class VolumnController < ApplicationController
def info
@output = `ls`
end
end

View File

@ -0,0 +1,2 @@
module VolumnHelper
end

View File

@ -39,7 +39,7 @@
<li><a><i class="fa fa-edit"></i> Volume <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu" style="display: none">
<li><a href="#">Info</a>
<li><a href="/volumn/info">Info</a>
</li>
<li><a href="#">Create</a>
</li>
@ -95,7 +95,6 @@
</ul>
</div>
<div class="menu_section">
<h3>---</h3>
<ul class="nav side-menu">
<li><a><i class="fa fa-bug"></i> Tier <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu" style="display: none">

View File

@ -0,0 +1,55 @@
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3>Volume Info</h3>
</div>
<div class="title_right">
<div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for...">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Go!</button>
</span>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Infomation <small>volumn</small></h2>
<ul class="nav navbar-right panel_toolbox">
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Settings 1</a>
</li>
<li><a href="#">Settings 2</a>
</li>
</ul>
</li>
<li><a class="close-link"><i class="fa fa-close"></i></a>
</li>
</ul>
<div class="clearfix"></div>
</div>
<div class="x_content">
<%=@output%>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->

View File

@ -1,4 +1,6 @@
Rails.application.routes.draw do
get 'volumn/info'
get 'home/index'
devise_for :users, controllers: { sessions: 'users/sessions' , registrations: 'users/registrations', confirmations: 'users/confirmations', passwords: 'users/passwords', unlocks: 'users/unlocks'}
@ -7,13 +9,11 @@ Rails.application.routes.draw do
# You can have the root of your site routed with "root"
root 'plainpage#index'
get 'index' => 'plainpage#index'
get 'dashboard' => 'plainpage#dashboard'
get 'dashboard2' => 'plainpage#dashboard2'
get 'dashboard5' => 'plainpage#dashboard5'
get 'temp' => 'home#index'
get 'volumn/info' => 'volumn#info'
# Example of regular route:
# get 'products/:id' => 'catalog#view'

View File

@ -0,0 +1,9 @@
require 'test_helper'
class VolumnControllerTest < ActionController::TestCase
test "should get info" do
get :info
assert_response :success
end
end