Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-girder-slicer-cli-ui

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-girder-slicer-cli-ui

This is a vue based component library to interface with the girder slicer CLI plugin. https://github.com/girder/slicer_cli_web

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by400%
Maintainers
0
Weekly downloads
 
Created
Source

Girder Slicer UI

This is a vue based component library to interface with the girder slicer CLI plugin. https://github.com/girder/slicer_cli_web

This Vue component library can be used with the above plugin to list and set values for slicer CLI plugins.

GirderSlicerTasksIntegrated.vue

This is a single component that provies a listing of the tasks as well as an interface to set the paramemter values.

Customization

apiURL

The URL of the base girder instance that contains the slicer cli plugin. This defaults to the current host /api/v1

filter

A filter function that can be used to remove tasks from the listing. This will be run on every task that is returned from the /slicer_cli_web/cli endpoint. It takes a function of the type (item: SlicerTask) => boolean where returning true will display the task and returning false will filter out the task.

export interface SlicerTask {
    _id: string;
    description: string;
    image: string;
    name: string;
    type: string;
}

defaults

A function that iterates through every task parameter and enables setting default values. (item: XMLParameters) => undefined | null | XMLParameters

export interface XMLParameters {
  type: ParamSlicerType;
  slicerType: ParamGUIType;
  title: string;
  description: string;
  channel?: 'input' | 'output';
  id: string;
  value?: XMLBaseValue;
  values?: XMLBaseValue[];
  constraints?: {min?: XMLBaseValue; max?: XMLBaseValue; step?: XMLBaseValue};
  defaultValue?: XMLBaseValue;
  // Extra
  fileValue?: {
    girderId: string; // item/folder Id for the selected item
    name: string; //File Name for display purposes
    parentId: string; // Parent folder to open when using DataBrowser
    regExp?: boolean | undefined; // When selecting multiple the regExp pattern
    fileId?: string | undefined; // fileId used
  }; // Added to handle files
  required?: boolean;
  extensions?: string | undefined;
  reference?: string | undefined;
  defaultNameMatch?: string | undefined;
  defaultPathMatch?: string | undefined;
  defaultRelativePath?: string | undefined;
  multiple?: boolean;
  datalist?: boolean;
  shapes?: string | undefined;
  error?: string | undefined; // Used to display errors
}

You can take the XMLParameter information and set a default fileValue or default value | values to indicate what it should be. I.E:

(item: XMLParamemters) => {
    if (item.channel == 'input' and item.type === 'file') {
        const updatedItem = {...item}
        item.fileValue = {
          fileId: '6433f9123b271b58c749ddbc',
          girderId: '6433f9123b271b58c749ddbb',
          name: 'SampleVideo.mp4',
          parentId: '6433f9113b271b58c749ddb6',
          regExp: false,
        }
    }
}

This is used to set default values.

Color Customization

There are some global css variables that are used to set the colors used in the system:

  :root {
    --gsu-color-primary: #90CAF9; /* Primary color */
    --gsu-color-secondary: #9FA8DA; /* Secondary color */
    --gsu-color-link: #2c7596; /* Link color */
    --gsu-color-text: #FFFFFF; /* Text color */
    --gsu-color-muted-text: #B0BEC5; /* Muted text color */
    --gsu-color-background: rgb(39, 39, 39);/* Background color */
    --gsu-color-border: rgba(255,255,255,0.3);
    --gsu-background-muted: #212121; /* Muted background color */
    --gsu-color-highlight: #717171bb; /* Highlighted color */
    --gsu-color-selected: #A5D6A7; /* Selected color */
  }

This default view mimics a vuetify dark theme but not completely. These variables can be modified to change the visual styling of the system.

FAQs

Package last updated on 15 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc