mirror of
https://github.com/apache/druid.git
synced 2025-03-04 16:29:17 +00:00
* Initial eslint config * I guess eslint sorts underscores differently * Trim curlies (in jsx) * Re-organize rules * Use consistent quote props * Restructure eslint rules as additions/overrides to recommended configs * Fix the 'recommended' stuff * Add prefer-readonly * Add prefer-object-spread * Prettify * Add eslint-plugin-react-hooks * Switch to eslint-plugin-simple-sort-order So much better * Add no-extraneous-dependencies * ban-tslint-comment for funzies * If we enabled no-shadow, we'd probably want this option * Not prefer-for-of * no-confusing-void-expression, no-confusing-non-null-assertion * Add some no-unnecessary-* rules * non-nullable-type-assertion-style! * prefer-includes * Reorganize * prefer-things * switch-exhaustiveness-check * We don't need the jsdoc plugin, prettier has our backs * Remove a useless rule * Drop TSLint and (temporarily) awesome-code-style * Removing Object.assign revealed a type issue * Bring back awesome-code-style for sasslint config * Disable react/jsx-no-target-blank * Add prettify-check script * Add license to eslint config * Format readme * Update README for eslint, IDE settings * Add 'autofix' script * Switch to @awesome-code-style
53 lines
1.8 KiB
TypeScript
53 lines
1.8 KiB
TypeScript
/*
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
* or more contributor license agreements. See the NOTICE file
|
|
* distributed with this work for additional information
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
* to you under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance
|
|
* with the License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
import * as playwright from 'playwright-chromium';
|
|
|
|
import { setLabeledInput } from '../../../util/playwright';
|
|
|
|
import { clickApplyButton, DataConnector } from './data-connector';
|
|
|
|
/**
|
|
* Local file connector for data loader input data.
|
|
*/
|
|
export class LocalFileDataConnector implements DataConnector {
|
|
readonly name: string;
|
|
readonly needParse: boolean;
|
|
private readonly page: playwright.Page;
|
|
|
|
constructor(page: playwright.Page, props: LocalFileDataConnectorProps) {
|
|
Object.assign(this, props);
|
|
this.name = 'Local disk';
|
|
this.needParse = true;
|
|
this.page = page;
|
|
}
|
|
|
|
async connect() {
|
|
await setLabeledInput(this.page, 'Base directory', this.baseDirectory);
|
|
await setLabeledInput(this.page, 'File filter', this.fileFilter);
|
|
await clickApplyButton(this.page);
|
|
}
|
|
}
|
|
|
|
interface LocalFileDataConnectorProps {
|
|
readonly baseDirectory: string;
|
|
readonly fileFilter: string;
|
|
}
|
|
|
|
export interface LocalFileDataConnector extends LocalFileDataConnectorProps {}
|