Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue etl manager #10822

Draft
wants to merge 7 commits into
base: dev/7.6.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions arches/app/media/js/views/components/plugins/vue-data-manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import ko from 'knockout';
import VueDataManagerApplication from '@/components/vue-data-manager/vue-data-manager.vue';
import createVueApplication from 'utils/create-vue-application';
import VueDataManagerAppTemplate from 'templates/views/components/plugins/vue-data-manager.htm';

ko.components.register('vue-data-manager', {
viewModel: function() {
createVueApplication(VueDataManagerApplication).then(vueApp => {
vueApp.mount('#vue-data-manager-mounting-point');
});
},
template: VueDataManagerAppTemplate,
});
89 changes: 89 additions & 0 deletions arches/app/src/components/vue-data-manager/ModuleCards.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<script setup>
const props = defineProps({filteredModules: {type: Array, default: () => []}});
const emit = defineEmits(["selectModule"]);

const emitSelectModule = (etlModule) => {
emit("selectModule", etlModule);
};
</script>
<template>
<div class="vue-manager-card-container">
<template
v-for="(etlModule, index) in props.filteredModules"
:key="index"
>
<div
class="vue-manager-card"
:style="{ backgroundColor: etlModule.config.bgColor }"
@click="emitSelectModule(etlModule)"
>
<div class="vue-manager-card-title">
{{ etlModule.name }}
</div>
<div
class="vue-manager-workflow-select-wf-circle"
:style="{
backgroundColor: etlModule.config.circleColor,
}"
>
<div
class="vue-manager-card-icon"
:class="etlModule.icon"
/>
</div>
<div class="vue-manager-card-subtitle">
{{ etlModule.description }}
</div>
</div>
</template>
</div>
</template>
<style>
.vue-manager-card {
width: 200px;
height: 200px;
margin: 10px;
border-radius: 7px;
display: flex;
justify-content: space-evenly;
flex-direction: column;
align-items: center;
padding: 10px;
box-shadow: 3px 3px 2px 0px lightgrey;
cursor: pointer;
}

.vue-manager-card-container {
display: flex;
flex-wrap: wrap;
}

.vue-manager-workflow-select-wf-circle {
width: 70px;
height: 70px;
display: inline-block;
text-align: center;
padding: 18px 12px;
border-radius: 40px;
border: 1px solid #747474;
}

.vue-manager-card-icon {
color: white;
font-size: 2.8rem;
padding-top: 0px;
}

.vue-manager-card-title {
font-size: medium;
color: white;
text-align: center;
font-weight: 600;
}

.vue-manager-card-subtitle {
color: white;
font-size: small;
text-align: center;
}
</style>
36 changes: 36 additions & 0 deletions arches/app/src/components/vue-data-manager/ModuleSearch.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<script setup>
import { ref, watch } from "vue";
import InputText from "primevue/inputtext";

const emit = defineEmits(["moduleSearch"]);

const moduleSearchValue = ref();

watch(moduleSearchValue, (val) => {
emit("moduleSearch", val);
});
</script>

<template>
<div id="search-box">
<span class="p-input-icon-left">
<i class="pi pi-search" />
<InputText
v-model="moduleSearchValue"
:placeholder="$gettext('Filter Modules...')"
/>
</span>
</div>
</template>

<style scoped>
.search-box {
height: 100%;
margin: 10px;
}
.p-inputtext {
height: 30px;
margin: 10px;
font-size: larger;
}
</style>
Loading
Loading