Exemplo n.º 1
0
    def insertNewProfile(self):
        win = self._dialog
        profile = win.getRecordData()["name"]
        profile_list = self.profile.get_profile_list()
        if profile not in profile_list:
            skeleton = self.cfg.get("management_gui", "template_profile")
            if skeleton in profile_list:
                self.profile.copy_profile(skeleton, profile)
                self.refreshListView()
            else:
                dlg = BaseRecordDialog(win, ["suite"])
                dlg.frame.text_label.setText("Select a suite for this profile")
                dlg.connect(dlg, SIGNAL("okClicked()"), self.insertNewProfilewithSuite)
                dlg.show()
                dlg.profile = profile
                win.suite_dialog = dlg
                KMessageBox.information(self, "need to select suite here")

            # need to determine if skeleton exists
            KMessageBox.information(self, "make profile %s" % profile)
        else:
            KMessageBox.error(self, "Profile %s already exists." % profile)
Exemplo n.º 2
0
 def insertNewProfile(self):
     win = self._dialog
     profile = win.getRecordData()['name']
     profile_list = self.profile.get_profile_list()
     if profile not in profile_list:
         skeleton = self.cfg.get('management_gui', 'template_profile')
         if skeleton in profile_list:
             self.profile.copy_profile(skeleton, profile)
             self.refreshListView()
         else:
             dlg = BaseRecordDialog(win, ['suite'])
             dlg.frame.text_label.setText('Select a suite for this profile')
             dlg.connect(dlg, SIGNAL('okClicked()'), self.insertNewProfilewithSuite)
             dlg.show()
             dlg.profile = profile
             win.suite_dialog = dlg
             KMessageBox.information(self, 'need to select suite here')
             
         # need to determine if skeleton exists
         KMessageBox.information(self, 'make profile %s' % profile)
     else:
         KMessageBox.error(self, 'Profile %s already exists.' % profile)