update plugins

This commit is contained in:
76487013@qq.com 2023-06-05 14:15:16 +08:00
parent 0cb8faf95a
commit e73518f689
26 changed files with 227 additions and 63 deletions

View File

@ -1,8 +1,8 @@
{ {
"files": { "files": {
"main.css": "./static/css/main.751babb1.css", "main.css": "./static/css/main.751babb1.css",
"main.js": "./static/js/main.31cbb49f.js", "main.js": "./static/js/main.a27efeeb.js",
"static/js/688.236f9104.chunk.js": "./static/js/688.236f9104.chunk.js", "static/js/688.bf21350d.chunk.js": "./static/js/688.bf21350d.chunk.js",
"static/js/376.0505e571.chunk.js": "./static/js/376.0505e571.chunk.js", "static/js/376.0505e571.chunk.js": "./static/js/376.0505e571.chunk.js",
"static/js/426.910887ac.chunk.js": "./static/js/426.910887ac.chunk.js", "static/js/426.910887ac.chunk.js": "./static/js/426.910887ac.chunk.js",
"static/js/912.833f32c9.chunk.js": "./static/js/912.833f32c9.chunk.js", "static/js/912.833f32c9.chunk.js": "./static/js/912.833f32c9.chunk.js",
@ -43,8 +43,8 @@
"static/media/logo-sm.svg": "./static/media/logo-sm.53b8ca70620b0b2968874a3660f195dd.svg", "static/media/logo-sm.svg": "./static/media/logo-sm.53b8ca70620b0b2968874a3660f195dd.svg",
"index.html": "./index.html", "index.html": "./index.html",
"main.751babb1.css.map": "./static/css/main.751babb1.css.map", "main.751babb1.css.map": "./static/css/main.751babb1.css.map",
"main.31cbb49f.js.map": "./static/js/main.31cbb49f.js.map", "main.a27efeeb.js.map": "./static/js/main.a27efeeb.js.map",
"688.236f9104.chunk.js.map": "./static/js/688.236f9104.chunk.js.map", "688.bf21350d.chunk.js.map": "./static/js/688.bf21350d.chunk.js.map",
"376.0505e571.chunk.js.map": "./static/js/376.0505e571.chunk.js.map", "376.0505e571.chunk.js.map": "./static/js/376.0505e571.chunk.js.map",
"426.910887ac.chunk.js.map": "./static/js/426.910887ac.chunk.js.map", "426.910887ac.chunk.js.map": "./static/js/426.910887ac.chunk.js.map",
"912.833f32c9.chunk.js.map": "./static/js/912.833f32c9.chunk.js.map", "912.833f32c9.chunk.js.map": "./static/js/912.833f32c9.chunk.js.map",
@ -53,6 +53,6 @@
}, },
"entrypoints": [ "entrypoints": [
"static/css/main.751babb1.css", "static/css/main.751babb1.css",
"static/js/main.31cbb49f.js" "static/js/main.a27efeeb.js"
] ]
} }

View File

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><script type="text/javascript" src="../base1/cockpit.js"></script><script type="text/javascript" src="../*/po.js"></script><link rel="manifest" href="./manifest.json"/><title>App Store</title><script defer="defer" src="./static/js/main.31cbb49f.js"></script><link href="./static/css/main.751babb1.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root" style="height:100%"></div></body></html> <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><script type="text/javascript" src="../base1/cockpit.js"></script><script type="text/javascript" src="../*/po.js"></script><link rel="manifest" href="./manifest.json"/><title>App Store</title><script defer="defer" src="./static/js/main.a27efeeb.js"></script><link href="./static/css/main.751babb1.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root" style="height:100%"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -18,11 +18,12 @@ const Alert = React.forwardRef(function Alert(props, ref) {
}); });
const getContentfulData = gql` const getContentfulData = gql`
query($locale: String){ query($locale: String,$skip: Int){
productCollection(locale:$locale,where:{appStore:true}) { productCollection(locale:$locale,where:{appStore:true},limit: 100, skip: $skip) {
total
items { items {
sys { sys {
id id
} }
key key
trademark trademark
@ -32,7 +33,6 @@ const getContentfulData = gql`
description description
screenshots screenshots
distribution distribution
highlights
vcpu vcpu
memory memory
storage storage
@ -271,16 +271,53 @@ const AppStore = (): React$Element<React$FragmentType> => {
const [isAllSelected, setIsAllSelected] = useState(true); const [isAllSelected, setIsAllSelected] = useState(true);
const [searchValue, setSearchValue] = useState(""); const [searchValue, setSearchValue] = useState("");
const { loading: dataLoading, error: dataError, data: allData } = useQuery(getContentfulData, { variables: { locale: language === "zh_CN" ? "zh-CN" : "en-US" } }); const { loading: dataLoading, error: dataError, data: allData, fetchMore } = useQuery(getContentfulData, { variables: { locale: language === "zh_CN" ? "zh-CN" : "en-US" } });
// 定义一个变量来存储已经查询过的数据的数量
let skipCount = 0;
// 定义一个函数来使用fetchMore方法获取更多的产品
const fetchMoreProducts = () => {
// 检查是否还有更多的产品可以获取
if (allData.productCollection.items.length < allData.productCollection.total) {
// 使用fetchMore方法把已经查询过的数据的数量作为skip变量传入
fetchMore({
variables: {
skip: skipCount,
},
// 使用新的结果更新之前的结果通过连接items数组
updateQuery: (prevResult, { fetchMoreResult }) => {
return Object.assign({}, prevResult, {
productCollection: {
...fetchMoreResult.productCollection,
items: [
...prevResult.productCollection.items,
...fetchMoreResult.productCollection.items,
],
},
});
},
});
}
};
const mainCatalogs = allData?.catalog.linkedFrom.catalogCollection.items; //主目录数据 const mainCatalogs = allData?.catalog.linkedFrom.catalogCollection.items; //主目录数据
const apps = allData?.productCollection?.items;//所有应用数据 //const apps = allData?.productCollection?.items;//所有应用数据
const [appList, setAppList] = useState(apps); //用于存储通过目录筛选出来的数据 const [apps, setApps] = useState(null); //用于存储通过目录筛选出来的数据
const [appList, setAppList] = useState(null); //用于存储通过目录筛选出来的数据
useEffect(() => { useEffect(() => {
setAppList(apps); // 检查是否有任何数据
}, [apps]) if (allData) {
// 更新已经查询过的数据的数量,加上当前返回的数据的数量
skipCount += allData.productCollection.items.length;
// 调用fetchMoreProducts函数来获取更多的产品如果有的话
fetchMoreProducts();
setAppList(allData.productCollection?.items);
setApps(allData.productCollection?.items);
}
}, [allData])
// if (dataLoading) return <p>Loading...</p>; // if (dataLoading) return <p>Loading...</p>;
@ -402,7 +439,7 @@ const AppStore = (): React$Element<React$FragmentType> => {
<Row> <Row>
{(appList || []).map((app, i) => { {(appList || []).map((app, i) => {
return ( return (
<Col xxl={3} sm={6} md={4} key={app.sys.id} className="appstore-item"> <Col xxl={3} sm={6} md={4} key={"app-" + i} className="appstore-item">
<div className='appstore-item-content highlight' onClick={() => { handleClick(app) }}> <div className='appstore-item-content highlight' onClick={() => { handleClick(app) }}>
<div className='appstore-item-content-icon col-same-height'> <div className='appstore-item-content-icon col-same-height'>
<img <img

View File

@ -1,8 +1,8 @@
{ {
"files": { "files": {
"main.css": "./static/css/main.751babb1.css", "main.css": "./static/css/main.751babb1.css",
"main.js": "./static/js/main.9813c239.js", "main.js": "./static/js/main.495e2b6f.js",
"static/js/145.13333720.chunk.js": "./static/js/145.13333720.chunk.js", "static/js/145.2fc71954.chunk.js": "./static/js/145.2fc71954.chunk.js",
"static/js/376.bc0e5568.chunk.js": "./static/js/376.bc0e5568.chunk.js", "static/js/376.bc0e5568.chunk.js": "./static/js/376.bc0e5568.chunk.js",
"static/js/426.46c5e949.chunk.js": "./static/js/426.46c5e949.chunk.js", "static/js/426.46c5e949.chunk.js": "./static/js/426.46c5e949.chunk.js",
"static/js/603.8e18e7fa.chunk.js": "./static/js/603.8e18e7fa.chunk.js", "static/js/603.8e18e7fa.chunk.js": "./static/js/603.8e18e7fa.chunk.js",
@ -64,8 +64,8 @@
"static/media/logo-sm.svg": "./static/media/logo-sm.53b8ca70620b0b2968874a3660f195dd.svg", "static/media/logo-sm.svg": "./static/media/logo-sm.53b8ca70620b0b2968874a3660f195dd.svg",
"index.html": "./index.html", "index.html": "./index.html",
"main.751babb1.css.map": "./static/css/main.751babb1.css.map", "main.751babb1.css.map": "./static/css/main.751babb1.css.map",
"main.9813c239.js.map": "./static/js/main.9813c239.js.map", "main.495e2b6f.js.map": "./static/js/main.495e2b6f.js.map",
"145.13333720.chunk.js.map": "./static/js/145.13333720.chunk.js.map", "145.2fc71954.chunk.js.map": "./static/js/145.2fc71954.chunk.js.map",
"376.bc0e5568.chunk.js.map": "./static/js/376.bc0e5568.chunk.js.map", "376.bc0e5568.chunk.js.map": "./static/js/376.bc0e5568.chunk.js.map",
"426.46c5e949.chunk.js.map": "./static/js/426.46c5e949.chunk.js.map", "426.46c5e949.chunk.js.map": "./static/js/426.46c5e949.chunk.js.map",
"603.8e18e7fa.chunk.js.map": "./static/js/603.8e18e7fa.chunk.js.map", "603.8e18e7fa.chunk.js.map": "./static/js/603.8e18e7fa.chunk.js.map",
@ -78,6 +78,6 @@
}, },
"entrypoints": [ "entrypoints": [
"static/css/main.751babb1.css", "static/css/main.751babb1.css",
"static/js/main.9813c239.js" "static/js/main.495e2b6f.js"
] ]
} }

View File

@ -1,7 +1,7 @@
{ {
"PORTAINER": { "PORTAINER": {
"PORTAINER_AUTH_URL": "/portainer/api/auth", "PORTAINER_AUTH_URL": "/portainer/api/auth",
"PORTAINER_HOME_PAGE": "/portainer/#!/home", "PORTAINER_HOME_PAGE": "/portainer",
"PORTAINER_USERNAME": "admin", "PORTAINER_USERNAME": "admin",
"PORTAINER_PASSWORD": "websoft9@2023" "PORTAINER_PASSWORD": "websoft9@2023"
}, },

View File

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><script type="text/javascript" src="../base1/cockpit.js"></script><script type="text/javascript" src="../*/po.js"></script><link rel="manifest" href="./manifest.json"/><title>App Store</title><script defer="defer" src="./static/js/main.9813c239.js"></script><link href="./static/css/main.751babb1.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root" style="height:100%"></div></body></html> <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><script type="text/javascript" src="../base1/cockpit.js"></script><script type="text/javascript" src="../*/po.js"></script><link rel="manifest" href="./manifest.json"/><title>App Store</title><script defer="defer" src="./static/js/main.495e2b6f.js"></script><link href="./static/css/main.751babb1.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root" style="height:100%"></div></body></html>

View File

@ -231,6 +231,10 @@
null, null,
"更多" "更多"
], ],
"more": [
null,
"更多"
],
"save": [ "save": [
null, null,
"保存" "保存"
@ -339,7 +343,7 @@
null, null,
"域名访问" "域名访问"
], ],
"Domain access for better application performance.HTTPS and custom configurations available.": [ "Access the domain name for better application performance, https and custom configuration can click": [
null, null,
"域名访问以获得更好的应用程序性能,HTTPS和自定义配置可点击" "域名访问以获得更好的应用程序性能,HTTPS和自定义配置可点击"
], ],
@ -350,6 +354,63 @@
"Admin Page": [ "Admin Page": [
null, null,
"访问后台" "访问后台"
],
"This application consists of the following containers, and the one named $0 is the main container.": [
null,
"本应用由如下容器组成,名称为 $0 的为主容器"
],
"Actions": [
null,
"操作"
],
"Image": [
null,
"镜像"
],
"Created": [
null,
"创建时间"
],
"Ip Address": [
null,
"IP地址"
],
"Published Ports": [
null,
"公共端口"
],
"No Domain Access": [
null,
"无域名访问"
],
"No domain name can temporarily access the application by IP + port": [
null,
"没有域名可以通过IP+端口的方式临时访问应用"
],
"Front End": [
null,
"前台"
],
"Back End": [
null,
"后台"
],
"Initial Account": [
null,
"初始账号"
],
"UserName": [
null,
"账号"
],
"Password": [
null,
"密码"
],
"This application is pre-configured with an administrator account, please change the administrator password immediately. The initial credentials are:": [
null,
"此应用程序是使用管理员帐户预先设置的,请立即更改管理员密码。初始凭据为:"
] ]
})); }));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{ {
"PORTAINER": { "PORTAINER": {
"PORTAINER_AUTH_URL": "/portainer/api/auth", "PORTAINER_AUTH_URL": "/portainer/api/auth",
"PORTAINER_HOME_PAGE": "/portainer/#!/home", "PORTAINER_HOME_PAGE": "/portainer",
"PORTAINER_USERNAME": "admin", "PORTAINER_USERNAME": "admin",
"PORTAINER_PASSWORD": "websoft9@2023" "PORTAINER_PASSWORD": "websoft9@2023"
}, },

View File

@ -231,6 +231,10 @@
null, null,
"更多" "更多"
], ],
"more": [
null,
"更多"
],
"save": [ "save": [
null, null,
"保存" "保存"
@ -339,7 +343,7 @@
null, null,
"域名访问" "域名访问"
], ],
"Domain access for better application performance.HTTPS and custom configurations available.": [ "Access the domain name for better application performance, https and custom configuration can click": [
null, null,
"域名访问以获得更好的应用程序性能,HTTPS和自定义配置可点击" "域名访问以获得更好的应用程序性能,HTTPS和自定义配置可点击"
], ],
@ -350,6 +354,63 @@
"Admin Page": [ "Admin Page": [
null, null,
"访问后台" "访问后台"
],
"This application consists of the following containers, and the one named $0 is the main container.": [
null,
"本应用由如下容器组成,名称为 $0 的为主容器"
],
"Actions": [
null,
"操作"
],
"Image": [
null,
"镜像"
],
"Created": [
null,
"创建时间"
],
"Ip Address": [
null,
"IP地址"
],
"Published Ports": [
null,
"公共端口"
],
"No Domain Access": [
null,
"无域名访问"
],
"No domain name can temporarily access the application by IP + port": [
null,
"没有域名可以通过IP+端口的方式临时访问应用"
],
"Front End": [
null,
"前台"
],
"Back End": [
null,
"后台"
],
"Initial Account": [
null,
"初始账号"
],
"UserName": [
null,
"账号"
],
"Password": [
null,
"密码"
],
"This application is pre-configured with an administrator account, please change the administrator password immediately. The initial credentials are:": [
null,
"此应用程序是使用管理员帐户预先设置的,请立即更改管理员密码。初始凭据为:"
] ]
})); }));

View File

@ -192,7 +192,7 @@ const AppAccess = (props): React$Element<React$FragmentType> => {
else { else {
setShowAlert(true); setShowAlert(true);
setAlertType("success") setAlertType("success")
setAlertMessage("设置成功!"); setAlertMessage(_("Success"));
getDomains(); getDomains();
} }
} }
@ -224,7 +224,7 @@ const AppAccess = (props): React$Element<React$FragmentType> => {
else { else {
setShowAlert(true); setShowAlert(true);
setAlertType("success") setAlertType("success")
setAlertMessage("Success"); setAlertMessage(_("Success"));
getDomains(); getDomains();
} }
} }
@ -253,7 +253,7 @@ const AppAccess = (props): React$Element<React$FragmentType> => {
else { else {
setShowAlert(true); setShowAlert(true);
setAlertType("success") setAlertType("success")
setAlertMessage("Success"); setAlertMessage(_("Success"));
getDomains(); getDomains();
} }
} }
@ -331,9 +331,10 @@ const AppAccess = (props): React$Element<React$FragmentType> => {
<Typography> <Typography>
<label className="me-2 fs-5 d-block">{_("Domain Access")}</label> <label className="me-2 fs-5 d-block">{_("Domain Access")}</label>
<span className="me-2 fs-6" style={{ display: isExpandedForDomain ? 'inline' : 'none' }}> <span className="me-2 fs-6" style={{ display: isExpandedForDomain ? 'inline' : 'none' }}>
{_("Domain access for better application performance. HTTPS and custom configurations available")} {_("Access the domain name for better application performance, https and custom configuration can click")}
{" "}
<a href="/nginx" target="_parent"> <a href="/nginx" target="_parent">
{_("More")} {_("more")}
</a> </a>
</span> </span>
</Typography> </Typography>
@ -442,8 +443,10 @@ const AppAccess = (props): React$Element<React$FragmentType> => {
id="panel2a-header" id="panel2a-header"
> >
<Typography> <Typography>
<label className="me-2 fs-5 d-block">无域名访问</label> <label className="me-2 fs-5 d-block">{_("No Domain Access")}</label>
<span className="me-2 fs-6" style={{ display: isExpandedForNoDomain ? 'inline' : 'none' }}>没有域名可以通过IP+端口的方式临时访问应用</span> <span className="me-2 fs-6" style={{ display: isExpandedForNoDomain ? 'inline' : 'none' }}>
{_("No domain name can temporarily access the application by IP + port")}
</span>
</Typography> </Typography>
</AccordionSummary> </AccordionSummary>
<AccordionDetails> <AccordionDetails>
@ -454,7 +457,7 @@ const AppAccess = (props): React$Element<React$FragmentType> => {
props.data?.config?.url && props.data?.config?.url &&
( (
<div> <div>
<label className="me-2 fs-5">前台:</label> <label className="me-2 fs-5">{_("Front End")}:</label>
<a href={props.data?.config?.url} target="_blank" className="me-2"> <a href={props.data?.config?.url} target="_blank" className="me-2">
{props.data?.config?.url} {props.data?.config?.url}
</a> </a>
@ -465,7 +468,7 @@ const AppAccess = (props): React$Element<React$FragmentType> => {
props.data?.config?.admin_url && props.data?.config?.admin_url &&
( (
<div> <div>
<label className="me-2 fs-5">后台:</label> <label className="me-2 fs-5">{_("Back End")}:</label>
<a href={props.data?.config?.admin_url} target="_blank" className="me-2"> <a href={props.data?.config?.admin_url} target="_blank" className="me-2">
{props.data?.config?.admin_url} {props.data?.config?.admin_url}
</a> </a>
@ -487,9 +490,9 @@ const AppAccess = (props): React$Element<React$FragmentType> => {
id="panel3a-header" id="panel3a-header"
> >
<Typography> <Typography>
<label className="me-2 fs-5 d-block">初始账号</label> <label className="me-2 fs-5 d-block">{_("Initial Account")}</label>
<span className="me-2 fs-6" style={{ display: isExpandedForAccount ? 'inline' : 'none' }}> <span className="me-2 fs-6" style={{ display: isExpandedForAccount ? 'inline' : 'none' }}>
此应用程序是使用管理员帐户预先设置的请立即更改管理员密码初始凭据为 {_("This application is pre-configured with an administrator account, please change the administrator password immediately. The initial credentials are:")}
</span> </span>
</Typography> </Typography>
</AccordionSummary> </AccordionSummary>
@ -502,7 +505,7 @@ const AppAccess = (props): React$Element<React$FragmentType> => {
</p> */} </p> */}
<Form.Group as={Row} className="mb-3"> <Form.Group as={Row} className="mb-3">
<Form.Label htmlFor="username" column md={2} className='fs-5'> <Form.Label htmlFor="username" column md={2} className='fs-5'>
UserName {_("UserName")}
</Form.Label> </Form.Label>
<Col md={4}> <Col md={4}>
<Form.Control <Form.Control
@ -517,7 +520,7 @@ const AppAccess = (props): React$Element<React$FragmentType> => {
<Form.Group as={Row} className="mb-3"> <Form.Group as={Row} className="mb-3">
<Form.Label htmlFor="password" column md={2} className='fs-5'> <Form.Label htmlFor="password" column md={2} className='fs-5'>
Password {_("Password")}
</Form.Label> </Form.Label>
<Col md={4}> <Col md={4}>
<FormInput <FormInput

View File

@ -117,7 +117,9 @@ const AppContainer = (props): React$Element<React$FragmentType> => {
<Row className="align-items-center"> <Row className="align-items-center">
<Col xs={12} md={10}> <Col xs={12} md={10}>
<label className="me-2 fs-5 d-block">{_("Container")}</label> <label className="me-2 fs-5 d-block">{_("Container")}</label>
<span className="me-2 fs-6">本应用由如下容器组成名称为 {customer_name} 的为主容器 </span> <span className="me-2 fs-6">
{cockpit.format(_("This application consists of the following containers, and the one named $0 is the main container."), customer_name)}
</span>
</Col> </Col>
<Col xs={12} md={2}> <Col xs={12} md={2}>
<a href={`/portainer/#!/${endpointsId}/docker/stacks/${customer_name}?type=2&regular=false&external=true&orphaned=false`} <a href={`/portainer/#!/${endpointsId}/docker/stacks/${customer_name}?type=2&regular=false&external=true&orphaned=false`}
@ -131,13 +133,13 @@ const AppContainer = (props): React$Element<React$FragmentType> => {
<Table className="mb-0"> <Table className="mb-0">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>{_("Name")}</th>
<th>State</th> <th>{_("State")}</th>
<th style={{ textAlign: 'center' }}>Actions</th> <th style={{ textAlign: 'center' }}>{_("Actions")}</th>
<th>Image</th> <th>{_("Image")}</th>
<th>Created</th> <th>{_("Created")}</th>
<th>Ip Address</th> <th>{_("Ip Address")}</th>
<th>Published Ports</th> <th>{_("Published Ports")}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -1,5 +1,5 @@
{ {
"version": "1.0.1", "version": "1.0.0",
"menu": { "menu": {
"container": { "container": {
"label": "Portainer", "label": "Portainer",