diff --git a/src/components/Layout/GlobalHeader/ProjectTable.jsx b/src/components/Layout/GlobalHeader/ProjectTable.jsx index 51d6a68e..1dc3fe51 100644 --- a/src/components/Layout/GlobalHeader/ProjectTable.jsx +++ b/src/components/Layout/GlobalHeader/ProjectTable.jsx @@ -135,6 +135,10 @@ export class ProjectSelect extends ModalAction { title: t('ID'), dataIndex: 'id', }, + { + title: t('Description'), + dataIndex: 'description', + }, { title: t('Enabled'), dataIndex: 'enabled', diff --git a/src/pages/network/containers/FloatingIp/actions/Allocate.jsx b/src/pages/network/containers/FloatingIp/actions/Allocate.jsx index 4475cc02..54fdfd5f 100644 --- a/src/pages/network/containers/FloatingIp/actions/Allocate.jsx +++ b/src/pages/network/containers/FloatingIp/actions/Allocate.jsx @@ -25,6 +25,7 @@ import { qosEndpoint } from 'client/client/constants'; import { projectTableOptions } from 'resources/keystone/project'; import { isAdminPage } from 'utils'; import { toJS } from 'mobx'; +import { checkPolicyRule } from 'resources/skyline/policy'; export class Allocate extends ModalAction { static id = 'allocate'; @@ -261,6 +262,13 @@ export class Allocate extends ModalAction { ); }; + canSpecifyFloatingIp() { + return ( + checkPolicyRule('create_floatingip') && + checkPolicyRule('create_floatingip:floating_ip_address') + ); + } + get formItems() { const { networks, @@ -338,6 +346,7 @@ export class Allocate extends ModalAction { name: 'floating_ip_address', label: t('Floating IP Address'), hidden: !selectedSubnet || batchAllocate, + display: this.canSpecifyFloatingIp(), type: 'ip-input', version: selectedSubnet && (selectedSubnet.ip_version || 4), }, diff --git a/src/pages/network/containers/SecurityGroup/Detail/Rule/actions/Create.jsx b/src/pages/network/containers/SecurityGroup/Detail/Rule/actions/Create.jsx index eeb5e091..ba01bf2d 100644 --- a/src/pages/network/containers/SecurityGroup/Detail/Rule/actions/Create.jsx +++ b/src/pages/network/containers/SecurityGroup/Detail/Rule/actions/Create.jsx @@ -261,16 +261,14 @@ export class Create extends ModalAction { }, { name: 'sourcePort', - label: + label: t('Port or Port Range'), + extra: direction === 'egress' - ? t('Destination Port/Port Range') - : t('Source Port/Port Range'), + ? t('Input destination port or port range (example: 80 or 80:160)') + : t('Input source port or port range (example: 80 or 80:160)'), type: 'port-range', required: showSourcePort, hidden: !showSourcePort, - extra: - direction === 'egress' && - t('Input destination port or port range (example: 80 or 80:160)'), }, { name: 'ipProtocol', @@ -302,6 +300,13 @@ export class Create extends ModalAction { hidden: !isCustomIcmp, help: t('Please input ICMP code(0-255)'), }, + { + name: 'description', + label: t('Description'), + type: 'textarea', + required: false, + placeholder: t('Description for this rule'), + }, { name: 'remoteType', label: t('Remote Type'), diff --git a/src/resources/neutron/security-group-rule.jsx b/src/resources/neutron/security-group-rule.jsx index a0868843..1e620aa5 100644 --- a/src/resources/neutron/security-group-rule.jsx +++ b/src/resources/neutron/security-group-rule.jsx @@ -77,6 +77,11 @@ export const getSelfColumns = (self) => [ dataIndex: 'port_range', isHideable: true, }, + { + title: t('Description'), + dataIndex: 'description', + isHideable: true, + }, { title: t('Remote IP Prefix'), dataIndex: 'remote_ip_prefix',