Skip to content

Commit

Permalink
Merge pull request #1861 from running-elephant/dev
Browse files Browse the repository at this point in the history
Release RC.1
  • Loading branch information
Cuiyansong authored Aug 10, 2022
2 parents 35cb1af + 5d2862c commit 762f92a
Show file tree
Hide file tree
Showing 191 changed files with 4,292 additions and 2,155 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/dev-ut-stage.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ jobs:
working-directory: ./frontend
- run: npm run test:ci
working-directory: ./frontend
- run: npm run lint:css
working-directory: ./frontend
- run: npm run lint:style
working-directory: ./frontend
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datart-parent</artifactId>
<groupId>datart</groupId>
<version>1.0.0-rc.0</version>
<version>1.0.0-rc.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
13 changes: 13 additions & 0 deletions core/src/main/java/datart/core/mappers/ext/VariableMapperExt.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ public interface VariableMapperExt extends VariableMapper {
})
List<Variable> selectByIds(Collection<String> ids);

@Select({
"<script>",
"SELECT count(1) FROM variable WHERE org_id=#{orgId} AND `name` = #{name}",
"<if test=\"viewId==null\">",
" AND view_id IS NULL ",
"</if>",
"<if test=\"viewId!=null\">",
" AND view_id=#{viewId} ",
"</if>",
"</script>",
})
int checkVariableName(String orgId, String viewId, String name);

@Select({
"SELECT * FROM variable WHERE view_id = #{viewId}"
})
Expand Down
2 changes: 1 addition & 1 deletion data-providers/data-provider-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datart-data-provider</artifactId>
<groupId>datart</groupId>
<version>1.0.0-rc.0</version>
<version>1.0.0-rc.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ private void excludeColumns(Dataframe data, Set<SelectColumn> include) {
if (include
.stream()
.noneMatch(selectColumn ->
column.columnKey().equals(selectColumn.getColumnKey()) || column.columnKey().equals(selectColumn.getAlias()))) {
column.columnKey().equals(selectColumn.getColumnKey())
|| column.columnKey().equals(selectColumn.getAlias())
|| column.columnKey().contains(selectColumn.getColumnKey()))) {
excludeIndex.add(i);
}
}
Expand Down
2 changes: 1 addition & 1 deletion data-providers/file-data-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datart-data-provider</artifactId>
<groupId>datart</groupId>
<version>1.0.0-rc.0</version>
<version>1.0.0-rc.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion data-providers/http-data-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datart-data-provider</artifactId>
<groupId>datart</groupId>
<version>1.0.0-rc.0</version>
<version>1.0.0-rc.1</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion data-providers/jdbc-data-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datart-data-provider</artifactId>
<groupId>datart</groupId>
<version>1.0.0-rc.0</version>
<version>1.0.0-rc.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion data-providers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datart-parent</artifactId>
<groupId>datart</groupId>
<version>1.0.0-rc.0</version>
<version>1.0.0-rc.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ yarn-error.log*
# docs
/types

/public/custom-chart-plugins/
/public/task
/public/antd/theme.less
6 changes: 6 additions & 0 deletions frontend/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd frontend
npm run lint:css
npm run lint:style
2 changes: 2 additions & 0 deletions frontend/.husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@

cd frontend
npm run test:ci
npm run lint:css
npm run lint:style
7 changes: 5 additions & 2 deletions frontend/.stylelintrc → frontend/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components",
"stylelint-config-recess-order"
],
"rules": {
"function-no-unknown": null,
"font-family-no-missing-generic-family-keyword": null
},
"overrides": [
{
"files": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
"customSyntax": "postcss"
"customSyntax": "@stylelint/postcss-css-in-js"
}
]
}
10 changes: 8 additions & 2 deletions frontend/craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ module.exports = {
},
};

const instanceOfMiniCssExtractPlugin = webpackConfig.plugins.filter(
plugin => plugin.constructor.name === 'MiniCssExtractPlugin',
)[0];
if (instanceOfMiniCssExtractPlugin) {
instanceOfMiniCssExtractPlugin.options.ignoreOrder = true;
}

const defaultEntryHTMLPlugin = webpackConfig.plugins.filter(plugin => {
return plugin.constructor.name === 'HtmlWebpackPlugin';
})[0];
Expand Down Expand Up @@ -189,15 +196,14 @@ module.exports = {
},
modulePaths: ['../'],
},

devServer: {
before: function (app, server, compiler) {
app.get('/api/v1/plugins/custom/charts', function (req, res) {
const pluginPath = 'custom-chart-plugins';
const dir = fs.readdirSync(`./public/${pluginPath}`);
res.json({
data: (dir || [])
.filter(file => path.extname(file) == '.js')
.filter(file => path.extname(file) === '.js')
.map(file => `${pluginPath}/${file}`),
errCode: 0,
success: true,
Expand Down
Loading

0 comments on commit 762f92a

Please sign in to comment.