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