Application types(应用程序类型)¶
Slate supports two types of applications: Integrated applications and public applications.
Integrated applications¶
In most cases, you will want to create an integrated application. An integrated Slate application can make use of the Foundry ecosystem to create widgets, use functions, configure Events and Actions, and more. Integrated applications are published to Foundry users within your Organization and can be viewed or edited based on user permissions.
Learn more about how to create an integrated application.
Public applications¶
Slate supports "public" applications, meaning Slate applications that can be used by individuals without Foundry accounts. Public applications allow users without Foundry accounts to submit information, upload data, or upload files into Palantir Foundry, subject to validation logic and other safety measures.
Uploaded data from public applications can directly feed into pipelines without the need to set up additional data connections to external systems. Developers can build and publish public applications to facilitate highly-customized workflows for partners, vendors, or employees who do not have Foundry accounts.
With Slate, you can develop public applications without the need to configure servers, DNS, or authentication, all while leveraging Slate's toolset of widgets, custom CSS overrides, functions, and events.
Learn more about how to create a public application.
Limitations¶
Public Slate applications are not able to read data and resources outside of the application itself. The application cannot access objects, datasets, actions, or files (like stored images or videos). Therefore, widgets and components that require access to other elements of the platform are not available in public Slate applications. All data and resources required for the Slate application need to be stored in the Slate application itself. Images, fonts, and other resources can be stored in the Slate application by encoding them in base64.
Example 1: Images encoded via base64 can be added with the image tag in HTML. Rather than the source tag being a URL, the tag needs to be configured to display an encoded image, like the following:
<image src="data:image/png;base64,<<base64_code>>">
Example 2: Fonts encoded in base64 can be added in the Styles panel in Slate. While web fonts are available as-is, custom fonts need to be declared within the app as shown below. Once the font has been added, it can be used anywhere in the application via the font family name.
@font-face {
font-family: '<<font_name>>';
src: url(data:application/font-woff2;charset=utf-8;base64,<<base64_code>>) format('woff2'),
}
Permissions¶
Public Slate applications require an additional set of permissions to create and edit files beyond existing file and project permissions. In order to create or edit public applications, users require access to the Manage public Slate applications workflow, grantable through Control Panel's Organization permissions settings found in the Security and governance section.
Once published, non-Foundry users have view-only access to the published Slate application using the public link.
The application is hosted in the same network as Foundry itself, therefore users require access to the Foundry instance in order to see public applications. Foundry instances only accessible via a restricted network are not able to publish applications to the web.
As public applications are not indexed by search engines by default, non-Foundry users will need to be provided with the link in order to access the application.
中文翻译¶
应用程序类型¶
Slate 支持两种类型的应用程序:集成应用程序(Integrated applications)和公共应用程序(Public applications)。
集成应用程序¶
在大多数情况下,您需要创建集成应用程序。集成 Slate 应用程序可以利用 Foundry 生态系统来创建小部件(widgets)、使用函数(functions)、配置事件(Events)和操作(Actions)等。集成应用程序会发布给您组织内的 Foundry 用户,并根据用户权限进行查看或编辑。
了解更多关于如何创建集成应用程序的信息。
公共应用程序¶
Slate 支持"公共"应用程序,即无需 Foundry 账户即可使用的 Slate 应用程序。公共应用程序允许没有 Foundry 账户的用户在 Palantir Foundry 中提交信息、上传数据或上传文件,并受验证逻辑和其他安全措施的保护。
来自公共应用程序的上传数据可以直接输入到数据管道(pipelines)中,无需设置额外的外部系统数据连接。开发人员可以构建和发布公共应用程序,为没有 Foundry 账户的合作伙伴、供应商或员工提供高度定制化的工作流程。
借助 Slate,您可以开发公共应用程序,无需配置服务器、DNS 或身份验证,同时充分利用 Slate 的小部件、自定义 CSS 覆盖、函数和事件等工具集。
了解更多关于如何创建公共应用程序的信息。
限制条件¶
公共 Slate 应用程序无法读取应用程序本身之外的数据和资源。应用程序无法访问对象(objects)、数据集(datasets)、操作(actions)或文件(如存储的图片或视频)。因此,需要访问平台其他元素的小部件和组件在公共 Slate 应用程序中不可用。Slate 应用程序所需的所有数据和资源都需要存储在 Slate 应用程序本身中。图片、字体和其他资源可以通过 base64 编码存储在 Slate 应用程序中。
示例 1:通过 base64 编码的图片可以使用 HTML 中的图片标签添加。源标签(source tag)不需要是 URL,而是需要配置为显示编码后的图片,如下所示:
<image src="data:image/png;base64,<<base64_code>>">
示例 2:通过 base64 编码的字体可以在 Slate 的样式面板(Styles panel)中添加。虽然网页字体可以直接使用,但自定义字体需要在应用程序内声明,如下所示。添加字体后,可以通过字体系列名称在应用程序的任何位置使用该字体。
@font-face {
font-family: '<<font_name>>';
src: url(data:application/font-woff2;charset=utf-8;base64,<<base64_code>>) format('woff2'),
}
权限设置¶
公共 Slate 应用程序需要一组额外的权限来创建和编辑文件,超出已有的文件和项目权限。要创建或编辑公共应用程序,用户需要访问管理公共 Slate 应用程序工作流程的权限,该权限可通过控制面板(Control Panel)中安全与治理部分下的组织权限设置进行授予。
发布后,非 Foundry 用户可以使用公共链接以只读方式访问已发布的 Slate 应用程序。
该应用程序托管在与 Foundry 相同的网络中,因此用户需要访问 Foundry 实例才能查看公共应用程序。仅可通过受限网络访问的 Foundry 实例无法将应用程序发布到互联网。
由于公共应用程序默认不会被搜索引擎索引,因此需要向非 Foundry 用户提供链接才能访问该应用程序。