Skip to content

Commit

Permalink
Clean up after refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
euler-room committed Dec 19, 2024
1 parent eab7fbf commit 764b6b1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion apps/dashboard/app/controllers/files_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def sort_by_column(files, column)
def posix_file?
@path.is_a?(PosixFile)
end

def download?
@download ||= false
end
Expand Down
3 changes: 1 addition & 2 deletions apps/dashboard/app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# The controller for project pages /dashboard/projects.
class ProjectsController < ApplicationController

# GET /projects/:id
def show
project_id = show_project_params[:id]
Expand Down Expand Up @@ -30,7 +29,7 @@ def show
end
end
end

# GET /projects
def index
@projects = Project.all
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/app/helpers/projects_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# Helpers for the projects page
module ProjectsHelper
include ApplicationHelper


def render_readme(readme_location)
file_content = File.read(readme_location)

if File.extname(readme_location) == '.md'
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
markdown_html = markdown.render(file_content).html_safe
Expand Down
6 changes: 1 addition & 5 deletions apps/dashboard/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
post 'save', on: :member
end
end
if Configuration.can_access_files?
get 'projects/:project_id/directory' => 'projects#directory', as: 'project_directory'
get 'projects/:project_id/file' => 'projects#file', as: 'project_file'
end
end

# in production, if the user doesn't have access to the files app directory, we hide the routes
Expand All @@ -37,11 +33,11 @@
:defaults => { :fs => 'fs', :format => 'json' }
end


post 'files/upload/:fs' => 'files#upload', :defaults => { :fs => 'fs' } if Configuration.upload_enabled?

get 'files', to: redirect("files/fs#{Dir.home}")
get 'files/fs', to: redirect("files/fs#{Dir.home}")

get 'frames/directory_frame' => 'files#directory_frame', as: 'directory_frame'
get 'frames/file_frame' => 'files#file_frame', as: 'file_frame'

Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/lib/current_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class << self

alias_method :home, :dir
end

attr_reader :pwuid
delegate :name, :uid, :gid, :gecos, :dir, :shell, to: :pwuid

Expand Down
1 change: 0 additions & 1 deletion apps/dashboard/test/system/project_manager_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ def add_auto_environment_variable(project_id, launcher_id, save: true)
end
end


test 'edit a project' do
Dir.mktmpdir do |dir|
project_id = setup_project(dir)
Expand Down

0 comments on commit 764b6b1

Please sign in to comment.