Skip to content

Commit

Permalink
[patch] Fix reset of mas_appws_components to default (#1142)
Browse files Browse the repository at this point in the history
  • Loading branch information
durera authored Jul 26, 2024
1 parent 49b3583 commit 03a9499
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion python/src/mas/cli/displayMixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def promptForListSelect(self, message: str, options: list, param: str=None, defa
# List indices are 0 origin, so we need to subtract 1 from the selection made to arrive at the correct value
self.setParam(param, options[selection-1])

def promptForFile(self, message: str, mustExist: bool=True, default: str="") -> None:
def promptForFile(self, message: str, mustExist: bool=True, default: str="", envVar: str="") -> None:
if default == "" and envVar != "":
default = getenv(envVar, "")
if mustExist:
return prompt(masPromptValue(message), validator=FileExistsValidator(), validate_while_typing=False, default=default)
else:
Expand Down
2 changes: 1 addition & 1 deletion python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def configCatalog(self):

def configSLS(self) -> None:
self.printH1("Configure Product License")
self.slsLicenseFileLocal = self.promptForFile("License file", mustExist=True)
self.slsLicenseFileLocal = self.promptForFile("License file", mustExist=True, envVar="SLS_LICENSE_FILE_LOCAL")
self.promptForString("Contact e-mail address", "uds_contact_email")
self.promptForString("Contact first name", "uds_contact_firstname")
self.promptForString("Contact last name", "uds_contact_lastname")
Expand Down
5 changes: 4 additions & 1 deletion python/src/mas/cli/install/settings/manageSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#
# *****************************************************************************

import logging
logger = logging.getLogger(__name__)

class ManageSettingsMixin():

def arcgisSettings(self) -> None:
Expand Down Expand Up @@ -82,6 +85,7 @@ def manageSettingsComponents(self) -> None:
if self.yesOrNo(" - Tririga"): self.params["mas_appws_components"] += ",tririga=latest"
if self.yesOrNo(" - Utilities"): self.params["mas_appws_components"] += ",utilities=latest"
if self.yesOrNo(" - Workday Applications"): self.params["mas_appws_components"] += ",workday=latest"
logger.debug(f"Generated mas_appws_components = {self.params['mas_appws_components']}")

if ",icd=" in self.params["mas_appws_components"]:
self.printH2("Maximo IT License Terms")
Expand All @@ -97,7 +101,6 @@ def manageSettingsDatabase(self) -> None:
self.printH2("Maximo Manage Settings - Database")
self.printDescription(["Customise the schema, tablespace, indexspace, and encryption settings used by Manage"])

self.params["mas_appws_components"] = "base=latest,health=latest"
if self.yesOrNo("Customize database settings"):
self.promptForString("Schema", "mas_app_settings_db2_schema", default="maximo")
self.promptForString("Tablespace", "mas_app_settings_db2_tablespace", default="MAXDATA")
Expand Down

0 comments on commit 03a9499

Please sign in to comment.