Skip to content

Commit

Permalink
Remove Bootstrap 3 (#9482)
Browse files Browse the repository at this point in the history
* Remove old theme

* Remove dangling less files

* Remove view helper bindings, clean up build

* Initial swap for modules

* Move more modules

* Clean up build, modules and references

* Add changelog

* Fix Jest
  • Loading branch information
Etheryte authored Nov 25, 2024
1 parent 24857b2 commit 7f28ef1
Show file tree
Hide file tree
Showing 100 changed files with 60 additions and 4,059 deletions.
74 changes: 0 additions & 74 deletions java/code/src/com/suse/manager/webui/utils/ViewHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,68 +52,6 @@ public enum ViewHelper {

private static final RenderUtils RENDER_UTILS = GlobalInstanceHolder.RENDER_UTILS;

/**
* List of pages that are updated to newer Bootstrap.
* @see ViewHelper#isBootstrapReady
*
* NB! This must be in sync with web/html/src/core/spa/view-helper.ts
*/
private static final List<String> BOOTSTRAP_READY_PAGES = List.of(
"/rhn/YourRhn.do",
"/rhn/account/UserPreferences.do",
"/rhn/account/UserDetails.do",
"/rhn/account/ChangeEmail.do",
"/rhn/account/AccountDeactivation.do",
"/rhn/account/Addresses.do",
"/rhn/account/EditAddress.do",
"/rhn/multiorg/OrgConfigDetails.do",
"/rhn/manager/notification-messages",
"/rhn/channels/software/Search.do",
"/rhn/activationkeys/List.do",
"/rhn/manager/systems/list/all",
"/rhn/manager/contentmanagement/projects",
"/rhn/kickstart/cobbler/DefaultSnippetList.do",
"/rhn/systems/details/packages/PackageList.do",
"/rhn/software/channels/All.do",
"/rhn/manager/systems/ssm/coco/settings",
"/rhn/systems/ssm/audit/ScheduleXccdf.do",
"/rhn/systems/ssm/provisioning/PowerManagementConfiguration.do",
"/rhn/systems/details/kickstart/PowerManagement.do",
"/rhn/systems/ssm/provisioning/PowerManagementOperations.do",
"/rhn/channels/ChannelDetail.do",
"/rhn/software/packages/Details.do",
"/rhn/manager/systems/details/formulas",
"/rhn/manager/cm/imagestores",
"/rhn/manager/systems/details/highstate",
"/rhn/manager/systems/keys",
"/rhn/manager/audit/cve",
"/rhn/errata/Search.do",
"/rhn/audit/scap/Search.do",
"/rhn/manager/schedule/recurring-actions",
"/rhn/manager/schedule/maintenance/calendars",
"/rhn/manager/multiorg/recurring-actions",
"/rhn/manager/schedule/maintenance/schedules",
"/rhn/manager/admin/config/monitoring",
"/rhn/admin/config/GeneralConfig.do",
"/rhn/manager/admin/config/monitoring",
"/rhn/manager/admin/setup/products",
"/rhn/systems/details/SystemRemoteCommand.do",
"/rhn/manager/systems/details/highstate",
"/rhn/manager/systems/details/recurring-actions",
"/rhn/manager/cm/build",
"/rhn/admin/ScheduleDetail.do",
"/rhn/manager/systems/cmd",
"/rhn/kickstart/KickstartIpRanges.do",
"/rhn/channels/manage/repos/RepoCreate.do",
"/rhn/systems/details/Overview",
"/rhn/manager/formula-catalog",
"/rhn/errata/manage/CloneErrata.do",
"/rhn/admin/setup/ProxySettings.do",
"/rhn/admin/setup/MirrorCredentials.do",
"/rhn/manager/admin/setup/payg",
"/rhn/manager/storybook"
);

ViewHelper() { }

/**
Expand Down Expand Up @@ -333,16 +271,4 @@ public boolean formulaValueEquals(Server server, String formulaName, String valu
public boolean hasSshPushContactMethod(Server server) {
return ContactMethodUtil.isSSHPushContactMethod(server.getContactMethod());
}

/**
* Checks if the requested page is updated to newer Bootstrap.
* @param uri the page URI
* @return true if the URI is in the list of updated pages
* @deprecated this is a temporary hook that makes partial Bootstrap migration possible. Will be removed when the
* migration is finished.
*/
@Deprecated
public boolean isBootstrapReady(String uri) {
return true;
}
}
11 changes: 1 addition & 10 deletions java/code/webapp/WEB-INF/decorators/layout_bare.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,9 @@
<head>
<jsp:include page="layout_head.jsp" />
<decorator:head />
<rhn:require acl="is(development_environment)">
<link rel="stylesheet/less" type="text/css" href="/css/susemanager-fullscreen.less" />
<script>less = { env: 'development' };</script>
<script src="/javascript/less.js"></script>
</rhn:require>
<rhn:require acl="not is(development_environment)">
<link rel="stylesheet" href="/css/susemanager-fullscreen.css" />
</rhn:require>
</head>
<c:set var="webTheme" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentWebTheme(pageContext)}"/>
<c:set var="isUpdatedPage" value="${GlobalInstanceHolder.VIEW_HELPER.isBootstrapReady(pageContext.request.requestURI)}"/>
<body class="theme-${webTheme} ${isUpdatedPage ? 'new-theme' : 'old-theme'}" onload="<decorator:getProperty property="body.onload" />">
<body class="theme-${webTheme} new-theme" onload="<decorator:getProperty property="body.onload" />">
<div id="menu-portal-target"></div>
<div class="spacewalk-main-column-layout">
<section id="spacewalk-content">
Expand Down
3 changes: 1 addition & 2 deletions java/code/webapp/WEB-INF/decorators/layout_c.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
<decorator:head />
</head>
<c:set var="webTheme" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentWebTheme(pageContext)}"/>
<c:set var="isUpdatedPage" value="${GlobalInstanceHolder.VIEW_HELPER.isBootstrapReady(pageContext.request.requestURI)}"/>
<body class="theme-${webTheme} ${isUpdatedPage ? 'new-theme' : 'old-theme'}" onload="<decorator:getProperty property="body.onload" />">
<body class="theme-${webTheme} new-theme" onload="<decorator:getProperty property="body.onload" />">
<div class="senna-loading-bar"></div>
<div id="menu-portal-target"></div>
<header class="navbar-pf navbar">
Expand Down
3 changes: 1 addition & 2 deletions java/code/webapp/WEB-INF/decorators/layout_equals.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
<decorator:head />
</head>
<c:set var="webTheme" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentWebTheme(pageContext)}"/>
<c:set var="isUpdatedPage" value="${GlobalInstanceHolder.VIEW_HELPER.isBootstrapReady(pageContext.request.requestURI)}"/>
<body class="theme-${webTheme} ${isUpdatedPage ? 'new-theme' : 'old-theme'}" onload="<decorator:getProperty property="body.onload" />">
<body class="theme-${webTheme} new-theme" onload="<decorator:getProperty property="body.onload" />">
<nav class="navbar-pf navbar" role="navigation">
<jsp:include page="/WEB-INF/includes/header.jsp" />
</nav>
Expand Down
3 changes: 1 addition & 2 deletions java/code/webapp/WEB-INF/decorators/layout_error.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
<decorator:head />
</head>
<c:set var="webTheme" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getCurrentWebTheme(pageContext)}"/>
<c:set var="isUpdatedPage" value="${GlobalInstanceHolder.VIEW_HELPER.isBootstrapReady(pageContext.request.requestURI)}"/>
<body class="theme-${webTheme} ${isUpdatedPage ? 'new-theme' : 'old-theme'}" onload="<decorator:getProperty property="body.onload" />">
<body class="theme-${webTheme} new-theme" onload="<decorator:getProperty property="body.onload" />">
<c:set var="custom_header" scope="page" value="${rhn:getConfig('java.custom_header')}" />

<header class="navbar-pf navbar">
Expand Down
1 change: 1 addition & 0 deletions java/spacewalk-java.changes.eth.remove-3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Reduced bundle size for the web UI
16 changes: 0 additions & 16 deletions web/html/src/branding/css/base/error.less

This file was deleted.

26 changes: 0 additions & 26 deletions web/html/src/branding/css/base/fixes.less

This file was deleted.

50 changes: 0 additions & 50 deletions web/html/src/branding/css/base/forms.less

This file was deleted.

7 changes: 0 additions & 7 deletions web/html/src/branding/css/base/hr.less

This file was deleted.

22 changes: 0 additions & 22 deletions web/html/src/branding/css/base/inputs.less

This file was deleted.

45 changes: 0 additions & 45 deletions web/html/src/branding/css/base/network.less

This file was deleted.

34 changes: 0 additions & 34 deletions web/html/src/branding/css/base/notifications.less

This file was deleted.

32 changes: 0 additions & 32 deletions web/html/src/branding/css/base/responsive-rules.less

This file was deleted.

Loading

0 comments on commit 7f28ef1

Please sign in to comment.