Skip to content

Add DAM Instance

File Information

  • Path: pages/add-dam-instance.vue
  • Route: /add-dam-instance
  • Purpose: Add new DAM instance to workspace

Overview

The Add DAM Instance page allows workspace administrators to add a new DAM instance to their workspace. It provides a form to configure the instance name, description, and initial settings.

Key Features

  1. Instance Configuration

    • Instance name input
    • Instance description
    • Initial settings
    • Storage configuration
  2. Form Validation

    • Name uniqueness check
    • Required fields validation
    • Settings validation
    • Error handling
  3. Instance Creation

    • Creates DAM instance
    • Sets up initial configuration
    • Redirects to instance settings
    • Success confirmation

Components Used

  • Instance form components
  • Validation components
  • Settings components

Data Properties

javascript
{
  form: {
    name: '',
    description: '',
    workspace_id: null,
    settings: {}
  },
  creating: false,    // Creation state
  errors: {},        // Form errors
  workspaceId: null  // Current workspace ID
}

Computed Properties

isFormValid

Validates form data

workspaceId

Returns current workspace ID

Methods

createInstance()

Creates DAM instance:

  • Validates form
  • Creates instance via API
  • Sets up configuration
  • Redirects to instance settings
  • Handles errors

API Endpoints

Create DAM Instance

  • Endpoint: POST /dam/instance/create
  • Request Body: Instance creation data
  • Response: Created instance object

User Flow

  1. User navigates to add DAM instance page
  2. User fills out instance form
  3. User configures initial settings
  4. User submits form
  5. Instance is created
  6. User is redirected to instance settings
  7. Success message displayed

Notes for Development

  • Page requires workspace admin permissions
  • Instance name must be unique
  • Workspace ID required
  • Redirects to instance settings after creation