Hello community, here is the log from the commit of package webyast-status-ui for openSUSE:Factory checked in at Wed May 4 10:46:42 CEST 2011.
-------- --- webyast-status-ui/webyast-status-ui.changes 2010-08-30 12:31:57.000000000 +0200 +++ /mounts/work_src_done/STABLE/webyast-status-ui/webyast-status-ui.changes 2011-05-03 11:56:27.000000000 +0200 @@ -1,0 +2,19 @@ +Tue May 3 09:52:01 UTC 2011 - [email protected] + +- splitted status string into rows +- fixed failed test cases +- 0.2.9 + +------------------------------------------------------------------- +Thu Apr 14 14:08:48 UTC 2011 - [email protected] + +- fixed failed functional test cases +- 0.2.8 + +------------------------------------------------------------------- +Tue Apr 12 14:37:31 UTC 2011 - [email protected] + +- new caching +- 0.2.7 + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ webyast-status-ui.spec ++++++ --- /var/tmp/diff_new_pack.kYN3dz/_old 2011-05-04 10:42:54.000000000 +0200 +++ /var/tmp/diff_new_pack.kYN3dz/_new 2011-05-04 10:42:54.000000000 +0200 @@ -29,7 +29,7 @@ Group: Productivity/Networking/Web/Utilities Url: http://en.opensuse.org/Portal:WebYaST AutoReqProv: on -Version: 0.2.6 +Version: 0.2.9 Release: 1 Summary: WebYaST - system status UI Source: www.tar.bz2 ++++++ www.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/app/controllers/status_controller.rb new/www/app/controllers/status_controller.rb --- old/www/app/controllers/status_controller.rb 2010-06-02 14:28:13.000000000 +0200 +++ new/www/app/controllers/status_controller.rb 2011-04-29 13:40:08.000000000 +0200 @@ -1,30 +1,30 @@ #-- # Copyright (c) 2009-2010 Novell, Inc. -# +# # All Rights Reserved. -# +# # This program is free software; you can redistribute it and/or modify it # under the terms of version 2 of the GNU General Public License # as published by the Free Software Foundation. -# +# # 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 # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, contact Novell, Inc. -# +# # To contact Novell about this file by physical or electronic mail, # you may find current contact information at www.novell.com #++ require 'yast/service_resource' require 'client_exception' -require 'open-uri' +require 'open-uri' # RORSCAN_ITL class StatusController < ApplicationController - + before_filter :login_required layout "main" @@ -45,7 +45,7 @@ group.single_graphs.each do |single_graph| single_graph.lines.each do |line| if line.limits.reached == "true" - label = group.id + label = group.id label += "/" + single_graph.headline if group.single_graphs.size > 1 label += "/" + line.label unless line.label.blank? if status.empty? @@ -53,8 +53,8 @@ else status += "; " + label end - end - end + end + end end return status end @@ -75,13 +75,13 @@ status.attributes["value"].each{ |value| if value.column == column_id value.value.collect!{|x| x.tr('\"','')} #removing \" - value.value.size.times{|t| ret << [(value.start.to_i + t*value.interval.to_i)*1000, value.value[t].to_f/scale]} # *1000 --> jlpot evalutas MSec for date format + value.value.size.times{|t| ret << [(value.start.to_i + t*value.interval.to_i)*1000, value.value[t].to_f/scale]} # *1000 --> jlpot evalutas MSec for date format # RORSCAN_ITL break end } else #only one value status.value.value.collect!{|x| x.tr('\"','')} #removing \" - status.value.value.size.times{|t| ret << [(status.value.start.to_i + t*status.value.interval.to_i)*1000, status.value.value[t].to_f/scale]} # *1000 --> jlpot evalutas MSec for date format + status.value.value.size.times{|t| ret << [(status.value.start.to_i + t*status.value.interval.to_i)*1000, status.value.value[t].to_f/scale]} # *1000 --> jlpot evalutas MSec for date format # RORSCAN_ITL end #strip zero values at the end of the array @@ -121,11 +121,11 @@ end lines = params[:lines].to_i || DEFAULT_LINES pos_begin = params[:pos_begin].to_i || 0 - begin + begin log = Logs.find(params[:id], :params => { :pos_begin => pos_begin, :lines => lines }) content = log.content.value if log position = log.content.position.to_i if log - render(:partial => 'status_log', + render(:partial => 'status_log', :locals => { :content => content, :position => position, :lines => lines, :id => params[:id] }) and return rescue ActiveResource::ServerError => error error_hash = Hash.from_xml error.response.body @@ -137,7 +137,7 @@ end end end - + def index client_permissions @logs = Logs.find(:all) @@ -145,13 +145,13 @@ begin @graphs = Graphs.find(:all, :params => { :checklimits => true }) #sorting graphs via id - @graphs.sort! {|x,y| y.id <=> x.id } - flash[:notice] = _("No data found for showing system status.") if @graphs.blank? + @graphs.sort! {|x,y| y.id <=> x.id } + flash[:notice] = _("No data found for showing system status.") if @graphs.blank? # RORSCAN_ITL rescue ActiveResource::ServerError => error error_hash = Hash.from_xml error.response.body logger.warn error_hash.inspect - if error_hash["error"] && - (error_hash["error"]["type"] == "SERVICE_NOT_RUNNING" || + if error_hash["error"] && + (error_hash["error"]["type"] == "SERVICE_NOT_RUNNING" || error_hash["error"]["type"] == "COLLECTD_SYNC_ERROR") if error_hash["error"]["type"] == "SERVICE_NOT_RUNNING" flash[:error] = _("Status not available.") @@ -176,8 +176,8 @@ status = _("Can't connect to host") host = Host.find(session[:host]) rescue nil status = _("Can't connect to host %s.") % host.name if host #this string is already translated int webclient - render(:partial => "status_summary", - :locals => { :status => status, :level => 'error', :error => nil, + render(:partial => "status_summary", + :locals => { :status => status, :level => 'error', :error => nil, :refresh_timeout => refresh_timeout }) return rescue ActiveResource::UnauthorizedAccess => error @@ -232,8 +232,8 @@ level = "error" refresh = false logger.warn error_hash.inspect - if error_hash["error"] && - (error_hash["error"]["type"] == "SERVICE_NOT_RUNNING" || + if error_hash["error"] && + (error_hash["error"]["type"] == "SERVICE_NOT_RUNNING" || error_hash["error"]["type"] == "COLLECTD_SYNC_ERROR") if error_hash["error"]["type"] == "COLLECTD_SYNC_ERROR" level = "warning" #it is a warning only @@ -255,7 +255,7 @@ status = plugin.short_description else status += "; " + plugin.short_description - end + end } rescue Exception => error logger.warn error.inspect @@ -272,8 +272,8 @@ end end #benchmark - render(:partial => "status_summary", - :locals => { :status => status, :level => level, :error => ret_error, + render(:partial => "status_summary", + :locals => { :status => status, :level => level, :error => ret_error, :refresh_timeout => (refresh ? refresh_timeout : nil) }) end @@ -287,12 +287,12 @@ till = Time.now data = Hash.new if params.has_key? "minutes" - data[:minutes] = params[:minutes].to_i + data[:minutes] = params[:minutes].to_i else data[:minutes] = 5 #default last 5 minutes end from = till - data[:minutes]*60 - + begin ActionController::Base.benchmark("Graphs data read from the server") do graph = Graphs.find(group_id) @@ -314,7 +314,7 @@ graph_description.lines.each do |line| original_metrics = available_metrics.select{|me| me.id[(me.host.size+1)..(me.id.size-1)] == line.metric_id} unless original_metrics.empty? - logger.warn "More than one metrics with the same id found: #{line.metric_id}. --> taking first" if original_metrics.size > 1 + logger.warn "More than one metrics with the same id found: #{line.metric_id}. --> taking first" if original_metrics.size > 1 original_metric = original_metrics.first single_line = Hash.new single_line[:label] = line.label @@ -363,7 +363,7 @@ #strip to the same length while line[:values].size > count line[:values].pop - end + end end logger.debug "Rendering #{data.inspect}" @@ -382,11 +382,11 @@ @graphs = Graphs.find(:all) end #sorting graphs via id - @graphs.sort! {|x,y| y.id <=> x.id } + @graphs.sort! {|x,y| y.id <=> x.id } rescue Exception => error logger.warn error.inspect flash[:error] = YaST::ServiceResource.error(error) - redirect_to :controller=>"status", :action=>"index" and return + redirect_to :controller=>"status", :action=>"index" and return end end @@ -399,7 +399,7 @@ rescue Exception => error logger.warn error.inspect flash[:error] = YaST::ServiceResource.error(error) - redirect_to :controller=>"status", :action=>"index" and return + redirect_to :controller=>"status", :action=>"index" and return end @graphs.each do |graph| @@ -454,10 +454,11 @@ if timeout.zero? Rails.logger.info "System status autorefresh is disabled" else - Rails.logger.info "Autorefresh system status after #{timeout} seconds" + Rails.logger.info "Autorefresh system status after #{timeout} seconds" # RORSCAN_ITL end return timeout end end + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/app/helpers/status_helper.rb new/www/app/helpers/status_helper.rb --- old/www/app/helpers/status_helper.rb 2010-05-28 09:52:16.000000000 +0200 +++ new/www/app/helpers/status_helper.rb 2011-04-11 16:48:55.000000000 +0200 @@ -46,7 +46,7 @@ graph_div_id = graph_id(group, single_graphs[index].headline) remote_function(:update => graph_div_id, :url => { :action => "evaluate_values", :group_id => group, :graph_id => single_graphs[index].headline}, - :complete => evaluate_next_graph(group, single_graphs, index+1)) + :complete => evaluate_next_graph(group, single_graphs, index+1)) # RORSCAN_ITL end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/app/models/graphs.rb new/www/app/models/graphs.rb --- old/www/app/models/graphs.rb 2010-05-28 09:52:16.000000000 +0200 +++ new/www/app/models/graphs.rb 2011-04-11 16:48:55.000000000 +0200 @@ -21,5 +21,5 @@ class Graphs < ActiveResource::Base extend YastModel::Base - model_interface :"org.opensuse.yast.system.graphs" + model_interface :"org.opensuse.yast.system.graphs" # RORSCAN_ITL end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/app/models/logs.rb new/www/app/models/logs.rb --- old/www/app/models/logs.rb 2010-05-28 09:52:16.000000000 +0200 +++ new/www/app/models/logs.rb 2011-04-11 16:48:55.000000000 +0200 @@ -21,5 +21,5 @@ class Logs < ActiveResource::Base extend YastModel::Base - model_interface :"org.opensuse.yast.system.logs" + model_interface :"org.opensuse.yast.system.logs" # RORSCAN_ITL end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/app/models/metrics.rb new/www/app/models/metrics.rb --- old/www/app/models/metrics.rb 2010-05-28 09:52:16.000000000 +0200 +++ new/www/app/models/metrics.rb 2011-04-11 16:48:55.000000000 +0200 @@ -21,5 +21,5 @@ class Metrics < ActiveResource::Base extend YastModel::Base - model_interface :"org.opensuse.yast.system.metrics" + model_interface :"org.opensuse.yast.system.metrics" # RORSCAN_ITL end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/app/models/plugins.rb new/www/app/models/plugins.rb --- old/www/app/models/plugins.rb 2010-05-28 09:52:16.000000000 +0200 +++ new/www/app/models/plugins.rb 2011-04-11 16:48:55.000000000 +0200 @@ -21,5 +21,5 @@ class Plugins < ActiveResource::Base extend YastModel::Base - model_interface :"org.opensuse.yast.system.plugins" + model_interface :"org.opensuse.yast.system.plugins" # RORSCAN_ITL end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/app/views/status/_status_progress.html.erb new/www/app/views/status/_status_progress.html.erb --- old/www/app/views/status/_status_progress.html.erb 2010-08-20 16:17:37.000000000 +0200 +++ new/www/app/views/status/_status_progress.html.erb 2011-04-14 16:12:58.000000000 +0200 @@ -1,41 +1,40 @@ <%# #-- # Copyright (c) 2009-2010 Novell, Inc. -# +# # All Rights Reserved. -# +# # This program is free software; you can redistribute it and/or modify it # under the terms of version 2 of the GNU General Public License # as published by the Free Software Foundation. -# +# # 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 # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, contact Novell, Inc. -# +# # To contact Novell about this file by physical or electronic mail, # you may find current contact information at www.novell.com #++ %> -<div class="status_status"> - <div style="float: left;"> - <%= image_tag("/images/working.gif", :height=>"32", :width=>"32", :class=>"small-working-icon") %> - </div> - - <div style="float: left; padding-left: 1em; padding-top:10px"> - <%= _("Checking system status") -%> - </div> +<!-- <div class="status_status"> --> + <div class="statusbar_row"> + <div style="float: left;"> + <%= image_tag("/images/working.gif", :height=>"22", :width=>"22", :class=>"small-working-icon") %> + </div> + <div style="float: left; padding-left: 1em; padding-top:10px"> + <%= _("Checking system status") -%> <!-- RORSCAN_ITL --> + </div> + </div> <%= progress_bar(progress) -%> <!-- refresh the status again after 5 seconds --> <% javascript_tag do -%> - setTimeout(function() { - <%= remote_function(:update => "status_status", - :url => { :controller => :status, :action => :show_summary, :background => true }) %> - }, 5000); + setTimeout(function() { <%= remote_function(:update => "statusbar_status", :url => { :controller => :status, :action => :show_summary, :background => true }) %> }, 5000); <% end -%> -</div> +<!-- </div> --> + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/app/views/status/_status_summary.html.erb new/www/app/views/status/_status_summary.html.erb --- old/www/app/views/status/_status_summary.html.erb 2010-06-14 10:33:51.000000000 +0200 +++ new/www/app/views/status/_status_summary.html.erb 2011-05-03 11:49:42.000000000 +0200 @@ -1,52 +1,78 @@ <%# #-- # Copyright (c) 2009-2010 Novell, Inc. -# +# # All Rights Reserved. -# +# # This program is free software; you can redistribute it and/or modify it # under the terms of version 2 of the GNU General Public License # as published by the Free Software Foundation. -# +# # 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 # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, contact Novell, Inc. -# +# # To contact Novell about this file by physical or electronic mail, # you may find current contact information at www.novell.com #++ %> -<% unauthorized = error.class == ActiveResource::UnauthorizedAccess -%> -<div class="status_status"> - <% link_to (unauthorized ? "controlpanel" : "status") do %> - <%= report_error(error, _("An problem occured when loading status information.")) if error && !unauthorized %> - <% unless status.blank? %> - <span class="status-icon <%= level %>"> </span> - <span><%= status %></span> - <% else %> - <% if unauthorized -%> - <span class="status-icon warning"> </span> - <span><%= _("Cannot read system status - you have been logged out.") %></span> - <% elsif !error %> - <span class="status-icon ok"> </span> - <span><%= _("Your system is healthy.") %></span> - <% end %> +<% unauthorized = error.class == ActiveResource::UnauthorizedAccess -%> +<%if error && !unauthorized %> + <div class="statusbar_row"> + <a href="status" class="warning_message"> + <%= report_error(error, _("An problem occured when loading status information.")) %> + </a> + </div> +<% end %> + +<% unless status.blank? %> + <% status.split(';').each do | message | %> + <div class="statusbar_row"> + <img src="/images/status-warning.png"> + <a href="status" class="warning_message"> + <span><%= message %></span> + </a> + </div> + <% end %> + + <% javascript_tag do -%> + jQuery(function($){ $('#status-eye').addClass('eye_warning'); }); + $('#status_indicator').addClass("status_warning"); + <% end -%> + +<% else %> + <% if unauthorized -%> + <div class="statusbar_row"> + <a href="status" class="warning_message"> + <span><%= _("Cannot read system status - you have been logged out.") %></span><!-- RORSCAN_ITL --> + </a> + </div> + <% elsif !error %> + <% javascript_tag do -%>jQuery(function($){ + if($('#status-eye').hasClass("eye_warning") == false) { $('#status-eye').addClass('eye_healthy'); } }); + $('#status_indicator').addClass("status_ok"); + <% end -%> + + <div class="statusbar_row"> + <% link_to "status", :class=>"warning_message" do %> + <span><%= _("Your system is healthy.") %></span> <!-- RORSCAN_ITL --> <% end %> + </div> <% end %> -</div> +<% end %> <!- if else --> <% if refresh_timeout.to_i > 0 && !unauthorized -%> <!-- refresh the status again after a timeout --> <% javascript_tag do -%> setTimeout(function() { - $('#status_status').html('<%= image_tag("/images/working.gif", :class => "small-working-icon") %> <%= _("Loading system information") %>') - <%= remote_function(:update => "status_status", - :url => { :controller => :status, :action => :show_summary, :background => true }) %> + $('#statusbar-status').html('<%= image_tag("/images/working.gif", :class => "small-working-icon") %> <%= _("Loading system information") %>') <!-- RORSCAN_ITL --> + <%= remote_function(:update => "statusbar_status", :url => { :controller => :status, :action => :show_summary, :background => true }) %> }, <%= refresh_timeout.to_i * 1000 -%>); <% end -%> <% end %> + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/app/views/status/edit.html.erb new/www/app/views/status/edit.html.erb --- old/www/app/views/status/edit.html.erb 2010-07-19 13:29:26.000000000 +0200 +++ new/www/app/views/status/edit.html.erb 2011-04-14 16:12:58.000000000 +0200 @@ -1,20 +1,20 @@ <!-- # Copyright (c) 2009-2010 Novell, Inc. -# +# # All Rights Reserved. -# +# # This program is free software; you can redistribute it and/or modify it # under the terms of version 2 of the GNU General Public License # as published by the Free Software Foundation. -# +# # 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 # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, contact Novell, Inc. -# +# # To contact Novell about this file by physical or electronic mail, # you may find current contact information at www.novell.com --> @@ -50,7 +50,7 @@ alert (say_bad); return false; } - <% end %> + <% end %> <% end %> <% end %> $('#progress').show(); @@ -72,7 +72,7 @@ <% end %> <% end %> -<div class='plugin-icon'><img alt="monitoring" src='/images/monitoring.png'/><%=_("Status") + header_spacer + _("Settings")%></div> +<div class='plugin-icon'><img alt="monitoring" src='/icons/monitoring.png'/><%=_("Status") + header_spacer + _("Settings")%><span id="questionMark">?</span></div> <div class="plugin-content"> <% form_tag( {:action => :save} , { :onsubmit => "return validateLimits();"} ) do %> <div class="accordion"> @@ -85,7 +85,7 @@ <label>Alarm, if <%= group_name %></label> <fieldset class="small-labels"> <% single_graph.lines.each do |line| %> - <% limit_key = "#{group.id}/#{single_graph.headline}/#{line.label}" + <% limit_key = "#{group.id}/#{single_graph.headline}/#{line.label}" measurements = {_("undercuts") => "min", _("exceeds") => "max"} if line.limits.max.to_i > 0 val = line.limits.max.to_i @@ -118,3 +118,4 @@ </div> <% end %> </div> + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/app/views/status/index.html.erb new/www/app/views/status/index.html.erb --- old/www/app/views/status/index.html.erb 2010-08-24 12:27:38.000000000 +0200 +++ new/www/app/views/status/index.html.erb 2011-04-12 12:45:08.000000000 +0200 @@ -38,6 +38,9 @@ <% content_for :before_script do %> <% javascript_tag do %> + var AUTH_TOKEN = 'authenticity_token=' + encodeURIComponent("<%= escape_javascript form_authenticity_token %>"); + startNotifier({'module':'status', 'AUTH_TOKEN':AUTH_TOKEN}, 1000, 11000); + $(document).ready(function() { $(".accordion").accordion({ autoHeight : false, @@ -53,13 +56,13 @@ <!--<%= javascript_include_tag :defaults %>--> -<div class='plugin-icon'><img alt="monitoring" src='/images/monitoring.png' width="48px" height="48"/><%=_("Status")%></div> +<div class='plugin-icon'><img alt="monitoring" src='/icons/monitoring.png' width="48px" height="48"/><%=_("Status")%><span id="questionMark">?</span></div> <div class="plugin-content"> <div class="accordion"> <% if @graphs %> <% @graphs.each do |group| %> - <div class="list-fieldset"> + <div class="list-fieldset"> <!-- RORSCAN_INL_12 th whole block --> <div class="list-fieldset-header" onclick="<%= remote_function(:update => graph_id(group.id, group.single_graphs.first.headline), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/lib/tasks/jsmin_status.rake new/www/lib/tasks/jsmin_status.rake --- old/www/lib/tasks/jsmin_status.rake 2010-08-23 14:32:04.000000000 +0200 +++ new/www/lib/tasks/jsmin_status.rake 2011-04-11 16:48:55.000000000 +0200 @@ -22,24 +22,16 @@ require "tempfile" JSCOMPRESSOR = File.join(RAILS_ROOT, '/script/javascript/jsmin.rb') -def minify(list, output) - tmp = Tempfile.open('all') - list.each {|file| open(file) {|f| tmp.write(f.read) } } - tmp.rewind - sh "ruby #{JSCOMPRESSOR} < #{tmp.path} > #{output}" -end - namespace :js do javascripts = ['jqplot.categoryAxisRenderer.js', "jqplot.dateAxisRenderer.js", "jqplot.canvasTextRenderer.js", "jqplot.cursor.js"] - + Dir.chdir(File.join(RAILS_ROOT, 'public', 'javascripts', 'plugin')) do - javascripts.map! {|f| File.join(Dir.pwd, f)} javascripts.unshift(File.join(RAILS_ROOT, 'public', 'javascripts', 'jquery.jqplot.js')) file 'status-min.js' => javascripts do | f | - - output_file = File.join(File.dirname(__FILE__), '..','..','public', 'javascripts', 'min', '/') + f.name - minify(f.prerequisites, output_file) + $dir = File.join(File.dirname(__FILE__), '/../../public/javascripts/min/') + mkpath($dir); + minify(f.prerequisites, $dir + f.name) end end @@ -48,3 +40,10 @@ puts "Done" end end + +def minify(list, output) + tmp = Tempfile.open('all') + list.each {|file| open(file) {|f| tmp.write(f.read) } } + tmp.rewind + sh "ruby #{JSCOMPRESSOR} < #{tmp.path} > #{output}" +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/shortcuts.yml new/www/shortcuts.yml --- old/www/shortcuts.yml 2010-08-23 14:39:43.000000000 +0200 +++ new/www/shortcuts.yml 2011-04-14 16:12:58.000000000 +0200 @@ -1,5 +1,5 @@ main: - icon: '/images/monitoring.png' + icon: '/icons/monitoring.png' url: /status groups: [ System ] tags: [ access] @@ -7,3 +7,4 @@ description: _("Show system status") resources: [ status ] read_permissions: [ org.opensuse.yast.system.status.read ] + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/www/test/functional/status_controller_test.rb new/www/test/functional/status_controller_test.rb --- old/www/test/functional/status_controller_test.rb 2010-07-06 11:16:07.000000000 +0200 +++ new/www/test/functional/status_controller_test.rb 2011-05-03 11:20:53.000000000 +0200 @@ -1,20 +1,20 @@ #-- # Copyright (c) 2009-2010 Novell, Inc. -# +# # All Rights Reserved. -# +# # This program is free software; you can redistribute it and/or modify it # under the terms of version 2 of the GNU General Public License # as published by the Free Software Foundation. -# +# # 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 # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, contact Novell, Inc. -# +# # To contact Novell about this file by physical or electronic mail, # you may find current contact information at www.novell.com #++ @@ -128,9 +128,8 @@ get :show_summary assert_response :success assert_valid_markup - assert_tag :tag =>"span", - :attributes => { :class => "status-icon warning" } - assert_tag "Registration is missing; Mail configuration test not confirmed" + assert_tag :tag => "a", :attributes => { :class => "warning_message" }, :parent => { :tag => "div"} + assert_tag "Registration is missing" end #testing show summary AJAX call; Host is not available @@ -139,8 +138,8 @@ get :show_summary assert_response :success assert_valid_markup - assert_tag :tag =>"span", - :attributes => { :class => "status-icon error" } + #assert_tag :tag =>"a", :attributes => { :class=>"warning_message" }, :child => "Can't connect to host" + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"} assert_tag "Can't connect to host" end @@ -150,8 +149,8 @@ get :show_summary assert_response :success assert_valid_markup - assert_tag :tag =>"span", - :attributes => { :class => "status-icon warning" } + #assert_tag :tag =>"a", :attributes => { :class=>"warning_message" } + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"} assert_tag "Cannot read system status - you have been logged out." end @@ -175,9 +174,13 @@ get :show_summary assert_response :success assert_valid_markup - assert_tag :tag =>"span", - :attributes => { :class => "status-icon error" } - assert_tag "Limits exceeded for CPU/CPU-0/user; CPU/CPU-1/user; Disk/root/free; Registration is missing; Mail configuration test not confirmed" + #assert_tag "Limits exceeded for CPU/CPU-0/user; CPU/CPU-1/user; Disk/root/free; Registration is missing; Mail configuration test not confirmed" + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"}, :content=> /Limits exceeded for CPU\/CPU-0\/user/ + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"}, :content=>/CPU\/CPU-0\/user/ + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"}, :content=>/CPU\/CPU-1\/user/ + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"}, :content=>/Disk\/root\/free/ + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"}, :content=>/Registration is missing/ + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"}, :content=>/Mail configuration test not confirmed/ end #testing show summary AJAX call; progress @@ -245,7 +248,10 @@ get :show_summary assert_response :success assert_valid_markup - assert_tag "Collectd is out of sync. Status information can be expected at Wed Jan 20 22:34:38 2010.; Registration is missing; Mail configuration test not confirmed" + assert_tag :tag=>"a", :attributes => { :class => "warning_message" }, :parent => { :tag => "div"} + assert_tag "Collectd is out of sync. Status information can be expected at Wed Jan 20 22:34:38 2010." + #; Registration is missing; Mail configuration test not confirmed" + #assert_tag "Collectd is out of sync. Status information can be expected at Wed Jan 20 22:34:38 2010.; Registration is missing; Mail configuration test not confirmed" end #testing show summary AJAX call; Server Error @@ -271,7 +277,10 @@ get :show_summary assert_response :success assert_valid_markup - assert_tag "Status not available; Registration is missing; Mail configuration test not confirmed" + + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"}, :content=>/Registration is missing/ + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"}, :content=>/Status not available/ + assert_tag :tag=>"a", :attributes => { :class => "warning_message"}, :parent => { :tag => "div"}, :content=>/Mail configuration test not confirmed/ end #testing show summary AJAX call; Server Error with no information @@ -302,7 +311,7 @@ #testing evaluate_values AJAX call def test_show_evaluate_values_1 Time.stubs(:now).returns(Time.at(1264006620)) - get :evaluate_values, { :group_id => "Memory", :graph_id => "Memory", :minutes => "5" } + get :evaluate_values, { :group_id => "Memory", :graph_id => "Memory", :minutes => "5" } assert_response :success assert_valid_markup assert_tag :tag =>"script", @@ -327,7 +336,7 @@ mock.get "/plugins.xml", @header, @response_plugins, 200 mock.get "/metrics.xml", @header, @response_metrics, 200 end - get :evaluate_values, { :group_id => "Memory", :graph_id => "Memory", :minutes => "5" } + get :evaluate_values, { :group_id => "Memory", :graph_id => "Memory", :minutes => "5" } assert_response :success assert_valid_markup end @@ -336,7 +345,7 @@ #testing evaluate_values AJAX call def test_show_evaluate_values_with_other_id Time.stubs(:now).returns(Time.at(1264006620)) - get :evaluate_values, { :group_id => "Disk", :graph_id => "root" } + get :evaluate_values, { :group_id => "Disk", :graph_id => "root" } assert_response :success assert_valid_markup assert_tag :tag =>"script", @@ -362,34 +371,34 @@ mock.get "/metrics.xml", @header, @response_metrics, 200 end - get :evaluate_values, { :group_id => "not_found", :graph_id => "not_found" } + get :evaluate_values, { :group_id => "not_found", :graph_id => "not_found" } assert_response :success assert_valid_markup end #testing confirming status def test_confirm_status - post :confirm_status, { :param=>"Test mail received", :url=>"/mail/state", } + post :confirm_status, { :param=>"Test mail received", :url=>"/mail/state", } assert_response :redirect end #testing confirming status without param def test_confirm_status_without_param - post :confirm_status, { } + post :confirm_status, { } assert_response 500 end #testing call ajax_log_custom def test_show_ajax_log_custom - get :ajax_log_custom, { :id => "system", :lines => "50" } + get :ajax_log_custom, { :id => "system", :lines => "50" } assert_response :success assert_valid_markup assert_tag "\nJan 28 12:04:27 f95 avahi-daemon[9245]: Received response from host 10.10.4.228 with invalid source port 33184 on interface 'eth0.0'\nJan 28 12:04:28 f95 avahi-daemon[9245]: Received response from host 10.10.4.228 with invalid source port 33184 on interface 'eth0.0'\n\n" end - #testing call ajax_log_custom + #testing call ajax_log_custom def test_show_ajax_log_custom_without_params - get :ajax_log_custom, { } + get :ajax_log_custom, { } assert_response 500 end @@ -404,7 +413,7 @@ mock.get "/logs/system.xml?lines=50&pos_begin=0", @header, response_logs, 503 end - get :ajax_log_custom, { :id => "system", :lines => "50" } + get :ajax_log_custom, { :id => "system", :lines => "50" } assert_response :success assert_valid_markup assert_tag "You have no permissions" @@ -421,7 +430,7 @@ mock.get "/logs/system.xml?lines=50&pos_begin=0", @header, response_logs, 503 end - get :ajax_log_custom, { :id => "system", :lines => "50" } + get :ajax_log_custom, { :id => "system", :lines => "50" } assert_response 500 end @@ -560,3 +569,4 @@ end + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
