{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'OCR模型免费转Markdown' && linkText !== 'OCR模型免费转Markdown' ) { link.textContent = 'OCR模型免费转Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== '模型下载攻略' ) { link.textContent = '模型下载攻略'; link.href = '/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'OCR模型免费转Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); \\n+\\n+\\n+\\n\"]"},"concern_count":{"kind":"number","value":1,"string":"1"},"shas":{"kind":"string","value":"[\"4be836f5655fb5356fde5ddd7437125f8574705d\"]"},"types":{"kind":"string","value":"[\"refactor\"]"}}},{"rowIdx":234,"cells":{"commit_message":{"kind":"string","value":"create dashboards from imported templates"},"diff":{"kind":"string","value":"[\"diff --git a/CHANGELOG.md b/CHANGELOG.md\\nindex 590f5ea..bd74e95 100644\\n--- a/CHANGELOG.md\\n+++ b/CHANGELOG.md\\n@@ -1,6 +1,7 @@\\n ## v2.0.0-alpha.6 [unreleased]\\n \\n ### Features\\n+1. [12496](https://github.com/influxdata/influxdb/pull/12496): Add ability to import a dashboard\\n \\n ### Bug Fixes\\n \\ndiff --git a/ui/src/dashboards/actions/v2/index.ts b/ui/src/dashboards/actions/v2/index.ts\\nindex ad0d13d..35babc7 100644\\n--- a/ui/src/dashboards/actions/v2/index.ts\\n+++ b/ui/src/dashboards/actions/v2/index.ts\\n@@ -16,6 +16,7 @@ import {\\n removeDashboardLabels as removeDashboardLabelsAJAX,\\n updateView as updateViewAJAX,\\n } from 'src/dashboards/apis/v2'\\n+import {client} from 'src/utils/api'\\n \\n // Actions\\n import {notify} from 'src/shared/actions/notifications'\\n@@ -25,6 +26,10 @@ import {\\n DeleteTimeRangeAction,\\n } from 'src/dashboards/actions/v2/ranges'\\n import {setView, SetViewAction} from 'src/dashboards/actions/v2/views'\\n+import {\\n+ importDashboardSucceeded,\\n+ importDashboardFailed,\\n+} from 'src/shared/copy/notifications'\\n \\n // Utils\\n import {\\n@@ -38,7 +43,7 @@ import * as copy from 'src/shared/copy/notifications'\\n // Types\\n import {RemoteDataState} from 'src/types'\\n import {PublishNotificationAction} from 'src/types/actions/notifications'\\n-import {CreateCell} from '@influxdata/influx'\\n+import {CreateCell, IDashboardTemplate} from '@influxdata/influx'\\n import {Dashboard, NewView, Cell} from 'src/types/v2'\\n import {ILabel} from '@influxdata/influx'\\n \\n@@ -201,6 +206,19 @@ export const getDashboardsAsync = () => async (\\n }\\n }\\n \\n+export const createDashboardFromTemplate = (\\n+ template: IDashboardTemplate,\\n+ orgID: string\\n+) => async dispatch => {\\n+ try {\\n+ await client.dashboards.createFromTemplate(template, orgID)\\n+\\n+ dispatch(notify(importDashboardSucceeded()))\\n+ } catch (error) {\\n+ dispatch(notify(importDashboardFailed(error)))\\n+ }\\n+}\\n+\\n export const importDashboardAsync = (dashboard: Dashboard) => async (\\n dispatch: Dispatch\\n ): Promise => {\\ndiff --git a/ui/src/dashboards/components/ImportDashboardOverlay.tsx b/ui/src/dashboards/components/ImportDashboardOverlay.tsx\\nindex 37ef80b..84216c3 100644\\n--- a/ui/src/dashboards/components/ImportDashboardOverlay.tsx\\n+++ b/ui/src/dashboards/components/ImportDashboardOverlay.tsx\\n@@ -1,70 +1,80 @@\\n+// Libraries\\n import React, {PureComponent} from 'react'\\n import _ from 'lodash'\\n+import {connect} from 'react-redux'\\n \\n-import Container from 'src/clockface/components/overlays/OverlayContainer'\\n-import Heading from 'src/clockface/components/overlays/OverlayHeading'\\n-import Body from 'src/clockface/components/overlays/OverlayBody'\\n-import DragAndDrop from 'src/shared/components/DragAndDrop'\\n+// Constants\\n import {dashboardImportFailed} from 'src/shared/copy/notifications'\\n \\n-import {Dashboard} from 'src/types/v2'\\n-import {Notification} from 'src/types/notifications'\\n+// Actions\\n+import {notify as notifyAction} from 'src/shared/actions/notifications'\\n+import {getDashboardsAsync} from 'src/dashboards/actions/v2'\\n \\n-interface Props {\\n+// Types\\n+import ImportOverlay from 'src/shared/components/ImportOverlay'\\n+import {createDashboardFromTemplate as createDashboardFromTemplateAction} from 'src/dashboards/actions/v2'\\n+\\n+interface OwnProps {\\n onDismissOverlay: () => void\\n- onImportDashboard: (dashboard: Dashboard) => void\\n- notify: (message: Notification) => void\\n+ orgID: string\\n+ isVisible: boolean\\n+}\\n+interface DispatchProps {\\n+ notify: typeof notifyAction\\n+ createDashboardFromTemplate: typeof createDashboardFromTemplateAction\\n+ populateDashboards: typeof getDashboardsAsync\\n }\\n+\\n+type Props = OwnProps & DispatchProps\\n+\\n class ImportDashboardOverlay extends PureComponent {\\n constructor(props: Props) {\\n super(props)\\n }\\n \\n public render() {\\n- const {onDismissOverlay} = this.props\\n+ const {isVisible, onDismissOverlay} = this.props\\n \\n return (\\n- \\n- \\n- \\n- \\n- \\n- \\n+ \\n )\\n }\\n \\n- private get validFileExtension(): string {\\n- return '.json'\\n- }\\n-\\n- private handleUploadDashboard = (\\n- uploadContent: string,\\n- fileName: string\\n- ): void => {\\n- const {notify, onImportDashboard, onDismissOverlay} = this.props\\n- const fileExtensionRegex = new RegExp(`${this.validFileExtension}$`)\\n- if (!fileName.match(fileExtensionRegex)) {\\n- notify(dashboardImportFailed('Please import a JSON file'))\\n- return\\n- }\\n+ private handleUploadDashboard = async (\\n+ uploadContent: string\\n+ ): Promise => {\\n+ const {\\n+ notify,\\n+ createDashboardFromTemplate,\\n+ onDismissOverlay,\\n+ populateDashboards,\\n+ orgID,\\n+ } = this.props\\n \\n try {\\n- const {dashboard} = JSON.parse(uploadContent)\\n+ const template = JSON.parse(uploadContent)\\n \\n- if (!_.isEmpty(dashboard)) {\\n- onImportDashboard(dashboard)\\n- onDismissOverlay()\\n- } else {\\n- notify(dashboardImportFailed('No dashboard found in file'))\\n- }\\n+ await createDashboardFromTemplate(template, orgID)\\n+ await populateDashboards()\\n+\\n+ onDismissOverlay()\\n } catch (error) {\\n notify(dashboardImportFailed(error))\\n }\\n }\\n }\\n+const mdtp: DispatchProps = {\\n+ notify: notifyAction,\\n+ createDashboardFromTemplate: createDashboardFromTemplateAction,\\n+ populateDashboards: getDashboardsAsync,\\n+}\\n \\n-export default ImportDashboardOverlay\\n+export default connect<{}, DispatchProps, OwnProps>(\\n+ null,\\n+ mdtp\\n+)(ImportDashboardOverlay)\\ndiff --git a/ui/src/dashboards/components/dashboard_index/DashboardsIndex.tsx b/ui/src/dashboards/components/dashboard_index/DashboardsIndex.tsx\\nindex d6b299f..1ff7f47 100644\\n--- a/ui/src/dashboards/components/dashboard_index/DashboardsIndex.tsx\\n+++ b/ui/src/dashboards/components/dashboard_index/DashboardsIndex.tsx\\n@@ -2,15 +2,15 @@\\n import React, {PureComponent} from 'react'\\n import {InjectedRouter} from 'react-router'\\n import {connect} from 'react-redux'\\n-import {isEmpty} from 'lodash'\\n+import {get} from 'lodash'\\n \\n // Components\\n import DashboardsIndexContents from 'src/dashboards/components/dashboard_index/DashboardsIndexContents'\\n import {Page} from 'src/pageLayout'\\n import SearchWidget from 'src/shared/components/search_widget/SearchWidget'\\n import AddResourceDropdown from 'src/shared/components/AddResourceDropdown'\\n-import ImportOverlay from 'src/shared/components/ImportOverlay'\\n import ExportOverlay from 'src/shared/components/ExportOverlay'\\n+import ImportDashboardOverlay from 'src/dashboards/components/ImportDashboardOverlay'\\n \\n // APIs\\n import {createDashboard, cloneDashboard} from 'src/dashboards/apis/v2/'\\n@@ -32,10 +32,7 @@ import {DEFAULT_DASHBOARD_NAME} from 'src/dashboards/constants/index'\\n import {\\n dashboardSetDefaultFailed,\\n dashboardCreateFailed,\\n- dashboardImported,\\n- dashboardImportFailed,\\n } from 'src/shared/copy/notifications'\\n-import {cantImportInvalidResource} from 'src/shared/copy/v2/notifications'\\n \\n // Types\\n import {Notification} from 'src/types/notifications'\\n@@ -197,24 +194,6 @@ class DashboardIndex extends PureComponent {\\n this.props.handleDeleteDashboard(dashboard)\\n }\\n \\n- private handleImportDashboard = async (\\n- importString: string\\n- ): Promise => {\\n- const {notify} = this.props\\n- try {\\n- const resource = JSON.parse(importString)\\n-\\n- if (isEmpty(resource)) {\\n- notify(cantImportInvalidResource('Dashboard'))\\n- return\\n- }\\n- this.handleToggleImportOverlay()\\n- notify(dashboardImported())\\n- } catch (error) {\\n- notify(dashboardImportFailed(error))\\n- }\\n- }\\n-\\n private handleFilterDashboards = (searchTerm: string): void => {\\n this.setState({searchTerm})\\n }\\n@@ -229,13 +208,13 @@ class DashboardIndex extends PureComponent {\\n \\n private get importOverlay(): JSX.Element {\\n const {isImportingDashboard} = this.state\\n+ const {orgs} = this.props\\n \\n return (\\n- \\n )\\n }\\ndiff --git a/ui/src/organizations/components/Dashboards.tsx b/ui/src/organizations/components/Dashboards.tsx\\nindex 08c8402..90c2514 100644\\n--- a/ui/src/organizations/components/Dashboards.tsx\\n+++ b/ui/src/organizations/components/Dashboards.tsx\\n@@ -6,13 +6,10 @@ import _ from 'lodash'\\n \\n // Components\\n import DashboardsIndexContents from 'src/dashboards/components/dashboard_index/DashboardsIndexContents'\\n-import {OverlayTechnology, Input, Tabs} from 'src/clockface'\\n+import {Input, Tabs} from 'src/clockface'\\n import {Button, ComponentColor, IconFont} from '@influxdata/clockface'\\n import ImportDashboardOverlay from 'src/dashboards/components/ImportDashboardOverlay'\\n \\n-// Utils\\n-import {getDeep} from 'src/utils/wrappers'\\n-\\n // APIs\\n import {createDashboard, cloneDashboard} from 'src/dashboards/apis/v2/'\\n \\n@@ -39,7 +36,7 @@ import {DEFAULT_DASHBOARD_NAME} from 'src/dashboards/constants/index'\\n \\n // Types\\n import {Notification} from 'src/types/notifications'\\n-import {Links, Cell, Dashboard, AppState, Organization} from 'src/types/v2'\\n+import {Links, Dashboard, AppState, Organization} from 'src/types/v2'\\n \\n // Decorators\\n import {ErrorHandling} from 'src/shared/decorators/errors'\\n@@ -205,46 +202,20 @@ class Dashboards extends PureComponent {\\n this.props.handleDeleteDashboard(dashboard)\\n }\\n \\n- private handleImportDashboard = async (\\n- dashboard: Dashboard\\n- ): Promise => {\\n- const defaultCell = {\\n- x: 0,\\n- y: 0,\\n- w: 4,\\n- h: 4,\\n- }\\n-\\n- const name = _.get(dashboard, 'name', DEFAULT_DASHBOARD_NAME)\\n- const cellsWithDefaultsApplied = getDeep(\\n- dashboard,\\n- 'cells',\\n- []\\n- ).map(c => ({...defaultCell, ...c}))\\n-\\n- await this.props.handleImportDashboard({\\n- ...dashboard,\\n- name,\\n- cells: cellsWithDefaultsApplied,\\n- })\\n- }\\n-\\n private handleToggleOverlay = (): void => {\\n this.setState({isImportingDashboard: !this.state.isImportingDashboard})\\n }\\n \\n private get renderImportOverlay(): JSX.Element {\\n- const {notify} = this.props\\n const {isImportingDashboard} = this.state\\n+ const {orgs} = this.props\\n \\n return (\\n- \\n- \\n- \\n+ \\n )\\n }\\n }\\ndiff --git a/ui/src/shared/components/ImportOverlay.tsx b/ui/src/shared/components/ImportOverlay.tsx\\nindex 10f1d50..476fa70 100644\\n--- a/ui/src/shared/components/ImportOverlay.tsx\\n+++ b/ui/src/shared/components/ImportOverlay.tsx\\n@@ -10,6 +10,7 @@ import {\\n OverlayHeading,\\n OverlayFooter,\\n Radio,\\n+ ComponentStatus,\\n } from 'src/clockface'\\n import {Button, ComponentColor} from '@influxdata/clockface'\\n \\n@@ -93,6 +94,7 @@ export default class ImportOverlay extends PureComponent {\\n submitText=\\\"Upload\\\"\\n handleSubmit={this.handleSetImportContent}\\n submitOnDrop={true}\\n+ submitOnUpload={true}\\n onCancel={this.clearImportContent}\\n />\\n )\\n@@ -110,18 +112,21 @@ export default class ImportOverlay extends PureComponent {\\n private get submitButton(): JSX.Element {\\n const {resourceName} = this.props\\n const {selectedImportOption, importContent} = this.state\\n- if (\\n+ const isEnabled =\\n selectedImportOption === ImportOption.Paste ||\\n (selectedImportOption === ImportOption.Upload && importContent)\\n- ) {\\n- return (\\n- \\n- )\\n- }\\n+ const status = isEnabled\\n+ ? ComponentStatus.Default\\n+ : ComponentStatus.Disabled\\n+\\n+ return (\\n+ \\n+ )\\n }\\n \\n private submit = () => {\\ndiff --git a/ui/src/shared/copy/notifications.ts b/ui/src/shared/copy/notifications.ts\\nindex 4492078..86700e2 100644\\n--- a/ui/src/shared/copy/notifications.ts\\n+++ b/ui/src/shared/copy/notifications.ts\\n@@ -799,9 +799,18 @@ export const importTaskSucceeded = (): Notification => ({\\n })\\n \\n export const importTaskFailed = (error: string): Notification => ({\\n- ...defaultSuccessNotification,\\n+ ...defaultErrorNotification,\\n message: `Failed to import task: ${error}`,\\n })\\n+export const importDashboardSucceeded = (): Notification => ({\\n+ ...defaultSuccessNotification,\\n+ message: `Successfully imported dashboard.`,\\n+})\\n+\\n+export const importDashboardFailed = (error: string): Notification => ({\\n+ ...defaultErrorNotification,\\n+ message: `Failed to import dashboard: ${error}`,\\n+})\\n \\n // Labels\\n export const getLabelsFailed = (): Notification => ({\\n\"]"},"concern_count":{"kind":"number","value":1,"string":"1"},"shas":{"kind":"string","value":"[\"9114362b39f5194209cd0b330af7076333f3db77\"]"},"types":{"kind":"string","value":"[\"feat\"]"}}},{"rowIdx":235,"cells":{"commit_message":{"kind":"string","value":"lint README"},"diff":{"kind":"string","value":"[\"diff --git a/README.md b/README.md\\nindex a163c83..9cd12bc 100644\\n--- a/README.md\\n+++ b/README.md\\n@@ -26,7 +26,7 @@ Ibis has three primary components:\\n Ibis aims to be a future-proof solution to interacting with data using Python and can accomplish this goal through its main features:\\n \\n - **Familiar API**: Ibis\\u2019s API design borrows from popular APIs like pandas and dplyr that most users already know and like to use.\\n-- **Consistent syntax**: Ibis aims to be universal Python API for tabular data, big or small.\\n+- **Consistent syntax**: Ibis aims to be universal Python API for tabular data, big or small.\\n - **Deferred execution**: Ibis pushes code execution to the query engine and only moves required data into memory when it has to.\\n This leads to more faster, more efficient analytics workflows\\n - **Interactive mode**: Ibis also provides an interactive mode, in which users can quickly diagnose problems, do exploratory data analysis, and mock up workflows locally.\\n\"]"},"concern_count":{"kind":"number","value":1,"string":"1"},"shas":{"kind":"string","value":"[\"cab2cf4d3fffb0ec2b56d455e67ac5fa992b4104\"]"},"types":{"kind":"string","value":"[\"docs\"]"}}},{"rowIdx":236,"cells":{"commit_message":{"kind":"string","value":"convert to record"},"diff":{"kind":"string","value":"[\"diff --git a/broker/src/test/java/io/camunda/zeebe/broker/exporter/stream/ExporterDirectorDistributionTest.java b/broker/src/test/java/io/camunda/zeebe/broker/exporter/stream/ExporterDirectorDistributionTest.java\\nindex cc998c6..65c8550 100755\\n--- a/broker/src/test/java/io/camunda/zeebe/broker/exporter/stream/ExporterDirectorDistributionTest.java\\n+++ b/broker/src/test/java/io/camunda/zeebe/broker/exporter/stream/ExporterDirectorDistributionTest.java\\n@@ -167,13 +167,8 @@ public final class ExporterDirectorDistributionTest {\\n *

This makes sure that even if we miss one export position event, we distribute the event\\n * later again, which makes tests less flaky.\\n */\\n- private static final class ClockShifter implements ConditionEvaluationListener {\\n-\\n- private final ControlledActorClock clock;\\n-\\n- public ClockShifter(final ControlledActorClock clock) {\\n- this.clock = clock;\\n- }\\n+ private record ClockShifter(ControlledActorClock clock)\\n+ implements ConditionEvaluationListener {\\n \\n @Override\\n public void conditionEvaluated(final EvaluatedCondition condition) {\\n\"]"},"concern_count":{"kind":"number","value":1,"string":"1"},"shas":{"kind":"string","value":"[\"3346331a963766c8193170fb130adad2e658ada2\"]"},"types":{"kind":"string","value":"[\"refactor\"]"}}},{"rowIdx":237,"cells":{"commit_message":{"kind":"string","value":"don't delay rendering if initialLayout is not specified"},"diff":{"kind":"string","value":"[\"diff --git a/packages/react-native-tab-view/example/src/BottomBarIconTextExample.js b/packages/react-native-tab-view/example/src/BottomBarIconTextExample.js\\nindex fcc4708..397e6e6 100644\\n--- a/packages/react-native-tab-view/example/src/BottomBarIconTextExample.js\\n+++ b/packages/react-native-tab-view/example/src/BottomBarIconTextExample.js\\n@@ -1,7 +1,7 @@\\n /* @flow */\\n \\n import React, { Component } from 'react';\\n-import { Animated, View, Text, Dimensions, StyleSheet } from 'react-native';\\n+import { Animated, View, Text, StyleSheet } from 'react-native';\\n import { TabViewAnimated, TabBar } from 'react-native-tab-view';\\n import { Ionicons } from '@exponent/vector-icons';\\n \\n@@ -13,7 +13,6 @@ const styles = StyleSheet.create({\\n backgroundColor: '#222',\\n },\\n tab: {\\n- opacity: 1,\\n padding: 0,\\n },\\n icon: {\\n@@ -50,11 +49,6 @@ const styles = StyleSheet.create({\\n },\\n });\\n \\n-const initialLayout = {\\n- height: 0,\\n- width: Dimensions.get('window').width,\\n-};\\n-\\n export default class TopBarIconExample extends Component {\\n \\n static title = 'Bottom bar with indicator';\\n@@ -80,14 +74,16 @@ export default class TopBarIconExample extends Component {\\n };\\n \\n _renderIndicator = (props) => {\\n- const { width, position } = props;\\n+ const { width, opacity, position } = props;\\n \\n- const translateX = Animated.multiply(position, new Animated.Value(width));\\n+ const translateX = Animated.multiply(position, width);\\n \\n return (\\n \\n+ style={[ styles.container, { width, opacity, transform: [ { translateX } ] } ]}\\n+ >\\n+ \\n+ \\n );\\n };\\n \\n@@ -146,7 +142,6 @@ export default class TopBarIconExample extends Component {\\n renderScene={this._renderScene}\\n renderFooter={this._renderFooter}\\n onRequestChangeTab={this._handleChangeTab}\\n- initialLayout={initialLayout}\\n />\\n );\\n }\\ndiff --git a/packages/react-native-tab-view/example/src/CoverflowExample.js b/packages/react-native-tab-view/example/src/CoverflowExample.js\\nindex 8950c0e..2336591 100644\\n--- a/packages/react-native-tab-view/example/src/CoverflowExample.js\\n+++ b/packages/react-native-tab-view/example/src/CoverflowExample.js\\n@@ -2,7 +2,7 @@\\n /* eslint-disable import/no-commonjs */\\n \\n import React, { Component } from 'react';\\n-import { Animated, View, Image, Text, Dimensions, StyleSheet } from 'react-native';\\n+import { Animated, View, Image, Text, StyleSheet } from 'react-native';\\n import { TabViewAnimated, TabViewPagerPan } from 'react-native-tab-view';\\n \\n const styles = StyleSheet.create({\\n@@ -48,11 +48,6 @@ const ALBUMS = {\\n 'Lost Horizons': require('../assets/album-art-8.jpg'),\\n };\\n \\n-const initialLayout = {\\n- height: 0,\\n- width: Dimensions.get('window').width,\\n-};\\n-\\n export default class CoverflowExample extends Component {\\n \\n static title = 'Coverflow';\\n@@ -142,7 +137,6 @@ export default class CoverflowExample extends Component {\\n renderPager={this._renderPager}\\n renderScene={this._renderScene}\\n onRequestChangeTab={this._handleChangeTab}\\n- initialLayout={initialLayout}\\n />\\n );\\n }\\ndiff --git a/packages/react-native-tab-view/example/src/ScrollViewsExample.js b/packages/react-native-tab-view/example/src/ScrollViewsExample.js\\nindex 94fefbb..5be3b69 100644\\n--- a/packages/react-native-tab-view/example/src/ScrollViewsExample.js\\n+++ b/packages/react-native-tab-view/example/src/ScrollViewsExample.js\\n@@ -28,11 +28,6 @@ const styles = StyleSheet.create({\\n },\\n });\\n \\n-const initialLayout = {\\n- height: 0,\\n- width: Dimensions.get('window').width,\\n-};\\n-\\n export default class TopBarTextExample extends Component {\\n \\n static title = 'Scroll views';\\n@@ -104,6 +99,7 @@ export default class TopBarTextExample extends Component {\\n renderLabel={this._renderLabel(props)}\\n indicatorStyle={styles.indicator}\\n tabStyle={styles.tab}\\n+ tabWidth={80}\\n style={styles.tabbar}\\n />\\n );\\n@@ -130,7 +126,6 @@ export default class TopBarTextExample extends Component {\\n renderScene={this._renderScene}\\n renderHeader={this._renderHeader}\\n onRequestChangeTab={this._handleChangeTab}\\n- initialLayout={initialLayout}\\n />\\n );\\n }\\ndiff --git a/packages/react-native-tab-view/example/src/TopBarIconExample.js b/packages/react-native-tab-view/example/src/TopBarIconExample.js\\nindex d13755f..5464981 100644\\n--- a/packages/react-native-tab-view/example/src/TopBarIconExample.js\\n+++ b/packages/react-native-tab-view/example/src/TopBarIconExample.js\\n@@ -1,7 +1,7 @@\\n /* @flow */\\n \\n import React, { Component } from 'react';\\n-import { View, Dimensions, StyleSheet } from 'react-native';\\n+import { View, StyleSheet } from 'react-native';\\n import { TabViewAnimated, TabBarTop } from 'react-native-tab-view';\\n import { Ionicons } from '@exponent/vector-icons';\\n \\n@@ -22,11 +22,6 @@ const styles = StyleSheet.create({\\n },\\n });\\n \\n-const initialLayout = {\\n- height: 0,\\n- width: Dimensions.get('window').width,\\n-};\\n-\\n export default class TopBarIconExample extends Component {\\n \\n static title = 'Icon only top bar';\\n@@ -93,7 +88,6 @@ export default class TopBarIconExample extends Component {\\n renderScene={this._renderScene}\\n renderHeader={this._renderHeader}\\n onRequestChangeTab={this._handleChangeTab}\\n- initialLayout={initialLayout}\\n />\\n );\\n }\\ndiff --git a/packages/react-native-tab-view/example/src/TopBarTextExample.js b/packages/react-native-tab-view/example/src/TopBarTextExample.js\\nindex 30307ad..454533d 100644\\n--- a/packages/react-native-tab-view/example/src/TopBarTextExample.js\\n+++ b/packages/react-native-tab-view/example/src/TopBarTextExample.js\\n@@ -1,7 +1,7 @@\\n /* @flow */\\n \\n import React, { Component } from 'react';\\n-import { View, Dimensions, StyleSheet } from 'react-native';\\n+import { View, StyleSheet } from 'react-native';\\n import { TabViewAnimated, TabBarTop } from 'react-native-tab-view';\\n \\n const styles = StyleSheet.create({\\n@@ -25,11 +25,6 @@ const styles = StyleSheet.create({\\n },\\n });\\n \\n-const initialLayout = {\\n- height: 0,\\n- width: Dimensions.get('window').width,\\n-};\\n-\\n export default class TopBarTextExample extends Component {\\n \\n static title = 'Scrollable top bar';\\n@@ -90,7 +85,6 @@ export default class TopBarTextExample extends Component {\\n renderScene={this._renderScene}\\n renderHeader={this._renderHeader}\\n onRequestChangeTab={this._handleChangeTab}\\n- initialLayout={initialLayout}\\n />\\n );\\n }\\ndiff --git a/packages/react-native-tab-view/src/TabBar.js b/packages/react-native-tab-view/src/TabBar.js\\nindex 615e85a..a03d8e5 100644\\n--- a/packages/react-native-tab-view/src/TabBar.js\\n+++ b/packages/react-native-tab-view/src/TabBar.js\\n@@ -92,6 +92,7 @@ type Props = SceneRendererProps & {\\n \\n type State = {\\n offset: Animated.Value;\\n+ visibility: Animated.Value;\\n }\\n \\n export default class TabBar extends Component {\\n@@ -115,8 +116,15 @@ export default class TabBar extends Component {\\n \\n state: State = {\\n offset: new Animated.Value(0),\\n+ visibility: new Animated.Value(0),\\n };\\n \\n+ componentWillMount() {\\n+ if (this.props.layout.width || this.props.tabWidth) {\\n+ this.state.visibility.setValue(1);\\n+ }\\n+ }\\n+\\n componentDidMount() {\\n this._adjustScroll(this.props.navigationState.index);\\n this._positionListener = this.props.subscribe('position', this._adjustScroll);\\n@@ -126,6 +134,16 @@ export default class TabBar extends Component {\\n if (this.props.navigationState !== nextProps.navigationState) {\\n this._resetScrollOffset(nextProps);\\n }\\n+\\n+ if (\\n+ (this.props.tabWidth !== nextProps.tabWidth && nextProps.tabWidth) ||\\n+ (this.props.layout.width !== nextProps.layout.width && nextProps.layout.width)\\n+ ) {\\n+ Animated.timing(this.state.visibility, {\\n+ toValue: 1,\\n+ duration: 150,\\n+ }).start();\\n+ }\\n }\\n \\n componentWillUnmount() {\\n@@ -282,7 +300,8 @@ export default class TabBar extends Component {\\n {this.props.renderIndicator ?\\n this.props.renderIndicator({\\n ...this.props,\\n- width: tabWidth,\\n+ width: new Animated.Value(tabWidth),\\n+ opacity: this.state.visibility,\\n }) :\\n null\\n }\\n@@ -307,10 +326,10 @@ export default class TabBar extends Component {\\n {routes.map((route, i) => {\\n const focused = index === i;\\n const outputRange = inputRange.map(inputIndex => inputIndex === i ? 1 : 0.7);\\n- const opacity = position.interpolate({\\n+ const opacity = Animated.multiply(this.state.visibility, position.interpolate({\\n inputRange,\\n outputRange,\\n- });\\n+ }));\\n const scene = {\\n route,\\n focused,\\n@@ -348,14 +367,14 @@ export default class TabBar extends Component {\\n }}\\n >\\n \\n- \\n+ \\n {icon}\\n {label}\\n \\n {badge ?\\n- \\n+ \\n {badge}\\n- : null\\n+ : null\\n }\\n \\n \\ndiff --git a/packages/react-native-tab-view/src/TabBarTop.js b/packages/react-native-tab-view/src/TabBarTop.js\\nindex 0960d4e..84dd6e2 100644\\n--- a/packages/react-native-tab-view/src/TabBarTop.js\\n+++ b/packages/react-native-tab-view/src/TabBarTop.js\\n@@ -28,7 +28,8 @@ const styles = StyleSheet.create({\\n });\\n \\n type IndicatorProps = SceneRendererProps & {\\n- width: number;\\n+ width: Animated.Valye;\\n+ opacity: Animated.Value;\\n }\\n \\n type Props = SceneRendererProps & {\\n@@ -50,13 +51,13 @@ export default class TabBarTop extends Component {\\n );\\n \\n _renderIndicator = (props: IndicatorProps) => {\\n- const { width, position } = props;\\n+ const { width, opacity, position } = props;\\n \\n- const translateX = Animated.multiply(position, new Animated.Value(width));\\n+ const translateX = Animated.multiply(position, width);\\n \\n return (\\n \\n );\\n };\\ndiff --git a/packages/react-native-tab-view/src/TabViewAnimated.js b/packages/react-native-tab-view/src/TabViewAnimated.js\\nindex d484816..4499748 100644\\n--- a/packages/react-native-tab-view/src/TabViewAnimated.js\\n+++ b/packages/react-native-tab-view/src/TabViewAnimated.js\\n@@ -94,19 +94,17 @@ export default class TabViewAnimated extends Component {\\n- if (props.layout.width === 0) {\\n- return null;\\n- }\\n-\\n const { renderPager, renderHeader, renderFooter } = this.props;\\n+ const { navigationState, layout } = props;\\n+ const currentRoute = navigationState.routes[navigationState.index];\\n \\n return (\\n \\n {renderHeader && renderHeader(props)}\\n {renderPager({\\n ...props,\\n- children: props.navigationState.routes.map((route, index) => (\\n- \\n+ children: layout.width ? navigationState.routes.map((route, index) => (\\n+ \\n {this._renderScene({\\n ...props,\\n route,\\n@@ -114,7 +112,16 @@ export default class TabViewAnimated extends Component\\n- )),\\n+ )) : (\\n+ \\n+ {this._renderScene({\\n+ ...props,\\n+ route: currentRoute,\\n+ index: navigationState.index,\\n+ focused: true,\\n+ })}\\n+ \\n+ ),\\n })}\\n {renderFooter && renderFooter(props)}\\n \\n\"]"},"concern_count":{"kind":"number","value":1,"string":"1"},"shas":{"kind":"string","value":"[\"e9233ae3f7811707945fc2de60971595d83c578d\"]"},"types":{"kind":"string","value":"[\"fix\"]"}}},{"rowIdx":238,"cells":{"commit_message":{"kind":"string","value":"switch to callback ref"},"diff":{"kind":"string","value":"[\"diff --git a/src/notebook/components/transforms/html.js b/src/notebook/components/transforms/html.js\\nindex 83fc1fb..021cc65 100644\\n--- a/src/notebook/components/transforms/html.js\\n+++ b/src/notebook/components/transforms/html.js\\n@@ -8,16 +8,16 @@ type Props = {\\n \\n export default class HTMLDisplay extends React.Component {\\n props: Props;\\n+ el: HTMLElement;\\n \\n componentDidMount(): void {\\n- if (this.refs.here) {\\n- if (document.createRange && Range && Range.prototype.createContextualFragment) {\\n- const range = document.createRange();\\n- const fragment = range.createContextualFragment(this.props.data);\\n- ReactDOM.findDOMNode(this.refs.here).appendChild(fragment);\\n- } else {\\n- ReactDOM.findDOMNode(this.refs.here).innerHTML = this.props.data;\\n- }\\n+ // Create a range to ensure that scripts are invoked from within the HTML\\n+ if (document.createRange && Range && Range.prototype.createContextualFragment) {\\n+ const range = document.createRange();\\n+ const fragment = range.createContextualFragment(this.props.data);\\n+ this.el.appendChild(fragment);\\n+ } else {\\n+ this.el.innerHTML = this.props.data;\\n }\\n }\\n \\n@@ -27,7 +27,7 @@ export default class HTMLDisplay extends React.Component {\\n \\n render(): ?React.Element {\\n return (\\n-

\\n+
{ this.el = el; }} />\\n );\\n }\\n }\\n\"]"},"concern_count":{"kind":"number","value":1,"string":"1"},"shas":{"kind":"string","value":"[\"ee4bf61fb8836e249fb4ef3507dc938e70696b3f\"]"},"types":{"kind":"string","value":"[\"refactor\"]"}}},{"rowIdx":239,"cells":{"commit_message":{"kind":"string","value":"wire up fixed null encoding"},"diff":{"kind":"string","value":"[\"diff --git a/read_buffer/src/row_group.rs b/read_buffer/src/row_group.rs\\nindex 91c9fb5..ca77f3c 100644\\n--- a/read_buffer/src/row_group.rs\\n+++ b/read_buffer/src/row_group.rs\\n@@ -958,24 +958,15 @@ impl From for RowGroup {\\n }\\n Some(InfluxColumnType::Field(_)) => {\\n let column_data = match arrow_column.data_type() {\\n- arrow::datatypes::DataType::Int64 => Column::from(\\n- arrow_column\\n- .as_any()\\n- .downcast_ref::()\\n- .unwrap(),\\n- ),\\n- arrow::datatypes::DataType::Float64 => Column::from(\\n- arrow_column\\n- .as_any()\\n- .downcast_ref::()\\n- .unwrap(),\\n- ),\\n- arrow::datatypes::DataType::UInt64 => Column::from(\\n- arrow_column\\n- .as_any()\\n- .downcast_ref::()\\n- .unwrap(),\\n- ),\\n+ arrow::datatypes::DataType::Int64 => {\\n+ Column::from(arrow::array::Int64Array::from(arrow_column.data()))\\n+ }\\n+ arrow::datatypes::DataType::Float64 => {\\n+ Column::from(arrow::array::Float64Array::from(arrow_column.data()))\\n+ }\\n+ arrow::datatypes::DataType::UInt64 => {\\n+ Column::from(arrow::array::UInt64Array::from(arrow_column.data()))\\n+ }\\n dt => unimplemented!(\\n \\\"data type {:?} currently not supported for field columns\\\",\\n dt\\n\"]"},"concern_count":{"kind":"number","value":1,"string":"1"},"shas":{"kind":"string","value":"[\"28b596b8834d1b51be3ac6a2ac30df28f37702d8\"]"},"types":{"kind":"string","value":"[\"refactor\"]"}}},{"rowIdx":240,"cells":{"commit_message":{"kind":"string","value":"tests should pass now\n\nMake the code more safe"},"diff":{"kind":"string","value":"[\"diff --git a/goreleaserlib/goreleaser.go b/goreleaserlib/goreleaser.go\\nindex 28ba3f4..67ba95d 100644\\n--- a/goreleaserlib/goreleaser.go\\n+++ b/goreleaserlib/goreleaser.go\\n@@ -27,6 +27,15 @@ import (\\n \\tyaml \\\"gopkg.in/yaml.v2\\\"\\n )\\n \\n+var (\\n+\\tnormalPadding = cli.Default.Padding\\n+\\tincreasedPadding = normalPadding * 2\\n+)\\n+\\n+func init() {\\n+\\tlog.SetHandler(cli.Default)\\n+}\\n+\\n var pipes = []pipeline.Piper{\\n \\tdefaults.Pipe{}, // load default configs\\n \\tgit.Pipe{}, // get and validate git repo state\\n@@ -89,17 +98,15 @@ func Release(flags Flags) error {\\n \\t\\tctx.Publish = false\\n \\t}\\n \\tctx.RmDist = flags.Bool(\\\"rm-dist\\\")\\n-\\tlogger, _ := log.Log.(*log.Logger)\\n-\\thandler, _ := logger.Handler.(*cli.Handler)\\n \\tfor _, pipe := range pipes {\\n-\\t\\thandler.Padding = 3\\n+\\t\\tcli.Default.Padding = normalPadding\\n \\t\\tlog.Infof(\\\"\\\\033[1m%s\\\\033[0m\\\", strings.ToUpper(pipe.String()))\\n-\\t\\thandler.Padding = 6\\n+\\t\\tcli.Default.Padding = increasedPadding\\n \\t\\tif err := handle(pipe.Run(ctx)); err != nil {\\n \\t\\t\\treturn err\\n \\t\\t}\\n \\t}\\n-\\thandler.Padding = 3\\n+\\tcli.Default.Padding = normalPadding\\n \\treturn nil\\n }\\n \\ndiff --git a/main.go b/main.go\\nindex b9b961d..7ced1dd 100644\\n--- a/main.go\\n+++ b/main.go\\n@@ -18,7 +18,7 @@ var (\\n )\\n \\n func init() {\\n-\\tlog.SetHandler(lcli.New(os.Stdout))\\n+\\tlog.SetHandler(lcli.Default)\\n }\\n \\n func main() {\\n\"]"},"concern_count":{"kind":"number","value":1,"string":"1"},"shas":{"kind":"string","value":"[\"5636313d7c9cfbd9f48578fd104771d65eae9720\"]"},"types":{"kind":"string","value":"[\"fix\"]"}}},{"rowIdx":241,"cells":{"commit_message":{"kind":"string","value":"disable edit/delete if primary key missing\n\nSigned-off-by: Pranav C "},"diff":{"kind":"string","value":"[\"diff --git a/packages/nc-gui/components/project/spreadsheet/components/expandedForm.vue b/packages/nc-gui/components/project/spreadsheet/components/expandedForm.vue\\nindex 5f9841f..c414c8c 100644\\n--- a/packages/nc-gui/components/project/spreadsheet/components/expandedForm.vue\\n+++ b/packages/nc-gui/components/project/spreadsheet/components/expandedForm.vue\\n@@ -413,6 +413,9 @@ export default {\\n \\n await this.reload()\\n } else if (Object.keys(updatedObj).length) {\\n+ if (!id) {\\n+ return this.$toast.info('Update not allowed for table which doesn\\\\'t have primary Key').goAway(3000)\\n+ }\\n await this.api.update(id, updatedObj, this.oldRow)\\n } else {\\n return this.$toast.info('No columns to update').goAway(3000)\\ndiff --git a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue\\nindex c2b4b81..1b9d6a0 100644\\n--- a/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue\\n+++ b/packages/nc-gui/components/project/spreadsheet/rowsXcDataTable.vue\\n@@ -62,7 +62,15 @@\\n \\n \\n \\n-\\n+ \\n+ \\n+ Update & Delete not allowed since the table doesn't have any primary key\\n+ \\n+ \\n \\n \\n \\n@@ -208,6 +216,7 @@\\n :meta=\\\"meta\\\"\\n :is-virtual=\\\"selectedView.type === 'vtable'\\\"\\n :api=\\\"api\\\"\\n+ :is-pk-avail=\\\"isPkAvail\\\"\\n @onNewColCreation=\\\"onNewColCreation\\\"\\n @onCellValueChange=\\\"onCellValueChange\\\"\\n @insertNewRow=\\\"insertNewRow\\\"\\n@@ -631,8 +640,8 @@ export default {\\n if (\\n !this.meta || (\\n (this.meta.hasMany && this.meta.hasMany.length) ||\\n- (this.meta.manyToMany && this.meta.manyToMany.length) ||\\n- (this.meta.belongsTo && this.meta.belongsTo.length))\\n+ (this.meta.manyToMany && this.meta.manyToMany.length) ||\\n+ (this.meta.belongsTo && this.meta.belongsTo.length))\\n ) {\\n return this.$toast.info('Please delete relations before deleting table.').goAway(3000)\\n }\\n@@ -817,6 +826,10 @@ export default {\\n \\n const id = this.meta.columns.filter(c => c.pk).map(c => rowObj[c._cn]).join('___')\\n \\n+ if (!id) {\\n+ return this.$toast.info('Update not allowed for table which doesn\\\\'t have primary Key').goAway(3000)\\n+ }\\n+\\n const newData = await this.api.update(id, {\\n [column._cn]: rowObj[column._cn]\\n }, { [column._cn]: oldRow[column._cn] })\\n@@ -841,6 +854,11 @@ export default {\\n const rowObj = this.rowContextMenu.row\\n if (!this.rowContextMenu.rowMeta.new) {\\n const id = this.meta && this.meta.columns && this.meta.columns.filter(c => c.pk).map(c => rowObj[c._cn]).join('___')\\n+\\n+ if (!id) {\\n+ return this.$toast.info('Delete not allowed for table which doesn\\\\'t have primary Key').goAway(3000)\\n+ }\\n+\\n await this.api.delete(id)\\n }\\n this.data.splice(this.rowContextMenu.index, 1)\\n@@ -859,6 +877,11 @@ export default {\\n }\\n if (!rowMeta.new) {\\n const id = this.meta.columns.filter(c => c.pk).map(c => rowObj[c._cn]).join('___')\\n+\\n+ if (!id) {\\n+ return this.$toast.info('Delete not allowed for table which doesn\\\\'t have primary Key').goAway(3000)\\n+ }\\n+\\n await this.api.delete(id)\\n }\\n this.data.splice(row, 1)\\n@@ -991,6 +1014,9 @@ export default {\\n }\\n },\\n computed: {\\n+ isPkAvail() {\\n+ return this.meta && this.meta.columns.some(c => c.pk)\\n+ },\\n isGallery() {\\n return this.selectedView && this.selectedView.show_as === 'gallery'\\n },\\ndiff --git a/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue b/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue\\nindex 5497d05..c198784 100644\\n--- a/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue\\n+++ b/packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue\\n@@ -27,7 +27,7 @@\\n @xcresized=\\\"resizingCol = null\\\"\\n >\\n \\n+-->\\n \\n \\n@@ -162,7 +162,8 @@\\n \\n \\n \\n \\n- \\n+ \\n \\n \\n