mirror of https://github.com/apache/cloudstack.git
Merge branch '4.15' into main
This commit is contained in:
commit
2a243b8b69
|
|
@ -21,6 +21,7 @@ import java.util.Map;
|
|||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
import org.apache.cloudstack.api.response.CapabilitiesResponse;
|
||||
import org.apache.cloudstack.config.ApiServiceConfiguration;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.user.Account;
|
||||
|
|
@ -69,6 +70,7 @@ public class ListCapabilitiesCmd extends BaseCmd {
|
|||
if (capabilities.containsKey("apiLimitMax")) {
|
||||
response.setApiLimitMax((Integer)capabilities.get("apiLimitMax"));
|
||||
}
|
||||
response.setDefaultUiPageSize((Long)capabilities.get(ApiServiceConfiguration.DefaultUIPageSize.key()));
|
||||
response.setObjectName("capability");
|
||||
response.setResponseName(getCommandName());
|
||||
this.setResponseObject(response);
|
||||
|
|
|
|||
|
|
@ -100,6 +100,10 @@ public class CapabilitiesResponse extends BaseResponse {
|
|||
@Param(description = "true if experimental features for Kubernetes cluster such as Docker private registry are enabled, false otherwise")
|
||||
private boolean kubernetesClusterExperimentalFeaturesEnabled;
|
||||
|
||||
@SerializedName("defaultuipagesize")
|
||||
@Param(description = "default page size in the UI for various views, value set in the configurations", since = "4.15.2")
|
||||
private Long defaultUiPageSize;
|
||||
|
||||
public void setSecurityGroupsEnabled(boolean securityGroupsEnabled) {
|
||||
this.securityGroupsEnabled = securityGroupsEnabled;
|
||||
}
|
||||
|
|
@ -175,4 +179,8 @@ public class CapabilitiesResponse extends BaseResponse {
|
|||
public void setKubernetesClusterExperimentalFeaturesEnabled(boolean kubernetesClusterExperimentalFeaturesEnabled) {
|
||||
this.kubernetesClusterExperimentalFeaturesEnabled = kubernetesClusterExperimentalFeaturesEnabled;
|
||||
}
|
||||
|
||||
public void setDefaultUiPageSize(Long defaultUiPageSize) {
|
||||
this.defaultUiPageSize = defaultUiPageSize;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -546,6 +546,7 @@ import org.apache.cloudstack.api.command.user.vpn.UpdateVpnConnectionCmd;
|
|||
import org.apache.cloudstack.api.command.user.vpn.UpdateVpnCustomerGatewayCmd;
|
||||
import org.apache.cloudstack.api.command.user.vpn.UpdateVpnGatewayCmd;
|
||||
import org.apache.cloudstack.api.command.user.zone.ListZonesCmd;
|
||||
import org.apache.cloudstack.config.ApiServiceConfiguration;
|
||||
import org.apache.cloudstack.config.Configuration;
|
||||
import org.apache.cloudstack.context.CallContext;
|
||||
import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
|
||||
|
|
@ -3906,6 +3907,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
|
|||
capabilities.put("allowUserViewAllDomainAccounts", allowUserViewAllDomainAccounts);
|
||||
capabilities.put("kubernetesServiceEnabled", kubernetesServiceEnabled);
|
||||
capabilities.put("kubernetesClusterExperimentalFeaturesEnabled", kubernetesClusterExperimentalFeaturesEnabled);
|
||||
capabilities.put(ApiServiceConfiguration.DefaultUIPageSize.key(), ApiServiceConfiguration.DefaultUIPageSize.value());
|
||||
if (apiLimitEnabled) {
|
||||
capabilities.put("apiLimitInterval", apiLimitInterval);
|
||||
capabilities.put("apiLimitMax", apiLimitMax);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<template>
|
||||
<template v-if="isDevelopmentMode">
|
||||
<drawer :visible="showSetting" placement="right">
|
||||
<div slot="handler">
|
||||
<a-button type="primary" size="large">
|
||||
|
|
@ -135,6 +135,9 @@ export default {
|
|||
...mapState({
|
||||
mainMenu: state => state.permission.addRouters
|
||||
}),
|
||||
isDevelopmentMode () {
|
||||
return process.env.NODE_ENV === 'development'
|
||||
},
|
||||
contentPaddingLeft () {
|
||||
if (!this.fixSidebar || this.isMobile()) {
|
||||
return '0'
|
||||
|
|
|
|||
|
|
@ -254,13 +254,9 @@ const user = {
|
|||
api('listCapabilities').then(response => {
|
||||
const result = response.listcapabilitiesresponse.capability
|
||||
commit('SET_FEATURES', result)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
|
||||
api('listConfigurations', { name: 'default.ui.page.size' }).then(response => {
|
||||
const defaultListViewPageSize = parseInt(response.listconfigurationsresponse.configuration[0].value)
|
||||
commit('SET_DEFAULT_LISTVIEW_PAGE_SIZE', defaultListViewPageSize)
|
||||
if (result && result.defaultuipagesize) {
|
||||
commit('SET_DEFAULT_LISTVIEW_PAGE_SIZE', result.defaultuipagesize)
|
||||
}
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -467,6 +467,11 @@ export default {
|
|||
eventBus.$off('async-job-complete')
|
||||
eventBus.$off('exec-action')
|
||||
},
|
||||
mounted () {
|
||||
eventBus.$on('exec-action', (action, isGroupAction) => {
|
||||
this.execAction(action, isGroupAction)
|
||||
})
|
||||
},
|
||||
created () {
|
||||
eventBus.$on('vm-refresh-data', () => {
|
||||
if (this.$route.path === '/vm' || this.$route.path.includes('/vm/')) {
|
||||
|
|
@ -490,9 +495,6 @@ export default {
|
|||
}
|
||||
this.fetchData()
|
||||
})
|
||||
eventBus.$on('exec-action', (action, isGroupAction) => {
|
||||
this.execAction(action, isGroupAction)
|
||||
})
|
||||
eventBus.$on('update-bulk-job-status', (items, action) => {
|
||||
for (const item of items) {
|
||||
this.$store.getters.headerNotices.map(function (j) {
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@
|
|||
</a-form-item>
|
||||
|
||||
<a-row :gutter="12" v-if="hyperKVMShow || hyperVMWShow">
|
||||
<a-col :md="24" :lg="24" v-if="hyperKVMShow || (hyperVMWShow && !deployasis)">
|
||||
<a-col :md="24" :lg="hyperKVMShow ? 24 : 12" v-if="hyperKVMShow || (hyperVMWShow && !deployasis)">
|
||||
<a-form-item :label="$t('label.rootdiskcontrollertype')">
|
||||
<a-select
|
||||
v-decorator="['rootDiskControllerType', {
|
||||
|
|
@ -241,10 +241,10 @@
|
|||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="24" :lg="24">
|
||||
<a-form-item v-if="hyperVMWShow && !deployasis" :label="$t('label.keyboardtype')">
|
||||
<a-col :md="24" :lg="12" v-if="hyperVMWShow && !deployasis">
|
||||
<a-form-item :label="$t('label.nicadaptertype')">
|
||||
<a-select
|
||||
v-decorator="['keyboardType', {
|
||||
v-decorator="['nicAdapterType', {
|
||||
rules: [
|
||||
{
|
||||
required: false,
|
||||
|
|
@ -252,41 +252,53 @@
|
|||
}
|
||||
]
|
||||
}]"
|
||||
:placeholder="$t('label.keyboard')">
|
||||
<a-select-option v-for="opt in keyboardType.opts" :key="opt.id">
|
||||
{{ opt.name || opt.description }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="12" v-if="!hyperVMWShow || (hyperVMWShow && !deployasis)">
|
||||
<a-col :md="24" :lg="24">
|
||||
<a-form-item :label="$t('label.ostypeid')">
|
||||
<a-select
|
||||
showSearch
|
||||
optionFilterProp="children"
|
||||
:filterOption="(input, option) => {
|
||||
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}"
|
||||
v-decorator="['ostypeid', {
|
||||
initialValue: defaultOsId,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: `${this.$t('message.error.select')}`
|
||||
}
|
||||
]
|
||||
}]"
|
||||
:loading="osTypes.loading"
|
||||
:placeholder="apiParams.ostypeid.description">
|
||||
<a-select-option v-for="opt in osTypes.opts" :key="opt.id">
|
||||
:placeholder="$t('label.nicadaptertype')">
|
||||
<a-select-option v-for="opt in nicAdapterType.opts" :key="opt.id">
|
||||
{{ opt.name || opt.description }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-form-item :label="$t('label.keyboardtype')" :lg="12" v-if="hyperVMWShow && !deployasis">
|
||||
<a-select
|
||||
v-decorator="['keyboardType', {
|
||||
rules: [
|
||||
{
|
||||
required: false,
|
||||
message: `${this.$t('message.error.select')}`
|
||||
}
|
||||
]
|
||||
}]"
|
||||
:placeholder="$t('label.keyboard')">
|
||||
<a-select-option v-for="opt in keyboardType.opts" :key="opt.id">
|
||||
{{ opt.name || opt.description }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('label.ostypeid')" v-if="!hyperVMWShow || (hyperVMWShow && !deployasis)">
|
||||
<a-select
|
||||
showSearch
|
||||
optionFilterProp="children"
|
||||
:filterOption="(input, option) => {
|
||||
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}"
|
||||
v-decorator="['ostypeid', {
|
||||
initialValue: defaultOsId,
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: `${this.$t('message.error.select')}`
|
||||
}
|
||||
]
|
||||
}]"
|
||||
:loading="osTypes.loading"
|
||||
:placeholder="apiParams.ostypeid.description">
|
||||
<a-select-option v-for="opt in osTypes.opts" :key="opt.id">
|
||||
{{ opt.name || opt.description }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-row :gutter="12">
|
||||
<a-col :md="24" :lg="24">
|
||||
<a-form-item>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
rules: [{ required: true, message: `${$t('label.required')}` }]
|
||||
}]"
|
||||
>
|
||||
<a-select-option v-for="item in items" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
||||
<a-select-option v-for="item in pods" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('label.gateway')" class="form__item">
|
||||
|
|
@ -151,6 +151,7 @@ export default {
|
|||
return {
|
||||
componentLoading: false,
|
||||
items: [],
|
||||
pods: [],
|
||||
total: 0,
|
||||
domains: [],
|
||||
domainsLoading: false,
|
||||
|
|
@ -222,8 +223,8 @@ export default {
|
|||
}).then(response => {
|
||||
this.items = []
|
||||
this.total = response.listpodsresponse.count || 0
|
||||
const pods = response.listpodsresponse.pod ? response.listpodsresponse.pod : []
|
||||
for (const pod of pods) {
|
||||
this.pods = response.listpodsresponse.pod ? response.listpodsresponse.pod : []
|
||||
for (const pod of this.pods) {
|
||||
if (pod && pod.startip && pod.startip.length > 0) {
|
||||
for (var idx = 0; idx < pod.startip.length; idx++) {
|
||||
this.items.push({
|
||||
|
|
|
|||
Loading…
Reference in New Issue