feat: extend managed accounts for get-account api (#1068)

* feat: add get-extend-account api

* feat: extend managed accounts for get-account api

* fix go-linter err

* Use GetApplicationsByOrganizationName
This commit is contained in:
Resulte Lee
2022-08-30 00:57:27 +08:00
committed by GitHub
parent 2394c8e2b4
commit 8da50b7893
3 changed files with 37 additions and 6 deletions

View File

@ -38,7 +38,7 @@ class ManagedAccountTable extends React.Component {
}
addRow(table) {
const row = {application: "", username: "", password: "", signinUrl: ""};
const row = {application: "", username: "", password: ""};
if (table === undefined || table === null) {
table = [];
}
@ -69,16 +69,11 @@ class ManagedAccountTable extends React.Component {
key: "application",
render: (text, record, index) => {
const items = this.props.applications;
const signinUrlMap = new Map();
for (const application of items) {
signinUrlMap.set(application.name, application.signinUrl);
}
return (
<Select virtual={false} style={{width: "100%"}}
value={text}
onChange={value => {
this.updateField(table, index, "application", value);
this.updateField(table, index, "signinUrl", signinUrlMap.get(value));
}} >
{
items.map((item, index) => <Option key={index} value={item.name}>{item.name}</Option>)