Skip to content

View

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.WebApp/Client/app/models/dashboard/data-source-schema/view.model.ts (line 4)

Part of: Pams

View models a view within the dashboard data-source schema. Its clone() method creates a separate View instance for workflows that need to copy schema state without changing the original object.

Methods

MethodSignatureReturns
cloneclone(model: View)void

Properties

PropertyType
Idstring
Namestring
ViewIDstring
Schemastring
NameSpacestring
ColumnsColumn[]
ConStringstring
ConNamestring
Dataany

Where it refuses work

  • View stops the work with an early return when model == null.

Diagram

mermaid
graph LR
  Schema[Data-source schema] --> View[View]
  View --> Clone[clone()]
  Clone --> Copy[Separate View instance]

Usage

ts
import { View } from './view.model';

const view = new View();

const copiedView = view.clone();

// Update copiedView without changing view.

AI Coding Instructions

  • Use clone() before changing a View that may also be referenced by existing dashboard schema state.
  • Keep cloning behavior aligned with the fields added to View.
  • Do not assume changes to a cloned instance update the original instance.
  • Import View from the dashboard data-source schema model path when building schema-related features.

Relationships

  • IMPORTS → Column
  • IMPORTS → GetColumnPrameter

Used by

3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (3)

  • DataSourceServicePams/Web/Pams.WebApp/Client/app/services/dashboard/data-source.service.ts:1
  • DashboardWidgetPams/Web/Pams.WebApp/Client/app/models/dashboard/dashboard-widget.model.ts:11
  • DataSourceConnectionPams/Web/Pams.WebApp/Client/app/models/dashboard/data-source-schema/data-source-connection.model.ts:4

Was this page helpful?

Download as PDF