Remove support for Buefy 0.8

only Buefy 0.9 and greater are supported now
This commit is contained in:
Lance Edgar 2023-02-01 18:44:55 -06:00
parent 5f7fa33eb2
commit 8410419717
20 changed files with 1057 additions and 1625 deletions

View file

@ -27,7 +27,6 @@ Rattail config extension for Tailbone
from __future__ import unicode_literals, absolute_import from __future__ import unicode_literals, absolute_import
import warnings import warnings
from pkg_resources import parse_version
from rattail.config import ConfigExtension as BaseExtension from rattail.config import ConfigExtension as BaseExtension
from rattail.db.config import configure_session from rattail.db.config import configure_session
@ -78,11 +77,9 @@ def get_buefy_version(config):
def get_buefy_0_8(config, version=None): def get_buefy_0_8(config, version=None):
if not version: warnings.warn("get_buefy_0_8() is no longer supported",
version = get_buefy_version(config) DeprecationWarning, stacklevel=2)
if version == 'latest': return False
return False
return parse_version(version) < parse_version('0.9')
def global_help_url(config): def global_help_url(config):

View file

@ -2,7 +2,7 @@
################################################################################ ################################################################################
# #
# Rattail -- Retail Software Framework # Rattail -- Retail Software Framework
# Copyright © 2010-2022 Lance Edgar # Copyright © 2010-2023 Lance Edgar
# #
# This file is part of Rattail. # This file is part of Rattail.
# #
@ -40,10 +40,9 @@ from webhelpers2.html import tags
import tailbone import tailbone
from tailbone import helpers from tailbone import helpers
from tailbone.db import Session from tailbone.db import Session
from tailbone.config import (csrf_header_name, should_expose_websockets, from tailbone.config import csrf_header_name, should_expose_websockets
get_buefy_0_8)
from tailbone.menus import make_simple_menus from tailbone.menus import make_simple_menus
from tailbone.util import should_use_buefy, get_global_search_options, get_libver from tailbone.util import should_use_buefy, get_global_search_options
def new_request(event): def new_request(event):
@ -160,10 +159,8 @@ def before_render(event):
# buefy themes get some extra treatment # buefy themes get some extra treatment
if should_use_buefy(request): if should_use_buefy(request):
# TODO: remove this hack once all nodes safely on buefy 0.9 # TODO: remove this hack once nothing references it
version = get_libver(request, 'buefy') renderer_globals['buefy_0_8'] = False
renderer_globals['buefy_0_8'] = get_buefy_0_8(rattail_config,
version=version)
# maybe set custom stylesheet # maybe set custom stylesheet
css = None css = None

View file

@ -102,68 +102,45 @@
<b-table :data="weblibs"> <b-table :data="weblibs">
% if buefy_0_8: <b-table-column field="title"
<template slot-scope="props"> label="Name"
% endif v-slot="props">
{{ props.row.title }}
</b-table-column>
<b-table-column field="title" <b-table-column field="configured_version"
label="Name" label="Version"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.configured_version || props.row.default_version }}
% endif </b-table-column>
>
{{ props.row.title }}
</b-table-column>
<b-table-column field="configured_version" <b-table-column field="configured_url"
label="Version" label="URL Override"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.configured_url }}
% endif </b-table-column>
>
{{ props.row.configured_version || props.row.default_version }}
</b-table-column>
<b-table-column field="configured_url" <b-table-column field="live_url"
label="URL Override" label="Effective (Live) URL"
% if not buefy_0_8: v-slot="props">
v-slot="props" <span v-if="props.row.modified"
% endif class="has-text-warning">
> save settings and refresh page to see new URL
{{ props.row.configured_url }} </span>
</b-table-column> <span v-if="!props.row.modified">
{{ props.row.live_url }}
</span>
</b-table-column>
<b-table-column field="live_url" <b-table-column field="actions"
label="Effective (Live) URL" label="Actions"
% if not buefy_0_8: v-slot="props">
v-slot="props" <a href="#"
% endif @click.prevent="editWebLibraryInit(props.row)">
> <i class="fas fa-edit"></i>
<span v-if="props.row.modified" Edit
class="has-text-warning"> </a>
save settings and refresh page to see new URL </b-table-column>
</span>
<span v-if="!props.row.modified">
{{ props.row.live_url }}
</span>
</b-table-column>
<b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#"
@click.prevent="editWebLibraryInit(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>

View file

@ -59,31 +59,17 @@
<div style="width: 100%;"> <div style="width: 100%;">
<b-table :data="configFiles"> <b-table :data="configFiles">
% if buefy_0_8: <b-table-column field="priority"
<template slot-scope="props"> label="Priority"
% endif v-slot="props">
{{ props.row.priority }}
</b-table-column>
<b-table-column field="priority" <b-table-column field="path"
label="Priority" label="File Path"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.path }}
% endif </b-table-column>
>
{{ props.row.priority }}
</b-table-column>
<b-table-column field="path"
label="File Path"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.path }}
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
</div> </div>

View file

@ -886,94 +886,72 @@
paginated paginated
per-page="5" per-page="5"
:debounce-search="1000"> :debounce-search="1000">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column :label="productKeyLabel" <b-table-column :label="productKeyLabel"
field="key" field="key"
% if not buefy_0_8: v-slot="props"
v-slot="props" sortable>
% endif {{ props.row.key }}
sortable> </b-table-column>
{{ props.row.key }}
</b-table-column>
<b-table-column label="Brand" <b-table-column label="Brand"
field="brand_name" field="brand_name"
% if not buefy_0_8: v-slot="props"
v-slot="props" sortable
% endif searchable>
sortable {{ props.row.brand_name }}
searchable> </b-table-column>
{{ props.row.brand_name }}
</b-table-column>
<b-table-column label="Description" <b-table-column label="Description"
field="description" field="description"
% if not buefy_0_8: v-slot="props"
v-slot="props" sortable
% endif searchable>
sortable {{ props.row.description }}
searchable> {{ props.row.size }}
{{ props.row.description }} </b-table-column>
{{ props.row.size }}
</b-table-column>
<b-table-column label="Unit Price" <b-table-column label="Unit Price"
field="unit_price" field="unit_price"
% if not buefy_0_8: v-slot="props"
v-slot="props" sortable>
% endif {{ props.row.unit_price_display }}
sortable> </b-table-column>
{{ props.row.unit_price_display }}
</b-table-column>
<b-table-column label="Sale Price" <b-table-column label="Sale Price"
field="sale_price" field="sale_price"
% if not buefy_0_8: v-slot="props"
v-slot="props" sortable>
% endif <span class="has-background-warning">
sortable> {{ props.row.sale_price_display }}
<span class="has-background-warning"> </span>
{{ props.row.sale_price_display }} </b-table-column>
</span>
</b-table-column>
<b-table-column label="Sale Ends" <b-table-column label="Sale Ends"
field="sale_ends" field="sale_ends"
% if not buefy_0_8: v-slot="props"
v-slot="props" sortable>
% endif <span class="has-background-warning">
sortable> {{ props.row.sale_ends_display }}
<span class="has-background-warning"> </span>
{{ props.row.sale_ends_display }} </b-table-column>
</span>
</b-table-column>
<b-table-column label="Department" <b-table-column label="Department"
field="department_name" field="department_name"
% if not buefy_0_8: v-slot="props"
v-slot="props" sortable
% endif searchable>
sortable {{ props.row.department_name }}
searchable> </b-table-column>
{{ props.row.department_name }}
</b-table-column>
<b-table-column label="Vendor" <b-table-column label="Vendor"
field="vendor_name" field="vendor_name"
% if not buefy_0_8: v-slot="props"
v-slot="props" sortable
% endif searchable>
sortable {{ props.row.vendor_name }}
searchable> </b-table-column>
{{ props.row.vendor_name }}
</b-table-column>
% if buefy_0_8:
</template>
% endif
<template slot="empty"> <template slot="empty">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">
<p> <p>
@ -1009,132 +987,93 @@
<b-table v-if="items.length" <b-table v-if="items.length"
:data="items" :data="items"
:row-class="(row, i) => row.product_uuid ? null : 'has-text-success'"> :row-class="(row, i) => row.product_uuid ? null : 'has-text-success'">
% if buefy_0_8:
<template slot-scope="props"> <b-table-column :label="productKeyLabel"
v-slot="props">
{{ props.row.product_key }}
</b-table-column>
<b-table-column label="Brand"
v-slot="props">
{{ props.row.product_brand }}
</b-table-column>
<b-table-column label="Description"
v-slot="props">
{{ props.row.product_description }}
</b-table-column>
<b-table-column label="Size"
v-slot="props">
{{ props.row.product_size }}
</b-table-column>
<b-table-column label="Department"
v-slot="props">
{{ props.row.department_display }}
</b-table-column>
<b-table-column label="Quantity"
v-slot="props">
<span v-html="props.row.order_quantity_display"></span>
</b-table-column>
<b-table-column label="Unit Price"
v-slot="props">
<span
% if product_price_may_be_questionable:
:class="props.row.price_needs_confirmation ? 'has-background-warning' : ''"
% else:
:class="props.row.pricing_reflects_sale ? 'has-background-warning' : null"
% endif
>
{{ props.row.unit_price_display }}
</span>
</b-table-column>
% if allow_item_discounts:
<b-table-column label="Discount"
v-slot="props">
{{ props.row.discount_percent }}{{ props.row.discount_percent ? " %" : "" }}
</b-table-column>
% endif % endif
<b-table-column :label="productKeyLabel" <b-table-column label="Total"
% if not buefy_0_8: v-slot="props">
v-slot="props" <span
% endif % if product_price_may_be_questionable:
> :class="props.row.price_needs_confirmation ? 'has-background-warning' : ''"
{{ props.row.product_key }} % else:
</b-table-column> :class="props.row.pricing_reflects_sale ? 'has-background-warning' : null"
% endif
>
{{ props.row.total_price_display }}
</span>
</b-table-column>
<b-table-column label="Brand" <b-table-column label="Vendor"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.vendor_display }}
% endif </b-table-column>
>
{{ props.row.product_brand }}
</b-table-column>
<b-table-column label="Description" <b-table-column field="actions"
% if not buefy_0_8: label="Actions"
v-slot="props" v-slot="props">
% endif <a href="#" class="grid-action"
> @click.prevent="showEditItemDialog(props.row)">
{{ props.row.product_description }} <i class="fas fa-edit"></i>
</b-table-column> Edit
</a>
&nbsp;
<b-table-column label="Size" <a href="#" class="grid-action has-text-danger"
% if not buefy_0_8: @click.prevent="deleteItem(props.index)">
v-slot="props" <i class="fas fa-trash"></i>
% endif Delete
> </a>
{{ props.row.product_size }} &nbsp;
</b-table-column> </b-table-column>
<b-table-column label="Department"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.department_display }}
</b-table-column>
<b-table-column label="Quantity"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.order_quantity_display"></span>
</b-table-column>
<b-table-column label="Unit Price"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span
% if product_price_may_be_questionable:
:class="props.row.price_needs_confirmation ? 'has-background-warning' : ''"
% else:
:class="props.row.pricing_reflects_sale ? 'has-background-warning' : null"
% endif
>
{{ props.row.unit_price_display }}
</span>
</b-table-column>
% if allow_item_discounts:
<b-table-column label="Discount"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.discount_percent }}{{ props.row.discount_percent ? " %" : "" }}
</b-table-column>
% endif
<b-table-column label="Total"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span
% if product_price_may_be_questionable:
:class="props.row.price_needs_confirmation ? 'has-background-warning' : ''"
% else:
:class="props.row.pricing_reflects_sale ? 'has-background-warning' : null"
% endif
>
{{ props.row.total_price_display }}
</span>
</b-table-column>
<b-table-column label="Vendor"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.vendor_display }}
</b-table-column>
<b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" class="grid-action"
@click.prevent="showEditItemDialog(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
&nbsp;
<a href="#" class="grid-action has-text-danger"
@click.prevent="deleteItem(props.index)">
<i class="fas fa-trash"></i>
Delete
</a>
&nbsp;
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
</div> </div>
</div> </div>

View file

@ -106,95 +106,56 @@
:checked-rows.sync="changeStatusCheckedRows" :checked-rows.sync="changeStatusCheckedRows"
narrowed narrowed
class="is-size-7"> class="is-size-7">
% if buefy_0_8: <b-table-column field="product_brand" label="Brand"
<template slot-scope="props"> v-slot="props">
% endif <span v-html="props.row.product_brand"></span>
<b-table-column field="product_brand" label="Brand" </b-table-column>
% if not buefy_0_8: <b-table-column field="product_description" label="Product"
v-slot="props" v-slot="props">
% endif <span v-html="props.row.product_description"></span>
> </b-table-column>
<span v-html="props.row.product_brand"></span> <!-- <b-table-column field="quantity" label="Quantity"> -->
</b-table-column> <!-- <span v-html="props.row.quantity"></span> -->
<b-table-column field="product_description" label="Product" <!-- </b-table-column> -->
% if not buefy_0_8: <b-table-column field="product_case_quantity" label="cPack"
v-slot="props" v-slot="props">
% endif <span v-html="props.row.product_case_quantity"></span>
> </b-table-column>
<span v-html="props.row.product_description"></span> <b-table-column field="order_quantity" label="oQty"
</b-table-column> v-slot="props">
<!-- <b-table-column field="quantity" label="Quantity"> --> <span v-html="props.row.order_quantity"></span>
<!-- <span v-html="props.row.quantity"></span> --> </b-table-column>
<!-- </b-table-column> --> <b-table-column field="order_uom" label="UOM"
<b-table-column field="product_case_quantity" label="cPack" v-slot="props">
% if not buefy_0_8: <span v-html="props.row.order_uom"></span>
v-slot="props" </b-table-column>
% endif <b-table-column field="department_name" label="Department"
> v-slot="props">
<span v-html="props.row.product_case_quantity"></span> <span v-html="props.row.department_name"></span>
</b-table-column> </b-table-column>
<b-table-column field="order_quantity" label="oQty" <b-table-column field="product_barcode" label="Product Barcode"
% if not buefy_0_8: v-slot="props">
v-slot="props" <span v-html="props.row.product_barcode"></span>
% endif </b-table-column>
> <b-table-column field="unit_price" label="Unit $"
<span v-html="props.row.order_quantity"></span> v-slot="props">
</b-table-column> <span v-html="props.row.unit_price"></span>
<b-table-column field="order_uom" label="UOM" </b-table-column>
% if not buefy_0_8: <b-table-column field="total_price" label="Total $"
v-slot="props" v-slot="props">
% endif <span v-html="props.row.total_price"></span>
> </b-table-column>
<span v-html="props.row.order_uom"></span> <b-table-column field="order_date" label="Order Date"
</b-table-column> v-slot="props">
<b-table-column field="department_name" label="Department" <span v-html="props.row.order_date"></span>
% if not buefy_0_8: </b-table-column>
v-slot="props" <b-table-column field="status_code" label="Status"
% endif v-slot="props">
> <span v-html="props.row.status_code"></span>
<span v-html="props.row.department_name"></span> </b-table-column>
</b-table-column> <!-- <b-table-column field="flagged" label="Flagged"> -->
<b-table-column field="product_barcode" label="Product Barcode" <!-- <span v-html="props.row.flagged"></span> -->
% if not buefy_0_8: <!-- </b-table-column> -->
v-slot="props"
% endif
>
<span v-html="props.row.product_barcode"></span>
</b-table-column>
<b-table-column field="unit_price" label="Unit $"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.unit_price"></span>
</b-table-column>
<b-table-column field="total_price" label="Total $"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.total_price"></span>
</b-table-column>
<b-table-column field="order_date" label="Order Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.order_date"></span>
</b-table-column>
<b-table-column field="status_code" label="Status"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.status_code"></span>
</b-table-column>
<!-- <b-table-column field="flagged" label="Flagged"> -->
<!-- <span v-html="props.row.flagged"></span> -->
<!-- </b-table-column> -->
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
<br /> <br />

View file

@ -103,98 +103,66 @@
<b-table :data="filteredProfilesData" <b-table :data="filteredProfilesData"
:row-class="(row, i) => row.enabled ? null : 'has-background-warning'"> :row-class="(row, i) => row.enabled ? null : 'has-background-warning'">
% if buefy_0_8: <b-table-column field="key"
<template slot-scope="props"> label="Watcher Key"
% endif v-slot="props">
<b-table-column field="key" {{ props.row.key }}
label="Watcher Key" </b-table-column>
% if not buefy_0_8: <b-table-column field="watcher_spec"
v-slot="props" label="Watcher Spec"
% endif v-slot="props">
> {{ props.row.watcher_spec }}
{{ props.row.key }} </b-table-column>
</b-table-column> <b-table-column field="watcher_dbkey"
<b-table-column field="watcher_spec" label="DB Key"
label="Watcher Spec" v-slot="props">
% if not buefy_0_8: {{ props.row.watcher_dbkey }}
v-slot="props" </b-table-column>
% endif <b-table-column field="watcher_delay"
> label="Loop Delay"
{{ props.row.watcher_spec }} v-slot="props">
</b-table-column> {{ props.row.watcher_delay }} sec
<b-table-column field="watcher_dbkey" </b-table-column>
label="DB Key" <b-table-column field="watcher_retry_attempts"
% if not buefy_0_8: label="Attempts / Delay"
v-slot="props" v-slot="props">
% endif {{ props.row.watcher_retry_attempts }} / {{ props.row.watcher_retry_delay }} sec
> </b-table-column>
{{ props.row.watcher_dbkey }} <b-table-column field="watcher_default_runas"
</b-table-column> label="Default Runas"
<b-table-column field="watcher_delay" v-slot="props">
label="Loop Delay" {{ props.row.watcher_default_runas }}
% if not buefy_0_8: </b-table-column>
v-slot="props" <b-table-column label="Consumers"
% endif v-slot="props">
> {{ consumerShortList(props.row) }}
{{ props.row.watcher_delay }} sec </b-table-column>
</b-table-column>
<b-table-column field="watcher_retry_attempts"
label="Attempts / Delay"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.watcher_retry_attempts }} / {{ props.row.watcher_retry_delay }} sec
</b-table-column>
<b-table-column field="watcher_default_runas"
label="Default Runas"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.watcher_default_runas }}
</b-table-column>
<b-table-column label="Consumers"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ consumerShortList(props.row) }}
</b-table-column>
## <b-table-column field="notes" label="Notes"> ## <b-table-column field="notes" label="Notes">
## TODO ## TODO
## ## {{ props.row.notes }} ## ## {{ props.row.notes }}
## </b-table-column> ## </b-table-column>
<b-table-column field="enabled" <b-table-column field="enabled"
label="Enabled" label="Enabled"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.enabled ? "Yes" : "No" }}
% endif </b-table-column>
> <b-table-column label="Actions"
{{ props.row.enabled ? "Yes" : "No" }} v-slot="props"
</b-table-column> v-if="useProfileSettings">
<b-table-column label="Actions" <a href="#"
% if not buefy_0_8: class="grid-action"
v-slot="props" @click.prevent="editProfile(props.row)">
% endif <i class="fas fa-edit"></i>
v-if="useProfileSettings"> Edit
<a href="#" </a>
class="grid-action" &nbsp;
@click.prevent="editProfile(props.row)"> <a href="#"
<i class="fas fa-edit"></i> class="grid-action has-text-danger"
Edit @click.prevent="deleteProfile(props.row)">
</a> <i class="fas fa-trash"></i>
&nbsp; Delete
<a href="#" </a>
class="grid-action has-text-danger" </b-table-column>
@click.prevent="deleteProfile(props.row)">
<i class="fas fa-trash"></i>
Delete
</a>
</b-table-column>
% if buefy_0_8:
</template>
% endif
<template slot="empty"> <template slot="empty">
<section class="section"> <section class="section">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">
@ -327,46 +295,31 @@
<b-table :data="editingProfilePendingWatcherKwargs" <b-table :data="editingProfilePendingWatcherKwargs"
style="margin-left: 1rem;"> style="margin-left: 1rem;">
% if buefy_0_8: <b-table-column field="key"
<template slot-scope="props"> label="Key"
% endif v-slot="props">
<b-table-column field="key" {{ props.row.key }}
label="Key" </b-table-column>
% if not buefy_0_8: <b-table-column field="value"
v-slot="props" label="Value"
% endif v-slot="props">
> {{ props.row.value }}
{{ props.row.key }} </b-table-column>
</b-table-column> <b-table-column label="Actions"
<b-table-column field="value" v-slot="props">
label="Value" <a href="#"
% if not buefy_0_8: @click.prevent="editProfileWatcherKwarg(props.row)">
v-slot="props" <i class="fas fa-edit"></i>
% endif Edit
> </a>
{{ props.row.value }} &nbsp;
</b-table-column> <a href="#"
<b-table-column label="Actions" class="has-text-danger"
% if not buefy_0_8: @click.prevent="deleteProfileWatcherKwarg(props.row)">
v-slot="props" <i class="fas fa-trash"></i>
% endif Delete
> </a>
<a href="#" </b-table-column>
@click.prevent="editProfileWatcherKwarg(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
&nbsp;
<a href="#"
class="has-text-danger"
@click.prevent="deleteProfileWatcherKwarg(props.row)">
<i class="fas fa-trash"></i>
Delete
</a>
</b-table-column>
% if buefy_0_8:
</template>
% endif
<template slot="empty"> <template slot="empty">
<section class="section"> <section class="section">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">
@ -400,46 +353,31 @@
<b-table :data="editingProfilePendingConsumers" <b-table :data="editingProfilePendingConsumers"
v-if="!editingProfileWatcherConsumesSelf" v-if="!editingProfileWatcherConsumesSelf"
:row-class="(row, i) => row.enabled ? null : 'has-background-warning'"> :row-class="(row, i) => row.enabled ? null : 'has-background-warning'">
% if buefy_0_8: <b-table-column field="key"
<template slot-scope="props"> label="Consumer"
% endif v-slot="props">
<b-table-column field="key" {{ props.row.key }}
label="Consumer" </b-table-column>
% if not buefy_0_8: <b-table-column style="white-space: nowrap;"
v-slot="props" v-slot="props">
% endif {{ props.row.consumer_delay }} / {{ props.row.consumer_retry_attempts }} / {{ props.row.consumer_retry_delay }}
> </b-table-column>
{{ props.row.key }} <b-table-column label="Actions"
</b-table-column> v-slot="props">
<b-table-column style="white-space: nowrap;" <a href="#"
% if not buefy_0_8: class="grid-action"
v-slot="props" @click.prevent="editProfileConsumer(props.row)">
% endif <i class="fas fa-edit"></i>
> Edit
{{ props.row.consumer_delay }} / {{ props.row.consumer_retry_attempts }} / {{ props.row.consumer_retry_delay }} </a>
</b-table-column> &nbsp;
<b-table-column label="Actions" <a href="#"
% if not buefy_0_8: class="grid-action has-text-danger"
v-slot="props" @click.prevent="deleteProfileConsumer(props.row)">
% endif <i class="fas fa-trash"></i>
> Delete
<a href="#" </a>
class="grid-action" </b-table-column>
@click.prevent="editProfileConsumer(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
&nbsp;
<a href="#"
class="grid-action has-text-danger"
@click.prevent="deleteProfileConsumer(props.row)">
<i class="fas fa-trash"></i>
Delete
</a>
</b-table-column>
% if buefy_0_8:
</template>
% endif
<template slot="empty"> <template slot="empty">
<section class="section"> <section class="section">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">

View file

@ -49,123 +49,75 @@
<b-field label="Watcher Status"> <b-field label="Watcher Status">
<b-table :data="watchers"> <b-table :data="watchers">
% if buefy_0_8: <b-table-column field="key"
<template slot-scope="props"> label="Watcher"
% endif v-slot="props">
<b-table-column field="key" {{ props.row.key }}
label="Watcher" </b-table-column>
% if not buefy_0_8: <b-table-column field="spec"
v-slot="props" label="Spec"
% endif v-slot="props">
> {{ props.row.spec }}
{{ props.row.key }} </b-table-column>
</b-table-column> <b-table-column field="dbkey"
<b-table-column field="spec" label="DB Key"
label="Spec" v-slot="props">
% if not buefy_0_8: {{ props.row.dbkey }}
v-slot="props" </b-table-column>
% endif <b-table-column field="delay"
> label="Delay"
{{ props.row.spec }} v-slot="props">
</b-table-column> {{ props.row.delay }} second(s)
<b-table-column field="dbkey" </b-table-column>
label="DB Key" <b-table-column field="lastrun"
% if not buefy_0_8: label="Last Watched"
v-slot="props" v-slot="props">
% endif <span v-html="props.row.lastrun"></span>
> </b-table-column>
{{ props.row.dbkey }} <b-table-column field="status"
</b-table-column> label="Status"
<b-table-column field="delay" v-slot="props">
label="Delay" <span :class="props.row.status == 'okay' ? 'has-background-success' : 'has-background-warning'">
% if not buefy_0_8: {{ props.row.status }}
v-slot="props" </span>
% endif </b-table-column>
>
{{ props.row.delay }} second(s)
</b-table-column>
<b-table-column field="lastrun"
label="Last Watched"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.lastrun"></span>
</b-table-column>
<b-table-column field="status"
label="Status"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span :class="props.row.status == 'okay' ? 'has-background-success' : 'has-background-warning'">
{{ props.row.status }}
</span>
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
</b-field> </b-field>
<b-field label="Consumer Status"> <b-field label="Consumer Status">
<b-table :data="consumers"> <b-table :data="consumers">
% if buefy_0_8: <b-table-column field="key"
<template slot-scope="props"> label="Consumer"
% endif v-slot="props">
<b-table-column field="key" {{ props.row.key }}
label="Consumer" </b-table-column>
% if not buefy_0_8: <b-table-column field="spec"
v-slot="props" label="Spec"
% endif v-slot="props">
> {{ props.row.spec }}
{{ props.row.key }} </b-table-column>
</b-table-column> <b-table-column field="dbkey"
<b-table-column field="spec" label="DB Key"
label="Spec" v-slot="props">
% if not buefy_0_8: {{ props.row.dbkey }}
v-slot="props" </b-table-column>
% endif <b-table-column field="delay"
> label="Delay"
{{ props.row.spec }} v-slot="props">
</b-table-column> {{ props.row.delay }} second(s)
<b-table-column field="dbkey" </b-table-column>
label="DB Key" <b-table-column field="changes"
% if not buefy_0_8: label="Pending Changes"
v-slot="props" v-slot="props">
% endif {{ props.row.changes }}
> </b-table-column>
{{ props.row.dbkey }} <b-table-column field="status"
</b-table-column> label="Status"
<b-table-column field="delay" v-slot="props">
label="Delay" <span :class="props.row.status == 'okay' ? 'has-background-success' : 'has-background-warning'">
% if not buefy_0_8: {{ props.row.status }}
v-slot="props" </span>
% endif </b-table-column>
>
{{ props.row.delay }} second(s)
</b-table-column>
<b-table-column field="changes"
label="Pending Changes"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.changes }}
</b-table-column>
<b-table-column field="status"
label="Status"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span :class="props.row.status == 'okay' ? 'has-background-success' : 'has-background-warning'">
{{ props.row.status }}
</span>
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
</b-field> </b-field>
</%def> </%def>

View file

@ -108,70 +108,49 @@
<b-table <b-table
:data="new_table.columns"> :data="new_table.columns">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column field="name" <b-table-column field="name"
label="Name" label="Name"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.name }}
% endif </b-table-column>
>
{{ props.row.name }}
</b-table-column>
<b-table-column field="data_type" <b-table-column field="data_type"
label="Data Type" label="Data Type"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.data_type }}
% endif </b-table-column>
>
{{ props.row.data_type }}
</b-table-column>
<b-table-column field="nullable" <b-table-column field="nullable"
label="Nullable" label="Nullable"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.nullable }}
% endif </b-table-column>
>
{{ props.row.nullable }}
</b-table-column>
<b-table-column field="description" <b-table-column field="description"
label="Description" label="Description"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.description }}
% endif </b-table-column>
>
{{ props.row.description }}
</b-table-column>
<b-table-column field="actions" <b-table-column field="actions"
label="Actions" label="Actions"
% if not buefy_0_8: v-slot="props">
v-slot="props" <a href="#" class="grid-action"
% endif @click.prevent="editColumnRow(props.row)">
> <i class="fas fa-edit"></i>
<a href="#" class="grid-action" Edit
@click.prevent="editColumnRow(props.row)"> </a>
<i class="fas fa-edit"></i> &nbsp;
Edit
</a>
&nbsp;
<a href="#" class="grid-action has-text-danger" <a href="#" class="grid-action has-text-danger"
@click.prevent="deleteColumn(props.index)"> @click.prevent="deleteColumn(props.index)">
<i class="fas fa-trash"></i> <i class="fas fa-trash"></i>
Delete Delete
</a> </a>
&nbsp; &nbsp;
</b-table-column> </b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
<b-modal has-modal-card <b-modal has-modal-card

View file

@ -20,71 +20,60 @@
% endif % endif
> >
% if buefy_0_8: % for i, column in enumerate(grid_columns):
<template slot-scope="props"> <b-table-column field="${column['field']}"
% endif % if not empty_labels:
% for i, column in enumerate(grid_columns): label="${column['label']}"
<b-table-column field="${column['field']}" % elif i > 0:
% if not empty_labels: label=" "
label="${column['label']}" % endif
% elif i > 0: v-slot="props"
label=" " ${'sortable' if column['sortable'] else ''}>
% endif % if empty_labels and i == 0:
% if not buefy_0_8: <template slot="header" slot-scope="{ column }"></template>
v-slot="props" % endif
% endif % if grid.is_linked(column['field']):
${'sortable' if column['sortable'] else ''}> <a :href="props.row._action_url_view"
% if empty_labels and i == 0: v-html="props.row.${column['field']}"
<template slot="header" slot-scope="{ column }"></template> % if view_click_handler:
% endif @click.prevent="${view_click_handler}"
% if grid.is_linked(column['field']): % endif
<a :href="props.row._action_url_view" >
v-html="props.row.${column['field']}" </a>
% if view_click_handler: % elif grid.has_click_handler(column['field']):
@click.prevent="${view_click_handler}" <span>
% endif <a href="#"
> @click.prevent="${grid.click_handlers[column['field']]}"
v-html="props.row.${column['field']}">
</a> </a>
% elif grid.has_click_handler(column['field']): </span>
<span> % else:
<a href="#" <span v-html="props.row.${column['field']}"></span>
@click.prevent="${grid.click_handlers[column['field']]}" % endif
v-html="props.row.${column['field']}"> </b-table-column>
</a> % endfor
</span>
% else:
<span v-html="props.row.${column['field']}"></span>
% endif
</b-table-column>
% endfor
% if grid.main_actions or grid.more_actions: % if grid.main_actions or grid.more_actions:
<b-table-column field="actions" <b-table-column field="actions"
label="Actions" label="Actions"
% if not buefy_0_8: v-slot="props">
v-slot="props" % for action in grid.main_actions:
% endif <a :href="props.row._action_url_${action.key}"
> % if action.link_class:
% for action in grid.main_actions: class="${action.link_class}"
<a :href="props.row._action_url_${action.key}" % else:
% if action.link_class: class="grid-action${' has-text-danger' if action.key == 'delete' else ''}"
class="${action.link_class}" % endif
% else: % if action.click_handler:
class="grid-action${' has-text-danger' if action.key == 'delete' else ''}" @click.prevent="${action.click_handler}"
% endif % endif
% if action.click_handler: >
@click.prevent="${action.click_handler}" <i class="fas fa-${action.icon}"></i>
% endif ${action.label}
> </a>
<i class="fas fa-${action.icon}"></i> &nbsp;
${action.label} % endfor
</a> </b-table-column>
&nbsp;
% endfor
</b-table-column>
% endif
% if buefy_0_8:
</template>
% endif % endif
<template slot="empty"> <template slot="empty">

View file

@ -218,60 +218,49 @@
:hoverable="true" :hoverable="true"
:narrowed="true"> :narrowed="true">
% if buefy_0_8: % for column in grid_columns:
<template slot-scope="props"> <b-table-column field="${column['field']}"
% endif label="${column['label']}"
% for column in grid_columns: v-slot="props"
<b-table-column field="${column['field']}" :sortable="${json.dumps(column['sortable'])}"
label="${column['label']}" % if grid.is_searchable(column['field']):
% if not buefy_0_8: searchable
v-slot="props" % endif
% endif cell-class="c_${column['field']}"
:sortable="${json.dumps(column['sortable'])}" % if grid.has_click_handler(column['field']):
% if grid.is_searchable(column['field']): @click.native="${grid.click_handlers[column['field']]}"
searchable % endif
% endif :visible="${json.dumps(column['visible'])}">
cell-class="c_${column['field']}" % if column['field'] in grid.raw_renderers:
% if grid.has_click_handler(column['field']): ${grid.raw_renderers[column['field']]()}
@click.native="${grid.click_handlers[column['field']]}" % elif grid.is_linked(column['field']):
% endif <a :href="props.row._action_url_view" v-html="props.row.${column['field']}"></a>
:visible="${json.dumps(column['visible'])}"> % else:
% if column['field'] in grid.raw_renderers: <span v-html="props.row.${column['field']}"></span>
${grid.raw_renderers[column['field']]()} % endif
% elif grid.is_linked(column['field']): </b-table-column>
<a :href="props.row._action_url_view" v-html="props.row.${column['field']}"></a> % endfor
% else:
<span v-html="props.row.${column['field']}"></span>
% endif
</b-table-column>
% endfor
% if grid.main_actions or grid.more_actions: % if grid.main_actions or grid.more_actions:
<b-table-column field="actions" <b-table-column field="actions"
label="Actions" label="Actions"
% if not buefy_0_8: v-slot="props">
v-slot="props" ## TODO: we do not currently differentiate for "main vs. more"
% endif ## here, but ideally we would tuck "more" away in a drawer etc.
> % for action in grid.main_actions + grid.more_actions:
## TODO: we do not currently differentiate for "main vs. more" <a v-if="props.row._action_url_${action.key}"
## here, but ideally we would tuck "more" away in a drawer etc. :href="props.row._action_url_${action.key}"
% for action in grid.main_actions + grid.more_actions: class="grid-action${' has-text-danger' if action.key == 'delete' else ''} ${action.link_class or ''}"
<a v-if="props.row._action_url_${action.key}" % if action.click_handler:
:href="props.row._action_url_${action.key}" @click.prevent="${action.click_handler}"
class="grid-action${' has-text-danger' if action.key == 'delete' else ''} ${action.link_class or ''}" % endif
% if action.click_handler: >
@click.prevent="${action.click_handler}" ${action.render_icon()|n}
% endif ${action.render_label()|n}
> </a>
${action.render_icon()|n} &nbsp;
${action.render_label()|n} % endfor
</a> </b-table-column>
&nbsp;
% endfor
</b-table-column>
% endif
% if buefy_0_8:
</template>
% endif % endif
<template #empty> <template #empty>

View file

@ -10,85 +10,64 @@
narrowed narrowed
icon-pack="fas" icon-pack="fas"
:default-sort="['host_title', 'asc']"> :default-sort="['host_title', 'asc']">
% if buefy_0_8: <b-table-column field="host_title"
<template slot-scope="props"> label="Data Source"
% endif v-slot="props"
<b-table-column field="host_title" sortable>
label="Data Source" {{ props.row.host_title }}
% if not buefy_0_8: </b-table-column>
v-slot="props" <b-table-column field="local_title"
% endif label="Data Target"
sortable> v-slot="props"
{{ props.row.host_title }} sortable>
</b-table-column> {{ props.row.local_title }}
<b-table-column field="local_title" </b-table-column>
label="Data Target" <b-table-column field="direction"
% if not buefy_0_8: label="Direction"
v-slot="props" v-slot="props"
% endif sortable>
sortable> {{ props.row.direction_display }}
{{ props.row.local_title }} </b-table-column>
</b-table-column> <b-table-column field="handler_spec"
<b-table-column field="direction" label="Handler Spec"
label="Direction" v-slot="props"
% if not buefy_0_8: sortable>
v-slot="props" {{ props.row.handler_spec }}
% endif </b-table-column>
sortable> <b-table-column field="cmd"
{{ props.row.direction_display }} label="Command"
</b-table-column> v-slot="props"
<b-table-column field="handler_spec" sortable>
label="Handler Spec" {{ props.row.command }} {{ props.row.subcommand }}
% if not buefy_0_8: </b-table-column>
v-slot="props" <b-table-column field="runas"
% endif label="Default Runas"
sortable> v-slot="props"
{{ props.row.handler_spec }} sortable>
</b-table-column> {{ props.row.default_runas }}
<b-table-column field="cmd" </b-table-column>
label="Command" <b-table-column label="Actions"
% if not buefy_0_8: v-slot="props">
v-slot="props" <a href="#" class="grid-action"
% endif @click.prevent="editHandler(props.row)">
sortable> <i class="fas fa-edit"></i>
{{ props.row.command }} {{ props.row.subcommand }} Edit
</b-table-column> </a>
<b-table-column field="runas" </b-table-column>
label="Default Runas" <template slot="empty">
% if not buefy_0_8: <section class="section">
v-slot="props" <div class="content has-text-grey has-text-centered">
% endif <p>
sortable> <b-icon
{{ props.row.default_runas }} pack="fas"
</b-table-column> icon="fas fa-sad-tear"
<b-table-column label="Actions" size="is-large">
% if not buefy_0_8: </b-icon>
v-slot="props" </p>
% endif <p>Nothing here.</p>
> </div>
<a href="#" class="grid-action" </section>
@click.prevent="editHandler(props.row)"> </template>
<i class="fas fa-edit"></i>
Edit
</a>
</b-table-column>
% if buefy_0_8:
</template>
% endif
<template slot="empty">
<section class="section">
<div class="content has-text-grey has-text-centered">
<p>
<b-icon
pack="fas"
icon="fas fa-sad-tear"
size="is-large">
</b-icon>
</p>
<p>Nothing here.</p>
</div>
</section>
</template>
</b-table> </b-table>
<b-modal :active.sync="editHandlerShowDialog"> <b-modal :active.sync="editHandlerShowDialog">

View file

@ -23,67 +23,46 @@
<div class="block" style="padding-left: 2rem; display: flex;"> <div class="block" style="padding-left: 2rem; display: flex;">
<b-table :data="overnightTasks"> <b-table :data="overnightTasks">
% if buefy_0_8: <!-- <b-table-column field="key" -->
<template slot-scope="props"> <!-- label="Key" -->
% endif <!-- sortable> -->
<!-- <b-table-column field="key" --> <!-- {{ props.row.key }} -->
<!-- label="Key" --> <!-- </b-table-column> -->
<!-- sortable> --> <b-table-column field="key"
<!-- {{ props.row.key }} --> label="Key"
<!-- </b-table-column> --> v-slot="props">
<b-table-column field="key" {{ props.row.key }}
label="Key" </b-table-column>
% if not buefy_0_8: <b-table-column field="description"
v-slot="props" label="Description"
% endif v-slot="props">
> {{ props.row.description }}
{{ props.row.key }} </b-table-column>
</b-table-column> <b-table-column field="class_name"
<b-table-column field="description" label="Class Name"
label="Description" v-slot="props">
% if not buefy_0_8: {{ props.row.class_name }}
v-slot="props" </b-table-column>
% endif <b-table-column field="script"
> label="Script"
{{ props.row.description }} v-slot="props">
</b-table-column> {{ props.row.script }}
<b-table-column field="class_name" </b-table-column>
label="Class Name" <b-table-column label="Actions"
% if not buefy_0_8: v-slot="props">
v-slot="props" <a href="#"
% endif @click.prevent="overnightTaskEdit(props.row)">
> <i class="fas fa-edit"></i>
{{ props.row.class_name }} Edit
</b-table-column> </a>
<b-table-column field="script" &nbsp;
label="Script" <a href="#"
% if not buefy_0_8: class="has-text-danger"
v-slot="props" @click.prevent="overnightTaskDelete(props.row)">
% endif <i class="fas fa-trash"></i>
> Delete
{{ props.row.script }} </a>
</b-table-column> </b-table-column>
<b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#"
@click.prevent="overnightTaskEdit(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
&nbsp;
<a href="#"
class="has-text-danger"
@click.prevent="overnightTaskDelete(props.row)">
<i class="fas fa-trash"></i>
Delete
</a>
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
<b-modal has-modal-card <b-modal has-modal-card
@ -161,70 +140,46 @@
<div class="block" style="padding-left: 2rem; display: flex;"> <div class="block" style="padding-left: 2rem; display: flex;">
<b-table :data="backfillTasks"> <b-table :data="backfillTasks">
% if buefy_0_8: <b-table-column field="key"
<template slot-scope="props"> label="Key"
% endif v-slot="props">
<b-table-column field="key" {{ props.row.key }}
label="Key" </b-table-column>
% if not buefy_0_8: <b-table-column field="description"
v-slot="props" label="Description"
% endif v-slot="props">
> {{ props.row.description }}
{{ props.row.key }} </b-table-column>
</b-table-column> <b-table-column field="script"
<b-table-column field="description" label="Script"
label="Description" v-slot="props">
% if not buefy_0_8: {{ props.row.script }}
v-slot="props" </b-table-column>
% endif <b-table-column field="forward"
> label="Orientation"
{{ props.row.description }} v-slot="props">
</b-table-column> {{ props.row.forward ? "Forward" : "Backward" }}
<b-table-column field="script" </b-table-column>
label="Script" <b-table-column field="target_date"
% if not buefy_0_8: label="Target Date"
v-slot="props" v-slot="props">
% endif {{ props.row.target_date }}
> </b-table-column>
{{ props.row.script }} <b-table-column label="Actions"
</b-table-column> v-slot="props">
<b-table-column field="forward" <a href="#"
label="Orientation" @click.prevent="backfillTaskEdit(props.row)">
% if not buefy_0_8: <i class="fas fa-edit"></i>
v-slot="props" Edit
% endif </a>
> &nbsp;
{{ props.row.forward ? "Forward" : "Backward" }} <a href="#"
</b-table-column> class="has-text-danger"
<b-table-column field="target_date" @click.prevent="backfillTaskDelete(props.row)">
label="Target Date" <i class="fas fa-trash"></i>
% if not buefy_0_8: Delete
v-slot="props" </a>
% endif </b-table-column>
>
{{ props.row.target_date }}
</b-table-column>
<b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#"
@click.prevent="backfillTaskEdit(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
&nbsp;
<a href="#"
class="has-text-danger"
@click.prevent="backfillTaskDelete(props.row)">
<i class="fas fa-trash"></i>
Delete
</a>
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
<b-modal has-modal-card <b-modal has-modal-card

View file

@ -54,99 +54,81 @@
<h3 class="block is-size-3">Overnight Tasks</h3> <h3 class="block is-size-3">Overnight Tasks</h3>
<b-table :data="overnightTasks" hoverable> <b-table :data="overnightTasks" hoverable>
% if buefy_0_8: <b-table-column field="description"
<template slot-scope="props"> label="Description"
% endif v-slot="props">
<b-table-column field="description" {{ props.row.description }}
label="Description" </b-table-column>
% if not buefy_0_8: <b-table-column field="script"
v-slot="props" label="Command"
% endif v-slot="props">
> {{ props.row.script || props.row.class_name }}
{{ props.row.description }} </b-table-column>
</b-table-column> <b-table-column field="last_date"
<b-table-column field="script" label="Last Date"
label="Command" v-slot="props">
% if not buefy_0_8: <span :class="overnightTextClass(props.row)">
v-slot="props" {{ props.row.last_date || "never!" }}
% endif </span>
> </b-table-column>
{{ props.row.script || props.row.class_name }} <b-table-column label="Actions"
</b-table-column> v-slot="props">
<b-table-column field="last_date" <b-button type="is-primary"
label="Last Date" icon-pack="fas"
% if not buefy_0_8: icon-left="arrow-circle-right"
v-slot="props" @click="overnightTaskLaunchInit(props.row)">
% endif Launch
> </b-button>
<span :class="overnightTextClass(props.row)"> <b-modal has-modal-card
{{ props.row.last_date || "never!" }} :active.sync="overnightTaskShowLaunchDialog">
</span> <div class="modal-card">
</b-table-column>
<b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<b-button type="is-primary"
icon-pack="fas"
icon-left="arrow-circle-right"
@click="overnightTaskLaunchInit(props.row)">
Launch
</b-button>
<b-modal has-modal-card
:active.sync="overnightTaskShowLaunchDialog">
<div class="modal-card">
<header class="modal-card-head"> <header class="modal-card-head">
<p class="modal-card-title">Launch Overnight Task</p> <p class="modal-card-title">Launch Overnight Task</p>
</header> </header>
<section class="modal-card-body" <section class="modal-card-body"
v-if="overnightTask"> v-if="overnightTask">
<b-field label="Task" horizontal> <b-field label="Task" horizontal>
<span>{{ overnightTask.description }}</span> <span>{{ overnightTask.description }}</span>
</b-field> </b-field>
<b-field label="Last Date" horizontal> <b-field label="Last Date" horizontal>
<span :class="overnightTextClass(overnightTask)"> <span :class="overnightTextClass(overnightTask)">
{{ overnightTask.last_date || "n/a" }} {{ overnightTask.last_date || "n/a" }}
</span> </span>
</b-field> </b-field>
<b-field label="Next Date" horizontal> <b-field label="Next Date" horizontal>
<span> <span>
${rattail_app.render_date(rattail_app.yesterday())} (yesterday) ${rattail_app.render_date(rattail_app.yesterday())} (yesterday)
</span> </span>
</b-field> </b-field>
<p class="block"> <p class="block">
Launching this task will schedule it to begin Launching this task will schedule it to begin
within one minute.&nbsp; See the Luigi Task within one minute.&nbsp; See the Luigi Task
Visualizer after that, for current status. Visualizer after that, for current status.
</p> </p>
</section> </section>
<footer class="modal-card-foot"> <footer class="modal-card-foot">
<b-button @click="overnightTaskShowLaunchDialog = false"> <b-button @click="overnightTaskShowLaunchDialog = false">
Cancel Cancel
</b-button> </b-button>
<b-button type="is-primary" <b-button type="is-primary"
icon-pack="fas" icon-pack="fas"
icon-left="arrow-circle-right" icon-left="arrow-circle-right"
@click="overnightTaskLaunchSubmit()" @click="overnightTaskLaunchSubmit()"
:disabled="overnightTaskLaunching"> :disabled="overnightTaskLaunching">
{{ overnightTaskLaunching ? "Working, please wait..." : "Launch" }} {{ overnightTaskLaunching ? "Working, please wait..." : "Launch" }}
</b-button> </b-button>
</footer> </footer>
</div> </div>
</b-modal> </b-modal>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template>
% endif
<template #empty> <template #empty>
<p class="block">No tasks defined.</p> <p class="block">No tasks defined.</p>
</template> </template>
@ -159,66 +141,42 @@
<h3 class="block is-size-3">Backfill Tasks</h3> <h3 class="block is-size-3">Backfill Tasks</h3>
<b-table :data="backfillTasks" hoverable> <b-table :data="backfillTasks" hoverable>
% if buefy_0_8: <b-table-column field="description"
<template slot-scope="props"> label="Description"
% endif v-slot="props">
<b-table-column field="description" {{ props.row.description }}
label="Description" </b-table-column>
% if not buefy_0_8: <b-table-column field="script"
v-slot="props" label="Script"
% endif v-slot="props">
> {{ props.row.script }}
{{ props.row.description }} </b-table-column>
</b-table-column> <b-table-column field="forward"
<b-table-column field="script" label="Orientation"
label="Script" v-slot="props">
% if not buefy_0_8: {{ props.row.forward ? "Forward" : "Backward" }}
v-slot="props" </b-table-column>
% endif <b-table-column field="last_date"
> label="Last Date"
{{ props.row.script }} v-slot="props">
</b-table-column> <span :class="backfillTextClass(props.row)">
<b-table-column field="forward" {{ props.row.last_date }}
label="Orientation" </span>
% if not buefy_0_8: </b-table-column>
v-slot="props" <b-table-column field="target_date"
% endif label="Target Date"
> v-slot="props">
{{ props.row.forward ? "Forward" : "Backward" }} {{ props.row.target_date }}
</b-table-column> </b-table-column>
<b-table-column field="last_date" <b-table-column label="Actions"
label="Last Date" v-slot="props">
% if not buefy_0_8: <b-button type="is-primary"
v-slot="props" icon-pack="fas"
% endif icon-left="arrow-circle-right"
> @click="backfillTaskLaunch(props.row)">
<span :class="backfillTextClass(props.row)"> Launch
{{ props.row.last_date }} </b-button>
</span> </b-table-column>
</b-table-column>
<b-table-column field="target_date"
label="Target Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.target_date }}
</b-table-column>
<b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<b-button type="is-primary"
icon-pack="fas"
icon-left="arrow-circle-right"
@click="backfillTaskLaunch(props.row)">
Launch
</b-button>
</b-table-column>
% if buefy_0_8:
</template>
% endif
<template #empty> <template #empty>
<p class="block">No tasks defined.</p> <p class="block">No tasks defined.</p>
</template> </template>

View file

@ -22,36 +22,21 @@
<section class="modal-card-body"> <section class="modal-card-body">
<b-table :data="mergeRequestRows" <b-table :data="mergeRequestRows"
striped hoverable> striped hoverable>
% if buefy_0_8: <b-table-column field="customer_number"
<template slot-scope="props"> label="Customer #"
% endif v-slot="props">
<b-table-column field="customer_number" <span v-html="props.row.customer_number"></span>
label="Customer #" </b-table-column>
% if not buefy_0_8: <b-table-column field="first_name"
v-slot="props" label="First Name"
% endif v-slot="props">
> <span v-html="props.row.first_name"></span>
<span v-html="props.row.customer_number"></span> </b-table-column>
</b-table-column> <b-table-column field="last_name"
<b-table-column field="first_name" label="Last Name"
label="First Name" v-slot="props">
% if not buefy_0_8: <span v-html="props.row.last_name"></span>
v-slot="props" </b-table-column>
% endif
>
<span v-html="props.row.first_name"></span>
</b-table-column>
<b-table-column field="last_name"
label="Last Name"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.last_name"></span>
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
</section> </section>

View file

@ -296,63 +296,45 @@
% endif % endif
<b-table :data="person.phones"> <b-table :data="person.phones">
% if buefy_0_8:
<template slot-scope="props"> <b-table-column field="preference"
label="Preferred"
v-slot="props">
{{ props.row.preferred ? "Yes" : "" }}
</b-table-column>
<b-table-column field="type"
label="Type"
v-slot="props">
{{ props.row.type }}
</b-table-column>
<b-table-column field="number"
label="Number"
v-slot="props">
{{ props.row.number }}
</b-table-column>
% if request.has_perm('people_profile.edit_person'):
<b-table-column label="Actions"
v-slot="props">
<a href="#" @click.prevent="editPhoneInit(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
<a href="#" @click.prevent="deletePhone(props.row)"
class="has-text-danger">
<i class="fas fa-trash"></i>
Delete
</a>
<a href="#" @click.prevent="setPreferredPhone(props.row)"
v-if="!props.row.preferred">
<i class="fas fa-star"></i>
Set Preferred
</a>
</b-table-column>
% endif % endif
<b-table-column field="preference"
label="Preferred"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.preferred ? "Yes" : "" }}
</b-table-column>
<b-table-column field="type"
label="Type"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.type }}
</b-table-column>
<b-table-column field="number"
label="Number"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.number }}
</b-table-column>
% if request.has_perm('people_profile.edit_person'):
<b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" @click.prevent="editPhoneInit(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
<a href="#" @click.prevent="deletePhone(props.row)"
class="has-text-danger">
<i class="fas fa-trash"></i>
Delete
</a>
<a href="#" @click.prevent="setPreferredPhone(props.row)"
v-if="!props.row.preferred">
<i class="fas fa-star"></i>
Set Preferred
</a>
</b-table-column>
% endif
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
</div> </div>
@ -440,72 +422,51 @@
% endif % endif
<b-table :data="person.emails"> <b-table :data="person.emails">
% if buefy_0_8:
<template slot-scope="props"> <b-table-column field="preference"
label="Preferred"
v-slot="props">
{{ props.row.preferred ? "Yes" : "" }}
</b-table-column>
<b-table-column field="type"
label="Type"
v-slot="props">
{{ props.row.type }}
</b-table-column>
<b-table-column field="address"
label="Address"
v-slot="props">
{{ props.row.address }}
</b-table-column>
<b-table-column field="invalid"
label="Invalid?"
v-slot="props">
<span v-if="props.row.invalid" class="has-text-danger has-text-weight-bold">Invalid</span>
</b-table-column>
% if request.has_perm('people_profile.edit_person'):
<b-table-column label="Actions"
v-slot="props">
<a href="#" @click.prevent="editEmailInit(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
<a href="#" @click.prevent="deleteEmail(props.row)"
class="has-text-danger">
<i class="fas fa-trash"></i>
Delete
</a>
<a href="#" @click.prevent="setPreferredEmail(props.row)"
v-if="!props.row.preferred">
<i class="fas fa-star"></i>
Set Preferred
</a>
</b-table-column>
% endif % endif
<b-table-column field="preference"
label="Preferred"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.preferred ? "Yes" : "" }}
</b-table-column>
<b-table-column field="type"
label="Type"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.type }}
</b-table-column>
<b-table-column field="address"
label="Address"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.address }}
</b-table-column>
<b-table-column field="invalid"
label="Invalid?"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-if="props.row.invalid" class="has-text-danger has-text-weight-bold">Invalid</span>
</b-table-column>
% if request.has_perm('people_profile.edit_person'):
<b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" @click.prevent="editEmailInit(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
<a href="#" @click.prevent="deleteEmail(props.row)"
class="has-text-danger">
<i class="fas fa-trash"></i>
Delete
</a>
<a href="#" @click.prevent="setPreferredEmail(props.row)"
v-if="!props.row.preferred">
<i class="fas fa-star"></i>
Set Preferred
</a>
</b-table-column>
% endif
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
</div> </div>
@ -810,45 +771,30 @@
<br /> <br />
<b-table :data="employeeHistory"> <b-table :data="employeeHistory">
% if buefy_0_8:
<template slot-scope="props"> <b-table-column field="start_date"
label="Start Date"
v-slot="props">
{{ props.row.start_date }}
</b-table-column>
<b-table-column field="end_date"
label="End Date"
v-slot="props">
{{ props.row.end_date }}
</b-table-column>
% if request.has_perm('people_profile.edit_employee_history'):
<b-table-column field="actions"
label="Actions"
v-slot="props">
<a href="#" @click.prevent="editEmployeeHistory(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
</b-table-column>
% endif % endif
<b-table-column field="start_date"
label="Start Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.start_date }}
</b-table-column>
<b-table-column field="end_date"
label="End Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.end_date }}
</b-table-column>
% if request.has_perm('people_profile.edit_employee_history'):
<b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" @click.prevent="editEmployeeHistory(props.row)">
<i class="fas fa-edit"></i>
Edit
</a>
</b-table-column>
% endif
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
</div> </div>
@ -1653,11 +1599,7 @@
<script type="text/javascript"> <script type="text/javascript">
let ProfileInfoData = { let ProfileInfoData = {
% if buefy_0_8:
activeTab: location.hash ? parseInt(location.hash.substring(1)) : undefined,
% else:
activeTab: location.hash ? location.hash.substring(1) : undefined, activeTab: location.hash ? location.hash.substring(1) : undefined,
% endif
person: ${json.dumps(person_data)|n}, person: ${json.dumps(person_data)|n},
customers: ${json.dumps(customers_data)|n}, customers: ${json.dumps(customers_data)|n},
member: null, // TODO member: null, // TODO
@ -1692,11 +1634,7 @@
}, },
activeTabChanged(value) { activeTabChanged(value) {
% if buefy_0_8:
location.hash = value.toString()
% else:
location.hash = value location.hash = value
% endif
this.activeTabChangedExtra(value) this.activeTabChangedExtra(value)
}, },

View file

@ -52,103 +52,70 @@
icon-pack="fas" icon-pack="fas"
:loading="searchResultsLoading" :loading="searchResultsLoading"
:selected.sync="searchResultSelected"> :selected.sync="searchResultSelected">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column label="${request.rattail_config.product_key_title()}" <b-table-column label="${request.rattail_config.product_key_title()}"
field="product_key" field="product_key"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.product_key }}
% endif </b-table-column>
>
{{ props.row.product_key }}
</b-table-column>
<b-table-column label="Brand" <b-table-column label="Brand"
field="brand_name" field="brand_name"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.brand_name }}
% endif </b-table-column>
>
{{ props.row.brand_name }}
</b-table-column>
<b-table-column label="Description" <b-table-column label="Description"
field="description" field="description"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.description }}
% endif {{ props.row.size }}
> </b-table-column>
{{ props.row.description }}
{{ props.row.size }}
</b-table-column>
<b-table-column label="Unit Price" <b-table-column label="Unit Price"
field="unit_price" field="unit_price"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.unit_price_display }}
% endif </b-table-column>
>
{{ props.row.unit_price_display }}
</b-table-column>
<b-table-column label="Sale Price" <b-table-column label="Sale Price"
field="sale_price" field="sale_price"
% if not buefy_0_8: v-slot="props">
v-slot="props" <span class="has-background-warning">
% endif {{ props.row.sale_price_display }}
> </span>
<span class="has-background-warning"> </b-table-column>
{{ props.row.sale_price_display }}
</span>
</b-table-column>
<b-table-column label="Sale Ends" <b-table-column label="Sale Ends"
field="sale_ends" field="sale_ends"
% if not buefy_0_8: v-slot="props">
v-slot="props" <span class="has-background-warning">
% endif {{ props.row.sale_ends_display }}
> </span>
<span class="has-background-warning"> </b-table-column>
{{ props.row.sale_ends_display }}
</span>
</b-table-column>
<b-table-column label="Department" <b-table-column label="Department"
field="department_name" field="department_name"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.department_name }}
% endif </b-table-column>
>
{{ props.row.department_name }}
</b-table-column>
<b-table-column label="Vendor" <b-table-column label="Vendor"
field="vendor_name" field="vendor_name"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.vendor_name }}
% endif </b-table-column>
>
{{ props.row.vendor_name }}
</b-table-column>
<b-table-column label="Actions" <b-table-column label="Actions"
% if not buefy_0_8: v-slot="props">
v-slot="props" <a :href="props.row.url"
% endif target="_blank"
> class="grid-action">
<a :href="props.row.url" <i class="fas fa-external-link-alt"></i>
target="_blank" View
class="grid-action"> </a>
<i class="fas fa-external-link-alt"></i> </b-table-column>
View
</a>
</b-table-column>
% if buefy_0_8:
</template>
% endif
<template slot="empty"> <template slot="empty">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">
<p> <p>

View file

@ -99,83 +99,59 @@
<b-table <b-table
:data="tableColumns"> :data="tableColumns">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column field="name" <b-table-column field="name"
label="Name" label="Name"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.name }}
% endif </b-table-column>
>
{{ props.row.name }}
</b-table-column>
<b-table-column field="data_type" <b-table-column field="data_type"
label="Data Type" label="Data Type"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ formatDataType(props.row.data_type) }}
% endif </b-table-column>
>
{{ formatDataType(props.row.data_type) }}
</b-table-column>
<b-table-column field="nullable" <b-table-column field="nullable"
label="Nullable" label="Nullable"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.nullable ? "Yes" : "No" }}
% endif </b-table-column>
>
{{ props.row.nullable ? "Yes" : "No" }}
</b-table-column>
<b-table-column field="versioned" <b-table-column field="versioned"
label="Versioned" label="Versioned"
:visible="tableVersioned" :visible="tableVersioned"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.versioned ? "Yes" : "No" }}
% endif </b-table-column>
>
{{ props.row.versioned ? "Yes" : "No" }}
</b-table-column>
<b-table-column field="description" <b-table-column field="description"
label="Description" label="Description"
% if not buefy_0_8: v-slot="props">
v-slot="props" {{ props.row.description }}
% endif </b-table-column>
>
{{ props.row.description }}
</b-table-column>
<b-table-column field="actions" <b-table-column field="actions"
label="Actions" label="Actions"
% if not buefy_0_8: v-slot="props">
v-slot="props" <a v-if="props.row.name != 'uuid'"
% endif href="#"
> @click.prevent="tableEditColumn(props.row)">
<a v-if="props.row.name != 'uuid'" <i class="fas fa-edit"></i>
href="#" Edit
@click.prevent="tableEditColumn(props.row)"> </a>
<i class="fas fa-edit"></i> &nbsp;
Edit
</a>
&nbsp;
<a v-if="props.row.name != 'uuid'" <a v-if="props.row.name != 'uuid'"
href="#" href="#"
class="has-text-danger" class="has-text-danger"
@click.prevent="tableDeleteColumn(props.index)"> @click.prevent="tableDeleteColumn(props.index)">
<i class="fas fa-trash"></i> <i class="fas fa-trash"></i>
Delete Delete
</a> </a>
&nbsp; &nbsp;
</b-table-column> </b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
<b-modal has-modal-card <b-modal has-modal-card

View file

@ -20,46 +20,31 @@
</p> </p>
<b-table :data="engines"> <b-table :data="engines">
% if buefy_0_8: <b-table-column field="key"
<template slot-scope="props"> label="DB Key"
% endif v-slot="props">
<b-table-column field="key" {{ props.row.key }}
label="DB Key" </b-table-column>
% if not buefy_0_8: <b-table-column field="oldest_date"
v-slot="props" label="Oldest Date"
% endif v-slot="props">
> <span v-if="props.row.error" class="has-text-danger">
{{ props.row.key }} error
</b-table-column> </span>
<b-table-column field="oldest_date" <span v-if="!props.row.error">
label="Oldest Date" {{ props.row.oldest_date }}
% if not buefy_0_8: </span>
v-slot="props" </b-table-column>
% endif <b-table-column field="newest_date"
> label="Newest Date"
<span v-if="props.row.error" class="has-text-danger"> v-slot="props">
error <span v-if="props.row.error" class="has-text-danger">
</span> error
<span v-if="!props.row.error"> </span>
{{ props.row.oldest_date }} <span v-if="!props.row.error">
</span> {{ props.row.newest_date }}
</b-table-column> </span>
<b-table-column field="newest_date" </b-table-column>
label="Newest Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-if="props.row.error" class="has-text-danger">
error
</span>
<span v-if="!props.row.error">
{{ props.row.newest_date }}
</span>
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
</%def> </%def>

View file

@ -9,55 +9,40 @@
<b-table :data="upgradeSystems" <b-table :data="upgradeSystems"
sortable> sortable>
% if buefy_0_8: <b-table-column field="key"
<template slot-scope="props"> label="Key"
% endif v-slot="props"
<b-table-column field="key" sortable>
label="Key" {{ props.row.key }}
% if not buefy_0_8: </b-table-column>
v-slot="props" <b-table-column field="label"
% endif label="Label"
sortable> v-slot="props"
{{ props.row.key }} sortable>
</b-table-column> {{ props.row.label }}
<b-table-column field="label" </b-table-column>
label="Label" <b-table-column field="command"
% if not buefy_0_8: label="Command"
v-slot="props" v-slot="props"
% endif sortable>
sortable> {{ props.row.command }}
{{ props.row.label }} </b-table-column>
</b-table-column> <b-table-column label="Actions"
<b-table-column field="command" v-slot="props">
label="Command" <a href="#"
% if not buefy_0_8: @click.prevent="upgradeSystemEdit(props.row)">
v-slot="props" <i class="fas fa-edit"></i>
% endif Edit
sortable> </a>
{{ props.row.command }} &nbsp;
</b-table-column> <a href="#"
<b-table-column label="Actions" v-if="props.row.key != 'rattail'"
% if not buefy_0_8: class="has-text-danger"
v-slot="props" @click.prevent="updateSystemDelete(props.row)">
% endif <i class="fas fa-trash"></i>
> Delete
<a href="#" </a>
@click.prevent="upgradeSystemEdit(props.row)"> </b-table-column>
<i class="fas fa-edit"></i>
Edit
</a>
&nbsp;
<a href="#"
v-if="props.row.key != 'rattail'"
class="has-text-danger"
@click.prevent="updateSystemDelete(props.row)">
<i class="fas fa-trash"></i>
Delete
</a>
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table> </b-table>
<div style="margin-left: 1rem;"> <div style="margin-left: 1rem;">