@zjlab-fe/data-hub-ui 0.11.4 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/Jenkinsfile +28 -0
- package/deploy/docker/Dockerfile +5 -0
- package/deploy/k8s/manifests-dev/app.yaml +72 -0
- package/deploy/k8s/manifests-prod/app.yaml +71 -0
- package/deploy/nginx/server.conf +24 -0
- package/dist/types/components/radio-card/demo/index.d.ts +2 -0
- package/dist/types/components/radio-card/index.d.ts +24 -0
- package/dist/types/index.d.ts +2 -0
- package/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@Library('common-pipeline-library') _
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def params = [
|
|
5
|
+
GIT_URL: 'http://gitee.zhejianglab.com:80/enterprise/data-hub-ui.git',
|
|
6
|
+
GIT_CREDENTIALS_ID: 'zhusw-fe',
|
|
7
|
+
NODE_VERSION: '22.3.0',
|
|
8
|
+
NPM_REGISTRY: '--registry https://registry.npmmirror.com',
|
|
9
|
+
BRANCH_SPECIFIC_SETTINGS: [
|
|
10
|
+
'dev': [
|
|
11
|
+
DOCKER_FILE_PATH: 'deploy/docker/Dockerfile',
|
|
12
|
+
DOCKER_IMAGE: 'cr.registry.res.cloud.zhejianglab.com/datahub/data-hub-ui',
|
|
13
|
+
DOCKER_REGISTRY_CREDENTIALS_ID: 'zjlab-ft-acr',
|
|
14
|
+
DOCKER_REGISTRY: 'cr.registry.res.cloud.zhejianglab.com',
|
|
15
|
+
KUBE_CONFIG_CREDENTIALS_ID: 'zjfe-ddeCloud-dev-cluster-config',
|
|
16
|
+
KUBENETES_MANIFESTS_PATH: 'deploy/k8s/manifests-dev'
|
|
17
|
+
],
|
|
18
|
+
'master': [
|
|
19
|
+
DOCKER_FILE_PATH: 'deploy/docker/Dockerfile',
|
|
20
|
+
DOCKER_IMAGE: 'cr.registry.res.cloud.zhejianglab.com/datahub/data-hub-ui',
|
|
21
|
+
DOCKER_REGISTRY_CREDENTIALS_ID: 'zjlab-ft-acr',
|
|
22
|
+
DOCKER_REGISTRY: 'cr.registry.res.cloud.zhejianglab.com',
|
|
23
|
+
KUBE_CONFIG_CREDENTIALS_ID: 'zjft-cluster-config',
|
|
24
|
+
KUBENETES_MANIFESTS_PATH: 'deploy/k8s/manifests-prod'
|
|
25
|
+
]
|
|
26
|
+
]
|
|
27
|
+
]
|
|
28
|
+
nodeNpmDockerK8sMultiBranchPipeline.call(params)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: Deployment
|
|
3
|
+
metadata:
|
|
4
|
+
labels:
|
|
5
|
+
run: data-hub-ui
|
|
6
|
+
name: data-hub-ui
|
|
7
|
+
namespace: frontend
|
|
8
|
+
spec:
|
|
9
|
+
progressDeadlineSeconds: 600
|
|
10
|
+
replicas: 1
|
|
11
|
+
revisionHistoryLimit: 10
|
|
12
|
+
selector:
|
|
13
|
+
matchLabels:
|
|
14
|
+
run: data-hub-ui
|
|
15
|
+
strategy:
|
|
16
|
+
rollingUpdate:
|
|
17
|
+
maxSurge: 25%
|
|
18
|
+
maxUnavailable: 25%
|
|
19
|
+
type: RollingUpdate
|
|
20
|
+
template:
|
|
21
|
+
metadata:
|
|
22
|
+
labels:
|
|
23
|
+
run: data-hub-ui
|
|
24
|
+
spec:
|
|
25
|
+
containers:
|
|
26
|
+
- image: ${IMAGE}
|
|
27
|
+
imagePullPolicy: IfNotPresent
|
|
28
|
+
name: data-hub-ui
|
|
29
|
+
resources:
|
|
30
|
+
requests:
|
|
31
|
+
cpu: '100m'
|
|
32
|
+
memory: 25Mi
|
|
33
|
+
limits:
|
|
34
|
+
cpu: '200m'
|
|
35
|
+
memory: 50Mi
|
|
36
|
+
terminationMessagePath: /dev/termination-log
|
|
37
|
+
terminationMessagePolicy: File
|
|
38
|
+
startupProbe:
|
|
39
|
+
httpGet:
|
|
40
|
+
path: /index.html
|
|
41
|
+
port: 80
|
|
42
|
+
failureThreshold: 50
|
|
43
|
+
periodSeconds: 10
|
|
44
|
+
dnsPolicy: ClusterFirst
|
|
45
|
+
imagePullSecrets:
|
|
46
|
+
- name: zj-acr
|
|
47
|
+
restartPolicy: Always
|
|
48
|
+
schedulerName: default-scheduler
|
|
49
|
+
terminationGracePeriodSeconds: 30
|
|
50
|
+
---
|
|
51
|
+
apiVersion: v1
|
|
52
|
+
kind: Service
|
|
53
|
+
metadata:
|
|
54
|
+
labels:
|
|
55
|
+
run: data-hub-ui
|
|
56
|
+
name: data-hub-ui
|
|
57
|
+
namespace: frontend
|
|
58
|
+
spec:
|
|
59
|
+
externalTrafficPolicy: Local
|
|
60
|
+
internalTrafficPolicy: Cluster
|
|
61
|
+
ipFamilies:
|
|
62
|
+
- IPv4
|
|
63
|
+
ipFamilyPolicy: SingleStack
|
|
64
|
+
ports:
|
|
65
|
+
- name: data-hub-ui
|
|
66
|
+
port: 80
|
|
67
|
+
protocol: TCP
|
|
68
|
+
targetPort: 80
|
|
69
|
+
selector:
|
|
70
|
+
run: data-hub-ui
|
|
71
|
+
sessionAffinity: None
|
|
72
|
+
type: NodePort
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
apiVersion: apps/v1
|
|
2
|
+
kind: Deployment
|
|
3
|
+
metadata:
|
|
4
|
+
labels:
|
|
5
|
+
run: data-hub-ui
|
|
6
|
+
name: data-hub-ui
|
|
7
|
+
namespace: frontend
|
|
8
|
+
spec:
|
|
9
|
+
progressDeadlineSeconds: 600
|
|
10
|
+
replicas: 1
|
|
11
|
+
revisionHistoryLimit: 10
|
|
12
|
+
selector:
|
|
13
|
+
matchLabels:
|
|
14
|
+
run: data-hub-ui
|
|
15
|
+
strategy:
|
|
16
|
+
rollingUpdate:
|
|
17
|
+
maxSurge: 25%
|
|
18
|
+
maxUnavailable: 25%
|
|
19
|
+
type: RollingUpdate
|
|
20
|
+
template:
|
|
21
|
+
metadata:
|
|
22
|
+
labels:
|
|
23
|
+
run: data-hub-ui
|
|
24
|
+
spec:
|
|
25
|
+
containers:
|
|
26
|
+
- image: ${IMAGE}
|
|
27
|
+
imagePullPolicy: IfNotPresent
|
|
28
|
+
name: data-hub-ui
|
|
29
|
+
resources:
|
|
30
|
+
requests:
|
|
31
|
+
cpu: '100m'
|
|
32
|
+
memory: 25Mi
|
|
33
|
+
limits:
|
|
34
|
+
cpu: '200m'
|
|
35
|
+
memory: 50Mi
|
|
36
|
+
terminationMessagePath: /dev/termination-log
|
|
37
|
+
terminationMessagePolicy: File
|
|
38
|
+
startupProbe:
|
|
39
|
+
httpGet:
|
|
40
|
+
path: /index.html
|
|
41
|
+
port: 80
|
|
42
|
+
failureThreshold: 50
|
|
43
|
+
periodSeconds: 10
|
|
44
|
+
dnsPolicy: ClusterFirst
|
|
45
|
+
imagePullSecrets:
|
|
46
|
+
- name: zj-acr
|
|
47
|
+
restartPolicy: Always
|
|
48
|
+
schedulerName: default-scheduler
|
|
49
|
+
terminationGracePeriodSeconds: 30
|
|
50
|
+
---
|
|
51
|
+
apiVersion: v1
|
|
52
|
+
kind: Service
|
|
53
|
+
metadata:
|
|
54
|
+
labels:
|
|
55
|
+
run: data-hub-ui
|
|
56
|
+
name: data-hub-ui
|
|
57
|
+
namespace: frontend
|
|
58
|
+
spec:
|
|
59
|
+
internalTrafficPolicy: Cluster
|
|
60
|
+
ipFamilies:
|
|
61
|
+
- IPv4
|
|
62
|
+
ipFamilyPolicy: SingleStack
|
|
63
|
+
ports:
|
|
64
|
+
- name: data-hub-ui
|
|
65
|
+
port: 80
|
|
66
|
+
protocol: TCP
|
|
67
|
+
targetPort: 80
|
|
68
|
+
selector:
|
|
69
|
+
run: data-hub-ui
|
|
70
|
+
sessionAffinity: None
|
|
71
|
+
type: ClusterIP
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
server {
|
|
2
|
+
listen 80;
|
|
3
|
+
server_name localhost;
|
|
4
|
+
client_max_body_size 2048m;
|
|
5
|
+
|
|
6
|
+
location / {
|
|
7
|
+
root /usr/share/nginx/html;
|
|
8
|
+
index index.html index.htm index.shtml;
|
|
9
|
+
try_files $uri $uri/ /index.html;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
location /data-hub-ui {
|
|
13
|
+
alias /usr/share/nginx/html/;
|
|
14
|
+
index index.html index.htm index.shtml;
|
|
15
|
+
try_files $uri $uri/ /index.html;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
error_page 405 =200 $uri;
|
|
19
|
+
|
|
20
|
+
error_page 500 502 503 504 /50x.html;
|
|
21
|
+
location = /50x.html {
|
|
22
|
+
root /usr/share/nginx/html;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
interface BaseRadioOption {
|
|
4
|
+
value: number | string;
|
|
5
|
+
desc?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TitleRadioOption extends BaseRadioOption {
|
|
8
|
+
title: string;
|
|
9
|
+
content?: never;
|
|
10
|
+
}
|
|
11
|
+
export interface ContentRadioOption extends BaseRadioOption {
|
|
12
|
+
content: React.ReactNode;
|
|
13
|
+
title?: never;
|
|
14
|
+
}
|
|
15
|
+
export type RadioOption = TitleRadioOption | ContentRadioOption;
|
|
16
|
+
export interface RadioCardProps {
|
|
17
|
+
options: RadioOption[];
|
|
18
|
+
value?: number | string;
|
|
19
|
+
onChange?: (value: number | string) => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
declare const RadioCard: React.FC<RadioCardProps>;
|
|
24
|
+
export default RadioCard;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -30,3 +30,5 @@ export { PermissionEditModal } from './components/permission-editor';
|
|
|
30
30
|
export { PermissionViewPopover } from './components/permission-editor';
|
|
31
31
|
export { default as ApplyPermModal } from './components/apply-perm-modal';
|
|
32
32
|
export { default as Menu } from './components/menu';
|
|
33
|
+
export { default as RadioCard } from './components/radio-card';
|
|
34
|
+
export type { RadioCardProps, RadioOption } from './components/radio-card';
|