-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
Conflicts: .travis.yml plugins/040-apps/app/views/apps/_is_installed.html.slim
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0-p195 | ||
ruby-2.0.0-p353 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Amahi Home Server | ||
# Copyright (C) 2007-2013 Amahi | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License v3 | ||
# (29 June 2007), as published in the COPYING file. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# file COPYING for more details. | ||
# | ||
# You should have received a copy of the GNU General Public | ||
# License along with this program; if not, write to the Amahi | ||
# team at http://www.amahi.org/ under "Contact Us." | ||
|
||
# Debug JS functionality | ||
|
||
|
||
$(document).on "ajax:success", ".debug-form", (event, results) -> | ||
if results.status is "ok" | ||
$('#debug-submit-form').html("<p class='alert alert-info'> Error Log Succesfully Submitted</p>") | ||
else | ||
$('#debug-submit-form').html("<p class='alert alert-danger'>Debug report failed. Please do try again later.</p>") |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Amahi Home Server | ||
# Copyright (C) 2007-2013 Amahi | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License v3 | ||
# (29 June 2007), as published in the COPYING file. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# file COPYING for more details. | ||
# | ||
# You should have received a copy of the GNU General Public | ||
# License along with this program; if not, write to the Amahi | ||
# team at http://www.amahi.org/ under "Contact Us." | ||
|
||
class DebugController < ApplicationController | ||
|
||
before_filter :admin_required | ||
layout 'debug' | ||
|
||
def index | ||
@page_title = t('debug') | ||
end | ||
|
||
def logs | ||
@page_title = t('debug') | ||
end | ||
|
||
def system | ||
@page_title = t('debug') | ||
end | ||
|
||
|
||
def submit | ||
AmahiApi.api_key = Setting.get "api-key" | ||
report = SystemUtils.run 'tail -200 /var/hda/platform/html/log/production.log' | ||
er = AmahiApi::ErrorReport.new(:report => report, :comments => params[:comments], :subject => params[:subject]) | ||
begin | ||
if er.save | ||
render :json =>{:status=>'ok'} | ||
else | ||
render :json =>{:status=>'failed',:errors=> er.errors} | ||
end | ||
rescue | ||
render :json =>{:status=>'failed',:errors=> er.errors} | ||
end | ||
end | ||
|
||
|
||
end |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- message_string = "\n\nExplain the sequence of events leading to the error\nin as much detail as you can.\n\nThe more *concrete detail* you can add,\nthe higher chances we fix the problem quickly!" | ||
|
||
= form_for :debug, :remote => true, :html => {\ | ||
:class => 'debug-form',\ | ||
:id => 'submit-debug-form'\ | ||
} do |f| | ||
.control-group | ||
h3.debug-form Help improve Amahi by sending crash reports and anonymous usage data. | ||
.control-group | ||
.controls= f.text_field :subject, :size => 32, :maxlength => 40, :placeholder => "Describe what failed here ...",:class=> "form-control debug-form" | ||
.control-group | ||
.controls | ||
= text_area_tag :comments, '', :rows => 10, :cols => 80, :placeholder => message_string, :class=> "form-control debug-form" | ||
.control-group.create-btn | ||
.controls | ||
= spinner | ||
= button_tag 'Submit', :type => 'submit', :id => 'debug_button', :class => 'btn btn-submit btn-info btn-sm debug-form', :data=>{:confirm=>"Machine logs will be submitted to Amahi for debug.\nThis will help improve Amahi!\nWould you like to submit?"} | ||
= link_to t('cancel'), '#', :class => 'close-area cancel-link debug-form', :data => {:related=> '#debug-button'}, :onclick=>"$('#debug-submit-form').hide('slow');" |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
= button_tag 'Submit for Debug', :type => 'button', :class => 'open-area btn btn-create', :id => "debug-button", :data => { :related => "#debug-submit-form" } | ||
|
||
#debug-submit-form[style="display:none;"] | ||
fieldset | ||
legend Debug Report | ||
= render 'form' | ||
pre | ||
= SystemUtils.run "tail -100 #{Rails.root}/log/production.log" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pre | ||
= SystemUtils.run "grep -v \"hda dhcpd:\" #{Platform.file_name(:syslog)} | tail -100 | tac" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pre | ||
= SystemUtils.uptime | ||
= SystemUtils.run 'cat /proc/cpuinfo' | ||
= SystemUtils.run 'cat /proc/meminfo' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
doctype 5 | ||
html[dir="#{@locale_direction}" lang="#{I18n.locale}" xml:lang="#{I18n.locale}"] | ||
head | ||
meta charset="utf-8" | ||
title = full_page_title | ||
|
||
= stylesheet_link_tag 'application' | ||
|
||
- if theme.name != "default" and theme.disable_inheritance == false | ||
= stylesheet_link_tag(theme_stylesheet_path('style', theme.default)) | ||
= stylesheet_link_tag(theme_stylesheet_path('rtl', theme.default)) if rtl? | ||
|
||
= theme_stylesheet_link_tag 'style' | ||
= theme_stylesheet_link_tag('rtl') if rtl? | ||
- amahi_plugins.each do |p| | ||
= stylesheet_link_tag p[:class].underscore | ||
|
||
/[ if lt IE 9 ] | ||
= javascript_include_tag 'http://html5shim.googlecode.com/svn/trunk/html5.js' | ||
= javascript_tag {render 'shared/js_vars'} | ||
= javascript_include_tag 'application' | ||
- amahi_plugins.each do |p| | ||
= javascript_include_tag p[:class].underscore | ||
|
||
= javascript_tag {'$.fx.off = true;' if Rails.env.test?} | ||
- for header in theme.headers do | ||
= header =~ /\.js$/ ? javascript_include_tag(header) : header | ||
|
||
link rel="search" type="application/opensearchdescription+xml" title="HDA Search" href="/search.xml" | ||
link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" | ||
|
||
= csrf_meta_tags | ||
|
||
body | ||
|
||
= render 'layouts/header' | ||
|
||
#content | ||
= render 'layouts/subheader' | ||
= render 'shared/flash_messages' | ||
#app.inner | ||
#tabs | ||
nav.preftab | ||
ul | ||
li.active | ||
a href='/tab/debug' | ||
= t 'debug' | ||
ul | ||
li[class="#{request.fullpath == '/tab/debug' ? 'active' : ''}"] | ||
= link_to "App Logs", '/tab/debug' | ||
li[class="#{request.fullpath == '/tab/debug/logs' ? 'active' : ''}"] | ||
= link_to "Logs", '/tab/debug/logs' | ||
li[class="#{request.fullpath == '/tab/debug/system' ? 'active' : ''}"] | ||
= link_to "System Info", '/tab/debug/system' | ||
#preferences | ||
.preftab | ||
= yield | ||
|
||
= render 'layouts/footer' | ||
|
||
#js-templates[style="display:none"] | ||
= yield :js_templates |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#errors | ||
- flash.each do |name, msg| | ||
div[id="flash_#{name}"]= msg | ||
div[class=" alert alert-#{name}"] | ||
strong = msg |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# plugin initialization | ||
t = Tab.new("users", "users", "/tab/users") | ||
# add any subtabs with what you need. params are controller and the label | ||
t.add('index', "details") | ||
# disable settings for now | ||
# t.add('settings', "settings") |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
Settings::Engine.routes.draw do | ||
# root of the plugin | ||
root :to => 'settings#index' | ||
match 'change_language' => 'settings#change_language' | ||
match 'toggle_setting' => 'settings#toggle_setting' | ||
match 'reboot' => 'settings#reboot' | ||
match 'poweroff' => 'settings#poweroff' | ||
match 'servers' => 'settings#servers' | ||
match 'servers/:id/refresh' => 'settings#refresh', as: 'refresh' | ||
match 'servers/:id/start' => 'settings#start', as: 'start' | ||
match 'servers/:id/stop' => 'settings#stop', as: 'stop' | ||
match 'servers/:id/restart' => 'settings#restart', as: 'restart' | ||
match 'servers/:id/toggle_monitored' => 'settings#toggle_monitored', as: 'toggle_monitored' | ||
match 'servers/:id/toggle_start_at_boot' => 'settings#toggle_start_at_boot', as: 'toggle_start_at_boot' | ||
match 'refresh' => 'settings#refresh' | ||
match 'themes' => 'settings#themes' | ||
match 'activate_theme' => 'settings#activate_theme' | ||
match 'change_language' => 'settings#change_language', via: [:get,:post] | ||
match 'toggle_setting' => 'settings#toggle_setting', via: [:get,:post] | ||
match 'reboot' => 'settings#reboot', via: [:get,:post] | ||
match 'poweroff' => 'settings#poweroff', via: [:get,:post] | ||
match 'servers' => 'settings#servers', via: [:get,:post] | ||
match 'servers/:id/refresh' => 'settings#refresh', as: 'refresh', via: [:get,:post] | ||
match 'servers/:id/start' => 'settings#start', as: 'start', via: [:get,:post] | ||
match 'servers/:id/stop' => 'settings#stop', as: 'stop', via: [:get,:post] | ||
match 'servers/:id/restart' => 'settings#restart', as: 'restart', via: [:get,:post] | ||
match 'servers/:id/toggle_monitored' => 'settings#toggle_monitored', as: 'toggle_monitored', via: [:get,:post] | ||
match 'servers/:id/toggle_start_at_boot' => 'settings#toggle_start_at_boot', as: 'toggle_start_at_boot', via: [:get,:post] | ||
match 'refresh' => 'settings#refresh', via: [:get,:post] | ||
match 'themes' => 'settings#themes', via: [:get,:post] | ||
match 'activate_theme' => 'settings#activate_theme', via: [:get,:post] | ||
|
||
put 'revoke_app' => 'settings#revoke_app', as: 'revoke_app' | ||
end |