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 - vlewin@novell.com + +- splitted status string into rows +- fixed failed test cases +- 0.2.9 + +------------------------------------------------------------------- +Thu Apr 14 14:08:48 UTC 2011 - vlewin@novell.com + +- fixed failed functional test cases +- 0.2.8 + +------------------------------------------------------------------- +Tue Apr 12 14:37:31 UTC 2011 - schubi@novell.com + +- 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 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 -->