mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
Add cert to ApplicationEditPage.js
This commit is contained in:
parent
612b5f5c2e
commit
e1c54744dc
@ -16,6 +16,7 @@ import React from "react";
|
||||
import {Button, Card, Col, Input, Popover, Row, Select, Switch, Upload} from 'antd';
|
||||
import {LinkOutlined, UploadOutlined} from "@ant-design/icons";
|
||||
import * as ApplicationBackend from "./backend/ApplicationBackend";
|
||||
import * as CertBackend from "./backend/CertBackend";
|
||||
import * as Setting from "./Setting";
|
||||
import * as ProviderBackend from "./backend/ProviderBackend";
|
||||
import * as OrganizationBackend from "./backend/OrganizationBackend";
|
||||
@ -43,6 +44,7 @@ class ApplicationEditPage extends React.Component {
|
||||
applicationName: props.match.params.applicationName,
|
||||
application: null,
|
||||
organizations: [],
|
||||
certs: [],
|
||||
providers: [],
|
||||
uploading: false,
|
||||
};
|
||||
@ -51,6 +53,7 @@ class ApplicationEditPage extends React.Component {
|
||||
UNSAFE_componentWillMount() {
|
||||
this.getApplication();
|
||||
this.getOrganizations();
|
||||
this.getCerts();
|
||||
this.getProviders();
|
||||
}
|
||||
|
||||
@ -72,6 +75,15 @@ class ApplicationEditPage extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
getCerts() {
|
||||
CertBackend.getCerts("admin")
|
||||
.then((res) => {
|
||||
this.setState({
|
||||
certs: (res.msg === undefined) ? res : [],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
getProviders() {
|
||||
ProviderBackend.getProviders("admin")
|
||||
.then((res) => {
|
||||
@ -226,6 +238,18 @@ class ApplicationEditPage extends React.Component {
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{Setting.getLabel(i18next.t("general:Cert"), i18next.t("general:Cert - Tooltip"))} :
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Select virtual={false} style={{width: '100%'}} value={this.state.application.cert} onChange={(value => {this.updateApplicationField('cert', value);})}>
|
||||
{
|
||||
this.state.certs.map((cert, index) => <Option key={index} value={cert.name}>{cert.name}</Option>)
|
||||
}
|
||||
</Select>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{Setting.getLabel(i18next.t("application:Redirect URLs"), i18next.t("application:Redirect URLs - Tooltip"))} :
|
||||
|
@ -47,6 +47,7 @@ class ApplicationListPage extends BaseListPage {
|
||||
{name: "Phone", visible: true, required: true, rule: "None"},
|
||||
{name: "Agreement", visible: true, required: true, rule: "None"},
|
||||
],
|
||||
cert: "cert-built-in",
|
||||
redirectUris: ["http://localhost:9000/callback"],
|
||||
tokenFormat: "JWT",
|
||||
expireInHours: 24 * 7,
|
||||
|
@ -92,6 +92,8 @@
|
||||
"Avatar - Tooltip": "Avatar to show to others",
|
||||
"Back Home": "Zurück zu Hause",
|
||||
"Captcha": "Captcha",
|
||||
"Cert": "Cert",
|
||||
"Cert - Tooltip": "Cert - Tooltip",
|
||||
"Certs": "Certs",
|
||||
"Client IP": "Client-IP",
|
||||
"Created time": "Erstellte Zeit",
|
||||
|
@ -92,6 +92,8 @@
|
||||
"Avatar - Tooltip": "Avatar - Tooltip",
|
||||
"Back Home": "Back Home",
|
||||
"Captcha": "Captcha",
|
||||
"Cert": "Cert",
|
||||
"Cert - Tooltip": "Cert - Tooltip",
|
||||
"Certs": "Certs",
|
||||
"Client IP": "Client IP",
|
||||
"Created time": "Created time",
|
||||
|
@ -92,6 +92,8 @@
|
||||
"Avatar - Tooltip": "Avatar to show to others",
|
||||
"Back Home": "Retour à la page d'accueil",
|
||||
"Captcha": "Captcha",
|
||||
"Cert": "Cert",
|
||||
"Cert - Tooltip": "Cert - Tooltip",
|
||||
"Certs": "Certes",
|
||||
"Client IP": "IP du client",
|
||||
"Created time": "Date de création",
|
||||
|
@ -92,6 +92,8 @@
|
||||
"Avatar - Tooltip": "Avatar to show to others",
|
||||
"Back Home": "ホーム",
|
||||
"Captcha": "Captcha",
|
||||
"Cert": "Cert",
|
||||
"Cert - Tooltip": "Cert - Tooltip",
|
||||
"Certs": "Certs",
|
||||
"Client IP": "クライアント IP",
|
||||
"Created time": "作成日時",
|
||||
|
@ -92,6 +92,8 @@
|
||||
"Avatar - Tooltip": "Avatar to show to others",
|
||||
"Back Home": "Back Home",
|
||||
"Captcha": "Captcha",
|
||||
"Cert": "Cert",
|
||||
"Cert - Tooltip": "Cert - Tooltip",
|
||||
"Certs": "Certs",
|
||||
"Client IP": "Client IP",
|
||||
"Created time": "Created time",
|
||||
|
@ -92,6 +92,8 @@
|
||||
"Avatar - Tooltip": "Avatar to show to others",
|
||||
"Back Home": "Назад",
|
||||
"Captcha": "Капча",
|
||||
"Cert": "Cert",
|
||||
"Cert - Tooltip": "Cert - Tooltip",
|
||||
"Certs": "Сертификаты",
|
||||
"Client IP": "IP клиента",
|
||||
"Created time": "Время создания",
|
||||
|
@ -92,6 +92,8 @@
|
||||
"Avatar - Tooltip": "向其他人展示的头像",
|
||||
"Back Home": "返回到首页",
|
||||
"Captcha": "人机验证码",
|
||||
"Cert": "证书",
|
||||
"Cert - Tooltip": "该应用所对应的客户端SDK需要验证的公钥证书",
|
||||
"Certs": "证书",
|
||||
"Client IP": "客户端IP",
|
||||
"Created time": "创建时间",
|
||||
|
Loading…
x
Reference in New Issue
Block a user