Subversion Repositories basico

Rev

Rev 75 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 75 Rev 82
Line 21... Line 21...
21
SAP_NOTE_URL_PDF = "https://launchpad.support.sap.com/services/pdf/notes/%s/E"
21
SAP_NOTE_URL_PDF = "https://launchpad.support.sap.com/services/pdf/notes/%s/E"
22
TIMEOUT = 5
22
TIMEOUT = 5
23
23
24
24
25
class Settings(Service):
25
class Settings(Service):
-
 
26
    ######
-
 
27
    # FIXME: right now, settings are hardcoded
-
 
28
    ######
26
    def initialize(self):
29
    def initialize(self):
27
        view = self.get_config_value('View')
30
        view = self.get_config_value('View')
28
        self.log.debug("View: %s" % view)
31
        self.log.debug("View: %s" % view)
29
32
30
    def get_default_settings(self):
33
    def get_default_settings(self):
31
        settings = {}
34
        settings = {}
32
        # Deprecated as Basico uses now login with SAP Passport
-
 
33
        #~ settings['CNF_SAP_SUser'] = 'SXXXXXXXXXX'
-
 
34
        #~ settings['CNF_SAP_SPass'] = 'MyP455w0rD'
-
 
35
        utils = self.get_service('Utils')
35
        utils = self.get_service('Utils')
36
        settings['CNF_SAP_LOGIN'] = LOGIN_PAGE_URL
36
        settings['CNF_SAP_LOGIN'] = LOGIN_PAGE_URL
37
        settings['CNF_SAP_LOGOUT'] = LOGOUT_PAGE_URL
37
        settings['CNF_SAP_LOGOUT'] = LOGOUT_PAGE_URL
38
        settings['CNF_SAP_ODATA_NOTES'] = ODATA_NOTE_URL
38
        settings['CNF_SAP_ODATA_NOTES'] = ODATA_NOTE_URL
39
        settings['CNF_SAP_NOTE_URL'] = SAP_NOTE_URL
39
        settings['CNF_SAP_NOTE_URL'] = SAP_NOTE_URL
Line 54... Line 54...
54
        settings['CNF_SAP_NOTE_URL'] = sap.get_config_value('CNF_SAP_NOTE_URL')
54
        settings['CNF_SAP_NOTE_URL'] = sap.get_config_value('CNF_SAP_NOTE_URL')
55
        settings['CNF_SAP_CONN_TIMEOUT'] = sap.get_config_value('CNF_SAP_CONN_TIMEOUT')
55
        settings['CNF_SAP_CONN_TIMEOUT'] = sap.get_config_value('CNF_SAP_CONN_TIMEOUT')
56
        settings['CNF_FF_PROFILE_DIR'] = sap.get_config_value('CNF_FF_PROFILE_DIR')
56
        settings['CNF_FF_PROFILE_DIR'] = sap.get_config_value('CNF_FF_PROFILE_DIR')
57
57
58
        return settings
58
        return settings
-
 
59
-
 
60
-
 
61
    #~ def get_value(self, key):
-
 
62
        #~ settings = self.get_custom_settings()
-
 
63
-
 
64
        #~ try:
-
 
65
            #~ return settings[key]
-
 
66
        #~ except:
-
 
67
            #~ return None
-
 
68
-
 
69
-
 
70
    #~ def set_value(self, key, value):
-
 
71
        #~ pass