Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions frontend/src/views/admin/AccountsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,6 @@
<div class="flex items-center gap-1.5" @click.stop>
<AccountStatusIndicator :account="row" @show-temp-unsched="handleShowTempUnsched" />
<AccountLastUpstreamError :account="row" />
<button @click.stop="handleToggleSchedulable(row)" :disabled="togglingSchedulable === row.id" class="relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:focus:ring-offset-dark-800" :class="[row.schedulable ? 'bg-primary-500 hover:bg-primary-600' : 'bg-gray-200 hover:bg-gray-300 dark:bg-dark-600 dark:hover:bg-dark-500']" :title="row.schedulable ? t('admin.accounts.schedulableEnabled') : t('admin.accounts.schedulableDisabled')">
<span class="pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out" :class="[row.schedulable ? 'translate-x-4' : 'translate-x-0']" />
</button>
</div>
</template>
<template #cell-schedulable="{ row }">
Expand Down Expand Up @@ -2100,12 +2097,12 @@ const allColumns = computed(() => {
{ key: 'id', label: t('admin.accounts.columns.id'), sortable: true },
{ key: 'platform_type', label: t('admin.accounts.columns.platformType'), sortable: false },
{ key: 'usage', label: t('admin.accounts.columns.usage'), sortable: false },
{ key: 'status', label: t('admin.accounts.columns.status'), sortable: true }
{ key: 'status', label: t('admin.accounts.columns.status'), sortable: true },
{ key: 'schedulable', label: t('admin.accounts.columns.schedulable'), sortable: true }
]
c.push(
{ key: 'taxonomy_route', label: t('admin.accounts.columns.classificationRoute'), sortable: false },
{ key: 'capacity', label: t('admin.accounts.columns.capacity'), sortable: false },
{ key: 'schedulable', label: t('admin.accounts.columns.schedulable'), sortable: true },
{ key: 'today_stats', label: t('admin.accounts.columns.todayStats'), sortable: false }
)
if (!authStore.isSimpleMode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,10 @@ describe('admin AccountsView Cockpit console', () => {
it('shows usage in the default table order', async () => {
const wrapper = mountView()
await flushPromises()
// upstream v0.2.8 defaults: only today_stats, proxy, notes, scheduler_score and rate_multiplier are hidden
// upstream defaults: only today_stats, proxy, notes, scheduler_score and rate_multiplier are hidden;
// the scheduling switch sits right after the status column, as upstream orders them
expect(wrapper.get('[data-test="view-table"]').attributes('data-columns')).toBe(
'select,name,id,platform_type,usage,status,taxonomy_route,capacity,schedulable,groups,priority,' +
'select,name,id,platform_type,usage,status,schedulable,taxonomy_route,capacity,groups,priority,' +
'upstream_billing_rate,last_used_at,created_at,expires_at,actions'
)
})
Expand Down
Loading