mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1973 lines
70 KiB
1973 lines
70 KiB
4 years ago
|
<template>
|
||
2 years ago
|
<div style="height: 100%" class="nc-tree-view" @mouseenter="onMiniHoverEnter" @mouseleave="onMiniHoverLeave">
|
||
4 years ago
|
<!-- :expand-on-hover="mini"-->
|
||
2 years ago
|
<div class="primary nc-project-title theme--dark" :class="{ shared: sharedBase }">
|
||
2 years ago
|
<img v-if="sharedBase" src="favicon-32.png" height="18" class="ml-2" />
|
||
2 years ago
|
<h3 v-if="sharedBase" class="nc-project-title white--text text-capitalize">
|
||
|
{{ $store.getters['project/GtrProjectName'] }}
|
||
3 years ago
|
</h3>
|
||
3 years ago
|
<github-star-btn v-else />
|
||
3 years ago
|
</div>
|
||
4 years ago
|
<v-navigation-drawer
|
||
3 years ago
|
ref="drawer"
|
||
|
v-model="navigation.shown"
|
||
4 years ago
|
permanent
|
||
|
mini-variant-width="50"
|
||
3 years ago
|
class="nc-nav-drawer"
|
||
3 years ago
|
style="min-width: 100%; height: calc(100% - 30px)"
|
||
4 years ago
|
>
|
||
4 years ago
|
<div class="h-100 d-flex flex-column">
|
||
4 years ago
|
<div class="flex-grow-1" style="overflow-y: auto; min-height: 200px">
|
||
2 years ago
|
<v-skeleton-loader v-if="!projects || !projects.length" class="mt-2 ml-2" type="button" />
|
||
3 years ago
|
<v-text-field
|
||
3 years ago
|
v-else
|
||
3 years ago
|
v-model="search"
|
||
3 years ago
|
:placeholder="$t('placeholder.searchProjectTree')"
|
||
3 years ago
|
dense
|
||
|
hide-details
|
||
3 years ago
|
class="elevation-0 mr-2 pl-3 pr-1 caption nc-table-list-filter"
|
||
3 years ago
|
>
|
||
|
<template #prepend-inner>
|
||
2 years ago
|
<v-icon small class="mt-2 ml-2 mr-1"> mdi-magnify </v-icon>
|
||
3 years ago
|
</template>
|
||
|
<template #append>
|
||
2 years ago
|
<v-icon v-if="search" class="mt-3 mr-3" color="grey" x-small @click="search = ''"> mdi-close </v-icon>
|
||
3 years ago
|
</template>
|
||
|
</v-text-field>
|
||
4 years ago
|
|
||
4 years ago
|
<v-skeleton-loader
|
||
|
v-if="!projects || !projects.length"
|
||
|
type="list-item,list-item-three-line@3,list-item@2,list-item-three-line@3"
|
||
3 years ago
|
/>
|
||
4 years ago
|
|
||
3 years ago
|
<!-- <v-treeview
|
||
4 years ago
|
v-else-if="isTreeView"
|
||
|
v-model="tree"
|
||
3 years ago
|
class="mt-5 project-tree nc-project-tree"
|
||
3 years ago
|
dense
|
||
4 years ago
|
:open.sync="open"
|
||
|
:active.sync="active"
|
||
|
:items="projects"
|
||
|
:search="search"
|
||
|
:filter="filter"
|
||
|
item-key="_nodes.key"
|
||
|
open-on-click
|
||
|
color="primary"
|
||
|
>
|
||
3 years ago
|
<template #label="{ item, open, leaf }">
|
||
4 years ago
|
<v-tooltip
|
||
|
:bottom="!!item.tooltip"
|
||
|
:right="!item.tooltip"
|
||
4 years ago
|
:disabled="!item.tooltip && false"
|
||
|
>
|
||
3 years ago
|
<template #activator="{ on }">
|
||
4 years ago
|
<div
|
||
|
v-if="!hideNode[item._nodes.type]"
|
||
|
v-on="item.tooltip || true ? on : ''"
|
||
|
@contextmenu.prevent="showCTXMenu($event, item, open, leaf)"
|
||
|
@click.stop="addTab({ ...item }, open, leaf)"
|
||
|
>
|
||
4 years ago
|
<template v-if="item._nodes.type === 'db'">
|
||
3 years ago
|
<v-icon size="16">
|
||
|
mdi-database
|
||
|
</v-icon>
|
||
3 years ago
|
<!– <img–>
|
||
|
<!– class="grey lighten-3"–>
|
||
|
<!– :width="16" :src="`/db-icons/${dbIcons[item._nodes.dbConnection.client]}`"/>–>
|
||
4 years ago
|
</template>
|
||
|
<template v-else>
|
||
|
<v-icon
|
||
3 years ago
|
v-if="open && icons[item._nodes.type].openIcon"
|
||
4 years ago
|
small
|
||
4 years ago
|
style="cursor: auto"
|
||
4 years ago
|
:color="icons[item._nodes.type].openColor"
|
||
3 years ago
|
>
|
||
|
{{ icons[item._nodes.type].openIcon }}
|
||
4 years ago
|
</v-icon>
|
||
|
<v-icon
|
||
3 years ago
|
v-else
|
||
4 years ago
|
small
|
||
4 years ago
|
style="cursor: auto"
|
||
|
:color="icons[item._nodes.type].color"
|
||
3 years ago
|
>
|
||
|
{{ icons[item._nodes.type].icon }}
|
||
4 years ago
|
</v-icon>
|
||
|
</template>
|
||
4 years ago
|
<span
|
||
|
class="v-treeview-node__label body-2"
|
||
|
:class="[
|
||
|
icons[item._nodes.type].class,
|
||
|
item.active ? 'font-weight-bold' : '',
|
||
|
]"
|
||
3 years ago
|
>{{ item.name }}</span>
|
||
4 years ago
|
</div>
|
||
|
</template>
|
||
|
<span>{{ item.tooltip || item.name }}</span>
|
||
|
</v-tooltip>
|
||
|
</template>
|
||
3 years ago
|
</v-treeview>-->
|
||
3 years ago
|
<v-container v-else fluid class="px-1 pt-0">
|
||
2 years ago
|
<v-list height="30" dense expand class="nc-project-tree nc-single-env-project-tree pt-1">
|
||
3 years ago
|
<template v-for="item in listViewArr">
|
||
4 years ago
|
<!-- v-if="item.children && item.children.length"-->
|
||
|
<v-list-group
|
||
3 years ago
|
v-if="isNested(item) && showNode(item)"
|
||
|
:key="item.type"
|
||
4 years ago
|
color="textColor"
|
||
3 years ago
|
:value="isActiveList(item) || search"
|
||
2 years ago
|
@click="!(item.children && item.children.length) && addTab({ ...item }, false, false)"
|
||
4 years ago
|
@contextmenu.prevent="showCTXMenu($event, item, true, false)"
|
||
4 years ago
|
>
|
||
3 years ago
|
<template #appendIcon>
|
||
2 years ago
|
<v-icon small color="grey"> mdi-chevron-down </v-icon>
|
||
4 years ago
|
</template>
|
||
3 years ago
|
<template #activator>
|
||
4 years ago
|
<v-list-item-icon>
|
||
|
<v-icon
|
||
3 years ago
|
v-if="icons[item._nodes.type].openIcon"
|
||
3 years ago
|
small
|
||
4 years ago
|
style="cursor: auto"
|
||
4 years ago
|
:color="icons[item._nodes.type].openColor"
|
||
3 years ago
|
>
|
||
|
{{ icons[item._nodes.type].openIcon }}
|
||
4 years ago
|
</v-icon>
|
||
2 years ago
|
<v-icon v-else small style="cursor: auto" :color="icons[item._nodes.type].color">
|
||
3 years ago
|
{{ icons[item._nodes.type].icon }}
|
||
4 years ago
|
</v-icon>
|
||
|
</v-list-item-icon>
|
||
|
<v-list-item-title>
|
||
3 years ago
|
<v-tooltip v-if="!isNonAdminAccessAllowed(item)" top>
|
||
|
<template #activator="{ on }">
|
||
2 years ago
|
<span v-if="item.type === 'tableDir'" class="body-2 font-weight-medium" v-on="on">
|
||
|
{{ $t('objects.tables')
|
||
|
}}<template v-if="item.children && item.children.length">
|
||
3 years ago
|
({{
|
||
3 years ago
|
item.children.filter(
|
||
2 years ago
|
child => !search || child.name.toLowerCase().includes(search.toLowerCase())
|
||
3 years ago
|
).length
|
||
2 years ago
|
}})</template
|
||
|
></span
|
||
3 years ago
|
>
|
||
2 years ago
|
<span v-else class="body-2 font-weight-medium" v-on="on"> {{ item.name }}</span>
|
||
4 years ago
|
</template>
|
||
|
<span class="caption">Only visible to Creator</span>
|
||
|
</v-tooltip>
|
||
3 years ago
|
<template v-else>
|
||
2 years ago
|
<span v-if="item.type === 'tableDir'" class="body-2 font-weight-medium">
|
||
|
{{ $t('objects.tables')
|
||
|
}}<template v-if="item.children && item.children.length">
|
||
3 years ago
|
({{
|
||
3 years ago
|
item.children.filter(
|
||
2 years ago
|
child => !search || child.name.toLowerCase().includes(search.toLowerCase())
|
||
3 years ago
|
).length
|
||
2 years ago
|
}})</template
|
||
|
></span
|
||
|
>
|
||
|
<span v-else class="caption font-weight-regular"> {{ item.name }}</span>
|
||
3 years ago
|
</template>
|
||
4 years ago
|
</v-list-item-title>
|
||
|
|
||
3 years ago
|
<v-spacer />
|
||
4 years ago
|
|
||
|
<v-tooltip bottom>
|
||
3 years ago
|
<template #activator="{ on }">
|
||
4 years ago
|
<x-icon
|
||
2 years ago
|
v-if="_isUIAllowed('treeview-add-button') && item.type !== 'viewDir'"
|
||
4 years ago
|
:color="['x-active', 'grey']"
|
||
4 years ago
|
small
|
||
3 years ago
|
v-on="on"
|
||
2 years ago
|
@click.prevent.stop="handleCreateBtnClick(item.type, item)"
|
||
4 years ago
|
>
|
||
4 years ago
|
mdi-plus-circle-outline
|
||
|
</x-icon>
|
||
|
</template>
|
||
2 years ago
|
<span class="caption"
|
||
|
>Add new <span class="text-capitalize">{{ item.type.slice(0, -3) }}</span></span
|
||
|
>
|
||
4 years ago
|
</v-tooltip>
|
||
|
</template>
|
||
|
|
||
|
<v-list-item-group :value="selectedItem">
|
||
3 years ago
|
<component
|
||
2 years ago
|
:is="_isUIAllowed('treeview-drag-n-drop') ? 'draggable' : 'div'"
|
||
3 years ago
|
v-model="item.children"
|
||
3 years ago
|
draggable="div"
|
||
|
v-bind="dragOptions"
|
||
|
@change="onMove($event, item.children)"
|
||
4 years ago
|
>
|
||
2 years ago
|
<transition-group type="transition" :name="!drag ? 'flip-list' : null">
|
||
3 years ago
|
<v-list-item
|
||
|
v-for="child in item.children || []"
|
||
2 years ago
|
v-show="!search || child.name.toLowerCase().includes(search.toLowerCase())"
|
||
3 years ago
|
:key="child.key"
|
||
3 years ago
|
v-t="['a:table:open']"
|
||
3 years ago
|
color="x-active"
|
||
|
active-class="font-weight-bold"
|
||
|
:selectable="true"
|
||
|
dense
|
||
2 years ago
|
:value="`${(child._nodes && child._nodes).type || ''}||${
|
||
|
(child._nodes && child._nodes.dbAlias) || ''
|
||
|
}||${child.name}`"
|
||
3 years ago
|
class="nested ml-3 nc-draggable-child"
|
||
|
style="position: relative"
|
||
|
@click.stop="addTab({ ...child }, false, true)"
|
||
3 years ago
|
@contextmenu="showCTXMenu($event, child, false, true)"
|
||
3 years ago
|
>
|
||
3 years ago
|
<v-icon
|
||
3 years ago
|
v-if="_isUIAllowed('treeview-drag-n-drop')"
|
||
3 years ago
|
small
|
||
3 years ago
|
:class="`nc-child-draggable-icon nc-child-draggable-icon-${child.name}`"
|
||
3 years ago
|
>
|
||
3 years ago
|
mdi-drag-vertical
|
||
|
</v-icon>
|
||
3 years ago
|
|
||
3 years ago
|
<v-list-item-icon>
|
||
|
<v-icon
|
||
|
v-if="icons[child._nodes.type].openIcon"
|
||
|
style="cursor: auto"
|
||
|
x-small
|
||
|
:color="icons[child._nodes.type].openColor"
|
||
|
>
|
||
|
{{ icons[child._nodes.type].openIcon }}
|
||
|
</v-icon>
|
||
2 years ago
|
<v-icon v-else x-small style="cursor: auto" :color="icons[child._nodes.type].color">
|
||
3 years ago
|
{{ icons[child._nodes.type].icon }}
|
||
|
</v-icon>
|
||
|
</v-list-item-icon>
|
||
|
<v-list-item-title>
|
||
2 years ago
|
<v-tooltip v-if="_isUIAllowed('creator_tooltip') && child.creator_tooltip" bottom>
|
||
3 years ago
|
<template #activator="{ on }">
|
||
2 years ago
|
<span class="caption" v-on="on" @dblclick="showSqlClient = true">
|
||
3 years ago
|
{{ child.name }}
|
||
|
</span>
|
||
|
</template>
|
||
2 years ago
|
<span class="caption">{{ child.creator_tooltip }}</span>
|
||
3 years ago
|
</v-tooltip>
|
||
|
<span v-else class="caption">{{ child.name }}</span>
|
||
|
</v-list-item-title>
|
||
|
<template v-if="child.type === 'table'">
|
||
3 years ago
|
<v-spacer />
|
||
3 years ago
|
<div class="action d-flex" @click.stop>
|
||
|
<v-menu>
|
||
|
<template #activator="{ on }">
|
||
|
<v-icon
|
||
2 years ago
|
v-if="_isUIAllowed('treeview-rename-button') || _isUIAllowed('ui-acl')"
|
||
3 years ago
|
small
|
||
|
v-on="on"
|
||
|
>
|
||
|
mdi-dots-vertical
|
||
3 years ago
|
</v-icon>
|
||
3 years ago
|
</template>
|
||
|
|
||
|
<v-list dense>
|
||
|
<v-list-item
|
||
2 years ago
|
v-if="_isUIAllowed('treeview-rename-button')"
|
||
3 years ago
|
v-t="['c:table:rename:navdraw:options']"
|
||
3 years ago
|
dense
|
||
|
@click="
|
||
|
menuItem = child;
|
||
|
dialogRenameTable.cookie = child;
|
||
|
dialogRenameTable.dialogShow = true;
|
||
2 years ago
|
dialogRenameTable.defaultValue = child.name;
|
||
3 years ago
|
"
|
||
|
>
|
||
|
<v-list-item-icon>
|
||
2 years ago
|
<v-icon x-small> mdi-pencil-outline </v-icon>
|
||
3 years ago
|
</v-list-item-icon>
|
||
|
<v-list-item-title>
|
||
3 years ago
|
<span classs="caption">
|
||
|
<!--Rename-->
|
||
2 years ago
|
{{ $t('general.rename') }}
|
||
3 years ago
|
</span>
|
||
3 years ago
|
</v-list-item-title>
|
||
|
</v-list-item>
|
||
3 years ago
|
<v-list-item
|
||
|
v-if="_isUIAllowed('ui-acl')"
|
||
3 years ago
|
v-t="['c:table:ui-acl']"
|
||
3 years ago
|
dense
|
||
|
@click="openUIACL(child)"
|
||
|
>
|
||
3 years ago
|
<v-list-item-icon>
|
||
2 years ago
|
<v-icon x-small> mdi-shield-outline </v-icon>
|
||
3 years ago
|
</v-list-item-icon>
|
||
|
<v-list-item-title>
|
||
3 years ago
|
<span classs="caption">
|
||
|
<!--UI ACL-->
|
||
2 years ago
|
{{ $t('labels.uiAcl') }}
|
||
3 years ago
|
</span>
|
||
3 years ago
|
</v-list-item-title>
|
||
|
</v-list-item>
|
||
2 years ago
|
<v-list-item
|
||
|
v-if="_isUIAllowed('table-delete')"
|
||
|
dense
|
||
|
@click="checkAndDeleteTable(child)"
|
||
|
>
|
||
2 years ago
|
<v-list-item-icon>
|
||
2 years ago
|
<v-icon x-small> mdi-delete-outline </v-icon>
|
||
2 years ago
|
</v-list-item-icon>
|
||
|
<v-list-item-title>
|
||
|
<span classs="caption">Delete</span>
|
||
|
</v-list-item-title>
|
||
|
</v-list-item>
|
||
3 years ago
|
</v-list>
|
||
|
</v-menu>
|
||
3 years ago
|
<!-- <v-icon @click.stop="" x-small>mdi-delete-outline</v-icon>-->
|
||
3 years ago
|
</div>
|
||
|
</template>
|
||
|
</v-list-item>
|
||
|
</transition-group>
|
||
3 years ago
|
</component>
|
||
4 years ago
|
</v-list-item-group>
|
||
|
</v-list-group>
|
||
|
<v-list-item
|
||
3 years ago
|
v-else-if="
|
||
|
(item.type !== 'sqlClientDir' || showSqlClient) &&
|
||
2 years ago
|
(item.type !== 'migrationsDir' || _isUIAllowed('audit'))
|
||
3 years ago
|
"
|
||
4 years ago
|
:key="item.key"
|
||
3 years ago
|
:selectable="false"
|
||
2 years ago
|
:value="`${(item._nodes && item._nodes).type || ''}||${(item._nodes && item._nodes.dbAlias) || ''}||${
|
||
|
item.name
|
||
|
}`"
|
||
3 years ago
|
:class="`nc-treeview-item-${item.name}`"
|
||
4 years ago
|
@click.stop="addTab({ ...item }, false, false)"
|
||
4 years ago
|
@contextmenu.prevent="showCTXMenu($event, item, false, false)"
|
||
4 years ago
|
>
|
||
|
<v-list-item-icon>
|
||
|
<v-icon
|
||
3 years ago
|
v-if="icons[item._nodes.type].openIcon"
|
||
4 years ago
|
small
|
||
4 years ago
|
style="cursor: auto"
|
||
4 years ago
|
:color="icons[item._nodes.type].openColor"
|
||
3 years ago
|
>
|
||
|
{{ icons[item._nodes.type].openIcon }}
|
||
4 years ago
|
</v-icon>
|
||
2 years ago
|
<v-icon v-else small style="cursor: auto" :color="icons[item._nodes.type].color">
|
||
3 years ago
|
{{ icons[item._nodes.type].icon }}
|
||
4 years ago
|
</v-icon>
|
||
|
</v-list-item-icon>
|
||
|
<v-list-item-title>
|
||
3 years ago
|
<v-tooltip v-if="!isNonAdminAccessAllowed(item)" top>
|
||
|
<template #activator="{ on }">
|
||
2 years ago
|
<span class="caption font-weight-regular" v-on="on" @dblclick="showSqlClient = true">{{
|
||
|
item.name
|
||
|
}}</span>
|
||
4 years ago
|
</template>
|
||
|
<span class="caption">Only visible to Creator</span>
|
||
|
</v-tooltip>
|
||
2 years ago
|
<span v-else class="caption font-weight-regular" @dblclick="showSqlClient = true">{{
|
||
|
item.name
|
||
|
}}</span>
|
||
4 years ago
|
</v-list-item-title>
|
||
|
</v-list-item>
|
||
|
</template>
|
||
|
</v-list>
|
||
|
</v-container>
|
||
4 years ago
|
<recursive-menu
|
||
|
v-model="menuVisible"
|
||
|
offset-y
|
||
|
:items="ctxMenuOptions()"
|
||
|
:position-x="x"
|
||
|
:position-y="y"
|
||
3 years ago
|
@click="handleCTXMenuClick($event.value)"
|
||
|
/>
|
||
4 years ago
|
</div>
|
||
3 years ago
|
<div class="pr-3 advance-menu d-none" :class="{ 'pl-3': !mini }">
|
||
3 years ago
|
<v-divider v-if="_isUIAllowed('treeViewProjectSettings')" />
|
||
4 years ago
|
|
||
2 years ago
|
<v-list v-if="_isUIAllowed('treeViewProjectSettings')" dense :class="{ 'advanced-border': overShieldIcon }">
|
||
4 years ago
|
<v-list-item>
|
||
|
<v-list-item-title>
|
||
4 years ago
|
<!-- Settings -->
|
||
2 years ago
|
<span class="body-2 font-weight-medium">{{ $t('activity.settings') }}</span>
|
||
4 years ago
|
<v-tooltip top>
|
||
3 years ago
|
<template #activator="{ on }">
|
||
4 years ago
|
<x-icon
|
||
|
class="mt-n1"
|
||
3 years ago
|
color="pink textColor"
|
||
4 years ago
|
icon-class="ml-2"
|
||
|
small
|
||
3 years ago
|
v-on="on"
|
||
|
@mouseenter="overShieldIcon = true"
|
||
|
@mouseleave="overShieldIcon = false"
|
||
|
>
|
||
|
mdi-shield-lock-outline
|
||
4 years ago
|
</x-icon>
|
||
|
</template>
|
||
4 years ago
|
<!-- Only visible to Creator -->
|
||
2 years ago
|
<span class="caption">{{ $t('msg.info.onlyCreator') }}</span>
|
||
4 years ago
|
</v-tooltip>
|
||
|
</v-list-item-title>
|
||
|
</v-list-item>
|
||
|
|
||
|
<template v-if="_isUIAllowed('treeViewProjectSettings')">
|
||
|
<v-tooltip bottom>
|
||
3 years ago
|
<template #activator="{ on }">
|
||
3 years ago
|
<v-list-item
|
||
3 years ago
|
v-t="['c:settings:appstore']"
|
||
3 years ago
|
dense
|
||
|
class="body-2 nc-settings-appstore"
|
||
|
@click="appsTabAdd"
|
||
|
v-on="on"
|
||
|
>
|
||
4 years ago
|
<v-list-item-icon>
|
||
2 years ago
|
<v-icon x-small> mdi-storefront-outline </v-icon>
|
||
4 years ago
|
</v-list-item-icon>
|
||
4 years ago
|
<!-- App Store -->
|
||
3 years ago
|
<v-list-item-title>
|
||
2 years ago
|
<span class="font-weight-regular caption">{{ $t('title.appStore') }}</span>
|
||
4 years ago
|
</v-list-item-title>
|
||
|
</v-list-item>
|
||
|
</template>
|
||
4 years ago
|
<!-- App Store -->
|
||
2 years ago
|
{{ $t('title.appStore') }}
|
||
4 years ago
|
</v-tooltip>
|
||
|
|
||
|
<v-tooltip bottom>
|
||
3 years ago
|
<template #activator="{ on }">
|
||
3 years ago
|
<v-list-item
|
||
3 years ago
|
v-t="['c:settings:team-auth']"
|
||
3 years ago
|
dense
|
||
|
class="body-2 nc-settings-teamauth"
|
||
|
@click="rolesTabAdd"
|
||
|
v-on="on"
|
||
|
>
|
||
4 years ago
|
<v-list-item-icon>
|
||
2 years ago
|
<v-icon x-small> mdi-account-group </v-icon>
|
||
4 years ago
|
</v-list-item-icon>
|
||
4 years ago
|
<!-- Team & Auth -->
|
||
3 years ago
|
<v-list-item-title>
|
||
2 years ago
|
<span class="font-weight-regular caption">{{ $t('title.teamAndAuth') }}</span>
|
||
3 years ago
|
</v-list-item-title>
|
||
4 years ago
|
</v-list-item>
|
||
|
</template>
|
||
4 years ago
|
<!-- Roles & Users Management -->
|
||
2 years ago
|
{{ $t('title.rolesUserMgmt') }}
|
||
4 years ago
|
</v-tooltip>
|
||
|
<v-tooltip bottom>
|
||
3 years ago
|
<template #activator="{ on }">
|
||
3 years ago
|
<v-list-item
|
||
3 years ago
|
v-t="['c:settings:proj-metadata']"
|
||
3 years ago
|
dense
|
||
|
class="body-2 nc-settings-projmeta"
|
||
|
@click="disableOrEnableModelTabAdd"
|
||
|
v-on="on"
|
||
|
>
|
||
4 years ago
|
<v-list-item-icon>
|
||
2 years ago
|
<v-icon x-small> mdi-table-multiple </v-icon>
|
||
4 years ago
|
</v-list-item-icon>
|
||
4 years ago
|
<!-- Project Metadata -->
|
||
3 years ago
|
<v-list-item-title>
|
||
2 years ago
|
<span class="font-weight-regular caption">{{ $t('title.projMeta') }}</span>
|
||
4 years ago
|
</v-list-item-title>
|
||
|
</v-list-item>
|
||
|
</template>
|
||
4 years ago
|
<!-- Meta Management -->
|
||
2 years ago
|
{{ $t('title.metaMgmt') }}
|
||
4 years ago
|
</v-tooltip>
|
||
3 years ago
|
|
||
|
<v-tooltip bottom>
|
||
|
<template #activator="{ on }">
|
||
3 years ago
|
<v-list-item
|
||
3 years ago
|
v-t="['c:settings:audit']"
|
||
3 years ago
|
dense
|
||
|
class="body-2 nc-settings-audit"
|
||
|
@click="openAuditTab"
|
||
|
v-on="on"
|
||
|
>
|
||
3 years ago
|
<v-list-item-icon>
|
||
2 years ago
|
<v-icon x-small> mdi-notebook-outline </v-icon>
|
||
3 years ago
|
</v-list-item-icon>
|
||
|
<!-- Project Metadata -->
|
||
|
<v-list-item-title>
|
||
2 years ago
|
<span class="font-weight-regular caption">{{ $t('title.audit') }}</span>
|
||
|
</v-list-item-title>
|
||
3 years ago
|
</v-list-item>
|
||
|
</template>
|
||
|
<!-- Meta Management -->
|
||
2 years ago
|
{{ $t('title.auditLogs') }}
|
||
3 years ago
|
</v-tooltip>
|
||
4 years ago
|
</template>
|
||
|
</v-list>
|
||
3 years ago
|
<v-divider />
|
||
4 years ago
|
|
||
3 years ago
|
<v-list v-if="_isUIAllowed('previewAs') || previewAs" dense>
|
||
4 years ago
|
<v-list-item>
|
||
4 years ago
|
<!-- Preview as -->
|
||
2 years ago
|
<span class="body-2 font-weight-medium">{{ $t('activity.previewAs') }}</span>
|
||
|
<v-icon small class="ml-1"> mdi-drama-masks </v-icon>
|
||
4 years ago
|
</v-list-item>
|
||
|
|
||
|
<v-list dense>
|
||
|
<div class="mx-4 d-flex align-center mb-2">
|
||
4 years ago
|
<template v-for="(role, i) in rolesList">
|
||
2 years ago
|
<v-divider v-if="i" :key="i" vertical class="mx-2 caption grey--text" />
|
||
4 years ago
|
<div
|
||
|
:key="role.title"
|
||
3 years ago
|
:class="`pointer text-center nc-preview-${role.title}`"
|
||
3 years ago
|
@click="setPreviewUSer(role.title)"
|
||
4 years ago
|
>
|
||
2 years ago
|
<v-icon small class="mr-1" :color="role.title === previewAs ? 'x-active' : ''">
|
||
3 years ago
|
{{ roleIcon[role.title] }}
|
||
4 years ago
|
</v-icon>
|
||
2 years ago
|
<span class="caption text-capitalize" :class="{ 'x-active--text': role.title === previewAs }">{{
|
||
|
role.title
|
||
|
}}</span>
|
||
4 years ago
|
</div>
|
||
|
</template>
|
||
|
</div>
|
||
|
<template v-if="previewAs">
|
||
|
<!-- <v-divider></v-divider>-->
|
||
|
<v-list-item @click="setPreviewUSer(null)">
|
||
2 years ago
|
<v-icon small class="mr-1"> mdi-close </v-icon>
|
||
4 years ago
|
<!-- Reset Preview -->
|
||
2 years ago
|
<span class="caption nc-preview-reset">{{ $t('activity.resetReview') }}</span>
|
||
4 years ago
|
</v-list-item>
|
||
|
</template>
|
||
|
</v-list>
|
||
|
</v-list>
|
||
|
</div>
|
||
3 years ago
|
|
||
3 years ago
|
<v-divider />
|
||
3 years ago
|
<template v-if="_isUIAllowed('apiDocs')">
|
||
|
<div
|
||
|
v-t="['e:api-docs']"
|
||
|
class="caption pointer nc-docs pb-2 pl-5 pr-3 pt-2 d-flex align-center"
|
||
|
@click="openLink(apiLink)"
|
||
|
>
|
||
2 years ago
|
<v-icon color="brown" small class="mr-2"> mdi-open-in-new </v-icon>
|
||
3 years ago
|
{{ $t('title.apiDocs') }}
|
||
|
</div>
|
||
|
</template>
|
||
3 years ago
|
|
||
|
<template v-if="_isUIAllowed('settings')">
|
||
|
<div class="pl-5 pr-3 d-flex align-center pb-2">
|
||
3 years ago
|
<settings-modal>
|
||
3 years ago
|
<template #default="{ click }">
|
||
2 years ago
|
<div v-t="['c:navdraw:project-settings']" class="caption pointer nc-team-settings" @click="click">
|
||
|
<v-icon color="brown" small class="mr-1"> mdi-cog </v-icon>
|
||
3 years ago
|
{{ $t('title.teamAndSettings') }}
|
||
3 years ago
|
</div>
|
||
|
</template>
|
||
|
</settings-modal>
|
||
|
</div>
|
||
|
</template>
|
||
3 years ago
|
|
||
3 years ago
|
<!-- <v-divider/>-->
|
||
3 years ago
|
<!-- <extras class="pl-1"/>-->
|
||
4 years ago
|
</div>
|
||
|
</v-navigation-drawer>
|
||
|
|
||
|
<dlg-table-create
|
||
|
v-if="dialogGetTableName.dialogShow"
|
||
|
v-model="dialogGetTableName.dialogShow"
|
||
|
@create="mtdTableCreate($event)"
|
||
3 years ago
|
/>
|
||
4 years ago
|
|
||
|
<dlg-view-create
|
||
|
v-if="dialogGetViewName.dialogShow"
|
||
|
v-model="dialogGetViewName.dialogShow"
|
||
|
@create="mtdViewCreate($event)"
|
||
3 years ago
|
/>
|
||
4 years ago
|
|
||
|
<textDlgSubmitCancel
|
||
|
v-if="dialogRenameTable.dialogShow"
|
||
3 years ago
|
:rules="[validateTableName, validateUniqueAlias]"
|
||
3 years ago
|
:dialog-show="dialogRenameTable.dialogShow"
|
||
4 years ago
|
:heading="dialogRenameTable.heading"
|
||
|
:cookie="dialogRenameTable.cookie"
|
||
3 years ago
|
:default-value="dialogRenameTable.defaultValue"
|
||
|
:mtd-dialog-submit="mtdDialogRenameTableSubmit"
|
||
|
:mtd-dialog-cancel="mtdDialogRenameTableCancel"
|
||
4 years ago
|
/>
|
||
3 years ago
|
|
||
4 years ago
|
<textDlgSubmitCancel
|
||
|
v-if="dialogGetFunctionName.dialogShow"
|
||
3 years ago
|
:dialog-show="dialogGetFunctionName.dialogShow"
|
||
4 years ago
|
:heading="dialogGetFunctionName.heading"
|
||
3 years ago
|
:mtd-dialog-submit="mtdDialogGetFunctionNameSubmit"
|
||
|
:mtd-dialog-cancel="mtdDialogGetFunctionNameCancel"
|
||
4 years ago
|
/>
|
||
|
<textDlgSubmitCancel
|
||
|
v-if="dialogGetProcedureName.dialogShow"
|
||
3 years ago
|
:dialog-show="dialogGetProcedureName.dialogShow"
|
||
4 years ago
|
:heading="dialogGetProcedureName.heading"
|
||
3 years ago
|
:mtd-dialog-submit="mtdDialogGetProcedureNameSubmit"
|
||
|
:mtd-dialog-cancel="mtdDialogGetProcedureNameCancel"
|
||
4 years ago
|
/>
|
||
|
<textDlgSubmitCancel
|
||
|
v-if="dialogGetSequenceName.dialogShow"
|
||
3 years ago
|
:dialog-show="dialogGetSequenceName.dialogShow"
|
||
4 years ago
|
:heading="dialogGetSequenceName.heading"
|
||
3 years ago
|
:mtd-dialog-submit="mtdDialogGetSequenceNameSubmit"
|
||
|
:mtd-dialog-cancel="mtdDialogGetSequenceNameCancel"
|
||
4 years ago
|
/>
|
||
|
<dlgLabelSubmitCancel
|
||
|
v-if="selectedNodeForDelete.dialog"
|
||
3 years ago
|
:actions-mtd="deleteSelectedNode"
|
||
|
:dialog-show="selectedNodeForDelete.dialog"
|
||
4 years ago
|
:heading="selectedNodeForDelete.heading"
|
||
|
type="error"
|
||
|
/>
|
||
2 years ago
|
<dlgLabelSubmitCancel
|
||
|
v-if="dialogDeleteTable.dialogShow"
|
||
|
type="error"
|
||
|
:actions-mtd="deleteTable"
|
||
|
:dialog-show="dialogDeleteTable.dialogShow"
|
||
2 years ago
|
:heading="`${dialogDeleteTable.heading} ${dialogDeleteTable.tableName}`"
|
||
2 years ago
|
/>
|
||
2 years ago
|
<quick-import ref="quickImport" v-model="quickImportDialog" hide-label import-to-project @success="onQuickImport" />
|
||
4 years ago
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
/* eslint-disable */
|
||
|
|
||
2 years ago
|
import { mapMutations, mapGetters, mapActions } from 'vuex';
|
||
|
import { UITypes } from 'nocodb-sdk';
|
||
4 years ago
|
|
||
2 years ago
|
import rightClickOptions from '../helpers/rightClickOptions';
|
||
|
import rightClickOptionsSub from '../helpers/rightClickOptionsSub';
|
||
|
import icons from '../helpers/treeViewIcons';
|
||
4 years ago
|
|
||
2 years ago
|
import textDlgSubmitCancel from './utils/DlgTextSubmitCancel';
|
||
|
import dlgLabelSubmitCancel from './utils/DlgLabelSubmitCancel';
|
||
|
import { copyTextToClipboard } from '../helpers/xutils';
|
||
|
import DlgTableCreate from '~/components/utils/DlgTableCreate';
|
||
|
import DlgViewCreate from '~/components/utils/DlgViewCreate';
|
||
|
import SponsorMini from '~/components/SponsorMini';
|
||
|
import { validateTableName } from '~/helpers';
|
||
|
import QuickImport from '~/components/import/QuickImport';
|
||
4 years ago
|
|
||
2 years ago
|
import draggable from 'vuedraggable';
|
||
|
import GithubStarBtn from '~/components/GithubStarBtn';
|
||
|
import SettingsModal from '~/components/settings/SettingsModal';
|
||
|
import Language from '~/components/utils/Language';
|
||
|
import Extras from '~/components/project/spreadsheet/components/Extras';
|
||
4 years ago
|
|
||
|
export default {
|
||
4 years ago
|
components: {
|
||
3 years ago
|
Extras,
|
||
|
Language,
|
||
|
SettingsModal,
|
||
|
GithubStarBtn,
|
||
3 years ago
|
draggable,
|
||
3 years ago
|
QuickImport,
|
||
4 years ago
|
SponsorMini,
|
||
|
DlgViewCreate,
|
||
|
DlgTableCreate,
|
||
|
textDlgSubmitCancel,
|
||
|
dlgLabelSubmitCancel,
|
||
|
},
|
||
3 years ago
|
props: {
|
||
3 years ago
|
sharedBase: Boolean,
|
||
3 years ago
|
},
|
||
4 years ago
|
data: () => ({
|
||
3 years ago
|
treeViewStatus: {},
|
||
|
drag: false,
|
||
|
dragOptions: {
|
||
3 years ago
|
animation: 200,
|
||
2 years ago
|
group: 'description',
|
||
3 years ago
|
disabled: false,
|
||
2 years ago
|
ghostClass: 'ghost',
|
||
3 years ago
|
},
|
||
4 years ago
|
roleIcon: {
|
||
2 years ago
|
owner: 'mdi-account-star',
|
||
|
creator: 'mdi-account-hard-hat',
|
||
|
editor: 'mdi-account-edit',
|
||
|
viewer: 'mdi-eye-outline',
|
||
|
commenter: 'mdi-comment-account-outline',
|
||
4 years ago
|
},
|
||
2 years ago
|
rolesList: [{ title: 'editor' }, { title: 'commenter' }, { title: 'viewer' }],
|
||
4 years ago
|
showSqlClient: false,
|
||
|
nestedMenu: {},
|
||
|
overShieldIcon: false,
|
||
|
activeListItem: null,
|
||
|
dbIcons: {
|
||
2 years ago
|
oracledb: 'oracle_icon@2x.png',
|
||
|
pg: 'postgresql_icon@2x.png',
|
||
|
mysql: 'mysql_icon@2x.png',
|
||
|
mssql: 'mssql_icon@2x.png',
|
||
|
sqlite3: 'sqlite.png',
|
||
4 years ago
|
},
|
||
|
mini: false,
|
||
|
miniExpanded: false,
|
||
|
navigation: {
|
||
|
shown: true,
|
||
|
width: 320,
|
||
4 years ago
|
borderSize: 3,
|
||
4 years ago
|
},
|
||
|
loadingProjects: true,
|
||
|
caseInsensitive: true,
|
||
|
search: null,
|
||
|
menuVisible: false,
|
||
3 years ago
|
quickImportDialog: false,
|
||
4 years ago
|
x: 0,
|
||
|
y: 0,
|
||
|
menuItem: null,
|
||
2 years ago
|
menu: [{ title: 'Execute' }],
|
||
4 years ago
|
icons,
|
||
|
tree: [],
|
||
|
active: [],
|
||
|
viewMenu: false,
|
||
|
dialogGetTableName: {
|
||
|
dialogShow: false,
|
||
2 years ago
|
heading: 'Enter New Table Name',
|
||
|
field: 'Table Name',
|
||
4 years ago
|
},
|
||
|
dialogGetViewName: {
|
||
|
dialogShow: false,
|
||
2 years ago
|
heading: 'Enter New View Name',
|
||
|
field: 'View Name',
|
||
4 years ago
|
},
|
||
|
dialogGetFunctionName: {
|
||
|
dialogShow: false,
|
||
2 years ago
|
heading: 'Enter New Function Name',
|
||
|
field: 'Function Name',
|
||
4 years ago
|
},
|
||
|
dialogGetProcedureName: {
|
||
|
dialogShow: false,
|
||
2 years ago
|
heading: 'Enter New Procedure Name',
|
||
|
field: 'Procedure Name',
|
||
4 years ago
|
},
|
||
|
dialogGetSequenceName: {
|
||
|
dialogShow: false,
|
||
2 years ago
|
heading: 'Enter New Sequence Name',
|
||
|
field: 'Sequence Name',
|
||
4 years ago
|
},
|
||
|
dialogRenameTable: {
|
||
|
dialogShow: false,
|
||
2 years ago
|
heading: 'Rename Table',
|
||
|
field: 'Table Name',
|
||
4 years ago
|
cookie: null,
|
||
4 years ago
|
defaultValue: null,
|
||
4 years ago
|
},
|
||
2 years ago
|
dialogDeleteTable: {
|
||
|
dialogShow: false,
|
||
|
heading: 'Click Submit to Delete the Table:',
|
||
|
nodes: {},
|
||
|
id: '',
|
||
|
},
|
||
3 years ago
|
selectedNodeForDelete: {
|
||
|
dialog: false,
|
||
|
item: null,
|
||
3 years ago
|
heading: null,
|
||
3 years ago
|
},
|
||
4 years ago
|
}),
|
||
|
computed: {
|
||
3 years ago
|
apiLink() {
|
||
2 years ago
|
return new URL(
|
||
|
`/api/v1/db/meta/projects/${this.projectId}/swagger`,
|
||
|
this.$store.state.project.appInfo && this.$store.state.project.appInfo.ncSiteUrl
|
||
|
);
|
||
3 years ago
|
},
|
||
4 years ago
|
previewAs: {
|
||
|
get() {
|
||
3 years ago
|
return this.$store.state.users.previewAs;
|
||
4 years ago
|
},
|
||
|
set(previewAs) {
|
||
2 years ago
|
this.$store.commit('users/MutPreviewAs', previewAs);
|
||
4 years ago
|
},
|
||
4 years ago
|
},
|
||
|
selectedItem() {
|
||
2 years ago
|
return [this.$route.query.type, this.$route.query.dbalias, this.$route.query.name].join('||');
|
||
4 years ago
|
},
|
||
|
direction() {
|
||
2 years ago
|
return this.navigation.shown === false ? 'Open' : 'Closed';
|
||
4 years ago
|
},
|
||
|
...mapGetters({
|
||
2 years ago
|
projects: 'project/list',
|
||
|
tabs: 'tabs/list',
|
||
|
sqlMgr: 'sqlMgr/sqlMgr',
|
||
|
currentProjectFolder: 'project/currentProjectFolder',
|
||
4 years ago
|
}),
|
||
|
filter() {
|
||
3 years ago
|
return (item, search, textKey) => item[textKey].indexOf(search) > -1;
|
||
4 years ago
|
},
|
||
|
hideNode() {
|
||
|
return {
|
||
2 years ago
|
sqlClientDir: !this._isUIAllowed('sqlClientDir'),
|
||
|
migrationsDir: !this._isUIAllowed('migrationsDir'),
|
||
|
functionDir: !this._isUIAllowed('functionDir'),
|
||
|
procedureDir: !this._isUIAllowed('procedureDir'),
|
||
3 years ago
|
};
|
||
4 years ago
|
},
|
||
|
isTreeView() {
|
||
4 years ago
|
return (
|
||
|
this.projects &&
|
||
|
(this.projects.length > 1 ||
|
||
|
(this.projects[0] &&
|
||
|
this.projects[0].children &&
|
||
|
(this.projects[0].children.length > 1 ||
|
||
|
(this.projects[0].children[0] &&
|
||
|
this.projects[0].children[0].children &&
|
||
|
this.projects[0].children[0].children.length > 1))))
|
||
3 years ago
|
);
|
||
4 years ago
|
},
|
||
|
listViewArr() {
|
||
|
return (
|
||
4 years ago
|
(this.projects &&
|
||
|
this.projects[0] &&
|
||
|
this.projects[0].children &&
|
||
|
this.projects[0].children[0] &&
|
||
|
this.projects[0].children[0].children &&
|
||
|
this.projects[0].children[0].children[0] &&
|
||
|
this.projects[0].children[0].children[0].children) ||
|
||
|
[]
|
||
3 years ago
|
);
|
||
4 years ago
|
},
|
||
4 years ago
|
},
|
||
|
methods: {
|
||
3 years ago
|
async onMove(event, children) {
|
||
|
if (children.length - 1 === event.moved.newIndex) {
|
||
2 years ago
|
this.$set(children[event.moved.newIndex], 'order', children[event.moved.newIndex - 1].order + 1);
|
||
3 years ago
|
} else if (event.moved.newIndex === 0) {
|
||
2 years ago
|
this.$set(children[event.moved.newIndex], 'order', children[1].order / 2);
|
||
3 years ago
|
} else {
|
||
3 years ago
|
this.$set(
|
||
|
children[event.moved.newIndex],
|
||
2 years ago
|
'order',
|
||
|
(children[event.moved.newIndex - 1].order + children[event.moved.newIndex + 1].order) / 2
|
||
3 years ago
|
);
|
||
3 years ago
|
}
|
||
|
|
||
3 years ago
|
// await this.$store.dispatch('sqlMgr/ActSqlOp', [{dbAlias: 'db'}, 'xcModelOrderSet', {
|
||
|
// tn: children[event.moved.newIndex].table_name,
|
||
|
// order: children[event.moved.newIndex].order,
|
||
|
// }])
|
||
|
await this.$api.dbTable.reorder(children[event.moved.newIndex].id, {
|
||
3 years ago
|
order: children[event.moved.newIndex].order,
|
||
|
});
|
||
3 years ago
|
},
|
||
|
openUIACL(child) {
|
||
3 years ago
|
this.disableOrEnableModelTabAdd();
|
||
4 years ago
|
setTimeout(() => {
|
||
|
this.$router.push({
|
||
|
query: {
|
||
|
...this.$route.query,
|
||
2 years ago
|
nested_1: (child && child._nodes && child._nodes.dbConnection && child._nodes.dbConnection.id) + 'acl',
|
||
4 years ago
|
},
|
||
3 years ago
|
});
|
||
|
}, 100);
|
||
|
} /*
|
||
4 years ago
|
setPreviewUSer(previewAs) {
|
||
|
if (!process.env.EE) {
|
||
|
this.$toast.info('Available in Enterprise edition').goAway(3000);
|
||
|
} else {
|
||
|
this.previewAs = previewAs;
|
||
|
window.location.reload();
|
||
|
}
|
||
3 years ago
|
},*/,
|
||
4 years ago
|
async loadRoles() {
|
||
3 years ago
|
// if (this.$store.getters['users/GtrIsAdmin']) {
|
||
|
// const roles = (
|
||
|
// await this.$axios.get('/admin/roles', {
|
||
|
// headers: {
|
||
|
// 'xc-auth': this.$store.state.users.token,
|
||
|
// },
|
||
|
// params: {
|
||
|
// project_id: this.$route.params.project_id,
|
||
|
// },
|
||
|
// })
|
||
|
// ).data
|
||
|
// this.rolesList = roles.filter(role => !['owner', 'creator', 'guest'].includes(role.title))
|
||
|
// } else {
|
||
|
// this.rolesList = null
|
||
|
// this.previewAs = null
|
||
|
// }
|
||
4 years ago
|
},
|
||
|
appsTabAdd() {
|
||
2 years ago
|
const tabIndex = this.tabs.findIndex(el => el.key === `appStore`);
|
||
4 years ago
|
if (tabIndex !== -1) {
|
||
3 years ago
|
this.changeActiveTab(tabIndex);
|
||
4 years ago
|
} else {
|
||
3 years ago
|
let item = {
|
||
2 years ago
|
name: 'App Store',
|
||
3 years ago
|
key: `appStore`,
|
||
|
};
|
||
2 years ago
|
item._nodes = { env: '_noco' };
|
||
|
item._nodes.type = 'appStore';
|
||
|
this.$store.dispatch('tabs/ActAddTab', item);
|
||
4 years ago
|
}
|
||
|
},
|
||
|
isNonAdminAccessAllowed(item) {
|
||
2 years ago
|
return ['tableDir', 'viewDir'].includes(item.type);
|
||
4 years ago
|
},
|
||
|
changeTheme() {
|
||
2 years ago
|
this.$store.dispatch('settings/ActToggleDarkMode', !this.$store.state.settings.darkTheme);
|
||
4 years ago
|
},
|
||
|
openLink(link) {
|
||
2 years ago
|
window.open(link, '_blank');
|
||
4 years ago
|
},
|
||
2 years ago
|
async checkAndDeleteTable(table, action = 'showDialog') {
|
||
2 years ago
|
this.dialogDeleteTable.tableName = table.title;
|
||
|
this.dialogDeleteTable.nodes = table._nodes;
|
||
|
this.dialogDeleteTable.id = table.id;
|
||
|
await this.deleteTable(action);
|
||
|
this.$e('c:table:delete');
|
||
2 years ago
|
},
|
||
|
async deleteTable(action = '') {
|
||
|
if (action === 'showDialog') {
|
||
2 years ago
|
this.dialogDeleteTable.dialogShow = true;
|
||
2 years ago
|
} else if (action === 'hideDialog') {
|
||
2 years ago
|
this.dialogDeleteTable.dialogShow = false;
|
||
2 years ago
|
} else {
|
||
|
try {
|
||
|
const nodes = this.dialogDeleteTable.nodes;
|
||
2 years ago
|
const id = this.dialogDeleteTable.id;
|
||
|
const meta = await this.$store.dispatch('meta/ActLoadMeta', { id });
|
||
|
const relationColumns = meta.columns.filter(c => c.uidt === UITypes.LinkToAnotherRecord);
|
||
2 years ago
|
|
||
|
if (relationColumns.length) {
|
||
2 years ago
|
const refColMsgs = await Promise.all(
|
||
|
relationColumns.map(async (c, i) => {
|
||
|
const refMeta = await this.$store.dispatch('meta/ActLoadMeta', {
|
||
|
id: c.colOptions.fk_related_model_id,
|
||
|
});
|
||
|
return `${i + 1}. ${c.title} is a LinkToAnotherRecord of ${(refMeta && refMeta.title) || c.title}`;
|
||
|
})
|
||
|
);
|
||
|
this.$toast
|
||
|
.info(
|
||
|
`<div style="padding:10px 4px">Unable to delete tables because of the following.
|
||
2 years ago
|
<br><br>${refColMsgs.join('<br>')}<br><br>
|
||
|
Delete them & try again</div>
|
||
2 years ago
|
`
|
||
|
)
|
||
|
.goAway(10000);
|
||
|
this.dialogDeleteTable.dialogShow = false;
|
||
|
return;
|
||
2 years ago
|
}
|
||
|
|
||
2 years ago
|
await this.$api.dbTable.delete(id);
|
||
4 years ago
|
|
||
2 years ago
|
this.removeTableTab({
|
||
|
env: nodes.env,
|
||
|
dbAlias: nodes.dbAlias,
|
||
2 years ago
|
table_name: nodes.table_name,
|
||
|
});
|
||
2 years ago
|
|
||
|
await this.loadTablesFromParentTreeNode({
|
||
|
_nodes: {
|
||
2 years ago
|
...nodes,
|
||
|
},
|
||
|
});
|
||
2 years ago
|
|
||
|
this.$store.commit('meta/MutMeta', {
|
||
|
key: nodes.table_name,
|
||
2 years ago
|
value: null,
|
||
|
});
|
||
2 years ago
|
this.$store.commit('meta/MutMeta', {
|
||
|
key: id,
|
||
2 years ago
|
value: null,
|
||
|
});
|
||
|
this.$toast.info(`Deleted table ${nodes.title} successfully`).goAway(3000);
|
||
2 years ago
|
} catch (e) {
|
||
2 years ago
|
const msg = await this._extractSdkResponseErrorMsg(e);
|
||
|
this.$toast.error(msg).goAway(3000);
|
||
2 years ago
|
}
|
||
2 years ago
|
this.dialogDeleteTable.dialogShow = false;
|
||
|
this.$e('a:table:delete');
|
||
2 years ago
|
}
|
||
|
},
|
||
4 years ago
|
/* settingsTabAdd() {
|
||
|
const tabIndex = this.tabs.findIndex(el => el.key === `projectSettings`);
|
||
|
if (tabIndex !== -1) {
|
||
|
this.changeActiveTab(tabIndex);
|
||
|
} else {
|
||
|
console.log('add roles tab');
|
||
|
let item = {name: 'Settings', key: `projectSettings`}
|
||
|
item._nodes = {env: 'dev'};
|
||
|
item._nodes.type = 'projectSettings';
|
||
|
this.$store.dispatch("tabs/ActAddTab", item);
|
||
|
}
|
||
|
|
||
|
},*/
|
||
|
|
||
|
rolesTabAdd() {
|
||
2 years ago
|
const tabIndex = this.tabs.findIndex(el => el.key === `roles`);
|
||
4 years ago
|
if (tabIndex !== -1) {
|
||
3 years ago
|
this.changeActiveTab(tabIndex);
|
||
4 years ago
|
} else {
|
||
3 years ago
|
let item = {
|
||
2 years ago
|
name: `${this.$t('title.teamAndAuth')} `,
|
||
3 years ago
|
key: `roles`,
|
||
|
};
|
||
2 years ago
|
item._nodes = { env: '_noco' };
|
||
|
item._nodes.type = 'roles';
|
||
|
this.$store.dispatch('tabs/ActAddTab', item);
|
||
4 years ago
|
}
|
||
|
},
|
||
|
disableOrEnableModelTabAdd() {
|
||
2 years ago
|
const tabIndex = this.tabs.findIndex(el => el.key === `disableOrEnableModel`);
|
||
4 years ago
|
if (tabIndex !== -1) {
|
||
3 years ago
|
this.changeActiveTab(tabIndex);
|
||
4 years ago
|
} else {
|
||
3 years ago
|
let item = {
|
||
2 years ago
|
name: `${this.$t('title.metaMgmt')}`,
|
||
3 years ago
|
key: `disableOrEnableModel`,
|
||
|
};
|
||
2 years ago
|
item._nodes = { env: '_noco' };
|
||
|
item._nodes.type = 'disableOrEnableModel';
|
||
|
this.$store.dispatch('tabs/ActAddTab', item);
|
||
4 years ago
|
}
|
||
3 years ago
|
},
|
||
|
openAuditTab() {
|
||
2 years ago
|
const tabIndex = this.tabs.findIndex(el => el.key === `migrationsDir`);
|
||
3 years ago
|
if (tabIndex !== -1) {
|
||
3 years ago
|
this.changeActiveTab(tabIndex);
|
||
3 years ago
|
} else {
|
||
3 years ago
|
let item = {
|
||
2 years ago
|
name: `${this.$t('title.audit')}`,
|
||
3 years ago
|
key: `migrationsDir`,
|
||
|
};
|
||
3 years ago
|
item._nodes = {
|
||
2 years ago
|
env: '_noco',
|
||
|
dbAlias: 'db',
|
||
3 years ago
|
};
|
||
2 years ago
|
item._nodes.type = 'migrationsDir';
|
||
|
item._nodes.dbKey = '';
|
||
|
this.$store.dispatch('tabs/ActAddTab', item);
|
||
3 years ago
|
}
|
||
4 years ago
|
},
|
||
|
toggleMini() {
|
||
2 years ago
|
this.$store.commit('panelSize/MutSize', {
|
||
|
type: 'treeView',
|
||
4 years ago
|
size: this.$store.state.panelSize.treeView.size === 18 ? 5 : 18,
|
||
3 years ago
|
});
|
||
4 years ago
|
// this.onMiniHoverEnter();
|
||
|
// this.mini = !this.mini;
|
||
|
},
|
||
|
onMiniHoverEnter() {
|
||
|
if (this.mini && this.$refs.drawer) {
|
||
3 years ago
|
const el = this.$refs.drawer.$el;
|
||
2 years ago
|
this.$refs.drawer.width = el.style.width = '320px';
|
||
3 years ago
|
this.miniExpanded = true;
|
||
4 years ago
|
}
|
||
|
},
|
||
|
onMiniHoverLeave() {
|
||
|
if (this.mini && this.$refs.drawer) {
|
||
3 years ago
|
const el = this.$refs.drawer.$el;
|
||
2 years ago
|
this.navigation.width = this.$refs.drawer.width = el.style.width = '50px';
|
||
3 years ago
|
this.miniExpanded = false;
|
||
4 years ago
|
}
|
||
|
},
|
||
3 years ago
|
onQuickImport() {
|
||
2 years ago
|
if (!this.menuItem || this.menuItem.type !== 'tableDir') {
|
||
|
this.menuItem = this.listViewArr.find(n => n.type === 'tableDir');
|
||
3 years ago
|
}
|
||
3 years ago
|
this.loadTables(this.menuItem);
|
||
3 years ago
|
},
|
||
4 years ago
|
...mapMutations({
|
||
2 years ago
|
setProject: 'project/list',
|
||
|
updateProject: 'project/update',
|
||
4 years ago
|
}),
|
||
|
...mapActions({
|
||
2 years ago
|
loadTables: 'project/loadTables',
|
||
|
loadProjects: 'project/loadProjects',
|
||
|
loadViews: 'project/loadViews',
|
||
|
loadProcedures: 'project/loadProcedures',
|
||
|
loadSequences: 'project/loadSequences',
|
||
|
loadFunctions: 'project/loadFunctions',
|
||
|
changeActiveTab: 'tabs/changeActiveTab',
|
||
4 years ago
|
// instantiateSqlMgr: "sqlMgr/instantiateSqlMgr",
|
||
2 years ago
|
loadDefaultTabs: 'tabs/loadDefaultTabs',
|
||
|
loadTablesFromParentTreeNode: 'project/loadTablesFromParentTreeNode',
|
||
|
loadViewsFromParentTreeNode: 'project/loadViewsFromParentTreeNode',
|
||
|
loadFunctionsFromParentTreeNode: 'project/loadFunctionsFromParentTreeNode',
|
||
|
loadProceduresFromParentTreeNode: 'project/loadProceduresFromParentTreeNode',
|
||
|
removeTabsByName: 'tabs/removeTabsByName',
|
||
|
clearProjects: 'project/clearProjects',
|
||
2 years ago
|
removeTableTab: 'tabs/removeTableTab',
|
||
4 years ago
|
}),
|
||
|
async addTab(item, open, leaf) {
|
||
|
// console.log("addtab item", item, open, leaf);
|
||
|
//this.$store.commit('notification/MutToggleProgressBar', true);
|
||
|
try {
|
||
2 years ago
|
if (item._nodes.type === 'tableDir' && !open) {
|
||
4 years ago
|
//load tables
|
||
3 years ago
|
await this.loadTables(item);
|
||
|
const currentlyOpened = JSON.parse(JSON.stringify(this.open));
|
||
|
currentlyOpened.push(item._nodes.key);
|
||
|
this.activeListItem = item._nodes.key;
|
||
3 years ago
|
// this.open = currentlyOpened;
|
||
2 years ago
|
} else if (item._nodes.type === 'viewDir' && !open) {
|
||
3 years ago
|
await this.loadViews(item);
|
||
|
const currentlyOpened = JSON.parse(JSON.stringify(this.open));
|
||
|
currentlyOpened.push(item._nodes.key);
|
||
|
this.activeListItem = item._nodes.key;
|
||
3 years ago
|
// this.open = currentlyOpened;
|
||
2 years ago
|
} else if (item._nodes.type === 'functionDir' && !open) {
|
||
3 years ago
|
await this.loadFunctions(item);
|
||
|
const currentlyOpened = JSON.parse(JSON.stringify(this.open));
|
||
|
currentlyOpened.push(item._nodes.key);
|
||
|
this.activeListItem = item._nodes.key;
|
||
3 years ago
|
// this.open = currentlyOpened;
|
||
2 years ago
|
} else if (item._nodes.type === 'procedureDir' && !open) {
|
||
3 years ago
|
await this.loadProcedures(item);
|
||
|
const currentlyOpened = JSON.parse(JSON.stringify(this.open));
|
||
|
currentlyOpened.push(item._nodes.key);
|
||
|
this.activeListItem = item._nodes.key;
|
||
3 years ago
|
// this.open = currentlyOpened;
|
||
2 years ago
|
} else if (item._nodes.type === 'sequenceDir' && !open) {
|
||
3 years ago
|
await this.loadSequences(item);
|
||
|
const currentlyOpened = JSON.parse(JSON.stringify(this.open));
|
||
|
currentlyOpened.push(item._nodes.key);
|
||
|
this.activeListItem = item._nodes.key;
|
||
3 years ago
|
// this.open = currentlyOpened;
|
||
2 years ago
|
} else if (item._nodes.type === 'env') {
|
||
3 years ago
|
return;
|
||
4 years ago
|
} else {
|
||
|
// const tabIndex = this.tabs.findIndex(el => el.key === item.key);
|
||
2 years ago
|
const tabIndex = this.tabs.findIndex(el => {
|
||
4 years ago
|
return (
|
||
4 years ago
|
((!el._nodes && !item._nodes) ||
|
||
|
(el._nodes &&
|
||
|
item._nodes &&
|
||
|
el._nodes.type === item._nodes.type &&
|
||
|
el._nodes.dbAlias === item._nodes.dbAlias)) &&
|
||
|
item.name === el.name
|
||
3 years ago
|
);
|
||
|
});
|
||
4 years ago
|
if (tabIndex !== -1) {
|
||
3 years ago
|
this.changeActiveTab(tabIndex);
|
||
4 years ago
|
} else {
|
||
|
if (
|
||
2 years ago
|
item._nodes.type === 'tableDir' ||
|
||
|
item._nodes.type === 'project' ||
|
||
|
item._nodes.type === 'viewDir' ||
|
||
|
item._nodes.type === 'procedureDir' ||
|
||
|
item._nodes.type === 'sequenceDir' ||
|
||
|
item._nodes.type === 'db' ||
|
||
|
item._nodes.type === 'functionDir'
|
||
4 years ago
|
) {
|
||
3 years ago
|
return;
|
||
4 years ago
|
}
|
||
2 years ago
|
if (item._nodes.type === 'table') {
|
||
|
let tableIndex = +item._nodes.key.split('.').pop();
|
||
3 years ago
|
if (
|
||
2 years ago
|
!(await this.$store.dispatch('settings/ActCheckMaxTable', {
|
||
3 years ago
|
tableIndex,
|
||
|
}))
|
||
|
) {
|
||
|
return;
|
||
3 years ago
|
}
|
||
4 years ago
|
}
|
||
2 years ago
|
this.$store.dispatch('tabs/ActAddTab', item);
|
||
4 years ago
|
}
|
||
|
}
|
||
|
} catch (e) {
|
||
3 years ago
|
console.log(e);
|
||
4 years ago
|
} finally {
|
||
|
//this.$store.commit('notification/MutToggleProgressBar', false);
|
||
|
}
|
||
|
},
|
||
|
isActiveList(item) {
|
||
3 years ago
|
return true; //this.treeViewStatus[item.type] = this.treeViewStatus[item.type] || item.type === this.$route.query.type || item.type === `${this.$route.query.type}Dir`;
|
||
4 years ago
|
},
|
||
|
showNode(item) {
|
||
4 years ago
|
return (
|
||
2 years ago
|
!(this.$store.getters['project/GtrProjectPrefix'] && ['functionDir', 'procedureDir'].includes(item.type)) &&
|
||
|
(['tableDir', 'viewDir'].includes(item.type) || this._isUIAllowed('advanced'))
|
||
3 years ago
|
);
|
||
4 years ago
|
},
|
||
|
showCTXMenu(e, item, open, leaf) {
|
||
2 years ago
|
if (!this._isUIAllowed('treeViewContextMenu')) {
|
||
3 years ago
|
return;
|
||
3 years ago
|
}
|
||
|
if (!item) {
|
||
3 years ago
|
return;
|
||
3 years ago
|
}
|
||
3 years ago
|
e.preventDefault();
|
||
|
e.stopPropagation();
|
||
|
this.x = e.clientX;
|
||
|
this.y = e.clientY;
|
||
|
this.menuItem = item;
|
||
4 years ago
|
|
||
|
this.$nextTick(() => {
|
||
3 years ago
|
this.menuVisible = true;
|
||
|
});
|
||
4 years ago
|
},
|
||
|
async loadProjectsData(id = null) {
|
||
|
try {
|
||
2 years ago
|
this.$store.commit('tabs/clear');
|
||
3 years ago
|
this.loadingProjects = true;
|
||
|
await this.loadProjects(id);
|
||
4 years ago
|
|
||
2 years ago
|
if ('toast' in this.$route.query) {
|
||
4 years ago
|
this.$toast
|
||
2 years ago
|
.success(
|
||
|
`Successfully generated ${(this.$store.getters['project/GtrProjectType'] || '').toUpperCase()} APIs`,
|
||
|
{
|
||
|
position: 'top-center',
|
||
|
}
|
||
|
)
|
||
|
.goAway(5000);
|
||
4 years ago
|
}
|
||
|
|
||
|
try {
|
||
|
this.open = [
|
||
|
this.projects[0].key,
|
||
|
this.projects[0].children[0].key,
|
||
4 years ago
|
this.projects[0].children[0].children[0].key,
|
||
3 years ago
|
];
|
||
4 years ago
|
} catch (error) {
|
||
2 years ago
|
console.log('this.open set array error', error);
|
||
4 years ago
|
}
|
||
3 years ago
|
this.loadingProjects = false;
|
||
4 years ago
|
if (!this.isTreeView) {
|
||
|
if (this.$route.query.type) {
|
||
2 years ago
|
const node = this.listViewArr.find(n => n.type === `${this.$route.query.type}Dir`);
|
||
|
await this.addTab({ ...(node || this.listViewArr[0]) }, false, true);
|
||
4 years ago
|
} else {
|
||
2 years ago
|
await this.addTab({ ...this.listViewArr[0] }, false, true);
|
||
4 years ago
|
}
|
||
|
}
|
||
|
} catch (error) {
|
||
2 years ago
|
console.error('loadProjectsData', error);
|
||
4 years ago
|
}
|
||
|
},
|
||
|
ctxMenuOptions() {
|
||
3 years ago
|
if (!this.menuItem || !this.menuItem._nodes.type) {
|
||
3 years ago
|
return;
|
||
3 years ago
|
}
|
||
3 years ago
|
let options = rightClickOptions[this.menuItem._nodes.type];
|
||
2 years ago
|
if (!this.$store.getters['users/GtrIsAdmin']) {
|
||
3 years ago
|
options = rightClickOptionsSub[this.menuItem._nodes.type];
|
||
3 years ago
|
}
|
||
3 years ago
|
return options;
|
||
4 years ago
|
// if (options) {
|
||
|
// return Object.keys(options).map(k => typeof options[k] === 'object' ? Object.keys(options[k]) : k);
|
||
|
// }
|
||
|
// return [];
|
||
|
},
|
||
|
isNested(item) {
|
||
4 years ago
|
return (
|
||
|
(item.children && item.children.length) ||
|
||
2 years ago
|
['tableDir', 'viewDir', 'functionDir', 'procedureDir', 'sequenceDir'].includes(item.type)
|
||
3 years ago
|
);
|
||
3 years ago
|
},
|
||
|
validateUniqueAlias(v) {
|
||
3 years ago
|
return (
|
||
|
(this.$store.state.project.tables || []).every(
|
||
2 years ago
|
t => this.dialogRenameTable.cookie.id === t.id || t.title !== (v || '')
|
||
|
) || 'Duplicate table alias'
|
||
3 years ago
|
);
|
||
4 years ago
|
},
|
||
|
async handleCreateBtnClick(type, item) {
|
||
3 years ago
|
this.menuItem = item;
|
||
4 years ago
|
switch (type) {
|
||
2 years ago
|
case 'tableDir':
|
||
3 years ago
|
this.dialogGetTableName.dialogShow = true;
|
||
|
break;
|
||
2 years ago
|
case 'viewDir':
|
||
3 years ago
|
this.dialogGetViewName.dialogShow = true;
|
||
|
break;
|
||
2 years ago
|
case 'functionDir':
|
||
3 years ago
|
this.dialogGetFunctionName.dialogShow = true;
|
||
|
break;
|
||
2 years ago
|
case 'procedureDir':
|
||
3 years ago
|
this.dialogGetProcedureName.dialogShow = true;
|
||
|
break;
|
||
2 years ago
|
case 'sequenceDir':
|
||
3 years ago
|
this.dialogGetSequenceName.dialogShow = true;
|
||
|
break;
|
||
4 years ago
|
}
|
||
2 years ago
|
this.$e('c:table:create:navdraw');
|
||
4 years ago
|
},
|
||
|
|
||
|
async handleCTXMenuClick(actionStr) {
|
||
|
///this.$store.commit('notification/MutToggleProgressBar', true);
|
||
|
|
||
|
try {
|
||
3 years ago
|
const item = this.menuItem;
|
||
4 years ago
|
// const options = rightClickOptions[this.menuItem._nodes.type];
|
||
3 years ago
|
const action = actionStr; //options[actionStr];
|
||
|
// this.$e(action)
|
||
3 years ago
|
|
||
4 years ago
|
if (action) {
|
||
2 years ago
|
if (action === 'ENV_DB_TABLES_CREATE') {
|
||
3 years ago
|
this.dialogGetTableName.dialogShow = true;
|
||
2 years ago
|
this.$e('c:table:create:navdraw:right-click');
|
||
|
} else if (action === 'ENV_DB_VIEWS_CREATE') {
|
||
3 years ago
|
this.dialogGetViewName.dialogShow = true;
|
||
2 years ago
|
} else if (action === 'ENV_DB_PROCEDURES_CREATE') {
|
||
3 years ago
|
this.dialogGetProcedureName.dialogShow = true;
|
||
2 years ago
|
} else if (action === 'ENV_DB_SEQUENCES_CREATE') {
|
||
3 years ago
|
this.dialogGetSequenceName.dialogShow = true;
|
||
2 years ago
|
} else if (action === 'ENV_DB_FUNCTIONS_CREATE') {
|
||
3 years ago
|
this.dialogGetFunctionName.dialogShow = true;
|
||
2 years ago
|
} else if (action === 'ENV_DB_FUNCTIONS_CREATE') {
|
||
3 years ago
|
this.dialogGetFunctionName.dialogShow = true;
|
||
2 years ago
|
} else if (action === 'ENV_DB_TABLES_REFRESH') {
|
||
3 years ago
|
await this.loadTables(this.menuItem);
|
||
2 years ago
|
this.$toast.success('Tables refreshed').goAway(1000);
|
||
|
this.$e('a:table:refresh:navdraw');
|
||
|
} else if (action === 'ENV_DB_VIEWS_REFRESH') {
|
||
3 years ago
|
await this.loadViews(this.menuItem);
|
||
2 years ago
|
this.$toast.success('Views refreshed').goAway(1000);
|
||
|
} else if (action === 'IMPORT_EXCEL') {
|
||
3 years ago
|
this.quickImportDialog = true;
|
||
2 years ago
|
} else if (action === 'ENV_DB_FUNCTIONS_REFRESH') {
|
||
3 years ago
|
await this.loadFunctions(this.menuItem);
|
||
2 years ago
|
this.$toast.success('Functions refreshed').goAway(1000);
|
||
|
} else if (action === 'ENV_DB_PROCEDURES_REFRESH') {
|
||
3 years ago
|
await this.loadProcedures(this.menuItem);
|
||
2 years ago
|
this.$toast.success('Procedures refreshed').goAway(1000);
|
||
|
} else if (action === 'ENV_DB_SEQUENCES_REFRESH') {
|
||
3 years ago
|
await this.loadSequences(this.menuItem);
|
||
2 years ago
|
this.$toast.success('Table refreshed').goAway(1000);
|
||
|
} else if (action === 'ENV_DB_TABLES_RENAME') {
|
||
3 years ago
|
this.dialogRenameTable.cookie = item;
|
||
|
this.dialogRenameTable.dialogShow = true;
|
||
|
this.dialogRenameTable.defaultValue = item.name;
|
||
2 years ago
|
this.$e('c:table:rename:navdraw:right-click');
|
||
|
} else if (action === 'ENV_DB_MIGRATION_DOWN') {
|
||
4 years ago
|
await this.sqlMgr.migrator().migrationsDown({
|
||
|
env: item._nodes.env,
|
||
|
dbAlias: item._nodes.dbAlias,
|
||
|
migrationSteps: 99999999999,
|
||
|
folder: this.currentProjectFolder,
|
||
4 years ago
|
sqlContentMigrate: 1,
|
||
3 years ago
|
});
|
||
2 years ago
|
} else if (action === 'SHOW_NODES') {
|
||
|
console.log('\n_nodes.type = ', item._nodes.type, '\n');
|
||
|
console.log('_nodes.key = ', item._nodes.key, '\n');
|
||
|
console.log('_nodes = ', item._nodes, '\n');
|
||
4 years ago
|
} else if (
|
||
2 years ago
|
action === 'ENV_DB_TABLES_DELETE' ||
|
||
|
action === 'ENV_DB_VIEWS_DELETE' ||
|
||
|
action === 'ENV_DB_FUNCTIONS_DELETE' ||
|
||
|
action === 'ENV_DB_PROCEDURES_DELETE' ||
|
||
|
action === 'ENV_DB_SEQUENCES_DELETE'
|
||
4 years ago
|
) {
|
||
2 years ago
|
this.deleteSelectedNode('showDialog', item);
|
||
|
} else if (action === 'ENV_DB_TABLES_CREATE_STATEMENT') {
|
||
4 years ago
|
await this.handleSqlStatementGeneration(
|
||
|
item,
|
||
2 years ago
|
'tableCreateStatement',
|
||
4 years ago
|
`${item.name} Create Statement copied`
|
||
3 years ago
|
);
|
||
2 years ago
|
} else if (action === 'ENV_DB_TABLES_INSERT_STATEMENT') {
|
||
4 years ago
|
await this.handleSqlStatementGeneration(
|
||
|
item,
|
||
2 years ago
|
'tableInsertStatement',
|
||
4 years ago
|
`${item.name} Insert Statement copied`
|
||
3 years ago
|
);
|
||
2 years ago
|
} else if (action === 'ENV_DB_TABLES_UPDATE_STATEMENT') {
|
||
4 years ago
|
await this.handleSqlStatementGeneration(
|
||
|
item,
|
||
2 years ago
|
'tableUpdateStatement',
|
||
4 years ago
|
`${item.name} Update Statement copied`
|
||
3 years ago
|
);
|
||
2 years ago
|
} else if (action === 'ENV_DB_TABLES_DELETE_STATEMENT') {
|
||
4 years ago
|
await this.handleSqlStatementGeneration(
|
||
|
item,
|
||
2 years ago
|
'tableSelectStatement',
|
||
4 years ago
|
`${item.name} Delete Statement copied`
|
||
3 years ago
|
);
|
||
2 years ago
|
} else if (action === 'ENV_DB_TABLES_SELECT_STATEMENT') {
|
||
4 years ago
|
await this.handleSqlStatementGeneration(
|
||
|
item,
|
||
2 years ago
|
'tableDeleteStatement',
|
||
4 years ago
|
`${item.name} Select Statement copied`
|
||
3 years ago
|
);
|
||
4 years ago
|
} else {
|
||
3 years ago
|
console.log(`No Action Fn found for ${action}`);
|
||
4 years ago
|
}
|
||
|
}
|
||
|
} catch (e) {
|
||
3 years ago
|
console.log(e);
|
||
4 years ago
|
} finally {
|
||
|
//this.$store.commit('notification/MutToggleProgressBar', false);
|
||
|
}
|
||
|
},
|
||
|
|
||
|
async handleSqlStatementGeneration(item, func, msg) {
|
||
|
try {
|
||
2 years ago
|
let result = await this.$store.dispatch('sqlMgr/ActSqlOp', [
|
||
4 years ago
|
{
|
||
|
env: item._nodes.env,
|
||
4 years ago
|
dbAlias: item._nodes.dbAlias,
|
||
4 years ago
|
},
|
||
|
func,
|
||
2 years ago
|
{ tn: item.name },
|
||
3 years ago
|
]);
|
||
4 years ago
|
if (result && result.data) {
|
||
2 years ago
|
copyTextToClipboard(result.data, 'selection');
|
||
4 years ago
|
} else {
|
||
2 years ago
|
copyTextToClipboard('Example String', 'selection');
|
||
4 years ago
|
}
|
||
|
|
||
2 years ago
|
let sqlClientNode = { ...item._nodes };
|
||
4 years ago
|
let newItem = {
|
||
4 years ago
|
_nodes: sqlClientNode,
|
||
3 years ago
|
};
|
||
4 years ago
|
|
||
2 years ago
|
sqlClientNode.type = 'sqlClientDir';
|
||
|
sqlClientNode.key = sqlClientNode.tableDirKey.split('.');
|
||
3 years ago
|
sqlClientNode.key.pop();
|
||
2 years ago
|
sqlClientNode.dbKey = sqlClientNode.key.join('.');
|
||
|
sqlClientNode.key.push('sqlClient');
|
||
|
sqlClientNode.key = sqlClientNode.key.join('.');
|
||
4 years ago
|
|
||
2 years ago
|
newItem.key = sqlClientNode.dbKey + '.sqlClient';
|
||
|
newItem.name = 'SQL Client';
|
||
|
newItem.tooltip = 'SQL Client';
|
||
|
newItem.type = 'sqlClientDir';
|
||
4 years ago
|
|
||
3 years ago
|
this.$toast.success(msg).goAway(2000);
|
||
4 years ago
|
|
||
3 years ago
|
this.addTab(newItem, false, false);
|
||
4 years ago
|
|
||
2 years ago
|
this.$store.commit('queries/MutSetClipboardQuery', result.data);
|
||
4 years ago
|
} catch (e) {
|
||
3 years ago
|
console.log(e);
|
||
2 years ago
|
this.$toast.error('Something went wrong').goAway(2000);
|
||
4 years ago
|
}
|
||
|
},
|
||
|
|
||
3 years ago
|
async mtdDialogRenameTableSubmit(title, cookie) {
|
||
3 years ago
|
let item = cookie;
|
||
3 years ago
|
try {
|
||
|
await this.$api.dbTable.update(item.id, {
|
||
2 years ago
|
project_id: this.projectId,
|
||
|
table_name: title,
|
||
3 years ago
|
});
|
||
3 years ago
|
} catch (e) {
|
||
2 years ago
|
this.$toast.error(await this._extractSdkResponseErrorMsg(e)).goAway(3000);
|
||
3 years ago
|
return;
|
||
3 years ago
|
}
|
||
3 years ago
|
await this.removeTabsByName(item);
|
||
4 years ago
|
await this.loadTablesFromParentTreeNode({
|
||
|
_nodes: {
|
||
4 years ago
|
...item._nodes,
|
||
|
},
|
||
3 years ago
|
});
|
||
2 years ago
|
this.$store.dispatch('tabs/ActAddTab', {
|
||
4 years ago
|
_nodes: {
|
||
|
env: this.menuItem._nodes.env,
|
||
|
dbAlias: this.menuItem._nodes.dbAlias,
|
||
3 years ago
|
table_name: this.menuItem._nodes.table_name,
|
||
|
title: title,
|
||
4 years ago
|
dbConnection: this.menuItem._nodes.dbConnection,
|
||
2 years ago
|
type: 'table',
|
||
4 years ago
|
dbKey: this.menuItem._nodes.dbKey,
|
||
|
key: this.menuItem._nodes.key,
|
||
3 years ago
|
tableDirKey: this.menuItem._nodes.tableDirKey,
|
||
4 years ago
|
},
|
||
3 years ago
|
name: title,
|
||
3 years ago
|
});
|
||
|
this.dialogRenameTable.dialogShow = false;
|
||
|
this.dialogRenameTable.defaultValue = null;
|
||
2 years ago
|
this.$toast.success('Table renamed successfully').goAway(3000);
|
||
|
this.$e('a:table:rename');
|
||
4 years ago
|
},
|
||
|
mtdDialogRenameTableCancel() {
|
||
3 years ago
|
this.dialogRenameTable.dialogShow = false;
|
||
|
this.dialogRenameTable.defaultValue = null;
|
||
4 years ago
|
},
|
||
|
mtdTableCreate(table) {
|
||
2 years ago
|
if (!this.menuItem || this.menuItem.type !== 'tableDir') {
|
||
|
this.menuItem = this.listViewArr.find(n => n.type === 'tableDir');
|
||
4 years ago
|
}
|
||
|
// const tables = table.name.split(',');
|
||
2 years ago
|
this.$store.commit('notification/MutToggleProgressBar', true);
|
||
3 years ago
|
this.dialogGetTableName.dialogShow = false;
|
||
4 years ago
|
setTimeout(() => {
|
||
|
// for (let i = 0; i < tables.length; ++i) {
|
||
|
if (table.name) {
|
||
2 years ago
|
this.$store.dispatch('tabs/ActAddTab', {
|
||
4 years ago
|
_nodes: {
|
||
|
env: this.menuItem._nodes.env,
|
||
|
dbAlias: this.menuItem._nodes.dbAlias,
|
||
3 years ago
|
table_name: table.name,
|
||
|
title: table.alias,
|
||
2 years ago
|
type: 'table',
|
||
4 years ago
|
dbKey: this.menuItem._nodes.dbKey,
|
||
|
key: this.menuItem._nodes.key,
|
||
|
dbConnection: this.menuItem._nodes.dbConnection,
|
||
4 years ago
|
newTable: table,
|
||
4 years ago
|
},
|
||
4 years ago
|
name: table.alias,
|
||
3 years ago
|
});
|
||
4 years ago
|
}
|
||
3 years ago
|
});
|
||
2 years ago
|
setTimeout(() => this.$store.commit('notification/MutToggleProgressBar', false), 200);
|
||
3 years ago
|
|
||
2 years ago
|
this.$set(this.dialogGetTableName, 'dialogShow', false);
|
||
|
this.$e('a:table:create');
|
||
4 years ago
|
},
|
||
|
mtdViewCreate(view) {
|
||
|
// const tables = table.name.split(',');
|
||
2 years ago
|
this.$store.commit('notification/MutToggleProgressBar', true);
|
||
3 years ago
|
this.dialogGetViewName.dialogShow = false;
|
||
4 years ago
|
setTimeout(() => {
|
||
|
// for (let i = 0; i < tables.length; ++i) {
|
||
|
if (view.name) {
|
||
2 years ago
|
this.$store.dispatch('tabs/ActAddTab', {
|
||
4 years ago
|
_nodes: {
|
||
|
env: this.menuItem._nodes.env,
|
||
|
dbAlias: this.menuItem._nodes.dbAlias,
|
||
|
view_name: view.name,
|
||
3 years ago
|
title: view.alias,
|
||
2 years ago
|
type: 'view',
|
||
4 years ago
|
dbKey: this.menuItem._nodes.key,
|
||
|
key: this.menuItem._nodes.key,
|
||
|
dbConnection: this.menuItem._nodes.dbConnection,
|
||
4 years ago
|
newView: true,
|
||
4 years ago
|
},
|
||
4 years ago
|
name: view.alias,
|
||
3 years ago
|
});
|
||
4 years ago
|
}
|
||
3 years ago
|
});
|
||
2 years ago
|
setTimeout(() => this.$store.commit('notification/MutToggleProgressBar', false), 200);
|
||
4 years ago
|
|
||
2 years ago
|
this.$set(this.dialogGetTableName, 'dialogShow', false);
|
||
4 years ago
|
},
|
||
|
mtdDialogGetTableNameSubmit(tn, cookie) {
|
||
2 years ago
|
let tables = tn.split(',');
|
||
|
this.$store.commit('notification/MutToggleProgressBar', true);
|
||
3 years ago
|
this.dialogGetTableName.dialogShow = false;
|
||
4 years ago
|
setTimeout(() => {
|
||
|
for (let i = 0; i < tables.length; ++i) {
|
||
|
if (tables[i]) {
|
||
2 years ago
|
this.$store.dispatch('tabs/ActAddTab', {
|
||
4 years ago
|
_nodes: {
|
||
|
env: this.menuItem._nodes.env,
|
||
|
dbAlias: this.menuItem._nodes.dbAlias,
|
||
|
tn: tables[i],
|
||
|
|
||
2 years ago
|
type: 'table',
|
||
4 years ago
|
dbKey: this.menuItem._nodes.dbKey,
|
||
|
key: this.menuItem._nodes.key,
|
||
|
dbConnection: this.menuItem._nodes.dbConnection,
|
||
|
|
||
4 years ago
|
newTable: true,
|
||
4 years ago
|
},
|
||
4 years ago
|
name: tables[i],
|
||
3 years ago
|
});
|
||
4 years ago
|
}
|
||
|
}
|
||
3 years ago
|
});
|
||
2 years ago
|
setTimeout(() => this.$store.commit('notification/MutToggleProgressBar', false), 200);
|
||
4 years ago
|
},
|
||
|
mtdDialogGetTableNameCancel() {
|
||
3 years ago
|
this.dialogGetTableName.dialogShow = false;
|
||
4 years ago
|
},
|
||
|
mtdDialogGetViewNameSubmit(view_name) {
|
||
2 years ago
|
this.$store.dispatch('tabs/ActAddTab', {
|
||
4 years ago
|
_nodes: {
|
||
|
env: this.menuItem._nodes.env,
|
||
|
dbAlias: this.menuItem._nodes.dbAlias,
|
||
|
view_name: view_name,
|
||
|
|
||
2 years ago
|
type: 'view',
|
||
4 years ago
|
dbKey: this.menuItem._nodes.key,
|
||
|
key: this.menuItem._nodes.key,
|
||
|
dbConnection: this.menuItem._nodes.dbConnection,
|
||
|
|
||
4 years ago
|
newView: true,
|
||
4 years ago
|
},
|
||
4 years ago
|
name: view_name,
|
||
3 years ago
|
});
|
||
|
this.dialogGetViewName.dialogShow = false;
|
||
4 years ago
|
},
|
||
|
mtdDialogGetViewNameCancel() {
|
||
3 years ago
|
this.dialogGetViewName.dialogShow = false;
|
||
4 years ago
|
},
|
||
|
mtdDialogGetFunctionNameSubmit(function_name) {
|
||
2 years ago
|
this.$store.dispatch('tabs/ActAddTab', {
|
||
4 years ago
|
_nodes: {
|
||
|
dbKey: this.menuItem._nodes.dbKey,
|
||
|
env: this.menuItem._nodes.env,
|
||
|
dbAlias: this.menuItem._nodes.dbAlias,
|
||
|
function_name: function_name,
|
||
|
newFunction: true,
|
||
2 years ago
|
type: 'function',
|
||
4 years ago
|
key: this.menuItem._nodes.key,
|
||
4 years ago
|
dbConnection: this.menuItem._nodes.dbConnection,
|
||
4 years ago
|
},
|
||
4 years ago
|
name: function_name,
|
||
3 years ago
|
});
|
||
|
this.dialogGetFunctionName.dialogShow = false;
|
||
4 years ago
|
},
|
||
|
mtdDialogGetFunctionNameCancel() {
|
||
3 years ago
|
this.dialogGetFunctionName.dialogShow = false;
|
||
4 years ago
|
},
|
||
|
mtdDialogGetProcedureNameSubmit(procedure_name) {
|
||
2 years ago
|
this.$store.dispatch('tabs/ActAddTab', {
|
||
4 years ago
|
_nodes: {
|
||
|
dbKey: this.menuItem._nodes.dbKey,
|
||
|
env: this.menuItem._nodes.env,
|
||
|
dbAlias: this.menuItem._nodes.dbAlias,
|
||
|
procedure_name: procedure_name,
|
||
|
newProcedure: true,
|
||
2 years ago
|
type: 'procedure',
|
||
4 years ago
|
key: this.menuItem._nodes.key,
|
||
4 years ago
|
},
|
||
4 years ago
|
name: procedure_name,
|
||
3 years ago
|
});
|
||
|
this.dialogGetProcedureName.dialogShow = false;
|
||
4 years ago
|
},
|
||
|
mtdDialogGetSequenceNameSubmit(sequence_name) {
|
||
2 years ago
|
this.$store.dispatch('tabs/ActAddTab', {
|
||
4 years ago
|
_nodes: {
|
||
|
dbKey: this.menuItem._nodes.dbKey,
|
||
|
env: this.menuItem._nodes.env,
|
||
|
dbAlias: this.menuItem._nodes.dbAlias,
|
||
|
sequence_name: sequence_name,
|
||
|
newSequence: true,
|
||
2 years ago
|
type: 'sequence',
|
||
4 years ago
|
key: this.menuItem._nodes.key,
|
||
4 years ago
|
dbConnection: this.menuItem._nodes.dbConnection,
|
||
4 years ago
|
},
|
||
4 years ago
|
name: sequence_name,
|
||
3 years ago
|
});
|
||
|
this.dialogGetSequenceName.dialogShow = false;
|
||
4 years ago
|
},
|
||
|
mtdDialogGetProcedureNameCancel() {
|
||
3 years ago
|
this.dialogGetProcedureName.dialogShow = false;
|
||
4 years ago
|
},
|
||
|
mtdDialogGetSequenceNameCancel() {
|
||
3 years ago
|
this.dialogGetSequenceName.dialogShow = false;
|
||
4 years ago
|
},
|
||
2 years ago
|
async renameSelectedNode(action = '', item) {
|
||
|
if (action === 'showDialog') {
|
||
4 years ago
|
this.selectedNodeForRename = {
|
||
|
dialog: true,
|
||
|
item: item,
|
||
4 years ago
|
heading: `Rename ${item._nodes.type}`,
|
||
3 years ago
|
};
|
||
2 years ago
|
} else if (action === 'hideDialog') {
|
||
4 years ago
|
this.selectedNodeForDelete = {
|
||
|
dialog: false,
|
||
|
item: null,
|
||
4 years ago
|
heading: null,
|
||
3 years ago
|
};
|
||
4 years ago
|
} else {
|
||
|
}
|
||
|
},
|
||
2 years ago
|
async deleteSelectedNode(action = '', item) {
|
||
|
if (action === 'showDialog') {
|
||
4 years ago
|
this.selectedNodeForDelete = {
|
||
|
dialog: true,
|
||
|
item: item,
|
||
2 years ago
|
heading: `Click Submit to Delete The ${item._nodes.type}: ${item.name}`,
|
||
3 years ago
|
};
|
||
2 years ago
|
} else if (action === 'hideDialog') {
|
||
4 years ago
|
this.selectedNodeForDelete = {
|
||
|
dialog: false,
|
||
|
item: null,
|
||
4 years ago
|
heading: null,
|
||
3 years ago
|
};
|
||
4 years ago
|
} else {
|
||
3 years ago
|
item = this.selectedNodeForDelete.item;
|
||
2 years ago
|
if (item._nodes.type === 'table') {
|
||
|
await this.checkAndDeleteTable(item, '');
|
||
|
} else if (item._nodes.type === 'view') {
|
||
|
const view = await this.$store.dispatch('sqlMgr/ActSqlOp', [
|
||
4 years ago
|
{
|
||
|
env: item._nodes.env,
|
||
|
dbAlias: item._nodes.dbAlias,
|
||
|
},
|
||
2 years ago
|
'viewRead',
|
||
|
{ view_name: item._nodes.view_name },
|
||
3 years ago
|
]);
|
||
4 years ago
|
|
||
2 years ago
|
await this.$store.dispatch('sqlMgr/ActSqlOpPlus', [
|
||
4 years ago
|
{
|
||
|
env: item._nodes.env,
|
||
4 years ago
|
dbAlias: item._nodes.dbAlias,
|
||
4 years ago
|
},
|
||
2 years ago
|
'viewDelete',
|
||
4 years ago
|
{
|
||
|
view_name: item._nodes.view_name,
|
||
4 years ago
|
oldViewDefination: view.view_definition,
|
||
|
},
|
||
3 years ago
|
]);
|
||
4 years ago
|
await this.loadViewsFromParentTreeNode({
|
||
|
_nodes: {
|
||
4 years ago
|
...item._nodes,
|
||
|
},
|
||
3 years ago
|
});
|
||
2 years ago
|
this.$toast.success('View deleted successfully').goAway(3000);
|
||
|
} else if (item._nodes.type === 'function') {
|
||
|
const _function = await this.$store.dispatch('sqlMgr/ActSqlOp', [
|
||
4 years ago
|
{
|
||
|
env: item._nodes.env,
|
||
|
dbAlias: item._nodes.dbAlias,
|
||
|
},
|
||
2 years ago
|
'functionRead',
|
||
4 years ago
|
{
|
||
|
function_name: item._nodes.function_name,
|
||
|
},
|
||
3 years ago
|
]);
|
||
4 years ago
|
|
||
2 years ago
|
await this.$store.dispatch('sqlMgr/ActSqlOpPlus', [
|
||
4 years ago
|
{
|
||
|
env: item._nodes.env,
|
||
4 years ago
|
dbAlias: item._nodes.dbAlias,
|
||
4 years ago
|
},
|
||
2 years ago
|
'functionDelete',
|
||
4 years ago
|
{
|
||
|
function_name: item._nodes.function_name,
|
||
4 years ago
|
oldCreateFunction: _function.create_function,
|
||
|
},
|
||
3 years ago
|
]);
|
||
4 years ago
|
|
||
|
await this.loadFunctionsFromParentTreeNode({
|
||
|
_nodes: {
|
||
4 years ago
|
...item._nodes,
|
||
|
},
|
||
3 years ago
|
});
|
||
2 years ago
|
this.$toast.success('Function deleted successfully').goAway(3000);
|
||
|
} else if (item._nodes.type === 'procedure') {
|
||
|
const procedure = await this.$store.dispatch('sqlMgr/ActSqlOp', [
|
||
4 years ago
|
{
|
||
|
env: item._nodes.env,
|
||
|
dbAlias: item._nodes.dbAlias,
|
||
|
},
|
||
2 years ago
|
'procedureRead',
|
||
4 years ago
|
{
|
||
|
procedure_name: item._nodes.procedure_name,
|
||
|
},
|
||
3 years ago
|
]);
|
||
4 years ago
|
|
||
2 years ago
|
await this.$store.dispatch('sqlMgr/ActSqlOpPlus', [
|
||
4 years ago
|
{
|
||
|
env: item._nodes.env,
|
||
4 years ago
|
dbAlias: item._nodes.dbAlias,
|
||
4 years ago
|
},
|
||
2 years ago
|
'procedureDelete',
|
||
4 years ago
|
{
|
||
|
procedure_name: item._nodes.procedure_name,
|
||
4 years ago
|
create_procedure: procedure.create_procedure,
|
||
|
},
|
||
3 years ago
|
]);
|
||
4 years ago
|
|
||
|
await this.loadProceduresFromParentTreeNode({
|
||
|
_nodes: {
|
||
4 years ago
|
...item._nodes,
|
||
|
},
|
||
3 years ago
|
});
|
||
2 years ago
|
this.$toast.success('Procedure deleted successfully').goAway(3000);
|
||
4 years ago
|
}
|
||
|
|
||
3 years ago
|
await this.removeTabsByName(item);
|
||
4 years ago
|
|
||
|
this.selectedNodeForDelete = {
|
||
|
dialog: false,
|
||
|
item: null,
|
||
4 years ago
|
heading: null,
|
||
3 years ago
|
};
|
||
4 years ago
|
}
|
||
4 years ago
|
},
|
||
3 years ago
|
validateTableName(v) {
|
||
2 years ago
|
return validateTableName(v, this.$store.getters['project/GtrProjectIsGraphql']);
|
||
3 years ago
|
},
|
||
4 years ago
|
},
|
||
|
async created() {
|
||
|
// this.loadDefaultTabs();
|
||
|
// this.instantiateSqlMgr();
|
||
3 years ago
|
const _id = this.$route.params.project;
|
||
4 years ago
|
|
||
2 years ago
|
if (_id === 'external') {
|
||
4 years ago
|
}
|
||
3 years ago
|
await this.loadProjectsData(_id);
|
||
|
this.loadDefaultTabs(true);
|
||
3 years ago
|
// this.loadRoles();
|
||
4 years ago
|
},
|
||
2 years ago
|
beforeCreate() {},
|
||
4 years ago
|
mounted() {
|
||
|
// this.setBorderWidth();
|
||
|
// this.setEvents();
|
||
|
},
|
||
|
async destroyed() {
|
||
3 years ago
|
await this.clearProjects();
|
||
4 years ago
|
},
|
||
3 years ago
|
};
|
||
4 years ago
|
</script>
|
||
|
<style scoped>
|
||
|
/deep/ .project-tree .v-treeview-node__level {
|
||
|
width: 12px;
|
||
|
}
|
||
|
|
||
|
/deep/ .project-tree .v-treeview-node__toggle {
|
||
|
width: 12px;
|
||
|
}
|
||
|
|
||
|
/deep/ .v-list-item.nested {
|
||
|
min-height: 25px;
|
||
|
}
|
||
|
|
||
|
/deep/ .v-list-item .v-list-item__icon {
|
||
|
margin-right: 0;
|
||
|
}
|
||
|
|
||
|
/deep/ .v-list-item.nested .v-list-item__icon {
|
||
|
min-height: 25px;
|
||
|
margin-top: 0;
|
||
|
margin-bottom: 0;
|
||
|
margin-right: 0;
|
||
|
}
|
||
|
|
||
|
@keyframes pulse {
|
||
|
0% {
|
||
|
transform: scale(1);
|
||
|
}
|
||
|
60% {
|
||
|
transform: scale(1);
|
||
|
}
|
||
|
70% {
|
||
|
/*opacity: 0;*/
|
||
|
transform: scale(1.35);
|
||
|
}
|
||
|
80% {
|
||
|
transform: scale(1);
|
||
|
}
|
||
|
90% {
|
||
|
/*opacity: 0;*/
|
||
|
transform: scale(1.35);
|
||
|
}
|
||
|
100% {
|
||
|
transform: scale(1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.heart-anim {
|
||
|
animation-name: pulse;
|
||
|
animation-duration: 2.5s;
|
||
|
animation-iteration-count: infinite;
|
||
|
}
|
||
|
|
||
4 years ago
|
/deep/ .advance-menu .v-list-item--dense,
|
||
|
/deep/ .advance-menu .v-list--dense .v-list-item {
|
||
4 years ago
|
min-height: 32px;
|
||
|
}
|
||
|
|
||
4 years ago
|
/deep/ .advance-menu .v-list-item--dense .v-list-item__icon,
|
||
|
/deep/ .advance-menu .v-list--dense .v-list-item .v-list-item__icon {
|
||
4 years ago
|
margin-top: 4px;
|
||
|
margin-bottom: 4px;
|
||
|
}
|
||
|
|
||
|
.font-weight-bold .caption {
|
||
|
font-weight: 700 !important;
|
||
|
}
|
||
|
|
||
2 years ago
|
/deep/ .v-list-group .v-list-group__header .v-list-item__icon.v-list-group__header__append-icon {
|
||
4 years ago
|
min-width: auto;
|
||
|
}
|
||
|
|
||
|
.nested .action {
|
||
|
opacity: 0;
|
||
4 years ago
|
transition: 0.4s opacity;
|
||
4 years ago
|
}
|
||
|
|
||
|
.nested:hover .action {
|
||
|
opacity: 1;
|
||
|
}
|
||
3 years ago
|
|
||
|
/deep/ .nc-table-list-filter .v-input__slot {
|
||
|
min-height: 30px !important;
|
||
|
}
|
||
3 years ago
|
|
||
3 years ago
|
/deep/ .nc-table-list-filter .v-input__slot label {
|
||
|
top: 6px;
|
||
|
}
|
||
|
|
||
2 years ago
|
/deep/ .nc-table-list-filter.theme--light.v-text-field > .v-input__control > .v-input__slot:before {
|
||
3 years ago
|
border-top-color: rgba(0, 0, 0, 0.12) !important;
|
||
|
}
|
||
|
|
||
2 years ago
|
/deep/ .nc-table-list-filter.theme--dark.v-text-field > .v-input__control > .v-input__slot:before {
|
||
3 years ago
|
border-top-color: rgba(255, 255, 255, 0.12) !important;
|
||
|
}
|
||
|
|
||
3 years ago
|
.nc-draggable-child .nc-child-draggable-icon {
|
||
|
opacity: 0;
|
||
3 years ago
|
transition: 0.3s opacity;
|
||
3 years ago
|
position: absolute;
|
||
|
left: 0;
|
||
|
}
|
||
|
|
||
|
.nc-draggable-child:hover .nc-child-draggable-icon {
|
||
|
opacity: 1;
|
||
|
}
|
||
|
|
||
3 years ago
|
.flip-list-move {
|
||
3 years ago
|
transition: transform 0.5s;
|
||
|
}
|
||
3 years ago
|
|
||
|
.no-move {
|
||
3 years ago
|
transition: transform 0s;
|
||
|
}
|
||
3 years ago
|
|
||
|
.ghost {
|
||
3 years ago
|
opacity: 0.5;
|
||
|
background: grey;
|
||
|
}
|
||
|
|
||
3 years ago
|
.nc-project-title {
|
||
|
height: 30px;
|
||
3 years ago
|
/*width: 100%;*/
|
||
3 years ago
|
display: flex;
|
||
3 years ago
|
justify-content: flex-start;
|
||
3 years ago
|
}
|
||
|
|
||
3 years ago
|
.nc-project-title.shared {
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.nc-project-title:not(.shared) {
|
||
|
padding-left: 30px;
|
||
|
}
|
||
|
|
||
|
.nc-project-title.shared > h3 {
|
||
|
padding: 0 10px;
|
||
3 years ago
|
overflow: hidden;
|
||
3 years ago
|
text-overflow: ellipsis;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.nc-project-title > div {
|
||
|
/* display: block;
|
||
|
text-overflow: ellipsis;
|
||
|
white-space: nowrap;
|
||
|
overflow: hidden;
|
||
|
color: white;
|
||
|
font-weight: bold;
|
||
|
padding: 0 10px 10px 10px;
|
||
|
text-transform: capitalize;
|
||
|
line-height: 20px;
|
||
|
min-width: calc(100% - 30px);*/
|
||
3 years ago
|
}
|
||
4 years ago
|
</style>
|
||
|
|
||
|
<!--
|
||
|
/**
|
||
|
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
|
||
|
*
|
||
|
* @author Naveen MR <oof1lab@gmail.com>
|
||
|
* @author Pranav C Balan <pranavxc@gmail.com>
|
||
4 years ago
|
* @author Wing-Kam Wong <wingkwong.code@gmail.com>
|
||
4 years ago
|
*
|
||
|
* @license GNU AGPL version 3 or any later version
|
||
|
*
|
||
|
* This program is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU Affero General Public License as
|
||
|
* published by the Free Software Foundation, either version 3 of the
|
||
|
* License, or (at your option) any later version.
|
||
|
*
|
||
|
* This program is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU Affero General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Affero General Public License
|
||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
*
|
||
|
*/
|
||
|
-->
|