3.5.1 Custom data models
This section describes the [Custom Data Model] tab of the Datamodel application.
On the [Custom Data Model] tab, you can view a list of data models registered in Ops I and edit data (records) registered in those data models.
In this section, user-created custom tables and custom views are referred to as “custom data models”.
For details about custom tables and custom views, see “Types of data models”.
To use the Datamodel application, you must be assigned the Primitive role “custom_data_model_admin”. Access control for custom data models by group or customer is not supported. Users assigned the Primitive role “custom_data_model_admin” can access all custom data models available for display.
(1) Workflow
[Viewing, adding, editing, or deleting records]
The following describes the workflow for displaying and operating the records of each custom data model from the [Custom Data Model List] window.
- Displaying the [Custom Data Model List] window:
From the [Custom Data Model] tab, display the [Custom Data Model List] window. You can view a list of custom data models in this window.
For details, see "[Custom Data Model List] window". - Creating a "custom data maintenance" console:
Create a "custom data maintenance" console to display records of a specified custom data model. You cannot view the records of a custom data model unless a "custom data maintenance" console is created.
For details, see "[Select columns to display by default in the record list] dialog box". - Operation in the [Record List] window:
Display the [Record List] window for the specified custom data model, and add or delete records.
For details, see "[Record List] window" and "[Create New Record] window". - Operation in the [record details] window:
Display the details of the specified record, and view, edit, or delete the record.
For details, see "[record details] window".
Notes
- If you modify a custom data model by editing the Datamodel YAML file, be sure to complete re-creation of the "custom data maintenance" console before operating records. If there is a mismatch between the structure of the custom data model defined in the Datamodel YAML file and the "custom data maintenance" console, unintended data might be saved.
- The predefined table "ticket_create_table" is used internally by the Ops I system. Do not perform any operations on this table.
- The "custom data maintenance" console supports inheritance of custom tables up to one level. If you create a "custom data maintenance" console based on a custom table with inheritance configured, the columns that can be displayed and operated are limited to those of the table one level above.
Examples:
- Table B, which inherits from Table A
- Table C, which inherits from Table B
Therefore, creating a "custom data maintenance" console based on a multi-level inheritance structure is not supported. For details about inheritance settings, see "Datamodel".
[Deleting a custom data model]
Deleting a registered custom data model is not recommended. If you still wish to delete it, follow the procedure below.
A custom data model can be deleted by deleting the Datamodel YAML file or by deleting the definitions of the custom table or custom view in the YAML file. A custom data model cannot be deleted if a “custom data maintenance” console has been created for it. If one has been created, delete the “custom data maintenance” console before deleting the custom data model.
The “custom data maintenance” console can be deleted by using the [Delete Console] button. For details about the button, see “(Table) Screen structure of the [Custom Data Model] tab”.
If deletion is successful, the Console Status of the custom data model changes to “Uninitialized”, the same as when no console has been created. After confirming that deletion has been completed successfully, delete the custom data model. For details about Console Status, see “(Table) Items in [Custom Data Model List]”.
If you accidentally delete a custom data model before deleting the “custom data maintenance” console, follow the procedure below:
① Re-commit a YAML file with “kind” set to "datamodel" using the same content as the file before deletion.
② In the GitOps Log, confirm that the “result” of the file is “recovered”.
③ Delete the “custom data maintenance” console.
④ After confirming that deletion was successful, delete the custom data model.
TipsCustom data models and Datamodel YAML files whose deletion has failed, as well as custom data models and Datamodel YAML files with the same names as those whose deletion has failed, cannot be used. Create a new custom data model for use. Note that records of failed deletion remain in the GitOps Log, but do not affect other settings.
If recovery is not possible and you still wish to delete the custom data model, contact the support service.
(2) Screen description
For details about how to operate each screen, see the following.
a. [Custom Data Model List] window
When you select the Datamodel application, the [Custom Data Model List] window is displayed on the [Custom Data Model] tab.
(Table) Screen structure of the [Custom Data Model] tab
| Component | Description |
|---|---|
| [Create Console] button | Creates a "custom data maintenance" console. Clicking this button opens the [Select columns to display by default in the record list] dialog box. Before clicking, select the radio button for the custom data model to configure. |
| [Delete Console] button | Deletes the "custom data maintenance" console. Before clicking, select the radio button for the custom data model to be deleted. A confirmation dialog box is displayed before deletion. |
| [Custom Data Model List] | Displays a list of custom data models. |
■ [Select columns to display by default in the record list] dialog box
Use this dialog box to specify the columns to be displayed by default in the [Record List] window.
This setting creates a “custom data maintenance” console.
You can confirm that the UI YAML file for the “custom data maintenance” console has been created by checking the GitOps Log. In the “name” column of the GitOps Log, the logs are displayed with the following names:
- [Record List] window: opsi_Custom Data Model Name_browser
- [record details] window: opsi_Custom Data Model Name_browser
- [Create New Record] window: opsi_Custom Data Model Name_record_new
This setting is required for each custom data model. If the columns to be displayed by default in the [Record List] window have never been configured, you cannot navigate from the [Custom Data Model List] window to the “custom data maintenance” console, and an error is displayed. The “custom data maintenance” console can be updated as necessary.
All columns of the custom data model are available for selection. Columns of a custom data model refer to those defined in “tables.columns” or “views.columns” in the Datamodel YAML definition.
The following items related to the columns are displayed. Items whose initial state is set to “Display” are displayed by default.
(Table) Items in the [Select columns to display by default in the record list] dialog box
| Item | Initial state | Description |
|---|---|---|
| Checkbox | Display | Select this checkbox to display the column by default in the [Record List] window. |
| Column Name | Display | Internal name of the column in the custom data model The value of the "tables.columns.name" or "views.columns.name" label in the Datamodel YAML definition is displayed. |
| Label | Display | Display name of the column in the custom data model The value of the "tables.columns.label" or "views.columns.label" label in the Datamodel YAML definition is displayed. |
| Description | Display | Detailed description of the column in the custom data model The value of the "tables.columns.description" or "views.columns.description" label in the Datamodel YAML definition is displayed. |
| Type | Display | Type of the column in the custom data model The value of the "tables.columns.description" or "views.columns.type" label in the Datamodel YAML definition is displayed. |
| Default value | Display | Default value The value of the "tables.columns.default" label in the Datamodel YAML definition is displayed. |
| Primary key | Hide | Indicates whether the column in the custom data model is a Primary key If the "tables.columns.primary" label in the Datamodel YAML definition is set to "true", the column is marked as a Primary key. For a custom view that does not configure a Primary key, the column is displayed without being marked as a Primary key. |
Displays a list of custom data models.
The following items for each custom data model are displayed. Items whose initial state is set to “Display” are displayed by default.
(Table) Items in [Custom Data Model List]
| Item | Initial state | Description |
|---|---|---|
| Custom Data Model ID | Hide | ID of the custom data model Automatically assigned number. Clicking this item displays a list of records registered in the custom data model. |
| Custom Data Model Name | Display | Internal name of the custom data model The value of the "tables.name" or "views.name" label in the Datamodel YAML definition is displayed. Clicking this item displays a list of records registered in the custom data model. |
| Type | Description | Type of the custom data model Either "table" or "view" is displayed. |
| Label | Hide | Display name of the custom data model The value of the "tables.label" or "views.label" label in the Datamodel YAML definition is displayed. |
| Description | Display | Detailed description of the custom data model The value of the "tables.description" or "views.description" label in the Datamodel YAML definition is displayed. |
| Datamodel ID | Hide | ID of the Datamodel YAML definition for the custom data model Automatically assigned number. |
| Datamodel Name | Display | Internal name of the Datamodel YAML definition for the custom data model The value of the "name" label in the Datamodel YAML definition is displayed. |
| Datamodel Label | Hide | Display name of the Datamodel YAML definition for the custom data model The value of the "label" label in the Datamodel YAML definition is displayed. |
| Datamodel Description | Hide | Details of the Datamodel YAML definition for the custom data model The value of the "description" label in the Datamodel YAML definition is displayed. |
| Datamodel Created On | Display | Date and time when the Datamodel YAML definition for the custom data model was created |
| Datamodel Created By | Hide | User who created the Datamodel YAML definition for the custom data model |
| Datamodel Updated On | Display | Date and time when the Datamodel YAML definition for the custom data model was updated |
| Datamodel Updated By | Hide | User who updated the Datamodel YAML definition for the custom data model |
| Console Status | Display | Configuration status of the "custom data maintenance" console One of the following statuses is displayed:
|
| Console Created On | Hide | Date and time when the "custom data maintenance" console was created This item is automatically populated when the console is created. |
| Console Created By | Hide | User who created the "custom data maintenance" console This item is automatically populated when the console is created. |
| Console Updated On | Hide | Date and time when the "custom data maintenance" console was updated This item is automatically populated when the console is updated. |
| Console Updated By | Hide | User who updated the "custom data maintenance" console This item is automatically populated when the console is updated. |
Notes
- Navigate to the [Record List] window when the Console Status is "Build_succeeded". If the status does not become "Build_succeeded" even after re-creating the "custom data maintenance" console, contact our support team.
- When deleting a custom data model, ensure that the Console Status is "Uninitialized".
- When multiple custom data models are defined in a single Datamodel YAML file, the Console Status becomes "Drifted" even if only one of them is updated.
- The following Console Statuses indicate that the console is currently being created or deleted. Do not perform any additional creation or deletion unless the status remains unchanged for five minutes or longer.
- Pending: Waiting for creation.
- Building: Creation in progress.
- Destructing: Deletion in progress.
b. [Record List] window
Clicking Custom Data Model ID or Custom Data Model Name in the [Custom Data Model List] window displays the [Record List] window, which shows a list of records registered in the selected custom data model.
Records cannot be edited in this window.
By default, the columns in the list display the checkbox and the items configured using the [Select columns to display by default in the record list] dialog box. Hidden columns can also be displayed in the list. Clicking the record ID displays the [record details] window, where you can view, edit, and delete records. To view the [record details] window, display the record ID.
For custom views, only viewing is supported.
(Table) Operation buttons in the [Record List] window
| Button | Description |
|---|---|
| Add | Clicking this button displays the [Create New Record] window. For details, see "[Create New Record] window". |
| Delete | This button is enabled by selecting the checkbox. Clicking this button deletes the record. Records that could not be deleted are displayed in the list. |
c. [record details] window
Clicking a record ID in the [Record List] window displays the [record details] window, where you can edit the record. However, records linked to a workflow and records in a custom view cannot be deleted or edited. Because all records in a custom view cannot be deleted or edited, neither the [Delete] button nor the [Save] button is displayed.
(Table) Operation buttons in the [record details] window
| Button | Description |
|---|---|
| Delete | Deletes the displayed record. Clicking the [OK] button in the confirmation dialog box confirms the deletion. |
| Save | Saves changes to the fields of the record. |
In addition to the columns configured using the [Select columns to display by default in the record list] dialog box, the following fields are displayed.
(Table) Default items displayed in the [record details] window
| Item | Description |
|---|---|
| ID | Record ID: Automatically assigned number. |
| Customer | Customer set in the record: Editable. |
| Created On | Date and time when the record was created: Automatically set. |
| Created By | User who created the record: Automatically set. |
| Updated On | Date and time when the record was updated: Automatically set. |
| Updated By | User who updated the record: Automatically set. |
d. [Create New Record] window
Clicking the [Add] button in the [Record List] window displays the [Create New Record] window.
In addition to the columns configured using the [Select columns to display by default in the record list] dialog box, the “Customer ID” field is displayed.
Using the following operation buttons at the top of the window, you can confirm or cancel the addition of a record.
(Table) Operation buttons in the [Create New Record] window
| Button | Description |
|---|---|
| Save | Confirms the addition of the record. |
| Cancel | Cancels the addition of the record. |