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'),
|
||||
dataIndex: 'qos_policy_id',
|
||||
dataIndex: 'qos_policy_name',
|
||||
isLink: true,
|
||||
routeName: this.getRouteName('networkQosDetail'),
|
||||
idKey: 'qos_policy_id',
|
||||
|
@ -12,12 +12,13 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import client from 'client';
|
||||
import Base from 'stores/base';
|
||||
import { action, observable } from 'mobx';
|
||||
import globalRouterStore from 'stores/neutron/router';
|
||||
import globalServerStore from 'stores/nova/instance';
|
||||
import globalLbaasStore from 'stores/octavia/loadbalancer';
|
||||
import client from 'client';
|
||||
import Base from 'stores/base';
|
||||
import globalQoSPolicyStore from 'stores/neutron/qos-policy';
|
||||
|
||||
export class FloatingIpStore extends Base {
|
||||
get client() {
|
||||
@ -69,17 +70,24 @@ export class FloatingIpStore extends Base {
|
||||
timeFilter,
|
||||
...filters
|
||||
} = {}) {
|
||||
const allData = await this.fetchListByPage({
|
||||
limit,
|
||||
page,
|
||||
sortKey,
|
||||
sortOrder,
|
||||
conditions,
|
||||
timeFilter,
|
||||
...filters,
|
||||
});
|
||||
const [qosPolicies, allData] = await Promise.all([
|
||||
globalQoSPolicyStore.fetchList(),
|
||||
this.fetchListByPage({
|
||||
limit,
|
||||
page,
|
||||
sortKey,
|
||||
sortOrder,
|
||||
conditions,
|
||||
timeFilter,
|
||||
...filters,
|
||||
}),
|
||||
]);
|
||||
const promises = [];
|
||||
allData.forEach((data) => {
|
||||
const qos = qosPolicies.find((it) => it.id === data.qos_policy_id);
|
||||
if (qos) {
|
||||
data.qos_policy_name = qos.name;
|
||||
}
|
||||
if (
|
||||
data.port_details &&
|
||||
data.port_details.device_owner === 'network:router_gateway'
|
||||
|
Loading…
Reference in New Issue
Block a user