~ubuntu-branches/ubuntu/vivid/zentyal-core/vivid-proposed

« back to all changes in this revision

Viewing changes to src/EBox/Event/Watcher/Updates.pm

  • Committer: Package Import Robot
  • Author(s): Jorge Salamero Sanz
  • Date: 2012-08-28 10:03:33 UTC
  • Revision ID: package-import@ubuntu.com-20120828100333-oz3n5kpav4z0tl27
Tags: 2.3.21+quantal1
New upstream release for Quantal

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
use EBox::Global;
36
36
use EBox::Util::Software;
37
37
 
 
38
use constant SB_URL => 'https://store.zentyal.com/small-business-edition.html/?utm_source=zentyal&utm_medium=updates&utm_campaign=smallbusiness_edition';
 
39
use constant ENT_URL => 'https://store.zentyal.com/enterprise-edition.html/?utm_source=zentyal&utm_medium=updates&utm_campaign=enterprise_edition';
 
40
 
38
41
# Group: Public methods
39
42
 
40
43
# Constructor: new
197
200
 
198
201
        # Commercial msg
199
202
        $msg .= "\n\n";
200
 
        $msg .= __s('Warning: The updates are community based and there is no guarantee that your '
201
 
                    . 'server will work properly after applying them. Servers in production '
202
 
                    . 'environments should have quality assured (QA) software updates. Purchase a '
203
 
                    . 'Professional or Enterprise Subscription to gain access to QA updates.');
 
203
        $msg .= __sx('Warning: The updates are community based and there is no guarantee that your server will work properly after applying them. In production environments you should use the {ohs}Small Business{ch} or {ohe}Enterprise Edition{ch} that include quality assured software updates.',
 
204
                     ohs => '<a href="' . SB_URL . '" target="_blank">',
 
205
                     ohe => '<a href="' . ENT_URL . '" target="_blank">',
 
206
                     ch => '</a>');
204
207
        return [
205
208
            new EBox::Event(message => $msg,
206
 
                            source  => 'security software update',
207
 
                            level   => 'warn'),
 
209
                            source  => 'security-software-update',
 
210
                            level   => 'warn',
 
211
                            additional => {
 
212
                                'n_updates'     => $nUpdates,
 
213
                                'n_sec_updates' => $nSecUpdates,
 
214
                                'updates'       => \@packages,
 
215
                                'sec_updates'   => \@secUpdates,
 
216
                            }),
208
217
           ];
209
218
    }
210
 
    return undef;
 
219
    return [
 
220
        new EBox::Event(message    => 'Up-to-date',
 
221
                        source     => 'security-software-update',
 
222
                        level      => 'info',
 
223
                        dispatchTo => [ 'ControlCenter' ],
 
224
                        additional => { 'n_updates' => 0 }),
 
225
        ];
211
226
}
212
227
 
213
228
# Group: Protected methods