Browse Source

delete progress-webpack-plugin (#1151)

* Dependency workflow add dependency correction value

* Download workflow instance map width adjustment and change "desc" field to "description"

* The third-party library that builds the dependency is recommended to be placed in 'devDependencies'

* Tree chart and Gantt chart style modification

* The workflow instance can be deleted only when its status is success, failure, stop and pause.

* change desc to description

* Maximum width of tooltip is set to 500px, note the copyright number of login page

* Delete copyright number

* No tenant in the list of selected tenants the default is default, and the status not shown in the repair page

* repair

* Repair security center module prompt

* Remove blank character during verification

* Remove blank character during verification

* Non admin users cannot create users, tenants, alarm groups, queues and worker groups

* Remove CI windows detection

* The value of loadaverage should be two decimal places

* Add license

* delete docs

* update package.json

* delete LICENSE

* Display icon when there is no data in process definition

* Worker group add IP format verification

* Modify MySQL page of monitoring center

* DB page rename and background color modification

* IO build replace with source code

* Replace ans charts with source code

* delete component-compiler-utils

* delete progress-webpack-plugin
pull/2/head
break60 5 years ago committed by qiaozhanwei
parent
commit
3392ec5704
  1. 2
      dolphinscheduler-ui/build/webpack.config.dev.js
  2. 2
      dolphinscheduler-ui/build/webpack.config.prod.js
  3. 81
      dolphinscheduler-ui/src/lib/@fedor/progress-webpack-plugin/lib/index.js
  4. 17
      dolphinscheduler-ui/src/lib/@fedor/progress-webpack-plugin/package.json
  5. 2
      dolphinscheduler-ui/src/lib/external/config.js

2
dolphinscheduler-ui/build/webpack.config.dev.js

@ -18,7 +18,6 @@ const webpack = require('webpack')
const merge = require('webpack-merge') const merge = require('webpack-merge')
const { assetsDir, baseConfig } = require('./config') const { assetsDir, baseConfig } = require('./config')
const ExtractTextPlugin = require('extract-text-webpack-plugin') const ExtractTextPlugin = require('extract-text-webpack-plugin')
const ProgressPlugin = require('./../src/lib/@fedor/progress-webpack-plugin')
const getEnv = require('env-parse').getEnv const getEnv = require('env-parse').getEnv
const config = merge.smart(baseConfig, { const config = merge.smart(baseConfig, {
@ -102,7 +101,6 @@ const config = merge.smart(baseConfig, {
clientLogLevel: 'none' clientLogLevel: 'none'
}, },
plugins: [ plugins: [
new ProgressPlugin(),
new webpack.HotModuleReplacementPlugin(), new webpack.HotModuleReplacementPlugin(),
new ExtractTextPlugin({ filename: 'css/[name].css', allChunks: true }), new ExtractTextPlugin({ filename: 'css/[name].css', allChunks: true }),
new webpack.optimize.CommonsChunkPlugin({ name: 'common', filename: 'js/[name].js' }), new webpack.optimize.CommonsChunkPlugin({ name: 'common', filename: 'js/[name].js' }),

2
dolphinscheduler-ui/build/webpack.config.prod.js

@ -22,7 +22,6 @@ const { baseConfig } = require('./config')
const ExtractTextPlugin = require('extract-text-webpack-plugin') const ExtractTextPlugin = require('extract-text-webpack-plugin')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin') const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin') const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const ProgressPlugin = require('./../src/lib/@fedor/progress-webpack-plugin')
const resolve = dir => const resolve = dir =>
path.resolve(__dirname, '..', dir) path.resolve(__dirname, '..', dir)
@ -85,7 +84,6 @@ const config = merge.smart(baseConfig, {
] ]
}, },
plugins: [ plugins: [
new ProgressPlugin(),
new ExtractTextPlugin({ filename: 'css/[name].[contenthash:7].css', allChunks: true }), new ExtractTextPlugin({ filename: 'css/[name].[contenthash:7].css', allChunks: true }),
new webpack.optimize.CommonsChunkPlugin({ name: 'common', filename: 'js/[name].[hash:7].js' }), new webpack.optimize.CommonsChunkPlugin({ name: 'common', filename: 'js/[name].[hash:7].js' }),
new webpack.optimize.OccurrenceOrderPlugin(), new webpack.optimize.OccurrenceOrderPlugin(),

81
dolphinscheduler-ui/src/lib/@fedor/progress-webpack-plugin/lib/index.js

@ -1,81 +0,0 @@
/**
* Add by allex to display compilation progress
*/
'use strict';
var _ = require('lodash');
var webpack = require('webpack');
var istty = process.env.MSYSTEM === 'MINGW64' || !!process.stdout.isTTY;
var print = process.stderr.write.bind(process.stderr);
module.exports = function (options) {
options = _.merge({ profile: true }, options);
var chars = 0,
lastState = void 0,
lastStateTime = void 0,
ts = void 0;
return new webpack.ProgressPlugin(function (percentage, msg) {
var state = msg;
if (percentage === 0) {
lastState = null;
lastStateTime = +new Date();
ts = lastStateTime;
}
if (percentage < 1) {
msg = Math.floor(percentage * 100) + '% ' + msg;
if (percentage < 1) {
msg = ' ' + msg;
}
if (percentage < 0.1) {
msg = ' ' + msg;
}
}
if (options.profile) {
state = state.replace(/^\d+\/\d+\s+/, '');
if (state !== lastState || percentage === 1) {
var now = +new Date();
if (lastState) {
var stateMsg = now - lastStateTime + 'ms ' + lastState;
if (istty) {
goToLineStart(stateMsg);
print(stateMsg + '\n');
} else {
print('>');
}
chars = 0;
}
lastState = state;
lastStateTime = now;
}
}
if (istty) {
goToLineStart(msg);
print(msg);
} else {
if (Date.now() - ts > 200) {
print('.');
ts = Date.now();
}
}
if (percentage === 1) {
print('\n'); // completed.
}
});
function goToLineStart(nextMessage) {
var str = '';
for (; chars > nextMessage.length; chars--) {
str += '\b \b';
}chars = nextMessage.length;
for (var i = 0; i < chars; i++) {
str += '\b';
}if (str) print(str);
}
};

17
dolphinscheduler-ui/src/lib/@fedor/progress-webpack-plugin/package.json

@ -1,17 +0,0 @@
{
"name": "@fedor/progress-webpack-plugin",
"version": "1.0.0",
"description": "",
"main": "lib/index.js",
"scripts": {
"build": "babel -d lib/ src/",
"prepublish": "npm run build",
"test": "tap test/*.js",
"watch": "babel -w -d lib/ src/"
},
"author": "allex",
"license": "ISC",
"dependencies": {
"lodash": "^4.17.4"
}
}

2
dolphinscheduler-ui/src/lib/external/config.js vendored

@ -2,6 +2,6 @@
* project external config * project external config
*/ */
export default { export default {
// qianfan task record switch // task record switch
recordSwitch:false recordSwitch:false
} }
Loading…
Cancel
Save