fix: Fix role list and monitor data and others
1. Fix the role list fetch in user manger and system role 2. Fix the state to get the right data of up and down 3. Add rest attribute for better extension functionality in select component 4. Fix create rule error A recent git update broke our jobs, diskimage-builder was updated to fix 1. This issue but the grenade job doesn't use dib from master (our other jobs do) 2. This commit ensure that our grenade job pulls dib from the git repo Change-Id: I2de592a337e769d1604d72b117fd8a44d5777f58
This commit is contained in:
parent
d76bd458fc
commit
f91454fdcb
@ -212,6 +212,7 @@
|
|||||||
- openstack/requirements
|
- openstack/requirements
|
||||||
- openstack/skyline-apiserver
|
- openstack/skyline-apiserver
|
||||||
- openstack/skyline-console
|
- openstack/skyline-console
|
||||||
|
- opendev.org/openstack/diskimage-builder
|
||||||
timeout: 10800
|
timeout: 10800
|
||||||
vars:
|
vars:
|
||||||
devstack_services:
|
devstack_services:
|
||||||
|
@ -33,12 +33,12 @@ export default class index extends Component {
|
|||||||
placeholder,
|
placeholder,
|
||||||
...componentProps,
|
...componentProps,
|
||||||
};
|
};
|
||||||
const { rules, ...rest } = formItemProps;
|
const { rules, extra, ...rest } = formItemProps;
|
||||||
const newRules = this.getRules(rules);
|
const newRules = this.getRules(rules);
|
||||||
const newFormItemProps = {
|
const newFormItemProps = {
|
||||||
...rest,
|
...rest,
|
||||||
rules: newRules,
|
rules: newRules,
|
||||||
extra: portRangeMessage,
|
extra: extra || portRangeMessage,
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Form.Item {...newFormItemProps}>
|
<Form.Item {...newFormItemProps}>
|
||||||
|
@ -157,6 +157,7 @@ export default class FormItem extends React.Component {
|
|||||||
checkOptions,
|
checkOptions,
|
||||||
checkBoxInfo,
|
checkBoxInfo,
|
||||||
allowClear,
|
allowClear,
|
||||||
|
...rest
|
||||||
} = this.props;
|
} = this.props;
|
||||||
return {
|
return {
|
||||||
options,
|
options,
|
||||||
@ -171,6 +172,7 @@ export default class FormItem extends React.Component {
|
|||||||
checkOptions,
|
checkOptions,
|
||||||
checkBoxInfo,
|
checkBoxInfo,
|
||||||
allowClear,
|
allowClear,
|
||||||
|
...rest,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
@ -689,6 +689,7 @@
|
|||||||
"Effective mode after configuration changes": "Effective mode after configuration changes",
|
"Effective mode after configuration changes": "Effective mode after configuration changes",
|
||||||
"Egress": "Egress",
|
"Egress": "Egress",
|
||||||
"Egypt": "Egypt",
|
"Egypt": "Egypt",
|
||||||
|
"Eject": "Eject",
|
||||||
"El Salvador": "El Salvador",
|
"El Salvador": "El Salvador",
|
||||||
"Email": "Email",
|
"Email": "Email",
|
||||||
"Enable": "Enable",
|
"Enable": "Enable",
|
||||||
@ -1546,6 +1547,7 @@
|
|||||||
"Project User": "Project User",
|
"Project User": "Project User",
|
||||||
"Project User Group": "Project User Group",
|
"Project User Group": "Project User Group",
|
||||||
"Projects": "Projects",
|
"Projects": "Projects",
|
||||||
|
"Promote": "Promote",
|
||||||
"Properties": "Properties",
|
"Properties": "Properties",
|
||||||
"Protected": "Protected",
|
"Protected": "Protected",
|
||||||
"Protocol": "Protocol",
|
"Protocol": "Protocol",
|
||||||
|
@ -689,6 +689,7 @@
|
|||||||
"Effective mode after configuration changes": "配置变更后的生效模式",
|
"Effective mode after configuration changes": "配置变更后的生效模式",
|
||||||
"Egress": "出口",
|
"Egress": "出口",
|
||||||
"Egypt": "埃及",
|
"Egypt": "埃及",
|
||||||
|
"Eject": "删除",
|
||||||
"El Salvador": "萨尔瓦多",
|
"El Salvador": "萨尔瓦多",
|
||||||
"Email": "邮箱",
|
"Email": "邮箱",
|
||||||
"Enable": "启用",
|
"Enable": "启用",
|
||||||
@ -1546,6 +1547,7 @@
|
|||||||
"Project User": "项目用户",
|
"Project User": "项目用户",
|
||||||
"Project User Group": "项目用户组",
|
"Project User Group": "项目用户组",
|
||||||
"Projects": "项目",
|
"Projects": "项目",
|
||||||
|
"Promote": "推动",
|
||||||
"Properties": "属性",
|
"Properties": "属性",
|
||||||
"Protected": "受保护的",
|
"Protected": "受保护的",
|
||||||
"Protocol": "协议",
|
"Protocol": "协议",
|
||||||
|
@ -25,14 +25,14 @@ export class UserGroupManager extends ModalAction {
|
|||||||
|
|
||||||
static title = t('Manage User Group');
|
static title = t('Manage User Group');
|
||||||
|
|
||||||
init() {
|
async init() {
|
||||||
const roles = JSON.stringify(this.item.groups);
|
const roles = JSON.stringify(this.item.groups);
|
||||||
this.state.domainDefault = this.item.domain_id;
|
this.state.domainDefault = this.item.domain_id;
|
||||||
this.state.groupRoles = JSON.parse(roles);
|
this.state.groupRoles = JSON.parse(roles);
|
||||||
this.userGroupStore = new GroupStore();
|
this.userGroupStore = new GroupStore();
|
||||||
this.store = globalRoleStore;
|
this.store = globalRoleStore;
|
||||||
|
await this.getRoleList();
|
||||||
this.getUserGroup();
|
this.getUserGroup();
|
||||||
this.getRoleList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get name() {
|
get name() {
|
||||||
@ -48,7 +48,11 @@ export class UserGroupManager extends ModalAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getRoleList() {
|
getRoleList() {
|
||||||
this.store.fetchList();
|
return new Promise((resolve) => {
|
||||||
|
this.store.fetchList().finally(() => {
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static get modalSize() {
|
static get modalSize() {
|
||||||
|
@ -30,20 +30,20 @@ export class UserManager extends ModalAction {
|
|||||||
return t('Manager user');
|
return t('Manager user');
|
||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
async init() {
|
||||||
const projectRole = JSON.stringify(this.item.userMapProjectRoles);
|
const projectRole = JSON.stringify(this.item.userMapProjectRoles);
|
||||||
this.state.domainDefault = this.item.domain_id;
|
this.state.domainDefault = this.item.domain_id;
|
||||||
this.state.userRoles = JSON.parse(projectRole);
|
this.state.userRoles = JSON.parse(projectRole);
|
||||||
this.store = new RoleStore();
|
this.store = new RoleStore();
|
||||||
this.domainStore = globalDomainStore;
|
this.domainStore = globalDomainStore;
|
||||||
this.userStore = new UserStore();
|
this.userStore = new UserStore();
|
||||||
this.getRoleList();
|
await this.getRoleList();
|
||||||
this.getDomains();
|
this.getDomains();
|
||||||
this.getUser();
|
this.getUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
getRoleList() {
|
getRoleList() {
|
||||||
this.store.fetchList();
|
return this.store.fetchList();
|
||||||
}
|
}
|
||||||
|
|
||||||
getDomains() {
|
getDomains() {
|
||||||
|
@ -30,20 +30,20 @@ export class SystemRole extends ModalAction {
|
|||||||
return t('edit system permission');
|
return t('edit system permission');
|
||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
async init() {
|
||||||
const systemRole = JSON.stringify(this.item.projectMapSystemRole);
|
const systemRole = JSON.stringify(this.item.projectMapSystemRole);
|
||||||
this.state.domainDefault = this.item.domain_id;
|
this.state.domainDefault = this.item.domain_id;
|
||||||
this.state.projectRoles = JSON.parse(systemRole);
|
this.state.projectRoles = JSON.parse(systemRole);
|
||||||
this.store = new RoleStore();
|
this.store = new RoleStore();
|
||||||
this.domainStore = globalDomainStore;
|
this.domainStore = globalDomainStore;
|
||||||
this.userStore = globalUserStore;
|
this.userStore = globalUserStore;
|
||||||
this.getRoleList();
|
await this.getRoleList();
|
||||||
this.getDomains();
|
this.getDomains();
|
||||||
this.getUser();
|
this.getUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
getRoleList() {
|
getRoleList() {
|
||||||
this.store.fetchList();
|
return this.store.fetchList();
|
||||||
}
|
}
|
||||||
|
|
||||||
getDomains() {
|
getDomains() {
|
||||||
|
@ -169,7 +169,7 @@ export const physicalNodeRightTopCardList = [
|
|||||||
];
|
];
|
||||||
const result = get(responses[0], 'data.result', []);
|
const result = get(responses[0], 'data.result', []);
|
||||||
result.forEach((r) => {
|
result.forEach((r) => {
|
||||||
const idx = r.metric.adminState === 'enabled' ? 0 : 1;
|
const idx = r.metric.services_state === 'up' ? 0 : 1;
|
||||||
status[idx].value += parseInt(r.value[1], 10);
|
status[idx].value += parseInt(r.value[1], 10);
|
||||||
});
|
});
|
||||||
return status;
|
return status;
|
||||||
|
@ -159,8 +159,14 @@ export default class Create extends ModalAction {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleDirectionChange = (direction) => {
|
||||||
|
this.setState({
|
||||||
|
direction,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
get formItems() {
|
get formItems() {
|
||||||
const { protocol, portOrRange, remoteType } = this.state;
|
const { protocol, portOrRange, remoteType, direction } = this.state;
|
||||||
const isCustomProtocol = protocol === 'custom_protocol';
|
const isCustomProtocol = protocol === 'custom_protocol';
|
||||||
const isCustomIcmp = protocol === 'custom_icmp';
|
const isCustomIcmp = protocol === 'custom_icmp';
|
||||||
const showPortType = ['custom_udp', 'custom_tcp'].includes(protocol);
|
const showPortType = ['custom_udp', 'custom_tcp'].includes(protocol);
|
||||||
@ -188,6 +194,7 @@ export default class Create extends ModalAction {
|
|||||||
{ value: 'ingress', label: t('Ingress') },
|
{ value: 'ingress', label: t('Ingress') },
|
||||||
{ value: 'egress', label: t('Egress') },
|
{ value: 'egress', label: t('Egress') },
|
||||||
],
|
],
|
||||||
|
onChange: this.handleDirectionChange,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'ethertype',
|
name: 'ethertype',
|
||||||
@ -212,18 +219,16 @@ export default class Create extends ModalAction {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'sourcePort',
|
name: 'sourcePort',
|
||||||
label: t('Source Port/Port Range'),
|
label:
|
||||||
|
direction === 'egress'
|
||||||
|
? t('Destination Port/Port Range')
|
||||||
|
: t('Source Port/Port Range'),
|
||||||
type: 'port-range',
|
type: 'port-range',
|
||||||
required: showSourcePort,
|
required: showSourcePort,
|
||||||
hidden: !showSourcePort || this.state.direction === 'egress',
|
hidden: !showSourcePort,
|
||||||
},
|
extra:
|
||||||
{
|
direction === 'egress' &&
|
||||||
name: 'destination_port',
|
t('Input destination port or port range(example: 80 or 80:160)'),
|
||||||
label: t('Destination Port/Port Range'),
|
|
||||||
type: 'input',
|
|
||||||
required: showSourcePort,
|
|
||||||
help: t('Input destination port or port range(example: 80 or 80:160)'),
|
|
||||||
hidden: !showSourcePort || this.state.direction === 'ingress',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'ipProtocol',
|
name: 'ipProtocol',
|
||||||
@ -292,8 +297,6 @@ export default class Create extends ModalAction {
|
|||||||
const { match: { params: { id } = {} } = {} } = containerProps;
|
const { match: { params: { id } = {} } = {} } = containerProps;
|
||||||
const {
|
const {
|
||||||
sourcePort,
|
sourcePort,
|
||||||
destination_port,
|
|
||||||
direction,
|
|
||||||
protocol,
|
protocol,
|
||||||
ipProtocol,
|
ipProtocol,
|
||||||
icmpType,
|
icmpType,
|
||||||
@ -305,10 +308,7 @@ export default class Create extends ModalAction {
|
|||||||
const range =
|
const range =
|
||||||
['custom_udp', 'custom_tcp'].includes(protocol) &&
|
['custom_udp', 'custom_tcp'].includes(protocol) &&
|
||||||
portOrRange === 'range';
|
portOrRange === 'range';
|
||||||
const ports =
|
const ports = sourcePort.split(':');
|
||||||
values.direction === 'ingress'
|
|
||||||
? sourcePort.split(':')
|
|
||||||
: destination_port.split(':');
|
|
||||||
const newProtocol =
|
const newProtocol =
|
||||||
protocol !== 'custom_protocol'
|
protocol !== 'custom_protocol'
|
||||||
? this.defaultRules[protocol].ip_protocol
|
? this.defaultRules[protocol].ip_protocol
|
||||||
@ -328,7 +328,6 @@ export default class Create extends ModalAction {
|
|||||||
? parseInt(ports[1] || ports[0], 10)
|
? parseInt(ports[1] || ports[0], 10)
|
||||||
: null,
|
: null,
|
||||||
protocol: newProtocol,
|
protocol: newProtocol,
|
||||||
direction,
|
|
||||||
...rest,
|
...rest,
|
||||||
};
|
};
|
||||||
if (protocol.includes('all')) {
|
if (protocol.includes('all')) {
|
||||||
|
@ -20,8 +20,8 @@ testFiles:
|
|||||||
# identity
|
# identity
|
||||||
- pages/identity/role.spec.js
|
- pages/identity/role.spec.js
|
||||||
- pages/identity/domain.spec.js
|
- pages/identity/domain.spec.js
|
||||||
# - pages/identity/user.spec.js
|
- pages/identity/user.spec.js
|
||||||
# - pages/identity/project.spec.js
|
- pages/identity/project.spec.js
|
||||||
- pages/identity/user-group.spec.js
|
- pages/identity/user-group.spec.js
|
||||||
# configuration
|
# configuration
|
||||||
- pages/configuration/metadata.spec.js
|
- pages/configuration/metadata.spec.js
|
||||||
|
Loading…
Reference in New Issue
Block a user