Skip to main content
Version: v0.2.6

Pages

pages.json

Create a src/vision/viewpoints/pages.json file (case-sensitive)

The src/vision/viewpoints/pages.json file is responsible for:

  • Defining what OML Vision can render
    • Home Page
      • Titles
      • Icons
    • Sidebar
      • Titles
      • Icons
    • Child Pages
      • Titles
      • Table, Tree, or Diagram
      • Icons
  • Defining the path to the content that OML Vision renders

It is formatted as a JSON data structure.

An example of what this looks like is seen below with the source code found here

Home Page

The home page acts as an entry point for users to navigate through the pages that OML Vision renders.

Home Page

title

REQUIRED
title: string

This string defines the title of the home page. A good name for the home page is "Home" or "Frontpage"

USER INTERFACE

The name of the title is rendered in the sidebar for the OML Vision extension shown in the red boxes.

Title Home Page

path

REQUIRED
path: string

This string defines the path of the page.

For the Home Page the path must be /

USER INTERFACE

The name of the path is rendered in the sidebar when you hover and hold for 2 seconds over the Home Page in the OML Vision extension shown in the red boxes.

Path Home Page

type

REQUIRED
type: string

This string defines the type of the webview to be rendered.

The type of webview determines the icon that is rendered in the sidebar.

The icons that are rendered come from here.

TYPES

These are the current types

  1. home - This type renders the Home Page.
  2. group - This type groups webviews together in the Home Page and sidebar. Grouping is only done in the UI.
  3. table - This type specifies the webview to render a table. For more info, look here
  4. tree - This type specifies the webview to render a tree. For more info, look here
  5. diagram - This type specifies the webview to render a diagram. For more info, look here

Child Pages

Child pages are pages that are grouped with other similar pages. The paths to these pages are rendered in the sidebar and in the Home Page shown in the red boxes.

OML Vision supports more than 1 child page.

Child Page

title

REQUIRED
title: string

This string defines the title of the child page.

USER INTERFACE

The name of the title is rendered in the sidebar and in the Home Page.

type

REQUIRED
type: string

This string defines the type of the webview to be rendered.

The type of webview determines the icon that is rendered in the sidebar.

The icons that are rendered come from here.

TYPES

These are the current types

  1. home - This type renders the Home Page.
  2. group - This type groups webviews together in the Home Page and sidebar. Grouping is only done in the UI.
  3. table - This type specifies the webview to render a table. For more info, look here
  4. tree - This type specifies the webview to render a tree. For more info, look here
  5. diagram - This type specifies the webview to render a diagram. For more info, look here

iconUrl

REQUIRED
iconUrl: string

This string defines the path of the icon that is rendered in the home page.

Supported image file formats are .svg, .png, or .jpg

USER INTERFACE

The Child Page icon of the iconUrl is rendered in the Home Page in the OML Vision extension shown in the red boxes.

Icon URL Child Page

children

REQUIRED
children: {
title: string;
path: string;
type: string;
}[];

This children array of objects defines the title, path, and type of the Child Page.

You can more than one Child Page in the children array.

By default all child pages are rendered as tables unless specified with the isTree or isDiagram booleans.

USER INTERFACE

The Child Pages are rendered in the sidebar and in the Home Page of the OML Vision extension shown in the red boxes.

Children Pages

title

REQUIRED
title: string

This string defines the title of the child page.

USER INTERFACE

The name of the title of the Child Page is rendered in the sidebar and in the Home Page of the OML Vision extension.

path

REQUIRED
path: string

This string defines the path of the Child Page.

Remember this string as it will be needed for the viewpoints of the tables, trees, and diagrams

USER INTERFACE

The name of the path is rendered in the sidebar when you hover and hold for 2 seconds over the Child Page in the OML Vision extension.

type

REQUIRED
type: string

This string defines the type of the webview to be rendered.

The type of webview determines the icon that is rendered in the sidebar.

The icons that are rendered come from here.

TYPES

These are the current types

  1. home - This type renders the Home Page.
  2. group - This type groups webviews together in the Home Page and sidebar. Grouping is only done in the UI.
  3. table - This type specifies the webview to render a table. For more info, look here
  4. tree - This type specifies the webview to render a tree. For more info, look here
  5. diagram - This type specifies the webview to render a diagram. For more info, look here