1. Support cpu/memory fuzzy search in the flavor list page 2. Support flavor cpu/memory fuzzy search in the FlavorSelectTable component, which is used in: (1) create instance page (2) create ironic page (3) instance resize form (4) create database instance page (5) create cluster template page (6) edit cluster template page Change-Id: Iba1303a7641621a50b92e21e9173ba65fd7ac669
62 lines
1.6 KiB
JavaScript
62 lines
1.6 KiB
JavaScript
// Copyright 2021 99cloud
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
import { observer, inject } from 'mobx-react';
|
|
import Base from 'containers/List';
|
|
import { FlavorStore } from 'stores/nova/flavor';
|
|
import { emptyActionConfig } from 'utils/constants';
|
|
import {
|
|
flavorArchitectures,
|
|
getBaseColumns,
|
|
extraColumns,
|
|
armCategoryList,
|
|
getFlavorSearchFilters,
|
|
} from 'resources/nova/flavor';
|
|
import actionConfigs from './actions';
|
|
|
|
export class Flavor extends Base {
|
|
init() {
|
|
this.store = new FlavorStore();
|
|
}
|
|
|
|
get policy() {
|
|
return 'os_compute_api:os-flavor-extra-specs:index';
|
|
}
|
|
|
|
get name() {
|
|
return `${flavorArchitectures.arm_architecture} ${t('Flavors')}`;
|
|
}
|
|
|
|
get hasTab() {
|
|
return true;
|
|
}
|
|
|
|
getColumns = () => [...getBaseColumns(this), ...extraColumns];
|
|
|
|
get actionConfigs() {
|
|
return this.isAdminPage ? actionConfigs : emptyActionConfig;
|
|
}
|
|
|
|
updateFetchParams = (params) => ({
|
|
...params,
|
|
tab: 'arm_architecture',
|
|
});
|
|
|
|
get searchFilters() {
|
|
return getFlavorSearchFilters(armCategoryList);
|
|
}
|
|
}
|
|
|
|
export default inject('rootStore')(observer(Flavor));
|