Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix][Server] Fix JopPage Error #247

Merged
merged 2 commits into from
Oct 14, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void buildSinkConfigs() throws DataVinesException {
ConnectorParameter connectorParameter = jobExecutionParameter.getConnectorParameter();
ConnectorFactory connectorFactory = PluginLoader
.getPluginLoader(ConnectorFactory.class)
.getNewPlugin(connectorParameter.getType());
.getNewPlugin(jobExecutionInfo.getErrorDataStorageType());

if (connectorFactory == null) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ public CheckResult validateConfig(Map<String, Object> config) {
@Override
public void prepare(Map<String, String> config) {
if (config.containsKey("filter")) {
sourceTableSql.append("WHERE (${filter})");
sourceTableSql.append(" WHERE (${filter}) ");
}

if (config.containsKey("filter2")) {
targetTableSql.append("WHERE (${filter2})");
targetTableSql.append(" WHERE (${filter2}) ");
}

invalidateItemsSql
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* 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.
*/
package io.datavines.server.api.dto.vo;


Expand Down
12 changes: 6 additions & 6 deletions datavines-server/src/main/resources/mapper/JobMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@
left join `dv_job_schedule` s on p.id = s.job_id and s.status = 1
<where>
<if test="searchVal != null and searchVal != ''">
LOWER(p.`name`) LIKE CONCAT(CONCAT('%', LOWER(#{searchVal})), '%')
AND LOWER(p.`name`) LIKE CONCAT(CONCAT('%', LOWER(#{searchVal})), '%')
</if>
<if test="schemaSearch != null and schemaSearch != ''">
LOWER(p.schema_name) LIKE CONCAT(CONCAT('%', LOWER(#{schemaSearch})), '%')
AND LOWER(p.schema_name) LIKE CONCAT(CONCAT('%', LOWER(#{schemaSearch})), '%')
</if>
<if test="tableSearch != null and tableSearch != ''">
LOWER(p.table_name) LIKE CONCAT(CONCAT('%', LOWER(#{tableSearch})), '%')
AND LOWER(p.table_name) LIKE CONCAT(CONCAT('%', LOWER(#{tableSearch})), '%')
</if>
<if test="columnSearch != null and columnSearch != ''">
LOWER(p.column_name) LIKE CONCAT(CONCAT('%', LOWER(#{columnSearch})), '%')
AND LOWER(p.column_name) LIKE CONCAT(CONCAT('%', LOWER(#{columnSearch})), '%')
</if>
<if test="startTime != null and startTime != ''">
and p.update_time &gt;= #{startTime}
AND p.update_time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and p.update_time &lt;= #{endTime}
AND p.update_time &lt;= #{endTime}
</if>
</where>
order by p.update_time desc
Expand Down
38 changes: 19 additions & 19 deletions datavines-ui/src/view/Main/HomeDetail/Jobs/JobsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,23 +296,24 @@ const Jobs = ({ datasourceId }: TJobs) => {
return (
<div className="dv-page-padding" style={{ height: 'calc(100vh - 73px)' }}>
<Tabs defaultActiveKey="0" items={items} onChange={onChangeTab} />
{/* <Title>{intl.formatMessage({ id: 'jobs_list' })}</Title> */}
<div style={{ paddingTop: '0px' }}>
<div className="dv-flex-between">
{/*<SearchForm form={form} onSearch={onSearch} placeholder={intl.formatMessage({ id: 'common_search' })} />*/}
<div className="dv-datasource__search">
<Form form={form}>
<Form.Item
label={intl.formatMessage({id: "jobs_name"})}
name="searchVal"
>
<Input
style={{ width: '100%' }}
autoComplete="off"
/>
</Form.Item>

<Row style={{width: '100%'}}>
<Form.Item style={{width: '33%'}}
<Form.Item style={{width: '18%'}}
label={intl.formatMessage({id: "jobs_name"})}
name="searchVal"
>
<Input
style={{ width: '100%' }}
autoComplete="off"
/>
</Form.Item>

<Form.Item style={{width: '15%',marginLeft: '10px'}}
label={intl.formatMessage({id: "job_database"})}
name="schemaSearch"
>
Expand All @@ -322,7 +323,7 @@ const Jobs = ({ datasourceId }: TJobs) => {
/>
</Form.Item>

<Form.Item style={{width: '33%'}}
<Form.Item style={{width: '15%',marginLeft: '10px'}}
label={intl.formatMessage({id: "job_table"})}
name="tableSearch"
>
Expand All @@ -331,7 +332,8 @@ const Jobs = ({ datasourceId }: TJobs) => {
autoComplete="off"
/>
</Form.Item>
<Form.Item style={{width: '33%'}}

<Form.Item style={{width: '15%',marginLeft: '10px'}}
label={intl.formatMessage({id: "job_column"})}
name="columnSearch"
>
Expand All @@ -340,28 +342,26 @@ const Jobs = ({ datasourceId }: TJobs) => {
autoComplete="off"
/>
</Form.Item>
</Row>

<Row >
<Form.Item
<Form.Item style={{width: '15%',marginLeft: '10px'}}
label={intl.formatMessage({ id: 'jobs_update_time' })}
name="startTime"
>
{Date}
</Form.Item>
{/*</Col>*/}

<span style={{ margin: '5px 10px 0px' }}>
{intl.formatMessage({ id: 'jobs_schedule_time_to' })}
</span>

<Form.Item
label=""
name="endTime"
style={{ display: 'inline-block' }}
style={{ display: 'inline-block', width: '15%',marginLeft: '10px'}}
>
{Date}
</Form.Item>
</Row>

</Form>
</div>
<div>
Expand Down
Loading