Skip to content

Commit

Permalink
clean: remove explorer (#4753)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnyama authored Sep 11, 2024
1 parent 49ba444 commit 8eab67f
Show file tree
Hide file tree
Showing 35 changed files with 132 additions and 3,310 deletions.
193 changes: 95 additions & 98 deletions packages/client/hmi-client/package.json
Original file line number Diff line number Diff line change
@@ -1,100 +1,97 @@
{
"name": "hmi-client",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "yarn install && vite --host",
"local": "yarn install && vite --host --config vite.config.local.ts",
"staging": "yarn install && vite --host --config vite.config.staging.ts",
"build": "vue-tsc --noEmit && vite build",
"typecheck": "yarn workspace graph-scaffolder tsc --build && vue-tsc --noEmit",
"preview": "vite preview",
"test": "vitest",
"test:ci": "vitest run",
"test:coverage": "vitest run --coverage",
"test:e2e": "playwright test",
"test:e2e:snapshots": "playwright test --update-snapshots",
"test:ct": "playwright test -c playwright-ct.config.ts"
},
"dependencies": {
"@carbon/icons-vue": "10.79.1",
"@hsorby/vue3-katex": "0.6.0-rc.7",
"@jupyter/ydoc": "1.0.2",
"@jupyterlab/application": "3.6.8",
"@jupyterlab/apputils": "3.6.8",
"@jupyterlab/cells": "3.6.8",
"@jupyterlab/codemirror": "3.6.8",
"@jupyterlab/completer": "3.6.8",
"@jupyterlab/coreutils": "5.6.7",
"@jupyterlab/outputarea": "3.6.8",
"@jupyterlab/rendermime": "3.6.8",
"@jupyterlab/services": "6.6.7",
"@jupyterlab/theme-light-extension": "3.6.8",
"@jupyterlab/translation": "3.6.8",
"@jupyterlab/ui-components": "3.6.8",
"@lumino/commands": "2.1.3",
"@lumino/coreutils": "2.1.2",
"@lumino/widgets": "2.1.0",
"@uncharted.software/design-tokens": "1.1.0",
"@uncharted.software/facets-core": "3.2.6",
"@uncharted.software/facets-plugins": "3.2.5",
"@vue/runtime-dom": "3.4.38",
"@vueup/vue-quill": "1.2.0",
"ace-builds": "1.32.9",
"axios": "1.7.5",
"chart.js": "4.4.4",
"chartjs-plugin-annotation": "3.0.1",
"chartjs-plugin-datalabels": "2.2.0",
"chroma-js": "2.4.2",
"d3": "7.8.5",
"dagre": "0.8.5",
"eslint-import-resolver-typescript": "3.6.1",
"event-source-polyfill": "1.0.31",
"extended-eventsource": "1.4.9",
"feather-icons": "4.29.2",
"graph-scaffolder": "*",
"katex": "0.16.11",
"lodash": "4.17.21",
"markdown-it": "14.1.0",
"mathlive": "0.89.2",
"mathml-to-latex": "1.2.0",
"oidc-spa": "4.6.2",
"path-browserify": "1.0.1",
"pinia": "2.1.7",
"pixi-viewport": "4.37.0",
"pixi.js": "7.0.5",
"primeflex": "3.3.1",
"primeicons": "7.0.0",
"primevue": "3.53.0",
"pyodide": "0.25.1",
"sass": "1.56.1",
"uuid": "9.0.1",
"vega": "5.30.0",
"vega-embed": "6.25.0",
"vega-lite": "5.19.0",
"vue": "3.4.38",
"vue-feather": "2.0.0",
"vue-gtag": "2.0.1",
"vue-router": "4.2.5",
"vue3-ace-editor": "2.2.4",
"vue3-draggable-resizable": "1.6.5",
"vue3-lottie": "3.2.0"
},
"devDependencies": {
"@playwright/experimental-ct-vue": "1.31.2",
"@playwright/test": "1.31.2",
"@rushstack/eslint-patch": "1.10.4",
"@types/d3": "7.4.3",
"@types/lodash": "4.17.7",
"@types/markdown-it": "14.1.2",
"@types/node": "18.19.3",
"@vitejs/plugin-vue": "4.6.2",
"@vitest/coverage-c8": "0.24.5",
"jsdom": "24.1.3",
"typescript": "5.4.5",
"vite": "5.4.2",
"vite-svg-loader": "4.0.0",
"vitest": "0.24.5",
"vue-tsc": "1.8.27"
}
"name": "hmi-client",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "yarn install && vite --host",
"local": "yarn install && vite --host --config vite.config.local.ts",
"staging": "yarn install && vite --host --config vite.config.staging.ts",
"build": "vue-tsc --noEmit && vite build",
"typecheck": "yarn workspace graph-scaffolder tsc --build && vue-tsc --noEmit",
"preview": "vite preview",
"test": "vitest",
"test:ci": "vitest run",
"test:coverage": "vitest run --coverage",
"test:e2e": "playwright test",
"test:e2e:snapshots": "playwright test --update-snapshots",
"test:ct": "playwright test -c playwright-ct.config.ts"
},
"dependencies": {
"@hsorby/vue3-katex": "0.6.0-rc.7",
"@jupyter/ydoc": "1.0.2",
"@jupyterlab/application": "3.6.8",
"@jupyterlab/apputils": "3.6.8",
"@jupyterlab/cells": "3.6.8",
"@jupyterlab/codemirror": "3.6.8",
"@jupyterlab/completer": "3.6.8",
"@jupyterlab/coreutils": "5.6.7",
"@jupyterlab/outputarea": "3.6.8",
"@jupyterlab/rendermime": "3.6.8",
"@jupyterlab/services": "6.6.7",
"@jupyterlab/theme-light-extension": "3.6.8",
"@jupyterlab/translation": "3.6.8",
"@jupyterlab/ui-components": "3.6.8",
"@lumino/commands": "2.1.3",
"@lumino/coreutils": "2.1.2",
"@lumino/widgets": "2.1.0",
"@uncharted.software/design-tokens": "1.1.0",
"@vue/runtime-dom": "3.4.38",
"@vueup/vue-quill": "1.2.0",
"ace-builds": "1.32.9",
"axios": "1.7.5",
"chart.js": "4.4.4",
"chartjs-plugin-annotation": "3.0.1",
"chartjs-plugin-datalabels": "2.2.0",
"chroma-js": "2.4.2",
"d3": "7.8.5",
"dagre": "0.8.5",
"eslint-import-resolver-typescript": "3.6.1",
"event-source-polyfill": "1.0.31",
"extended-eventsource": "1.4.9",
"feather-icons": "4.29.2",
"graph-scaffolder": "*",
"katex": "0.16.11",
"lodash": "4.17.21",
"markdown-it": "14.1.0",
"mathlive": "0.89.2",
"mathml-to-latex": "1.2.0",
"oidc-spa": "4.6.2",
"path-browserify": "1.0.1",
"pinia": "2.1.7",
"pixi-viewport": "4.37.0",
"pixi.js": "7.0.5",
"primeflex": "3.3.1",
"primeicons": "7.0.0",
"primevue": "3.53.0",
"pyodide": "0.25.1",
"sass": "1.56.1",
"uuid": "9.0.1",
"vega": "5.30.0",
"vega-embed": "6.25.0",
"vega-lite": "5.19.0",
"vue": "3.4.38",
"vue-feather": "2.0.0",
"vue-gtag": "2.0.1",
"vue-router": "4.2.5",
"vue3-ace-editor": "2.2.4",
"vue3-draggable-resizable": "1.6.5",
"vue3-lottie": "3.2.0"
},
"devDependencies": {
"@playwright/experimental-ct-vue": "1.31.2",
"@playwright/test": "1.31.2",
"@rushstack/eslint-patch": "1.10.4",
"@types/d3": "7.4.3",
"@types/lodash": "4.17.7",
"@types/markdown-it": "14.1.2",
"@types/node": "18.19.3",
"@vitejs/plugin-vue": "4.6.2",
"@vitest/coverage-c8": "0.24.5",
"jsdom": "24.1.3",
"typescript": "5.4.5",
"vite": "5.4.2",
"vite-svg-loader": "4.0.0",
"vitest": "0.24.5",
"vue-tsc": "1.8.27"
}
}
46 changes: 2 additions & 44 deletions packages/client/hmi-client/src/assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,54 +116,12 @@
margin-right: 0 !important;
}

// Styles reused in Document.vue and DataExplorer.vue - TODO: look into changing prime vue styling to reflect this
.p-buttonset {
white-space: nowrap;

.p-button.p-button-secondary {
border: 1px solid var(--surface-border);
box-shadow: none;
}

.p-button[active='false'].p-button-secondary,
.p-button[active='false'].p-button-secondary:focus,
.p-button[active='false'].p-button-secondary:enabled {
border-color: var(--surface-border);
background-color: var(--surface-0);
color: var(--text-color-primary);
}

.p-button[active='false'].p-button-secondary:hover {
border-color: var(--surface-border);
background-color: var(--surface-100);
color: var(--text-color-primary);
}

.p-button[active='true'].p-button-secondary,
.p-button[active='true'].p-button-secondary:focus,
.p-button[active='true'].p-button-secondary:enabled {
border-color: var(--surface-border);
background-color: var(--surface-highlight);
color: var(--text-color-primary);
}

.p-button[active='true'].p-button-secondary:hover {
border-color: var(--surface-border);
background-color: var(--surface-highlight);
color: var(--text-color-primary);
}

.p-button.p-button-sm {
padding: var(--gap-2) var(--gap-3);
}
}

/* Correct button font weight */
.p-button-label {
font-weight: var(--font-weight);
}

/* Fill checkboxes with color when selected */
/* Fill checkboxes with color when selected */
.p-checkbox .p-checkbox-box {
background-color: var(--surface-0);
border-color: var(--surface-border-dark);
Expand Down Expand Up @@ -254,6 +212,6 @@
padding-left: var(--gap-2);
gap: 0;
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ import {
import { AssetType, type CsvAsset, type Dataset, PresignedURL } from '@/types/Types';
import TeraAsset from '@/components/asset/tera-asset.vue';
import type { FeatureConfig } from '@/types/common';
import type { Source } from '@/types/search';
import { DatasetSource } from '@/types/search';
import { DatasetSource } from '@/types/Dataset';
import { useProjects } from '@/composables/project';
import TeraInputText from '@/components/widgets/tera-input-text.vue';
import TeraShowMoreText from '@/components/widgets/tera-show-more-text.vue';
Expand All @@ -174,7 +173,7 @@ const props = defineProps({
default: { isPreview: false } as FeatureConfig
},
source: {
type: String as PropType<Source>,
type: String as PropType<DatasetSource>,
default: DatasetSource.TERARIUM
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ import Accordion from 'primevue/accordion';
import AccordionTab from 'primevue/accordiontab';
import Column from 'primevue/column';
import DataTable from 'primevue/datatable';
import { FeatureConfig, ResultType } from '@/types/common';
import { FeatureConfig } from '@/types/common';
import type { Author, Dataset, Model } from '@/types/Types';
import TeraShowMoreText from '@/components/widgets/tera-show-more-text.vue';
import TeraModelDiagram from '@/components/model/petrinet/model-diagrams/tera-model-diagram.vue';
import TeraModelEquation from '@/components/model/petrinet/tera-model-equation.vue';
import { isDataset, isModel } from '@/utils/data-util';
import { isDataset, isModel, type Asset } from '@/utils/asset';
import TeraProgressSpinner from '@/components/widgets/tera-progress-spinner.vue';
const props = defineProps<{
Expand Down Expand Up @@ -88,7 +88,7 @@ const authors = computed(() => {
return [...authorsSet].join(', ');
});
const relatedTerariumArtifacts = ref<ResultType[]>([]);
const relatedTerariumArtifacts = ref<Asset[]>([]);
const relatedTerariumModels = computed(() => relatedTerariumArtifacts.value.filter((d) => isModel(d)) as Model[]);
const relatedTerariumDatasets = computed(() => relatedTerariumArtifacts.value.filter((d) => isDataset(d)) as Dataset[]);
</script>
Expand Down
21 changes: 5 additions & 16 deletions packages/client/hmi-client/src/components/navbar/tera-navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ import Button from 'primevue/button';
import Dialog from 'primevue/dialog';
import Menu from 'primevue/menu';
import { MenuItem } from 'primevue/menuitem';
import { RoutePath, useCurrentRoute } from '@/router/index';
import { RouteMetadata, RouteName } from '@/router/routes';
import { RoutePath } from '@/router/index';
import { RouteName } from '@/router/routes';
import useAuthStore from '@/stores/auth';
import SplitButton from 'primevue/splitbutton';
import TeraModal from '@/components/widgets/tera-modal.vue';
Expand Down Expand Up @@ -198,9 +198,6 @@ const isAboutModalVisible = ref(false);
const router = useRouter();
const menuLabel = computed(() => {
if (isDataExplorer.value) {
return 'Explorer';
}
if (useProjects().activeProject.value) {
return useProjects().activeProject.value?.name;
}
Expand Down Expand Up @@ -354,18 +351,11 @@ const clearEvaluationScenario = () => {
};
const homeItem: MenuItem = {
label: RouteMetadata[RouteName.Home].displayName,
icon: RouteMetadata[RouteName.Home].icon,
label: 'Home',
icon: 'pi pi-home',
command: () => router.push(RoutePath.Home)
};
const explorerItem: MenuItem = {
label: RouteMetadata[RouteName.DataExplorer].displayName,
icon: RouteMetadata[RouteName.DataExplorer].icon,
command: () => router.push(RoutePath.DataExplorer)
};
const navMenuItems = ref<MenuItem[]>([homeItem, explorerItem]);
const currentRoute = useCurrentRoute();
const isDataExplorer = computed(() => currentRoute.value.name === RouteName.DataExplorer);
const navMenuItems = ref<MenuItem[]>([homeItem]);
/*
* User Menu
Expand Down Expand Up @@ -438,7 +428,6 @@ watch(
const removedUpdatedProject = remove(items, (item) => item.label === lastProjectUpdated?.name);
navMenuItems.value = [
homeItem,
explorerItem,
...removedUpdatedProject,
...sortBy(items, (item) => item.label?.toString().toLowerCase())
];
Expand Down
Loading

0 comments on commit 8eab67f

Please sign in to comment.