Skip to content

Commit

Permalink
consistent pages
Browse files Browse the repository at this point in the history
  • Loading branch information
artpar committed Oct 13, 2024
1 parent 1b91aa3 commit 41081db
Show file tree
Hide file tree
Showing 7 changed files with 173 additions and 93 deletions.
37 changes: 21 additions & 16 deletions src/pages/Actions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,45 @@
<q-page-container>

<q-page>
<div class="row q-pa-md q-gutter-sm">



<div class="row">
<div class="col-4">
<q-input clearable label="search" v-model="actionFilter">
<q-input dense v-model="nameFilter" icon="search" label="search">
<template v-slot:prepend>
<q-icon name="search" />
<q-icon name="search"/>
</template>
</q-input>
</div>
<div class="col-4">
<q-btn @click="showCreateAction()" label="New" fab icon="add"/>
</div>
<div class="row" style="border-top: 1px solid black; border-bottom: 1px solid black">
<div class="col-1">
<q-btn-group flat size="sm">
<q-btn icon="add" flat @click="showCreateAction()"/>
<q-btn icon="delete" disable flat @click="$router.push('/tables/create')"/>
</q-btn-group>
</div>
</div>

<div class="row q-gutter-sm q-pa-md">
<div class="row">
<div class="col-8 col-xs-12 col-xl-6">

<q-markup-table>
<q-markup-table flat>
<thead>
<tr class="text-left">
<th>Actions</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody >
<tbody>
<tr v-for="action in filteredActions">
<td style="width: 100px">{{ action.action_name }}</td>
<td>{{ action.label }}</td>

<td class="text-right">
<q-btn icon="edit" @click="showEditAction(action)" size="md" class="float-right"></q-btn>

<q-btn flat class="float-right" icon="edit" size="md" @click="showEditAction(action)"></q-btn>
</td>
</tr>
</tbody>
Expand All @@ -44,7 +50,7 @@
</div>


<q-drawer overlay :width="400" side="right" v-model="showCreateActionDrawer">
<q-drawer v-model="showCreateActionDrawer" :width="400" overlay side="right">
<q-scroll-area class="fit row">
<q-card>
<q-card-section>
Expand All @@ -66,7 +72,7 @@
</q-drawer>


<q-drawer overlay content-class="bg-grey-3" :width="400" side="right" v-model="showEditActionDrawer">
<q-drawer v-model="showEditActionDrawer" :width="400" content-class="bg-grey-3" overlay side="right">
<q-scroll-area class="fit row">
<div class="q-pa-md">
<span class="text-h6">Edit action</span>
Expand Down Expand Up @@ -225,28 +231,27 @@ OutFields:`)
'updateRow', 'executeAction', 'setSelectedActionForEditor']),
refresh() {
const that = this;
that.refreshTables().then(function (){
that.refreshTables().then(function () {
console.log("Loaded tabled")
that.localTables = that.allTables.sort(function (a, b) {
return a.table_name > b.table_name;
});
}).catch(function (err){
}).catch(function (err) {
console.log("Failed to refresh tables", err)
});
this.refreshActions().then(function () {
console.log("actions loaded")
})
}
},
data() {
return {
text: '',
localTables: [],
actionSchemaEditor: null,
actionFilter: null,
nameFilter: null,
selectedAction: {},
actionProviderOptions: [
{
Expand Down
87 changes: 65 additions & 22 deletions src/pages/ApiCatalogue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,60 @@

<q-page>

<div class="row q-pa-md q-gutter-sm">
<div class="col-xl-3 col-lg-4 col-6 col-sm-8 col-xs-12 ">
<q-input label="Search" v-model="filterWord"></q-input>


<div class="row">
<div class="col-4">
<q-input dense v-model="nameFilter" icon="search" label="search">
<template v-slot:prepend>
<q-icon name="search"/>
</template>
</q-input>
</div>
<div class="col-6 q-pa-md">
<q-btn @click="showCreateIntegrationDrawer = true" fab icon="add" color="primary"/>
</div>
<div class="row" style="border-top: 1px solid black; border-bottom: 1px solid black">
<div class="col-1">
<q-btn-group flat size="sm">
<q-btn icon="add" flat @click="showCreateIntegrationDrawer = true"/>
<q-btn icon="delete" disable flat @click="$router.push('/tables/create')"/>
</q-btn-group>
</div>
</div>



<div class="row">

<div class="col-4 col-xl-3 col-lg-4 col-xs-12 col-sm-6 q-pa-md" v-for="integration in filteredIntegrations">
<div class="col">
<q-markup-table flat>
<thead>
<tr style="text-align: left">
<th>Integrations</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr v-for="integration in filteredIntegrations.filter((e) => {
if (nameFilter) {
return e.name.indexOf(nameFilter) > -1;
} else {
return true;
}
})" style="cursor: pointer" @click="showEditIntegration(integration)">
<td>{{ integration.name }}</td>
<td>{{ integration.specification_format }}</td>
<td>{{ integration.specification_format }}</td>
<td class="text-right">
<q-btn color="black" flat icon="fas fa-wrench"></q-btn>
</td>
</tr>
</tbody>
</q-markup-table>
</div>

<div v-for="integration in filteredIntegrations" class="col-4 col-xl-3 col-lg-4 col-xs-12 col-sm-6 q-pa-md">
<q-card>
<q-card-section>
<span class="text-h6"
Expand All @@ -25,15 +68,15 @@
<span>Format</span> <span class="text-bold float-right">{{ integration.specification_format }}</span>
</q-card-section>
<q-card-section>
<span>Language</span> <span class="text-bold float-right">{{ integration.specification_language }}</span>
<span>Language</span> <span class="text-bold float-right">{{ integration.specification_format }}</span>
</q-card-section>
<q-card-section>
<div class="row">
<div class="col-12">
<!-- <q-btn size="sm" @click="listFiles(integration)" label="Browse files" color="primary"-->
<!-- class="float-right"></q-btn>-->
<q-btn @click="showEditIntegration(integration)" size="sm" label="Edit integration"
class="float-right"></q-btn>
<q-btn class="float-right" label="Edit integration" size="sm"
@click="showEditIntegration(integration)"></q-btn>
</div>
</div>
</q-card-section>
Expand All @@ -42,8 +85,8 @@

</div>

<q-drawer overlay content-class="bg-grey-3" :width="400" side="right" v-model="showCreateIntegrationDrawer">
<q-card flat class="bg-grey-3">
<q-drawer v-model="showCreateIntegrationDrawer" :width="400" content-class="bg-grey-3" overlay side="right">
<q-card class="bg-grey-3" flat>
<q-card-section>
<span class="text-h6">Create integration</span>
</q-card-section>
Expand All @@ -58,21 +101,21 @@
<q-card-section>
<q-form class="q-gutter-md q-pa-md">
<file-upload
:multiple="true"
style="height: 300px; width: 100%"
class="bg-grey-3"
ref="upload"
v-model="specFile"
:drop="true"
:drop-directory="false"
v-model="specFile"
:multiple="true"
class="bg-grey-3"
post-action="/post.method"
put-action="/put.method"
style="height: 300px; width: 100%"
@input-file="fileAdded"
>
<div class="container ">
<span v-if="specFile.length === 0" style="padding-top: 40%" class="vertical-middle">Drop files or click to select <br/></span>
<div class="row" v-if="specFile.length > 0">
<div class="col-12" v-for="file in specFile">{{ file.name }} - Error: {{ file.error }}, Success:
<span v-if="specFile.length === 0" class="vertical-middle" style="padding-top: 40%">Drop files or click to select <br/></span>
<div v-if="specFile.length > 0" class="row">
<div v-for="file in specFile" class="col-12">{{ file.name }} - Error: {{ file.error }}, Success:
{{ file.success }}
</div>
</div>
Expand All @@ -89,7 +132,7 @@
</q-drawer>


<q-drawer overlay content-class="bg-grey-3" :width="400" side="right" v-model="showEditIntegrationDrawer">
<q-drawer v-model="showEditIntegrationDrawer" :width="400" content-class="bg-grey-3" overlay side="right">
<q-scroll-area class="fit">
<div class="row q-pa-md">
<div class="col-12">
Expand All @@ -100,12 +143,12 @@
<q-item>
<q-item-section>

<q-input label="Name" v-model="newIntegration.name"></q-input>
<q-input v-model="newIntegration.name" label="Name"></q-input>
</q-item-section>
</q-item>
<q-item>
<q-item-section>
<q-checkbox label="Enable" v-model="newIntegration.enable">
<q-checkbox v-model="newIntegration.enable" label="Enable">
<q-tooltip>
Operations from schema are imported to be used in actions
</q-tooltip>
Expand Down Expand Up @@ -393,7 +436,7 @@ export default {
return {
text: '',
fileIsBeingLoaded: false,
filterWord: null,
nameFilter: null,
selectedIntegration: {},
showHelp: false,
specFile: [],
Expand Down
10 changes: 5 additions & 5 deletions src/pages/CloudStorePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<q-page-container>
<q-page>

<div class="row q-gutter-sm q-pa-md">
<div class="row">
<div class="col-4">
<q-input dense v-model="nameFilter" icon="search" label="search">
<template v-slot:prepend>
Expand All @@ -21,9 +21,9 @@
</div>


<div class="row q-pa-md q-gutter-sm">
<div class="row">
<div class="col-12">
<q-markup-table>
<q-markup-table flat>
<thead>
<tr style="text-align: left">
<th>Storage</th>
Expand All @@ -39,11 +39,11 @@
} else {
return true;
}
})" style="cursor: pointer" @click="$router.push('/user/' + user.email)">
})" style="cursor: pointer" @click="showEditStore(cloudStore)">
<td>{{ cloudStore.name }}</td>
<td>{{ cloudStore.store_provider }}</td>
<td>{{ cloudStore.root_path }}</td>
<td>
<td class="text-right">
<q-btn color="black" flat icon="fas fa-wrench"></q-btn>
</td>
</tr>
Expand Down
40 changes: 27 additions & 13 deletions src/pages/SitePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,31 @@

<q-page>

<div class="row q-gutter-sm q-pa-md">

<div class="row">
<div class="col-4">
<q-input v-model="siteFilter" icon="search" label="search">
<q-input dense v-model="nameFilter" icon="search" label="search">
<template v-slot:prepend>
<q-icon name="search" />
<q-icon name="search"/>
</template>
</q-input>
</div>
<div class="col-4">
<q-btn fab icon="add" label="New" @click="showCreateSiteDrawer = true"/>
</div>
<div class="row" style="border-top: 1px solid black; border-bottom: 1px solid black">
<div class="col-1">
<q-btn-group flat size="sm">
<q-btn icon="add" flat @click="showCreateSiteDrawer = true"/>
<q-btn icon="delete" disable flat @click="$router.push('/tables/create')"/>
</q-btn-group>
</div>
</div>


<div class="row q-pa-md q-gutter-sm">

<div class="row">

<div class="col-12">
<q-markup-table>
<q-markup-table flat>
<thead>
<tr style="text-align: left">
<th>Sites</th>
Expand All @@ -31,17 +38,24 @@
</thead>
<tbody>
<tr v-for="site in sites.filter((e) => {
if (siteFilter) {
return e.name.indexOf(siteFilter) > -1;
if (nameFilter) {
return e.name.indexOf(nameFilter) > -1;
} else {
return true;
}
})" style="cursor: pointer" @click="$router.push('/user/' + user.email)">
})" style="cursor: pointer">
<td>{{ site.name }}</td>
<td>{{ site.enable_https }}</td>
<td>{{ site.ftp_enabled }}</td>
<td>
<q-btn color="black" flat icon="fas fa-wrench"></q-btn>
<td class="text-right">
<q-btn-group flat>
<q-btn
@click="$router.push('/site/' + site.reference_id + '/browse')"
label="Browse files"
icon="folder"
class="float-right"></q-btn>
<q-btn @click="showEditSite(site)" icon="edit" label="Edit site" class="float-right"></q-btn>
</q-btn-group>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -270,7 +284,7 @@
return {
text: '',
showHttpEdit: false,
siteFilter: null,
nameFilter: null,
fileList: [],
currentSite: null,
showFileBrowser: false,
Expand Down
Loading

0 comments on commit 41081db

Please sign in to comment.