Skip to content

Commit

Permalink
Release v7.0.0 [skip pd_pr] (#1509)
Browse files Browse the repository at this point in the history
* chore: adjust time range limit (#1485)

* tweak: change time range by cluster type (#1486)

      * tweak: change time range by cluster type

* fix typo

* Feat/sql index advisor (#1460)

* feat: add insight index advisor app

* chore: sync upstream master

* fix: lint

* chore: add authorization header for api req (#1490)

* chore: add authorization header for api req

* chore: bump tidb-dashboard-for-clinic-cloud to 0.0.51

* chore: refine sql advisor (#1488)

* chore: refine sql advisor

* chore: refine index advisor

* fix: lint

* refine: aysnc await usage

* Revert "upgrade etcd client (#1491)" (#1495)

* Hotifx Index Advisor (#1496)

* chore: slow query and statements apps refines (#1498)

* feat: adjust statement work for serverless clusters (#1500)

* feat: adjust statement to work for serverless cluster

* chore: bump tidb-dashboard-for-clinic-cloud to 0.0.54

* chore: rename CLINIC_UI_DASHBOARD_PATH to TARGET_VARIANT_DASHBOARD_PATH

* fix: fix navigation back miss the selected time range info

* chore: support hide the page load progress bar

* chore: bump tidb-dashboard-for-clinic-cloud to 0.0.55

* chore: slight refine

* chore: bump tidb-dashboard-for-clinic-cloud to 0.0.56

* feat: node metrics (#1501)

* add avg by for metrics query (#1503)

* update metrics chart (#1502)

* update metrics

* update version

* use fixed pnpm version to build image (#1508)

* Fixed issue #1505: Wrong disk mount directory of TiFlash (#1506)

* tweak(perf_insight): update apis & workflow (#1504)

* update version

---------

Co-authored-by: Suhaha <[email protected]>
Co-authored-by: Yini Xu <[email protected]>
Co-authored-by: Sparkle <[email protected]>
Co-authored-by: zzm <[email protected]>
Co-authored-by: Justin Huang <[email protected]>
Co-authored-by: Zhenchi <[email protected]>
Co-authored-by: Ping An Technology Database Team <[email protected]>
  • Loading branch information
8 people authored Apr 4, 2023
1 parent ea2cab7 commit c90c070
Show file tree
Hide file tree
Showing 121 changed files with 2,991 additions and 4,362 deletions.
2 changes: 1 addition & 1 deletion cmd/tidb-dashboard/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/pingcap/log"
flag "github.com/spf13/pflag"
"go.etcd.io/etcd/client/pkg/v3/transport"
"go.etcd.io/etcd/pkg/transport"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/alpine316.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apk add --no-cache \
npm \
openjdk11

RUN npm install -g pnpm
RUN npm install -g pnpm@7.30.5

RUN mkdir -p /go/src/github.com/pingcap/tidb-dashboard/ui
WORKDIR /go/src/github.com/pingcap/tidb-dashboard
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/centos7.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
# Install nodejs.
RUN curl -fsSL https://rpm.nodesource.com/setup_16.x | bash -
RUN yum -y install nodejs
RUN npm install -g pnpm
RUN npm install -g pnpm@7.30.5

# Install java.
RUN yum -y install java-11-openjdk
Expand Down
22 changes: 10 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/golang-jwt/jwt v3.2.1+incompatible
github.com/golang/snappy v0.0.4
github.com/google/pprof v0.0.0-20211122183932-1daafda22083
github.com/google/uuid v1.1.2
github.com/google/uuid v1.0.0
github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69
github.com/henrylee2cn/ameda v1.4.10
github.com/jarcoal/httpmock v1.0.8
Expand All @@ -45,15 +45,14 @@ require (
github.com/swaggo/http-swagger v0.0.0-20200308142732-58ac5e232fba
github.com/swaggo/swag v1.6.6-0.20200529100950-7c765ddd0476
github.com/vmihailenco/msgpack/v5 v5.3.5
go.etcd.io/etcd/client/pkg/v3 v3.5.7
go.etcd.io/etcd/client/v3 v3.5.7
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738
go.uber.org/atomic v1.9.0
go.uber.org/fx v1.12.0
go.uber.org/goleak v1.1.10
go.uber.org/zap v1.19.0
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
google.golang.org/grpc v1.41.0
google.golang.org/grpc v1.25.1
google.golang.org/protobuf v1.28.0
gorm.io/datatypes v1.1.0
gorm.io/driver/mysql v1.4.5
Expand All @@ -67,8 +66,8 @@ require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fogleman/gg v1.3.0 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
Expand All @@ -79,9 +78,9 @@ require (
github.com/go-playground/locales v0.13.0 // indirect
github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.0 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
Expand All @@ -97,19 +96,18 @@ require (
github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.7 // indirect
go.uber.org/dig v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b // indirect
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023 // indirect
google.golang.org/appengine v1.4.0 // indirect
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
Expand Down
180 changes: 99 additions & 81 deletions go.sum

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pkg/apiserver/clusterinfo/hostinfo/cluster_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ func FillInstances(db *gorm.DB, m InfoMap) error {
Table("INFORMATION_SCHEMA.CLUSTER_CONFIG").
Where("(`TYPE` = 'tidb' AND `KEY` = 'log.file.filename') " +
"OR (`TYPE` = 'tikv' AND `KEY` = 'storage.data-dir') " +
"OR (`TYPE` = 'pd' AND `KEY` = 'data-dir')").
"OR (`TYPE` = 'pd' AND `KEY` = 'data-dir') " +
"OR (`TYPE` = 'tiflash' AND `KEY` = 'engine-store.path')").
Find(&rows).Error; err != nil {
return err
}
Expand Down
47 changes: 0 additions & 47 deletions pkg/apiserver/clusterinfo/hostinfo/cluster_hardware.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ func FillFromClusterHardwareTable(db *gorm.DB, m InfoMap) error {
return err
}

tiFlashDisks := make([]clusterTableModel, 0)

for _, row := range rows {
hostname, _, err := netutil.ParseHostAndPortFromAddress(row.Instance)
if err != nil {
Expand All @@ -70,10 +68,6 @@ func FillFromClusterHardwareTable(db *gorm.DB, m InfoMap) error {
PhysicalCores: v.PhysicalCores,
}
case row.DeviceType == "disk":
if row.Type == "tiflash" {
// Collect TiFlash related information for later processing.
tiFlashDisks = append(tiFlashDisks, row)
}
if m[hostname].PartitionProviderType != "" && m[hostname].PartitionProviderType != row.Type {
// Another instance on the same host has already provided disk information, skip.
continue
Expand All @@ -95,46 +89,5 @@ func FillFromClusterHardwareTable(db *gorm.DB, m InfoMap) error {
}
}

// ==========================================================================================
// HACK: TiFlash special logic
// For now, we can only infer TiFlash instances from its reported disk information.
// Due to a bug, TiFlash will return all disks that has the prefix of actual deployed disk.
type tiFlashDiskEntity struct {
maxLen int
maxLenPath string
}
tiFlashDiskInfo := make(map[string]tiFlashDiskEntity) // key is TiFlash instance address
for _, d := range tiFlashDisks {
var v clusterHardwareDiskModel
err := json.Unmarshal([]byte(d.JSONValue), &v)
if err != nil {
continue
}
// For each TiFlash instance, it may report multiple disks. We keep the disk that has longest path.
if _, ok := tiFlashDiskInfo[d.Instance]; !ok {
tiFlashDiskInfo[d.Instance] = tiFlashDiskEntity{
maxLen: 0,
maxLenPath: "",
}
}
if len(v.Path) > tiFlashDiskInfo[d.Instance].maxLen {
tiFlashDiskInfo[d.Instance] = tiFlashDiskEntity{
maxLen: len(v.Path),
maxLenPath: v.Path,
}
}
}
// Back fill TiFlash instances
for instance, de := range tiFlashDiskInfo {
hostname, _, err := netutil.ParseHostAndPortFromAddress(instance)
if err != nil {
panic(err)
}
m[hostname].Instances[instance] = &InstanceInfo{
Type: "tiflash",
PartitionPathL: strings.ToLower(de.maxLenPath),
}
}

return nil
}
2 changes: 1 addition & 1 deletion pkg/apiserver/clusterinfo/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"time"

"github.com/gin-gonic/gin"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"

"github.com/pingcap/tidb-dashboard/pkg/apiserver/clusterinfo/hostinfo"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/configuration/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sort"

"github.com/joomcode/errorx"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"
"gorm.io/gorm"

Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/conprof/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"

"github.com/gin-gonic/gin"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"

"github.com/pingcap/tidb-dashboard/pkg/apiserver/user"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/Masterminds/semver"
"github.com/gin-gonic/gin"
"github.com/samber/lo"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"

"github.com/pingcap/tidb-dashboard/pkg/apiserver/user"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/metrics/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/joomcode/errorx"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/atomic"
"go.uber.org/fx"
"golang.org/x/sync/singleflight"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/profiling/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/joomcode/errorx"
"github.com/pingcap/log"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"
"go.uber.org/zap"

Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/utils/ngm.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/gin-gonic/gin"
"github.com/joomcode/errorx"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"
"golang.org/x/sync/singleflight"

Expand Down
2 changes: 1 addition & 1 deletion pkg/config/dynamic_config_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cenkalti/backoff/v4"
"github.com/joomcode/errorx"
"github.com/pingcap/log"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"
"go.uber.org/zap"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/keyvisual/decorator/tidb.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sync"
"time"

clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"

"github.com/pingcap/tidb-dashboard/pkg/config"
Expand Down
2 changes: 1 addition & 1 deletion pkg/keyvisual/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/joomcode/errorx"
"github.com/pingcap/log"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"
"go.uber.org/zap"

Expand Down
2 changes: 1 addition & 1 deletion pkg/pd/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/pingcap/log"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"
"go.uber.org/zap"

Expand Down
2 changes: 1 addition & 1 deletion pkg/tidb/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/VividCortex/mysqlerr"
"github.com/go-sql-driver/mysql"
"github.com/pingcap/log"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"
"go.uber.org/zap"
mysqlDriver "gorm.io/driver/mysql"
Expand Down
2 changes: 1 addition & 1 deletion pkg/tidb/forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/cenkalti/backoff/v4"
"github.com/pingcap/log"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/fx"

"github.com/pingcap/tidb-dashboard/pkg/utils/topology"
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/topology/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/pingcap/log"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/zap"

"github.com/pingcap/tidb-dashboard/util/distro"
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/topology/tidb.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"time"

"github.com/pingcap/log"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/zap"

"github.com/pingcap/tidb-dashboard/util/distro"
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/topology/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/joomcode/errorx"
"github.com/pingcap/log"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/clientv3"
"go.uber.org/zap"

"github.com/pingcap/tidb-dashboard/util/distro"
Expand Down
2 changes: 1 addition & 1 deletion release-version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file specifies the TiDB Dashboard internal version, which will be printed in `--version`
# and UI. In release branch, changing this file will result in publishing a new version and tag.
2023.02.22.1
7.0.0
2 changes: 1 addition & 1 deletion scripts/distro/write_strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -euo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
PROJECT_DIR=$(cd "$DIR/../.."; pwd)

TARGET="${PROJECT_DIR}/ui/packages/tidb-dashboard-for-op/src/uilts/distro/strings_res.json"
TARGET="${PROJECT_DIR}/ui/packages/tidb-dashboard-for-op/src/utils/distro/strings_res.json"

echo "+ Write distro strings"
cd "$PROJECT_DIR"
Expand Down
2 changes: 1 addition & 1 deletion scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
Expand Down
2 changes: 1 addition & 1 deletion ui/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ packages/tidb-dashboard-client/dist
packages/tidb-dashboard-lib/src/client/models.ts
packages/tidb-dashboard-lib/dist

packages/tidb-dashboard-for-op/src/uilts/distro/strings_res.json
packages/tidb-dashboard-for-op/src/utils/distro/strings_res.json
packages/tidb-dashboard-for-op/public/speedscope
packages/tidb-dashboard-for-op/dist
packages/tidb-dashboard-for-op/.nyc_output
Expand Down
5 changes: 3 additions & 2 deletions ui/packages/tidb-dashboard-for-clinic-cloud/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ REACT_APP_VERSION=$npm_package_version
REACT_APP_MIXPANEL_HOST=https://telemetry.pingcap.com/api/v1/dashboard/report
REACT_APP_MIXPANEL_TOKEN=
#####
# env vars for debugging with clinic ui
# CLINIC_UI_DASHBOARD_PATH=/mnt/bao/codes/work/clinic-ui/packages/clinic-web/dist/dashboard/cloud
# env vars for debugging with target variant (for example: clinic ui, dbaas ui)
# TARGET_VARIANT_DASHBOARD_PATH=/mnt/bao/codes/work/clinic-ui/packages/clinic-web/dist/dashboard/cloud
# TARGET_VARIANT_DASHBOARD_PATH=/mnt/bao/codes/work/dbaas-ui/public/dashboard
# you can set this env value in the .env.local
12 changes: 6 additions & 6 deletions ui/packages/tidb-dashboard-for-clinic-cloud/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (isDev && fs.pathExistsSync(path.resolve(process.cwd(), '.env.local'))) {
}

const outDir = 'dist'
const clinicUIDashboardPath = process.env.CLINIC_UI_DASHBOARD_PATH
const targetVariantDashboardPath = process.env.TARGET_VARIANT_DASHBOARD_PATH

function genDefine() {
const define = {}
Expand Down Expand Up @@ -107,15 +107,15 @@ function handleAssets() {
}

function copyAssets() {
if (!fs.existsSync(clinicUIDashboardPath)) {
if (!fs.existsSync(targetVariantDashboardPath)) {
console.log(
`clinic ui dashboard path ${clinicUIDashboardPath} doesn't exist, ignore`
`target variant dashboard path ${targetVariantDashboardPath} doesn't exist, ignore`
)
return
}
fs.removeSync(clinicUIDashboardPath)
fs.copySync(`./${outDir}`, clinicUIDashboardPath)
console.log('copy dashboard to clinic ui')
fs.removeSync(targetVariantDashboardPath)
fs.copySync(`./${outDir}`, targetVariantDashboardPath)
console.log('copy dashboard to target variant')
}

async function main() {
Expand Down
Loading

0 comments on commit c90c070

Please sign in to comment.