~didrocks/ubiquity/intall-metrics

« back to all changes in this revision

Viewing changes to ubiquity/frontend/gtk_ui.py

  • Committer: Jean-Baptiste Lallement
  • Date: 2018-03-15 14:08:00 UTC
  • mfrom: (6592.2.6 ubiquity3)
  • Revision ID: jean-baptiste.lallement@ubuntu.com-20180315140800-iq939idf77zpw7br
* Added telemetry feature to collect installation metrics and optional reporting later on. Thanks didrocks

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    from ubiquity import gtkwidgets
55
55
 
56
56
from ubiquity import (
57
 
    filteredcommand, gsettings, i18n, validation, misc, osextras)
 
57
    filteredcommand, gsettings, i18n, validation, misc, osextras, telemetry)
58
58
from ubiquity.components import install, plugininstall, partman_commit
59
59
import ubiquity.frontend.base
60
60
from ubiquity.frontend.base import BaseFrontend
757
757
            self.debconf_progress_cancellable(False)
758
758
            self.refresh()
759
759
 
 
760
        telemetry.get().set_installer_type('GTK')
 
761
 
760
762
        self.set_current_page(0)
761
763
        self.live_installer.show()
762
764
 
821
823
        # postinstall will exit here by calling Gtk.main_quit in
822
824
        # find_next_step.
823
825
 
 
826
        telemetry.get().done(self.db)
 
827
 
824
828
        self.unlock_environment()
825
829
        if self.oem_user_config:
826
830
            self.quit_installer()
1555
1559
        for i in range(len(self.pages))[index + 1:]:
1556
1560
            self.dot_grid.get_child_at(i, 0).set_fraction(0)
1557
1561
 
 
1562
        telemetry.get().add_stage(name)
1558
1563
        syslog.syslog('switched to page %s' % name)
1559
1564
 
1560
1565
    # Callbacks provided to components.
1645
1650
            return False
1646
1651
 
1647
1652
    def switch_to_install_interface(self):
 
1653
        if not self.installing:
 
1654
            telemetry.get().add_stage(telemetry.START_INSTALL_STAGE_TAG)
1648
1655
        self.installing = True
1649
1656
        self.lockdown_environment()
1650
1657