feat: support network qos policy actions in console
Support qos policy actions in current project tab in console 1. Support create qos policy in console 2. Support edit qos policy in console 3. Support delete qos policy in console 4. Support create/edit/delete bandwidth in console Change-Id: I3142f9e9386c85fd99438f7277eaebad0d2c2b6b
This commit is contained in:
parent
36c5a63196
commit
9763ce317f
@ -17,6 +17,7 @@ import Base from 'containers/List';
|
|||||||
import { QoSPolicyStore } from 'stores/neutron/qos-policy';
|
import { QoSPolicyStore } from 'stores/neutron/qos-policy';
|
||||||
import { getQosPolicyColumns, getQosPolicyFilters } from 'resources/qos-policy';
|
import { getQosPolicyColumns, getQosPolicyFilters } from 'resources/qos-policy';
|
||||||
import { qosEndpoint } from 'client/client/constants';
|
import { qosEndpoint } from 'client/client/constants';
|
||||||
|
import { emptyActionConfig } from 'utils/constants';
|
||||||
import actionConfigs from './actions';
|
import actionConfigs from './actions';
|
||||||
|
|
||||||
export class QoSPolicy extends Base {
|
export class QoSPolicy extends Base {
|
||||||
@ -25,6 +26,14 @@ export class QoSPolicy extends Base {
|
|||||||
this.downloadStore = new QoSPolicyStore();
|
this.downloadStore = new QoSPolicyStore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isProjectTab() {
|
||||||
|
const tab = this.tabKey;
|
||||||
|
if (this.isAdminPage) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return !tab || tab === 'projectQoSPolicy';
|
||||||
|
}
|
||||||
|
|
||||||
updateFetchParamsByPage = (params) => {
|
updateFetchParamsByPage = (params) => {
|
||||||
switch (this.tabKey) {
|
switch (this.tabKey) {
|
||||||
case 'projectQoSPolicy':
|
case 'projectQoSPolicy':
|
||||||
@ -62,7 +71,10 @@ export class QoSPolicy extends Base {
|
|||||||
if (this.isAdminPage) {
|
if (this.isAdminPage) {
|
||||||
return actionConfigs.actionConfigs;
|
return actionConfigs.actionConfigs;
|
||||||
}
|
}
|
||||||
return actionConfigs.consoleActions;
|
if (this.isProjectTab) {
|
||||||
|
return actionConfigs.consoleActions;
|
||||||
|
}
|
||||||
|
return emptyActionConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
get isFilterByBackend() {
|
get isFilterByBackend() {
|
||||||
|
@ -45,10 +45,18 @@ const actionConfigs = {
|
|||||||
|
|
||||||
const consoleActions = {
|
const consoleActions = {
|
||||||
rowActions: {
|
rowActions: {
|
||||||
firstAction: null,
|
firstAction: Edit,
|
||||||
moreActions: [],
|
moreActions: [
|
||||||
|
{ action: CreateBandwidthLimitRule },
|
||||||
|
{ action: EditBandwidthEgressRule },
|
||||||
|
{ action: EditBandwidthIngressRule },
|
||||||
|
{ action: DeleteBandwidthEgressRules },
|
||||||
|
{ action: DeleteBandwidthIngressRules },
|
||||||
|
{ action: DeleteAction },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
batchActions: [],
|
batchActions: [DeleteAction],
|
||||||
primaryActions: [],
|
primaryActions: [Create],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default { actionConfigs, consoleActions };
|
export default { actionConfigs, consoleActions };
|
||||||
|
Loading…
Reference in New Issue
Block a user