Skip to content

Commit 4126237

Browse files
chore: remove cloud specific onboarding
CMK-30426 Change-Id: Ibcc3f5a701d9a814c0e8b6ccb08380b97a799022
1 parent 2cdc595 commit 4126237

5 files changed

Lines changed: 2 additions & 26 deletions

File tree

cmk/gui/type_defs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ class UserSpec(TypedDict, total=False):
323323
start_url: str | None
324324
two_factor_credentials: TwoFactorCredentials
325325
ui_sidebar_position: Literal["left"] | None
326-
ui_saas_onboarding_button_toggle: Literal["invisible"] | None
327326
ui_theme: Literal["modern-dark", "facelift"] | None
328327
user_id: AnnotatedUserId
329328
user_scheme_serial: int

cmk/gui/userdb/store.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ def _load_users(lock: bool = False) -> Users:
201201
"ui_theme",
202202
"two_factor_credentials",
203203
"ui_sidebar_position",
204-
"ui_saas_onboarding_button_toggle",
205204
"last_login",
206205
],
207206
Callable,
@@ -216,7 +215,6 @@ def _load_users(lock: bool = False) -> Users:
216215
("ui_theme", lambda x: x),
217216
("two_factor_credentials", ast.literal_eval),
218217
("ui_sidebar_position", lambda x: None if x == "None" else x),
219-
("ui_saas_onboarding_button_toggle", lambda x: None if x == "None" else x),
220218
("last_login", ast.literal_eval),
221219
]
222220

@@ -520,15 +518,6 @@ def _save_user_profiles(
520518
else:
521519
remove_custom_attr(user_id, "ui_sidebar_position")
522520

523-
if "ui_saas_onboarding_button_toggle" in user:
524-
save_custom_attr(
525-
user_id,
526-
"ui_saas_onboarding_button_toggle",
527-
user["ui_saas_onboarding_button_toggle"],
528-
)
529-
else:
530-
remove_custom_attr(user_id, "ui_saas_onboarding_button_toggle")
531-
532521
_save_cached_profile(user_id, user, multisite_keys, non_contact_keys)
533522

534523

@@ -697,8 +686,7 @@ def _multisite_keys(user_attributes: Sequence[tuple[str, UserAttribute]]) -> lis
697686
multisite_variables = [
698687
var
699688
for var in _get_multisite_custom_variable_names(user_attributes)
700-
if var
701-
not in ("start_url", "ui_theme", "ui_sidebar_position", "ui_saas_onboarding_button_toggle")
689+
if var not in ("start_url", "ui_theme", "ui_sidebar_position")
702690
]
703691
return [
704692
"roles",

cmk/gui/userdb/userdata.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ class UserData:
132132
nav_hide_icons_title: Literal["hide"] | None | _MissingValueSentinel
133133
icons_per_item: Literal["entry"] | None | _MissingValueSentinel
134134
ui_sidebar_position: Literal["left"] | None # I think None means right, which is the default?
135-
ui_saas_onboarding_button_toggle: Literal["invisible"] | None
136135
ui_theme: Literal["modern-dark", "facelift"] | None
137136
# contextual_help_icon: NotRequired[Literal["hide_icon"] | None]
138137

@@ -185,7 +184,6 @@ def to_userspec(self) -> UserSpec:
185184
("last_login", self.last_login),
186185
# UI
187186
("temperature_unit", self.temperature_unit),
188-
("ui_saas_onboarding_button_toggle", self.ui_saas_onboarding_button_toggle),
189187
("ui_sidebar_position", self.ui_sidebar_position),
190188
("ui_theme", self.ui_theme),
191189
("start_url", self.start_url),
@@ -289,7 +287,6 @@ def from_userspec(
289287
temperature_unit=userspec.get("temperature_unit"),
290288
two_factor_credentials=userspec.get("two_factor_credentials"),
291289
ui_sidebar_position=userspec.get("ui_sidebar_position"),
292-
ui_saas_onboarding_button_toggle=userspec.get("ui_saas_onboarding_button_toggle"),
293290
ui_theme=userspec.get("ui_theme"),
294291
created_on_version=userspec.get("created_on_version"),
295292
user_id=user_id,

tests/testlib/web_session.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,13 @@ def _check_html_page_resources(self, url: str | bytes | None, soup: BeautifulSou
125125

126126
# There might be other resources like iframe, audio, ... but we don't care about them
127127
self._check_resources(soup, base_url, "img", "src", ["image/png", "image/svg+xml"])
128-
# Checkmk Cloud includes a new onboarding feature. This is loaded from an external source hosted
129-
# by checkmk. We do not want to check it in the integration tests
130-
script_filters = (
131-
[("src", "https://static.saas-dev.cloudsandbox.checkmk.cloud")]
132-
if edition_from_env().is_cloud_edition()
133-
else None
134-
)
135128
self._check_resources(
136129
soup,
137130
base_url,
138131
"script",
139132
"src",
140133
["application/javascript", "text/javascript"],
141-
filters=script_filters,
134+
filters=None,
142135
)
143136
self._check_resources(
144137
soup, base_url, "link", "href", ["text/css"], filters=[("rel", "stylesheet")]

tests/unit/cmk/gui/test_pages.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ def test_registered_pages() -> None:
239239

240240
if cmk_version.edition(paths.omd_root) is cmk_version.Edition.CLOUD:
241241
expected_pages += [
242-
"ajax_saas_onboarding_button_toggle",
243242
"noauth:cognito_sso",
244243
"noauth:cognito_callback",
245244
"cognito_logout",

0 commit comments

Comments
 (0)