Skip to content

Commit

Permalink
fix(console): fix tchart bug (#1885)
Browse files Browse the repository at this point in the history
* feat(console): move tchart and tea-app to local

* fix(console): when monitor time range is 7 day, display MM-DD

* fix(console): fix build error
  • Loading branch information
jo-hnny committed Apr 27, 2022
1 parent 92a7f18 commit ee1a1f5
Show file tree
Hide file tree
Showing 52 changed files with 217 additions and 19,045 deletions.
4 changes: 4 additions & 0 deletions web/console/ambient/json.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "*.json" {
const value: any;
export default value;
}
2 changes: 1 addition & 1 deletion web/console/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations under the License.
*/
// 导入依赖
import { i18n } from '@tea/app';
import { i18n } from '@tencent/tea-app/lib';
// 导入词条
import { translation } from '@i18n/translation';

Expand Down
2 changes: 1 addition & 1 deletion web/console/index.project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { TipDialog } from '@src/modules/common';
import { Button, Alert, Text } from '@tencent/tea-component';
import { PersistentEvent } from '@src/modules/persistentEvent';
// 公有云的图表组件为异步加载,这里为了减少路径配置,还是保留为同步加载,预先import即可变成不split
import '@tencent/tchart/build/ChartsComponents';
// import '@tencent/tchart/build/ChartsComponents';
import { PlatformTypeEnum } from './config';

const ApplicationPromise = import(/* webpackPrefetch: true */ './src/modules/cluster/index.project');
Expand Down
2 changes: 1 addition & 1 deletion web/console/index.tke.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { Button, Alert, Text } from '@tencent/tea-component';
import { Init_Forbiddent_Config } from './helpers/reduceNetwork';

// 公有云的图表组件为异步加载,这里为了减少路径配置,还是保留为同步加载,预先import即可变成不split
import '@tencent/tchart/build/ChartsComponents';
// import '@tencent/tchart/build/ChartsComponents';
import { BlankPage } from './blankPage';
import { Overview } from '@src/modules/overview';
import { PlatformTypeEnum } from './config';
Expand Down
145 changes: 145 additions & 0 deletions web/console/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion web/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
},
"scripts": {
"preinstall": "rm -rf node_modules",
"postinstall": "cp -r ./tencent/ ./node_modules/@tencent",
"prestart-tke": "npm install",
"start-tke": "webpack server --config ./webpack/webpack.dev.js --progress --color --env version=tke",
"prestart-project": "npm install",
Expand Down Expand Up @@ -111,6 +110,8 @@
"gulp-uglify": "^3.0.2",
"html-webpack-plugin": "^5.3.1",
"husky": "^6.0.0",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"lint-staged": "^11.0.0",
"prettier": "^2.3.2",
"readable-stream": "^3.6.0",
Expand Down
Loading

0 comments on commit ee1a1f5

Please sign in to comment.