fix: show qos_policy name in floating ip list
Show qos_policy name in floating ip list Change-Id: I4e6c574b4f192d47557a1f5b44490ec6110abf09
This commit is contained in:
parent
1e0e60ea32
commit
47b40b1737
@ -220,7 +220,7 @@ export class FloatingIps extends Base {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('QoS Policy'),
|
title: t('QoS Policy'),
|
||||||
dataIndex: 'qos_policy_id',
|
dataIndex: 'qos_policy_name',
|
||||||
isLink: true,
|
isLink: true,
|
||||||
routeName: this.getRouteName('networkQosDetail'),
|
routeName: this.getRouteName('networkQosDetail'),
|
||||||
idKey: 'qos_policy_id',
|
idKey: 'qos_policy_id',
|
||||||
|
@ -12,12 +12,13 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
import client from 'client';
|
||||||
|
import Base from 'stores/base';
|
||||||
import { action, observable } from 'mobx';
|
import { action, observable } from 'mobx';
|
||||||
import globalRouterStore from 'stores/neutron/router';
|
import globalRouterStore from 'stores/neutron/router';
|
||||||
import globalServerStore from 'stores/nova/instance';
|
import globalServerStore from 'stores/nova/instance';
|
||||||
import globalLbaasStore from 'stores/octavia/loadbalancer';
|
import globalLbaasStore from 'stores/octavia/loadbalancer';
|
||||||
import client from 'client';
|
import globalQoSPolicyStore from 'stores/neutron/qos-policy';
|
||||||
import Base from 'stores/base';
|
|
||||||
|
|
||||||
export class FloatingIpStore extends Base {
|
export class FloatingIpStore extends Base {
|
||||||
get client() {
|
get client() {
|
||||||
@ -69,17 +70,24 @@ export class FloatingIpStore extends Base {
|
|||||||
timeFilter,
|
timeFilter,
|
||||||
...filters
|
...filters
|
||||||
} = {}) {
|
} = {}) {
|
||||||
const allData = await this.fetchListByPage({
|
const [qosPolicies, allData] = await Promise.all([
|
||||||
limit,
|
globalQoSPolicyStore.fetchList(),
|
||||||
page,
|
this.fetchListByPage({
|
||||||
sortKey,
|
limit,
|
||||||
sortOrder,
|
page,
|
||||||
conditions,
|
sortKey,
|
||||||
timeFilter,
|
sortOrder,
|
||||||
...filters,
|
conditions,
|
||||||
});
|
timeFilter,
|
||||||
|
...filters,
|
||||||
|
}),
|
||||||
|
]);
|
||||||
const promises = [];
|
const promises = [];
|
||||||
allData.forEach((data) => {
|
allData.forEach((data) => {
|
||||||
|
const qos = qosPolicies.find((it) => it.id === data.qos_policy_id);
|
||||||
|
if (qos) {
|
||||||
|
data.qos_policy_name = qos.name;
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
data.port_details &&
|
data.port_details &&
|
||||||
data.port_details.device_owner === 'network:router_gateway'
|
data.port_details.device_owner === 'network:router_gateway'
|
||||||
|
Loading…
Reference in New Issue
Block a user