diff --git a/packages/client/hmi-client/src/services/project.ts b/packages/client/hmi-client/src/services/project.ts index 61e3f41959..70a6548af3 100644 --- a/packages/client/hmi-client/src/services/project.ts +++ b/packages/client/hmi-client/src/services/project.ts @@ -7,7 +7,6 @@ import { IProject, ProjectAssets, ProjectAssetTypes } from '@/types/Project'; import { logger } from '@/utils/logger'; import { Tab } from '@/types/common'; import DatasetIcon from '@/assets/svg/icons/dataset.svg?component'; -import ResultsIcon from '@/assets/svg/icons/results.svg?component'; import { Component } from 'vue'; import useResourcesStore from '@/stores/resources'; import * as EventService from '@/services/event'; @@ -213,7 +212,6 @@ const icons = new Map([ [ProjectAssetTypes.MODELS, 'share-2'], [ProjectAssetTypes.DATASETS, DatasetIcon], [ProjectAssetTypes.SIMULATIONS, 'settings'], - [ProjectAssetTypes.SIMULATION_RUNS, ResultsIcon], [ProjectAssetTypes.CODE, 'code'], [ProjectAssetTypes.SIMULATION_WORKFLOW, 'git-merge'], ['overview', 'layout'] diff --git a/packages/client/hmi-client/src/types/ModelConfig.ts b/packages/client/hmi-client/src/types/ModelConfig.ts deleted file mode 100644 index becac23126..0000000000 --- a/packages/client/hmi-client/src/types/ModelConfig.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Model } from '@/types/Types'; - -// This is temp as it will be replaced by types/Types when this is more finalized and moved to hmi-server -export interface ModelConfig { - id?: string; - model: Model; - initialValues: { [key: string]: number }; - parameterValues: { [key: string]: number }; -} diff --git a/packages/client/hmi-client/src/types/Project.ts b/packages/client/hmi-client/src/types/Project.ts index 01813ce32c..8de8328eff 100644 --- a/packages/client/hmi-client/src/types/Project.ts +++ b/packages/client/hmi-client/src/types/Project.ts @@ -4,9 +4,7 @@ import { DocumentAsset, Document, Dataset, Model, Artifact } from '@/types/Types export enum ProjectAssetTypes { DOCUMENTS = 'publications', MODELS = 'models', - PLANS = 'plans', SIMULATIONS = 'simulations', - SIMULATION_RUNS = 'simulation_runs', SIMULATION_WORKFLOW = 'workflows', DATASETS = 'datasets', CODE = 'code', @@ -26,8 +24,6 @@ export const isProjectAssetTypes = (type: ProjectAssetTypes | string): boolean = export type ProjectAssets = { [ProjectAssetTypes.DOCUMENTS]: DocumentAsset[]; [ProjectAssetTypes.MODELS]: Model[]; - [ProjectAssetTypes.PLANS]: any[]; // FIXME: add proper type - [ProjectAssetTypes.SIMULATION_RUNS]: any[]; // FIXME: add proper type [ProjectAssetTypes.DATASETS]: Dataset[]; [ProjectAssetTypes.CODE]: any[]; [ProjectAssetTypes.ARTIFACTS]: Artifact[]; diff --git a/packages/client/hmi-client/src/utils/csv.ts b/packages/client/hmi-client/src/utils/csv.ts deleted file mode 100644 index f265bf90bd..0000000000 --- a/packages/client/hmi-client/src/utils/csv.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { isArray } from 'lodash'; - -export type Record = { - [key: string]: string; -}; - -// Convert csv to record objects -export const csvToRecords = (csv: string) => { - const lines = csv.split('\n').filter((line) => line.trim() !== ''); - const result: Record[] = []; - const headerRow = lines[0]; - // the app uses data as json structure, and when needed it is written into csv with ; separator - // but regardless we are able to consume input csv with both ; and , separators - // as long as a header is provided - const separator = headerRow.includes(';') ? ';' : ','; - const headers = headerRow.split(separator); - for (let i = 1; i < lines.length; i++) { - const obj: Record = {}; - const currentLine = lines[i].split(separator); - for (let j = 0; j < headers.length; j++) { - obj[headers[j]] = currentLine[j]; - } - result.push(obj); - } - return result; -}; - -export const getColumns = (record: Record[] | Record) => { - if (isArray(record) && record.length && record.length > 0) { - return Object.keys((record as Record[])[0]); - } - return Object.keys(record); -};