Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First batch of product renaming #9841

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ After:
## Documentation
- No documentation needed: **add explanation. This can't be used if there is a GUI diff**
- No documentation needed: only internal and user invisible changes
- Documentation issue was created: [Link for SUSE Manager contributors](https://github.com/SUSE/spacewalk/issues/new?template=ISSUE_TEMPLATE_DOCUMENTATION.md&labels=documentation&projects=SUSE/spacewalk/31), [Link for community contributors](https://github.com/uyuni-project/uyuni-docs/issues/new).
- Documentation issue was created: [Link for SUSE Multi-Linux Manager contributors](https://github.com/SUSE/spacewalk/issues/new?template=ISSUE_TEMPLATE_DOCUMENTATION.md&labels=documentation&projects=SUSE/spacewalk/31), [Link for community contributors](https://github.com/uyuni-project/uyuni-docs/issues/new).
- API documentation added: please review the Wiki page [Writing Documentation for the API](https://github.com/uyuni-project/uyuni/wiki/Writing-documentation-for-the-API) if you have any changes to API documentation.
- (OPTIONAL) [Documentation PR](https://github.com/uyuni-project/uyuni-docs/pulls)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ public List<String> getWebThemesList() {
* @return the name of the theme for the webUI
*/
public String getDefaultWebTheme() {
return Config.get().getString(WEB_THEME, "susemanager-light");
return Config.get().getString(WEB_THEME, "suse-light");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9681,10 +9681,10 @@ For a detailed analysis, please refer to the log files.
<source>Systems with conflicting minion ID and machine ID were found ({0}, {1}). Onboarding aborted. Please remove conflicting systems first ({2}, {3})</source>
</trans-unit>
<trans-unit id="bootstrap.minion.error.payg.dcregistered">
<source>Registration of '{0}' on SUSE Manager Server rejected. \nTo manage Datacenter clients you have to configure SCC Credentials at Admin => Setup Wizard => Organization Credentials.</source>
<source>Registration of '{0}' on SUSE Multi-Linux Manager Server rejected. \nTo manage Datacenter clients you have to configure SCC Credentials at Admin => Setup Wizard => Organization Credentials.</source>
</trans-unit>
<trans-unit id="bootstrap.minion.error.payg.byosregistered">
<source>Registration of '{0}' on SUSE Manager Server rejected. \nTo manage BYOS (Bring-your-own-Subscription) clients you have to configure SCC Credentials at Admin => Setup Wizard => Organization Credentials. \n\nIf the instance being onboarded is PAYG, ensure the `python-instance-billing-flavor-check` package is installed and try again.</source>
<source>Registration of '{0}' on SUSE Multi-Linux Manager Server rejected. \nTo manage BYOS (Bring-your-own-Subscription) clients you have to configure SCC Credentials at Admin => Setup Wizard => Organization Credentials. \n\nIf the instance being onboarded is PAYG, ensure the `python-instance-billing-flavor-check` package is installed and try again.</source>
</trans-unit>
<trans-unit id="coco.environment.none.description">
<source>None</source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import static com.suse.manager.webui.utils.SparkApplicationHelper.withUserPreferences;
import static spark.Spark.get;

import com.redhat.rhn.common.conf.ConfigDefaults;
import com.redhat.rhn.common.util.validation.password.PasswordPolicy;
import com.redhat.rhn.domain.cloudpayg.PaygSshData;
import com.redhat.rhn.domain.cloudpayg.PaygSshDataFactory;
Expand Down Expand Up @@ -102,7 +101,6 @@ public static void initRoutes(JadeTemplateEngine jade) {
*/
public static ModelAndView showMonitoring(Request request, Response response, User user) {
Map<String, Object> data = new HashMap<>();
data.put("isUyuni", ConfigDefaults.get().isUyuni());
return new ModelAndView(data, "controllers/admin/templates/monitoring.jade");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ script(type='text/javascript').

script(type='text/javascript').
spaImportReactPage('admin/config/monitoring')
.then(function (module) { module.renderer('monitoring', JSON.parse("#{isUyuni}")) });
.then(function (module) { module.renderer('monitoring', {}) });
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ html(lang=window.preferredLocale.replace("_", "-"))
script(type='text/javascript').
window.preferredLocale = "#{preferredLocale}";
window.docsLocale = "#{docsLocale}";
window.isUyuni = #{isUyuni};
script(src='/javascript/jquery.js?cb=#{webBuildtimestamp}')
script(src='/javascript/login.js?cb=#{webBuildtimestamp}')
script(src='/javascript/bootstrap.js?cb=#{webBuildtimestamp}')
Expand Down Expand Up @@ -45,13 +46,11 @@ html(lang=window.preferredLocale.replace("_", "-"))
module.renderer(
'login',
{
isUyuni: JSON.parse("#{isUyuni}"),
theme: '!{webTheme}',
urlBounce: document.getElementById('init_data_url_bounce').textContent,
validationErrors: JSON.parse('!{validationErrors}'),
schemaUpgradeRequired: JSON.parse('!{schemaUpgradeRequired}'),
webVersion: '!{webVersion}',
productName: '!{productName}',
customHeader: '!{customHeader}',
customFooter: '!{customFooter}',
legalNote: '!{legalNote}',
Expand Down
4 changes: 2 additions & 2 deletions java/code/webapp/WEB-INF/decorators/layout_error.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
</a>
</c:when>
<c:otherwise>
<a href="/" class="navbar-brand js-spa" target="" title="SUSE Manager homepage">
<span>SUSE<i class="fa fa-registered"></i>Manager</span>
<a href="/" class="navbar-brand js-spa" target="" title="SUSE Multi-Linux Manager homepage">
<span>SUSE<i class="fa fa-registered"></i> Multi-Linux Manager</span>
</a>
</c:otherwise>
</c:choose>
Expand Down
14 changes: 8 additions & 6 deletions java/code/webapp/WEB-INF/decorators/layout_head.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@
<c:set var="userDateFormat" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getUserDateFormat(pageContext)}"/>
<c:set var="userTimeFormat" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getUserTimeFormat(pageContext)}"/>
<c:set var="userPageSize" value="${GlobalInstanceHolder.USER_PREFERENCE_UTILS.getUserPageSize(pageContext)}"/>
<c:set var="isUyuni" value='${ConfigDefaults.get().isUyuni()}' />
<script>
window.serverTime='${serverTime}'
window.serverTimeZone='${serverTimeZone}'
window.userTimeZone='${userTimeZone}'
window.userDateFormat='${userDateFormat}'
window.userTimeFormat='${userTimeFormat}'
window.userPrefPageSize=${userPageSize}
window.serverTime='${serverTime}';
window.serverTimeZone='${serverTimeZone}';
window.userTimeZone='${userTimeZone}';
window.userDateFormat='${userDateFormat}';
window.userTimeFormat='${userTimeFormat}';
window.userPrefPageSize=${userPageSize};
window.isUyuni=${isUyuni};
</script>

<script src="/javascript/legacy/jquery.min.js?cb=${cb_version}"></script>
Expand Down
1 change: 0 additions & 1 deletion java/code/webapp/WEB-INF/includes/leftnav.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
<div id="left-menu-data">
<script type="text/javascript">
window.JSONMenu = <%= GlobalInstanceHolder.MENU_TREE.getJsonMenu(pageContext) %>;
window._IS_UYUNI = <%= Config.get().getString("product_name").compareToIgnoreCase("Uyuni") == 0 %>;
</script>
</div>
1 change: 1 addition & 0 deletions java/spacewalk-java.changes.eth.rename
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- SUSE Manager is now branded as SUSE Multi-Linux Manager
1 change: 1 addition & 0 deletions schema/spacewalk/susemanager-schema.changes.eth.rename
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- SUSE Manager is now branded as SUSE Multi-Linux Manager
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
UPDATE rhnUserInfo SET web_theme = 'suse-light' WHERE web_theme = 'susemanager-light';
UPDATE rhnUserInfo SET web_theme = 'suse-dark' WHERE web_theme = 'susemanager-dark';
4 changes: 2 additions & 2 deletions web/conf/rhn_web.conf
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ web.locale = en_US
web.docs_locale = en

# Set the list of possible webUI style themes name in a comma separated name list
# susemanager-light,susemanager-dark,uyuni
web.themes = susemanager-light,susemanager-dark,uyuni
# suse-light,suse-dark,uyuni
web.themes = suse-light,suse-dark,uyuni

# Set the default webUI style theme name
web.theme_default = uyuni
Expand Down
4 changes: 2 additions & 2 deletions web/html/src/branding/css/base/mixins.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@mixin onSuma {
@if $theme == "susemanager-light" {
@if $theme == "suse-light" {
@content;
}
@if $theme == "susemanager-dark" {
@if $theme == "suse-dark" {
@content;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "./susemanager-light-variables.scss";
@import "./suse-light-variables.scss";

$aside-background: $eos-bc-pine-500;
$aside-menu-text: $eos-bc-white;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$theme: "susemanager-dark";
$theme: "suse-dark";

@import "./base/body.scss";

Expand All @@ -9,7 +9,7 @@ $theme: "susemanager-dark";
@import "bootstrap/scss/bootstrap";

@import "./variables.scss";
@import "./susemanager-dark-variables.scss";
@import "./suse-dark-variables.scss";

display: flex;
flex-direction: column;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$theme: "susemanager-light";
$theme: "suse-light";

@import "./base/body.scss";

Expand All @@ -9,7 +9,7 @@ $theme: "susemanager-light";
@import "bootstrap/scss/bootstrap";

@import "./variables.scss";
@import "./susemanager-light-variables.scss";
@import "./suse-light-variables.scss";

display: flex;
flex-direction: column;
Expand Down
4 changes: 2 additions & 2 deletions web/html/src/build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ module.exports = (env, argv) => {
return {
entry: {
"javascript/manager/main": "./manager/index.ts",
"css/updated-susemanager-light": path.resolve(__dirname, "../branding/css/susemanager-light.scss"),
"css/updated-susemanager-dark": path.resolve(__dirname, "../branding/css/susemanager-dark.scss"),
"css/updated-suse-light": path.resolve(__dirname, "../branding/css/suse-light.scss"),
"css/updated-suse-dark": path.resolve(__dirname, "../branding/css/suse-dark.scss"),
"css/updated-uyuni": path.resolve(__dirname, "../branding/css/uyuni.scss"),
},
output: {
Expand Down
4 changes: 2 additions & 2 deletions web/html/src/components/formulas/EditGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import "./formula-form.css";

import * as React from "react";

import { productName } from "core/user-preferences";

import { SectionState } from "components/FormulaForm";
import { Highlight } from "components/table/Highlight";
import HelpIcon from "components/utils/HelpIcon";
Expand All @@ -21,8 +23,6 @@ const getEditGroupSubtype = Formulas.getEditGroupSubtype;
const deepCopy = Utils.deepCopy;
// circular dependencies are bad

const productName = Utils.getProductName();

type EditGroupProps = {
id: string;
key: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import * as React from "react";

import { default as Jexl } from "jexl";

import { productName } from "core/user-preferences";

import { SectionState } from "components/FormulaForm";
import HelpIcon from "components/utils/HelpIcon";

Expand Down Expand Up @@ -472,7 +474,7 @@ export function text(txt) {
}
// replace variables
if (typeof txt === "string" || txt instanceof String) {
txt = txt.replace(/\${productName}/g, Utils.getProductName());
txt = txt.replace(/\${productName}/g, productName);
}
return txt;
}
Expand Down
4 changes: 2 additions & 2 deletions web/html/src/components/hub/RegisterPeripheralForm.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as React from "react";

import { productName } from "core/user-preferences";

import { AsyncButton, SubmitButton } from "components/buttons";
import { Form, Password, Radio, Text, TextArea } from "components/input";
import { Messages, MessageType } from "components/messages/messages";
import { TopPanel } from "components/panels";
import Validation from "components/validation";

import { Utils } from "utils/functions";
import Network from "utils/network";

import { HubRegisterRequest } from "./types";
Expand Down Expand Up @@ -130,7 +131,6 @@ export class RegisterPeripheralForm extends React.Component<Props, State> {
}

public render(): React.ReactNode {
const productName = Utils.getProductName();
return (
<TopPanel title={t("Register a new peripheral server")} icon="fa fa-plus">
{this.state.loading && (
Expand Down
24 changes: 9 additions & 15 deletions web/html/src/core/debugUtils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { showErrorToastr, showSuccessToastr, showWarningToastr } from "component
const debugUtils = {
logTheme() {
const theme = document.querySelector<HTMLLinkElement>(
'link[href^="/css/updated-susemanager-light"],link[href^="/css/updated-susemanager-dark"],link[href^="/css/updated-uyuni"]'
'link[href^="/css/updated-suse-light"],link[href^="/css/updated-suse-dark"],link[href^="/css/updated-uyuni"]'
);
if (!theme) {
throw new TypeError("Unable to identify theme");
Expand All @@ -13,35 +13,29 @@ const debugUtils = {
},
toggleTheme() {
if (document.body.className.includes("theme-susemanager-")) {
document.body.className = document.body.className.replace("theme-susemanager-light", "theme-uyuni");
document.body.className = document.body.className.replace("theme-susemanager-dark", "theme-uyuni");
document.body.className = document.body.className.replace("theme-suse-light", "theme-uyuni");
document.body.className = document.body.className.replace("theme-suse-dark", "theme-uyuni");
} else if (document.body.className.includes("theme-uyuni")) {
document.body.className = document.body.className.replace("theme-uyuni", "theme-susemanager-light");
document.body.className = document.body.className.replace("theme-uyuni", "theme-suse-light");
}

const sumaLight = document.querySelector('link[href^="/css/updated-susemanager-light"]');
const sumaLight = document.querySelector('link[href^="/css/updated-suse-light"]');
if (sumaLight) {
sumaLight.setAttribute(
"href",
sumaLight.getAttribute("href")!.replace("updated-susemanager-light", "updated-uyuni")
);
sumaLight.setAttribute("href", sumaLight.getAttribute("href")!.replace("updated-suse-light", "updated-uyuni"));
this.logTheme();
return;
}

const sumaDark = document.querySelector('link[href^="/css/updated-susemanager-dark"]');
const sumaDark = document.querySelector('link[href^="/css/updated-suse-dark"]');
if (sumaDark) {
sumaDark.setAttribute(
"href",
sumaDark.getAttribute("href")!.replace("updated-susemanager-dark", "updated-uyuni")
);
sumaDark.setAttribute("href", sumaDark.getAttribute("href")!.replace("updated-suse-dark", "updated-uyuni"));
this.logTheme();
return;
}

const uyuni = document.querySelector('link[href^="/css/updated-uyuni"]');
if (uyuni) {
uyuni.setAttribute("href", uyuni.getAttribute("href")!.replace("updated-uyuni", "updated-susemanager-light"));
uyuni.setAttribute("href", uyuni.getAttribute("href")!.replace("updated-uyuni", "updated-suse-light"));
this.logTheme();
return;
}
Expand Down
2 changes: 2 additions & 0 deletions web/html/src/core/user-preferences/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ export const docsLocale: string = window.docsLocale || "en";
export const preferredLocale: string = window.preferredLocale || "en_US";
// Locale strings come with '_' from the backend but many frontend libraries expect them with '-' so we exchange these
export const jsFormatPreferredLocale: string = preferredLocale.replace("_", "-");
export const isUyuni = window.isUyuni ?? true;
export const productName = isUyuni ? "Uyuni" : "SUSE Multi-Linux Manager";
2 changes: 1 addition & 1 deletion web/html/src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ declare global {
interface Window {
// See java/code/webapp/WEB-INF/includes/leftnav.jsp
JSONMenu: any[];
_IS_UYUNI: boolean;

// CSRF loopback
csrfToken?: string;
Expand Down Expand Up @@ -34,6 +33,7 @@ declare global {
spaImportReactPage: (pageName: string) => Promise<unknown>;

userPrefPageSize?: number;
isUyuni?: boolean;
}

// Test env setup, see ./utils/test-utils/setup/index.ts
Expand Down
27 changes: 11 additions & 16 deletions web/html/src/manager/admin/config/monitoring-admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { hot } from "react-hot-loader/root";
import * as React from "react";
import { useEffect } from "react";

import { docsLocale } from "core/user-preferences";
import { docsLocale, isUyuni, productName } from "core/user-preferences";

import { AsyncButton, Button } from "components/buttons";
import withPageWrapper from "components/general/with-page-wrapper";
Expand Down Expand Up @@ -146,12 +146,8 @@ const ListPlaceholder = (props) => {
);
};

type HelpPanelProps = {
isUyuni: boolean;
};

const HelpPanel = (props: HelpPanelProps) => {
const docsDirectory = props.isUyuni ? "/uyuni" : "/suse-manager";
const HelpPanel = () => {
const docsDirectory = isUyuni ? "/uyuni" : "/suse-manager";
return (
<div className="col-sm-3 hidden-xs" id="wizard-faq">
<h4>{t("Server Monitoring")}</h4>
Expand Down Expand Up @@ -202,11 +198,7 @@ const ExportersMessages = (props: {
}
};

type MonitoringAdminProps = {
isUyuni: boolean;
};

const MonitoringAdmin = (props: MonitoringAdminProps) => {
const MonitoringAdmin = () => {
const {
action,
fetchStatus,
Expand Down Expand Up @@ -331,19 +323,22 @@ const MonitoringAdmin = (props: MonitoringAdminProps) => {
</React.Fragment>
);
}

return (
<div className="responsive-wizard">
{messages && <Messages items={messages} />}
<div className="spacewalk-toolbar-h1">
<div className="spacewalk-toolbar"></div>
<h1>
<i className="fa fa-info-circle"></i>
{t("SUSE Manager Configuration - Monitoring")}
<HelpLink url={`${props.isUyuni ? "uyuni" : "suse-manager"}/administration/monitoring.html`} />
{t("{productName} Configuration - Monitoring", {
productName,
})}
<HelpLink url={`${isUyuni ? "uyuni" : "suse-manager"}/administration/monitoring.html`} />
</h1>
</div>
<div className="page-summary">
<p>{t("Setup your SUSE Manager server monitoring.")}</p>
<p>{t("Set up monitoring for your {productName} server.", { productName })}</p>
</div>
<div className="spacewalk-content-nav">
<ul className="nav nav-tabs">
Expand Down Expand Up @@ -413,7 +408,7 @@ const MonitoringAdmin = (props: MonitoringAdminProps) => {
</div>
</div>
</div>
<HelpPanel isUyuni={props.isUyuni} />
<HelpPanel />
</div>
</Panel>
</div>
Expand Down
Loading
Loading