mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
feat: Update fieldType to ObjectID for various components to enhance data handling
This commit is contained in:
@@ -68,7 +68,7 @@ const Projects: FunctionComponent = (): ReactElement => {
|
||||
_id: true,
|
||||
},
|
||||
title: "Project ID",
|
||||
fieldType: FieldType.Text,
|
||||
fieldType: FieldType.ObjectID,
|
||||
placeholder: "-",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -342,7 +342,7 @@ const SettingsWhatsApp: FunctionComponent = (): ReactElement => {
|
||||
metaWhatsAppPhoneNumberId: true,
|
||||
},
|
||||
title: "Phone Number ID",
|
||||
fieldType: FieldType.Text,
|
||||
fieldType: FieldType.ObjectID,
|
||||
placeholder: "Not Configured",
|
||||
},
|
||||
{
|
||||
@@ -350,7 +350,7 @@ const SettingsWhatsApp: FunctionComponent = (): ReactElement => {
|
||||
metaWhatsAppBusinessAccountId: true,
|
||||
},
|
||||
title: "Business Account ID",
|
||||
fieldType: FieldType.Text,
|
||||
fieldType: FieldType.ObjectID,
|
||||
placeholder: "Not Configured",
|
||||
},
|
||||
{
|
||||
@@ -366,7 +366,7 @@ const SettingsWhatsApp: FunctionComponent = (): ReactElement => {
|
||||
metaWhatsAppAppId: true,
|
||||
},
|
||||
title: "App ID",
|
||||
fieldType: FieldType.Text,
|
||||
fieldType: FieldType.ObjectID,
|
||||
placeholder: "Not Configured",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ const Users: FunctionComponent = (): ReactElement => {
|
||||
_id: true,
|
||||
},
|
||||
title: "User ID",
|
||||
fieldType: FieldType.Text,
|
||||
fieldType: FieldType.ObjectID,
|
||||
placeholder: "-",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -488,6 +488,14 @@ const Detail: DetailFunction = <T extends GenericObject>(
|
||||
);
|
||||
}
|
||||
|
||||
if (data && field.fieldType === FieldType.ObjectID) {
|
||||
data = (
|
||||
<code className="px-2 py-1 bg-gray-100 text-gray-800 rounded font-mono text-sm border border-gray-200 break-all">
|
||||
{data.toString()}
|
||||
</code>
|
||||
);
|
||||
}
|
||||
|
||||
if (field.getElement) {
|
||||
data = field.getElement(props.item);
|
||||
}
|
||||
|
||||
@@ -135,6 +135,7 @@ const CodeRepositoryView: FunctionComponent<
|
||||
_id: true,
|
||||
},
|
||||
title: "Repository ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -86,6 +86,7 @@ const DashboardView: FunctionComponent<
|
||||
_id: true,
|
||||
},
|
||||
title: "Dashboard ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -114,7 +114,7 @@ const Home: FunctionComponent<PageComponentProps> = (): ReactElement => {
|
||||
_id: true,
|
||||
},
|
||||
title: "Incident ID",
|
||||
type: FieldType.Text,
|
||||
type: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -466,6 +466,7 @@ const MonitorView: FunctionComponent<PageComponentProps> = (): ReactElement => {
|
||||
_id: true,
|
||||
},
|
||||
title: "Monitor ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -238,6 +238,7 @@ const MonitorGroupView: FunctionComponent<
|
||||
_id: true,
|
||||
},
|
||||
title: "Monitor Group ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -87,6 +87,7 @@ const OnCallDutyPolicyView: FunctionComponent<
|
||||
_id: true,
|
||||
},
|
||||
title: "On-Call Policy ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -208,6 +208,7 @@ const OnCallDutyScheduleView: FunctionComponent<
|
||||
_id: true,
|
||||
},
|
||||
title: "On-Call Schedule ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -102,6 +102,7 @@ const StatusPageView: FunctionComponent<
|
||||
_id: true,
|
||||
},
|
||||
title: "Service ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -132,6 +132,7 @@ const AIAgentView: FunctionComponent<PageComponentProps> = (
|
||||
_id: true,
|
||||
},
|
||||
title: "AI Agent ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -310,7 +310,7 @@ const APIKeyView: FunctionComponent<PageComponentProps> = (
|
||||
projectId: true,
|
||||
},
|
||||
title: "Project ID",
|
||||
fieldType: FieldType.Text,
|
||||
fieldType: FieldType.ObjectID,
|
||||
opts: {
|
||||
isCopyable: true,
|
||||
},
|
||||
|
||||
@@ -138,6 +138,7 @@ const LlmProviderView: FunctionComponent<PageComponentProps> = (
|
||||
_id: true,
|
||||
},
|
||||
title: "LLM Provider ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -141,6 +141,7 @@ const TeamView: FunctionComponent<PageComponentProps> = (
|
||||
_id: true,
|
||||
},
|
||||
title: "Probe ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -45,6 +45,7 @@ const Settings: FunctionComponent<PageComponentProps> = (): ReactElement => {
|
||||
_id: true,
|
||||
},
|
||||
title: "Project ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -309,6 +309,7 @@ const TeamView: FunctionComponent<PageComponentProps> = (
|
||||
_id: true,
|
||||
},
|
||||
title: "Team ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -89,6 +89,7 @@ const StatusPageView: FunctionComponent<
|
||||
_id: true,
|
||||
},
|
||||
title: "Status Page ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -86,6 +86,7 @@ const ServiceDelete: FunctionComponent<
|
||||
_id: true,
|
||||
},
|
||||
title: "Service ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -93,6 +93,7 @@ const Delete: FunctionComponent<PageComponentProps> = (): ReactElement => {
|
||||
_id: true,
|
||||
},
|
||||
title: "Workflow ID",
|
||||
fieldType: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
@@ -115,7 +115,7 @@ const Delete: FunctionComponent<PageComponentProps> = (): ReactElement => {
|
||||
_id: true,
|
||||
},
|
||||
title: "Run ID",
|
||||
type: FieldType.Text,
|
||||
type: FieldType.ObjectID,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
|
||||
Reference in New Issue
Block a user