Skip to content

Commit

Permalink
NN-647 remove unused code and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anlisha-maharjan committed Jan 17, 2025
1 parent 045a9fe commit 3e76df3
Show file tree
Hide file tree
Showing 17 changed files with 143 additions and 282 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/enrichment/PathwaySet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</Button>

<Button severity="danger" size="small" rounded text v-on:click.stop="addToChatbot(entry)"
v-tooltip.bottom="'Add to chatbot'" class="w-6 h-6 !text-slate-500 dark:!text-slate-300">
v-tooltip.bottom="'Add to AxoBot'" class="w-6 h-6 !text-slate-500 dark:!text-slate-300">
<span class="text-xl material-symbols-rounded"> forum </span>
</Button>
</label>
Expand Down
32 changes: 7 additions & 25 deletions frontend/src/components/pane/modules/difexp/DEValuePane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<span class="text-sm font-normal">{{ active_decoloumn }}</span>
</header>

<Tabs :value="active_section">
<Tabs v-model:value="active_section">
<div
:class="`${active_section ? '!pt-2 !border-t !border-slate-700 !mt-2' : ''} px-2.5 -mx-2.5 max-h-[10rem] overflow-auto overflow-x-visible`">
<TabPanels class="!p-0">
<TabPanel value="informations" v-show="tool_active && active_section == 'informations'">
<TabPanel value="informations">
<h3 class="mb-1 text-sm font-medium">
Informations
</h3>
</TabPanel>
<TabPanel value="statistics" v-show="tool_active && active_section == 'statistics'">
<TabPanel value="statistics">
<h3 class="mb-1 text-sm font-medium">
Contained nodes
</h3>
Expand All @@ -27,10 +27,10 @@
tabList: { class: '!border-0 !gap-4' },
activeBar: { class: '!hidden' }
}">
<Tab v-on:click="change_section('informations')" value="informations" class="!p-0 !border-0"><span
<Tab value="informations" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-lg ${active_section == 'informations' ? 'font-variation-ico-filled' : ''}`">info</span>
</Tab>
<Tab v-on:click="change_section('statistics')" value="statistics" class="!p-0 !border-0"><span
<Tab value="statistics" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-lg ${active_section == 'statistics' ? 'font-variation-ico-filled' : ''}`">tune</span>
</Tab>
</TabList>
Expand All @@ -44,8 +44,8 @@ import RegulatedProteins from "@/components/pane/modules/difexp/RegulatedProtein
import { useToast } from "primevue/usetoast";
export default {
name: "DEValuePane",
props: ["active_decoloumn", "gephi_data", "tool_active"],
emits: ["active_item_changed", "tool_active_changed"],
props: ["active_decoloumn", "gephi_data"],
emits: ["active_item_changed"],
components: {
RegulatedProteins,
},
Expand Down Expand Up @@ -74,24 +74,6 @@ export default {
},
},
methods: {
change_section(val) {
var com = this;
if (com.tool_active && com.active_section == val) {
com.active_section = "";
com.$emit("tool_active_changed", false);
} else {
if (!com.tool_active) {
com.active_section = val;
com.$emit("tool_active_changed", true);
}
if (com.tool_active && com.active_section != val) {
com.active_section = val;
com.$emit("tool_active_changed", true);
}
}
},
copyclipboard() {
var com = this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</li>
</ul>

<!-- :virtualScrollerOptions="{ itemSize: 28 }" scrollHeight="4.5rem" -->
<Listbox v-if="filt_links?.length" optionLabel="" :options="filt_links" :pt="{
listContainer: { class: 'order-2' },
list: { class: '!p-0' },
Expand All @@ -16,7 +17,7 @@
class:
'!px-0 !py-1 !text-slate-500 dark:!text-slate-300 leading-tight transition-all duration-300 ease-in-out',
},
}" :virtualScrollerOptions="{ itemSize: 28 }" scrollHeight="4.5rem" listStyle="max-height:100%" class="h-full flex flex-col !p-0 !bg-transparent !border-0" :tabindex="0"
}" listStyle="max-height:100%" class="h-full flex flex-col !p-0 !bg-transparent !border-0" :tabindex="0"
emptyMessage="No nodes available.">

<template #footer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<!-- :virtualScrollerOptions="{ itemSize: 28 }" scrollHeight="4.5rem" -->
<Listbox v-if="intersectingDicts?.length" optionLabel="" :options="intersectingDicts" :pt="{
listContainer: { class: 'order-2' },
list: { class: '!p-0' },
Expand All @@ -7,7 +8,7 @@
class:
'!px-0 !py-1 !text-slate-500 dark:!text-slate-300 leading-tight transition-all duration-300 ease-in-out',
},
}" :virtualScrollerOptions="{ itemSize: 28 }" scrollHeight="4.5rem" listStyle="max-height:100%" class="h-full flex flex-col !p-0 !bg-transparent !border-0" :tabindex="0"
}" listStyle="max-height:100%" class="h-full flex flex-col !p-0 !bg-transparent !border-0" :tabindex="0"
emptyMessage="No nodes available.">

<template #footer>
Expand Down
36 changes: 9 additions & 27 deletions frontend/src/components/pane/modules/layer/EnrichmentLayerPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
</span>
</header>

<Tabs :value="active_section">
<Tabs v-model:value="active_section">
<div
:class="`${active_section ? '!pt-2 !border-t !border-slate-700 !mt-2' : ''} px-2.5 -mx-2.5 max-h-[10rem] overflow-auto overflow-x-visible`">
<TabPanels class="!p-0">
<TabPanel value="statistics" v-show="tool_active && active_section == 'informations'">
<TabPanel value="informations">
<h3 class="mb-1 text-sm font-medium">
Informations
</h3>
</TabPanel>
<TabPanel value="statistics" v-show="tool_active && active_section == 'statistics'">
<TabPanel value="statistics">
<div class="flex items-center justify-between mb-1">
<h3 class="text-sm font-medium">
Contained proteins
Expand All @@ -27,7 +27,7 @@
</div>
<LayerProteins :active_termlayers="active_termlayers" :gephi_data="gephi_data"></LayerProteins>
</TabPanel>
<TabPanel value="connections" v-show="tool_active && active_section == 'connections'">
<TabPanel value="connections">
<h3 class="mb-1 text-sm font-medium">
Connections
</h3>
Expand All @@ -41,13 +41,13 @@
tabList: { class: '!border-0 !gap-4' },
activeBar: { class: '!hidden' }
}">
<Tab v-on:click="change_section('information')" value="informations" class="!p-0 !border-0"><span
<Tab value="informations" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-lg ${active_section == 'informations' ? 'font-variation-ico-filled' : ''}`">info</span>
</Tab>
<Tab v-on:click="change_section('statistics')" value="statistics" class="!p-0 !border-0"><span
<Tab value="statistics" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-lg ${active_section == 'statistics' ? 'font-variation-ico-filled' : ''}`">tune</span>
</Tab>
<Tab v-on:click="change_section('connections')" value="connections" class="!p-0 !border-0"><span
<Tab value="connections" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-base ${active_section == 'connections' ? 'font-variation-ico-filled' : ''}`">hub</span>
</Tab>
</TabList>
Expand All @@ -62,8 +62,8 @@ import EnrichmentConnections from "@/components/pane/modules/layer/EnrichmentCon
export default {
name: "EnrichmentLayerPane",
props: ["active_termlayers", "gephi_data", "node_color_index", "tool_active"],
emits: ["active_item_changed", "tool_active_changed"],
props: ["active_termlayers", "gephi_data", "node_color_index"],
emits: ["active_item_changed"],
components: {
LayerProteins,
EnrichmentConnections,
Expand Down Expand Up @@ -98,24 +98,6 @@ export default {
},
},
methods: {
change_section(val) {
var com = this;
if (com.tool_active && com.active_section == val) {
com.active_section = "";
com.$emit("tool_active_changed", false);
} else {
if (!com.tool_active) {
com.active_section = val;
com.$emit("tool_active_changed", true);
}
if (com.tool_active && com.active_section != val) {
com.active_section = val;
com.$emit("tool_active_changed", true);
}
}
},
copyclipboard() {
this.emitter.emit("copyLayerConnections");
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/pane/modules/layer/LayerProteins.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<p v-if="!filt_links?.length" class="flex items-center justify-center py-1 text-sm text-slate-300">No proteins
</p>

<!-- :virtualScrollerOptions="{ itemSize: 28 }" scrollHeight="4.5rem" -->
<Listbox v-if="filt_links?.length" optionLabel="" :options="filt_links" :pt="{
listContainer: { class: 'order-2' },
list: { class: '!p-0' },
Expand All @@ -10,7 +10,7 @@
class:
'!px-0 !py-1 !text-slate-500 dark:!text-slate-300 leading-tight transition-all duration-300 ease-in-out',
},
}" :virtualScrollerOptions="{ itemSize: 28 }" scrollHeight="4.5rem" listStyle="max-height:100%" class="h-full flex flex-col !p-0 !bg-transparent !border-0" :tabindex="0"
}" listStyle="max-height:100%" class="h-full flex flex-col !p-0 !bg-transparent !border-0" :tabindex="0"
emptyMessage="No proteins available.">

<template #footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<p v-if="!filt_links?.length" class="flex items-center justify-center py-1 text-sm text-slate-300">No nodes
</p>

<!-- :virtualScrollerOptions="{ itemSize: 28 }" scrollHeight="4.5rem" -->
<Listbox v-if="filt_links?.length" optionLabel="" :options="filt_links" :pt="{
listContainer: { class: 'order-2' },
list: { class: '!p-0' },
Expand Down
41 changes: 11 additions & 30 deletions frontend/src/components/pane/modules/node/NodePane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
</span>
</header>

<Tabs :value="active_section">
<Tabs v-model:value="active_section">
<div
:class="`${active_section ? '!pt-2 !border-t !border-slate-700 !mt-2' : ''} px-2.5 -mx-2.5 max-h-[10rem] overflow-auto overflow-x-visible`">
<TabPanels class="!p-0">
<TabPanel value="informations" v-show="tool_active && active_section == 'informations'">
<TabPanel value="informations">
<h3 class="mb-1 text-sm font-medium">
Information
</h3>
<ChatbotInformation :active_node="active_node"></ChatbotInformation>
</TabPanel>
<TabPanel value="statistics" v-show="tool_active && active_section == 'statistics'">
<TabPanel value="statistics">
<h3 class="mb-1 text-sm font-medium">
Network statistics
</h3>
<NetworkStatistics :active_node="active_node" :mode="mode"></NetworkStatistics>
</TabPanel>
<TabPanel value="connections" v-show="tool_active && active_section == 'connections'">
<TabPanel value="connections">
<div class="flex items-center justify-between mb-1">
<h3 class="text-sm font-medium">
Connections
Expand All @@ -43,7 +43,7 @@
</div>
<NodeConnections :active_node="active_node" :links="links"></NodeConnections>
</TabPanel>
<TabPanel value="routing" v-show="tool_active && active_section == 'routing'">
<TabPanel value="routing">
<h3 class="mb-1 text-sm font-medium">
Routing
</h3>
Expand All @@ -57,16 +57,16 @@
tabList: { class: '!border-0 !gap-4' },
activeBar: { class: '!hidden' }
}">
<Tab v-on:click="change_section('informations')" value="informations" class="!p-0 !border-0"><span
<Tab value="informations" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-lg ${active_section == 'informations' ? 'font-variation-ico-filled' : ''}`">info</span>
</Tab>
<Tab v-on:click="change_section('statistics')" value="statistics" class="!p-0 !border-0"><span
<Tab value="statistics" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-lg ${active_section == 'statistics' ? 'font-variation-ico-filled' : ''}`">tune</span>
</Tab>
<Tab v-on:click="change_section('connections')" value="connections" class="!p-0 !border-0"><span
<Tab value="connections" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-base ${active_section == 'connections' ? 'font-variation-ico-filled' : ''}`">hub</span>
</Tab>
<Tab v-on:click="change_section('routing')" value="routing" class="!p-0 !border-0"><span
<Tab value="routing" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-lg ${active_section == 'routing' ? 'font-variation-ico-filled' : ''}`">logout</span>
</Tab>
</TabList>
Expand All @@ -92,10 +92,9 @@ export default {
"active_node",
"gephi_data",
"node_color_index",
"mode",
"tool_active",
"mode"
],
emits: ["active_item_changed", "tool_active_changed"],
emits: ["active_item_changed"],
components: {
NetworkStatistics,
ChatbotInformation,
Expand Down Expand Up @@ -149,24 +148,6 @@ export default {
},
},
methods: {
change_section(val) {
var com = this;
if (com.tool_active && com.active_section == val) {
com.active_section = "";
com.$emit("tool_active_changed", false);
} else {
if (!com.tool_active) {
com.active_section = val;
com.$emit("tool_active_changed", true);
}
if (com.tool_active && com.active_section != val) {
com.active_section = val;
com.$emit("tool_active_changed", true);
}
}
},
to_proteins() {
var com = this;
this.$store.commit(
Expand Down
40 changes: 10 additions & 30 deletions frontend/src/components/pane/modules/pathway/PathwayPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
</span>
</Button>
</header>
<Tabs :value="active_section">

<Tabs v-model:value="active_section">
<div
:class="`${active_section ? '!pt-2 !border-t !border-slate-700 !mt-2' : ''} px-2.5 -mx-2.5 max-h-[10rem] overflow-auto overflow-x-visible`">
<TabPanels class="!p-0">
<TabPanel value="informations">
<h3 class="mb-3 text-sm font-medium" v-show="tool_active && active_section == 'informations'">
<h3 class="mb-3 text-sm font-medium">
Informations
</h3>

</TabPanel>
<TabPanel value="statistics" v-show="tool_active && active_section == 'statistics'">
<TabPanel value="statistics">
<h3 class="mb-3 text-sm font-medium">
Network statistics
</h3>
<NetworkStatistics :active_node="active_node" :mode="mode"></NetworkStatistics>
</TabPanel>
<TabPanel value="connections" v-show="tool_active && active_section == 'connections'">
<TabPanel value="connections">
<div class="flex items-center justify-between mb-3">
<h3 class="text-sm font-medium">
Connections
Expand All @@ -47,14 +47,13 @@
tabList: { class: '!border-0 !gap-4' },
activeBar: { class: '!hidden' }
}">
<Tab v-on:click="change_section('informations')" value="informations" class="!p-0 !border-0"><span
<Tab value="informations" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-lg ${active_section == 'informations' ? 'font-variation-ico-filled' : ''}`">info</span>
</Tab>
<Tab v-on:click="change_section('statistics')" value="statistics" class="!p-0 !border-0"
v-if="active_node !== null"><span
<Tab value="statistics" class="!p-0 !border-0" v-if="active_node !== null"><span
:class="`material-symbols-rounded !text-lg ${active_section == 'statistics' ? 'font-variation-ico-filled' : ''}`">tune</span>
</Tab>
<Tab v-on:click="change_section('connections')" value="connections" class="!p-0 !border-0"><span
<Tab value="connections" class="!p-0 !border-0"><span
:class="`material-symbols-rounded !text-base ${active_section == 'connections' ? 'font-variation-ico-filled' : ''}`">hub</span>
</Tab>
</TabList>
Expand All @@ -77,10 +76,9 @@ export default {
"active_node",
"gephi_data",
"node_color_index",
"mode",
"tool_active",
"mode"
],
emits: ["active_item_changed", "tool_active_changed"],
emits: ["active_item_changed"],
components: {
NetworkStatistics,
NodeConnections,
Expand Down Expand Up @@ -126,24 +124,6 @@ export default {
},
},
methods: {
change_section(val) {
var com = this;
if (com.tool_active && com.active_section == val) {
com.active_section = "";
com.$emit("tool_active_changed", false);
} else {
if (!com.tool_active) {
com.active_section = val;
com.$emit("tool_active_changed", true);
}
if (com.tool_active && com.active_section != val) {
com.active_section = val;
com.$emit("tool_active_changed", true);
}
}
},
copyclipboard() {
var com = this;
Expand Down
Loading

0 comments on commit 3e76df3

Please sign in to comment.