要显示法律警告或官方公告,可以使用有限形式的 Markdown 语法配置登录页面横幅。
通过直接在主机上修改文本文件 /etc/vmware/welcome,可以更改在用户名和密码登录字段右侧显示的登录横幅内容。
注: 将 Markdown 解析器应用于内容块,某些字符序列(如
可以在
welcome 文件中应用以下有限的 Markdown 指令集。
#, ` , *
)可能会意外触发 Markdown 格式化规则。
布局概念 | Markdown 代码语法 | 输出 |
---|---|---|
标题标签 |
|
为“My Title”生成大的 HTML <H1> 标记。 |
水平线 |
|
以 HTML 格式生成 <hr /> 分隔线标记。 |
文字或代码块 |
示例 ``` My content - - - *Login Secure* >_ Read the policy ``` |
以等宽字体显示不带格式或解释的反引号行之间的文本块。My content - - - *Login Secure* >_ Read the policy
注: 如果 Markdown 解析器意外对内容设置了格式,请使用一对反引号字符行封装内容。由于保留空格字符,因此使用等宽字体时可以使用 ASCII Art 字体。
|
粗体文本 | 将文本字符串放在双星号之间。 示例 **important message** .
注: 省略了 Markdown 双下划线字符语法,以避免与 URL 冲突。
|
<b> important message</b> |
斜体文本 | 将文本字符串放在单星号之间。 示例 *A named document* .
注: 省略了 Markdown 下划线字符语法,以避免与 URL 冲突。
|
<i> A named document</i> |
超链接 | 要链接绝对 URL,请使用以下 Markdown 语法:用方括号括起链接文本,后跟圆括号括起的 URL。 示例 [My link](https://www.example.com?search=virtual) |
生成具有可点击文本的普通超链接定位标记。<a href="https://www.example.com?search=virtual">My link</a> |
您可以在文本文件中的任何位置插入以下变量。
变量概念 | 元标记变量代码 | 输出 |
---|---|---|
当前主机或 IP 地址的完全限定域名 | {hostname} |
显示当前主机的完整名称。例如,sample.host.com |
点分数字格式的 ESXi 版本 | {esxversion} |
例如,显示 7.0.0 |
ESXi 完整产品名、版本和内部版本号 | {esxproduct} |
例如,显示 VMware ESXi 7.0.0 build-16324942 |
用户计算机上的当前日期 | {client-current-date} |
例如,显示 Tuesday, August 30, 2022
注: 这是特定于区域设置的。
|
用户计算机上的当前时间 | {client-current-time} |
例如,显示 08:00 AM
注: 这是特定于区域设置的。
|
高级标记根据应用于登录页面的分隔线提供视觉和行为更改。在文本文件的末尾插入这些标记。
UI 概念 | 元标记变量代码 | 输出 |
---|---|---|
自定义映像 | {logo src="https://site/logo.png" width="100" height="100" align="center"}My Secured ESXi Server Tooltip{/logo} |
显示在消息块上方水平居中的 100x100 px 图像 logo.png。将向图像添加可访问工具提示标题 My Secured ESXi Server Tooltip 。
注: 尽管
width 、
height 和
align 属性是可选的,请确保使用这些属性。支持所有 Web 映像格式。
|
用户协议复选框 | {accept}Please accept the terms{/accept} |
显示一个复选框,消息内容的底部显示“请接受条款”标签。 |
强制接受错误消息 | {mustaccept}You must agree before logging into the system{/mustaccept} |
添加表单验证以要求用户在登录之前选中该复选框。如果用户未选中该复选框,则登录按钮上方将显示“您必须同意才能登录系统”消息。 |
简单标记
简单纯文本消息的单行标记
## Warning: Authorized Users Only
高级标记
虚拟云存储公司 Vaulted 的高级标记示例,表单上带有徽标、链接和必填接受复选框。
## Warning: Authorized Users Only The information on this host is the property of **"Vaulted Storage"** *(sample organization)* and is protected under sovereign **intellectual property rights**. You must be assigned an account on this computer to access information and are only allowed to access information defined by the system administrators. *All activities* are monitored and **trespassing violators** will be reported to a federal law enforcement agency. ### Policy bulletins *Please refer to the helpful links* below on end user protection guidelines. * [Privacy addendum](https://en.wikipedia.org/wiki/Computer_security) * [Terms of Use](https://en.wikipedia.org/wiki/Terms_of_service#:~:text=Terms%20of%20service%20(also%20known,to%20use%20the%20offered%20service.) ``` ,----------------, ,-----------------------, ," ,"| +-----------------------+ | | .-----------------. | | | | | | | | | ACCESS | | | | | RESTRICTED! | | | | | login as: _ | | | | | | | | | `-----------------' |," +-----------------------+ /_)______________(_/ //' ___________________________/___ / oooooooooooooooo .o. oooo /, / ==ooooooooooooooo==.o. ooo= // /_==__==========__==_ooo__ooo=_/' `-----------------------------' --------------- Host: {hostname} ESXi Server Version: {esxversion} Product: {esxproduct} --------------- ``` {logo align="center" width="200" height="200" src="https://i.postimg.cc/y6wZXTPm/vaulted-logo-white-text.png"}Vaulted Enterprise Storage{/logo} {accept}I accept the terms of use policy{/accept} {mustaccept}User must check terms of use to login. LOG OFF immediately if you do not agree to the conditions stated in the warning.{/mustaccept}