mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge remote-tracking branch 'origin/4.15'
This commit is contained in:
commit
775de36688
@ -23,6 +23,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.projects.ProjectAccount;
|
||||
import com.cloud.projects.ProjectAccountVO;
|
||||
import com.cloud.utils.db.Filter;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.GenericSearchBuilder;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
@ -96,8 +97,8 @@ public class ProjectAccountDaoImpl extends GenericDaoBase<ProjectAccountVO, Long
|
||||
public List<ProjectAccountVO> listByProjectId(long projectId) {
|
||||
SearchCriteria<ProjectAccountVO> sc = AllFieldsSearch.create();
|
||||
sc.setParameters("projectId", projectId);
|
||||
|
||||
return listBy(sc);
|
||||
Filter filter = new Filter(ProjectAccountVO.class, "id", Boolean.TRUE, null, null);
|
||||
return listBy(sc, filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -675,11 +675,9 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
|
||||
Map<String, String> vmDetails = _userVmDetailsDao.listDetailsKeyPairs(vm.getId());
|
||||
String vmDetailCpu = vmDetails.get("cpuOvercommitRatio");
|
||||
String vmDetailRam = vmDetails.get("memoryOvercommitRatio");
|
||||
if (vmDetailCpu != null) {
|
||||
//if vmDetail_cpu is not null it means it is running in a overcommited cluster.
|
||||
cpuOvercommitRatio = Float.parseFloat(vmDetailCpu);
|
||||
ramOvercommitRatio = Float.parseFloat(vmDetailRam);
|
||||
}
|
||||
// if vmDetailCpu or vmDetailRam is not null it means it is running in a overcommitted cluster.
|
||||
cpuOvercommitRatio = (vmDetailCpu != null) ? Float.parseFloat(vmDetailCpu) : clusterCpuOvercommitRatio;
|
||||
ramOvercommitRatio = (vmDetailRam != null) ? Float.parseFloat(vmDetailRam) : clusterRamOvercommitRatio;
|
||||
ServiceOffering so = offeringsMap.get(vm.getServiceOfferingId());
|
||||
if (so == null) {
|
||||
so = _offeringsDao.findByIdIncludingRemoved(vm.getServiceOfferingId());
|
||||
|
||||
@ -495,8 +495,10 @@ public class ConsoleProxyServlet extends HttpServlet {
|
||||
if (param.getHypervHost() != null || !ConsoleProxyManager.NoVncConsoleDefault.value()) {
|
||||
sb.append("/ajax?token=" + encryptor.encryptObject(ConsoleProxyClientParam.class, param));
|
||||
} else {
|
||||
sb.append("/resource/noVNC/vnc.html?port=" + ConsoleProxyManager.DEFAULT_NOVNC_PORT + "&token="
|
||||
+ encryptor.encryptObject(ConsoleProxyClientParam.class, param));
|
||||
sb.append("/resource/noVNC/vnc.html")
|
||||
.append("?autoconnect=true")
|
||||
.append("&port=" + ConsoleProxyManager.DEFAULT_NOVNC_PORT)
|
||||
.append("&token=" + encryptor.encryptObject(ConsoleProxyClientParam.class, param));
|
||||
}
|
||||
|
||||
// for console access, we need guest OS type to help implement keyboard
|
||||
|
||||
@ -672,6 +672,10 @@ select:active {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
:root:not(.noVNC_connected) #noVNC_fullscreen_button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Settings */
|
||||
#noVNC_settings {
|
||||
}
|
||||
|
||||
@ -333,9 +333,4 @@
|
||||
<source src="app/sounds/bell.mp3" type="audio/mpeg">
|
||||
</audio>
|
||||
</body>
|
||||
<script type="application/javascript">
|
||||
window.onload = function() {
|
||||
document.getElementById("noVNC_connect_button").click();
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@ -202,6 +202,8 @@
|
||||
"label.action.generate.keys": "Generate Keys",
|
||||
"label.action.generate.keys.processing": "Generate Keys....",
|
||||
"label.action.get.diagnostics": "Get Diagnostics Data",
|
||||
"label.action.image.store.read.only": "Make Image store read-only",
|
||||
"label.action.image.store.read.write": "Make Image store read-write",
|
||||
"label.action.iso.permission": "Update ISO Permissions",
|
||||
"label.action.iso.share": "Update ISO Sharing",
|
||||
"label.action.list.nexusvswitch": "List Nexus 1000v",
|
||||
@ -2438,6 +2440,8 @@
|
||||
"message.action.revert.snapshot": "Please confirm that you want to revert the owning volume to this snapshot.",
|
||||
"message.action.router.health.checks": "Health checks result will be fetched from router.",
|
||||
"message.action.router.health.checks.disabled.warning": "Please enable router health checks.",
|
||||
"message.action.secondary.storage.read.only": "Please confirm that you want to make this secondary storage read only.",
|
||||
"message.action.secondary.storage.read.write": "Please confirm that you want to make this secondary storage read write.",
|
||||
"message.action.secure.host": "This will restart the host agent and libvirtd process after applying new X509 certificates, please confirm?",
|
||||
"message.action.settings.warning.vm.running": "Please stop the virtual machine to access settings",
|
||||
"message.action.settings.warning.vm.started": "Virtual machine has been started. It needs to be stopped to access settings",
|
||||
@ -3057,7 +3061,7 @@
|
||||
"message.restart.mgmt.usage.server": "Please restart your management server(s) and usage server(s) for your new settings to take effect.",
|
||||
"message.restart.network": "All services provided by this network will be interrupted. Please confirm that you want to restart this network.",
|
||||
"message.restart.vpc": "Please confirm that you want to restart the VPC",
|
||||
"message.restart.vpc.remark": "Please confirm that you want to restart the VPC <p><small><i>Remark: making a non-redundant VPC redundant will force a clean up. The networks will not be available for a couple of minutes</i>.</small></p>",
|
||||
"message.restart.vpc.remark": "Please confirm that you want to restart the VPC <p><i>Remark: making a non-redundant VPC redundant will force a clean up. The networks will not be available for a couple of minutes</i>.</p>",
|
||||
"message.restorevm": "Do you want to restore the VM ?",
|
||||
"message.role.ordering.fail": "Reordering of rule permissions aborted as the list has changed while you were making changes. Please try again.",
|
||||
"message.role.update.fail": "Failed updating rule permission",
|
||||
@ -3191,6 +3195,7 @@
|
||||
"message.update.ipaddress.processing": "Updating IP Address...",
|
||||
"message.update.os.preference": "Please choose a OS preference for this host. All virtual instances with similar preferences will be first allocated to this host before choosing another.",
|
||||
"message.update.resource.count": "Please confirm that you want to update resource counts for this account.",
|
||||
"message.update.resource.count.domain": "Please confirm that you want to update resource counts for this domain.",
|
||||
"message.update.ssl": "Please submit a new X.509 compliant SSL certificate chain to be updated to each console proxy and secondary storage virtual instance:",
|
||||
"message.update.ssl.failed": "Failed to update SSL Certificate.",
|
||||
"message.update.ssl.succeeded": "Update SSL Certificates succeeded",
|
||||
|
||||
@ -17,7 +17,12 @@
|
||||
|
||||
<template>
|
||||
<span class="row-action-button">
|
||||
<console :resource="resource" :size="size" v-if="resource && resource.id && dataView" />
|
||||
<a-tooltip arrowPointAtCenter placement="bottomRight">
|
||||
<template slot="title">
|
||||
{{ $t('label.view.console') }}
|
||||
</template>
|
||||
<console :resource="resource" :size="size" v-if="resource && resource.id && dataView" />
|
||||
</a-tooltip>
|
||||
<a-tooltip
|
||||
v-for="(action, actionIndex) in actions"
|
||||
:key="actionIndex"
|
||||
|
||||
@ -311,7 +311,7 @@ export default {
|
||||
message: 'message.action.instance.reset.password',
|
||||
dataView: true,
|
||||
show: (record) => { return ['Running', 'Stopped'].includes(record.state) && record.passwordenabled },
|
||||
response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `Password of the VM is ${result.virtualmachine.password}` : null }
|
||||
response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `The password of VM <b>${result.virtualmachine.displayname}</b> is <b>${result.virtualmachine.password}</b>` : null }
|
||||
},
|
||||
{
|
||||
api: 'resetSSHKeyForVirtualMachine',
|
||||
@ -537,6 +537,7 @@ export default {
|
||||
api: 'deleteSSHKeyPair',
|
||||
icon: 'delete',
|
||||
label: 'label.remove.ssh.key.pair',
|
||||
message: 'message.please.confirm.remove.ssh.key.pair',
|
||||
dataView: true,
|
||||
args: ['name', 'account', 'domainid'],
|
||||
mapping: {
|
||||
|
||||
@ -93,7 +93,7 @@ export default {
|
||||
api: 'updateResourceCount',
|
||||
icon: 'sync',
|
||||
label: 'label.action.update.resource.count',
|
||||
message: 'message.update.resource.count',
|
||||
message: 'message.update.resource.count.domain',
|
||||
listView: true,
|
||||
dataView: true,
|
||||
args: ['domainid'],
|
||||
|
||||
@ -104,6 +104,7 @@ export default {
|
||||
api: 'migrateSystemVm',
|
||||
icon: 'drag',
|
||||
label: 'label.action.migrate.router',
|
||||
message: 'message.migrate.router.confirm',
|
||||
dataView: true,
|
||||
show: (record, store) => { return record.state === 'Running' && ['Admin'].includes(store.userInfo.roletype) },
|
||||
component: () => import('@/views/compute/MigrateWizard'),
|
||||
|
||||
@ -61,17 +61,11 @@ export default {
|
||||
popup: true,
|
||||
component: () => import('@/views/infra/AddSecondaryStorage.vue')
|
||||
},
|
||||
{
|
||||
api: 'deleteImageStore',
|
||||
icon: 'delete',
|
||||
label: 'label.action.delete.secondary.storage',
|
||||
message: 'message.action.delete.secondary.storage',
|
||||
dataView: true
|
||||
},
|
||||
{
|
||||
api: 'updateImageStore',
|
||||
icon: 'stop',
|
||||
label: 'Make Image store read-only',
|
||||
label: 'label.action.image.store.read.only',
|
||||
message: 'message.action.secondary.storage.read.only',
|
||||
dataView: true,
|
||||
defaultArgs: { readonly: true },
|
||||
show: (record) => { return record.readonly === false }
|
||||
@ -79,10 +73,18 @@ export default {
|
||||
{
|
||||
api: 'updateImageStore',
|
||||
icon: 'check-circle',
|
||||
label: 'Make Image store read-write',
|
||||
label: 'label.action.image.store.read.write',
|
||||
message: 'message.action.secondary.storage.read.write',
|
||||
dataView: true,
|
||||
defaultArgs: { readonly: false },
|
||||
show: (record) => { return record.readonly === true }
|
||||
},
|
||||
{
|
||||
api: 'deleteImageStore',
|
||||
icon: 'delete',
|
||||
label: 'label.action.delete.secondary.storage',
|
||||
message: 'message.action.delete.secondary.storage',
|
||||
dataView: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -69,6 +69,7 @@ export default {
|
||||
api: 'migrateSystemVm',
|
||||
icon: 'drag',
|
||||
label: 'label.action.migrate.systemvm',
|
||||
message: 'message.migrate.systemvm.confirm',
|
||||
dataView: true,
|
||||
show: (record, store) => { return record.state === 'Running' && ['Admin'].includes(store.userInfo.roletype) },
|
||||
component: () => import('@/views/compute/MigrateWizard'),
|
||||
|
||||
@ -85,6 +85,7 @@ export default {
|
||||
api: 'restartNetwork',
|
||||
icon: 'sync',
|
||||
label: 'label.restart.network',
|
||||
message: 'message.restart.network',
|
||||
dataView: true,
|
||||
args: ['cleanup'],
|
||||
show: (record) => record.type !== 'L2'
|
||||
@ -165,7 +166,7 @@ export default {
|
||||
api: 'restartVPC',
|
||||
icon: 'sync',
|
||||
label: 'label.restart.vpc',
|
||||
message: 'message.restart.vpc',
|
||||
message: (record) => { return record.redundantvpcrouter ? 'message.restart.vpc' : 'message.restart.vpc.remark' },
|
||||
dataView: true,
|
||||
args: (record) => {
|
||||
var fields = ['cleanup']
|
||||
|
||||
@ -727,6 +727,13 @@ export default {
|
||||
return 0
|
||||
})
|
||||
this.currentAction.paramFields = []
|
||||
if ('message' in action) {
|
||||
var message = action.message
|
||||
if (typeof action.message === 'function') {
|
||||
message = action.message(action.resource)
|
||||
}
|
||||
action.message = message
|
||||
}
|
||||
if ('args' in action) {
|
||||
var args = action.args
|
||||
if (typeof action.args === 'function') {
|
||||
|
||||
@ -17,14 +17,16 @@
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<p v-html="$t('message.assign.instance.another')"></p>
|
||||
|
||||
<div class="form">
|
||||
|
||||
<div v-if="loading" class="loading">
|
||||
<a-icon type="loading" style="color: #1890ff;"></a-icon>
|
||||
</div>
|
||||
|
||||
<a-alert type="warning" style="margin-bottom: 20px">
|
||||
<span slot="message" v-html="$t('message.assign.instance.another')"></span>
|
||||
</a-alert>
|
||||
|
||||
<div class="form__item">
|
||||
<p class="form__label">{{ $t('label.accounttype') }}</p>
|
||||
<a-select v-model="selectedAccountType" defaultValue="account">
|
||||
@ -226,6 +228,12 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.form {
|
||||
width: 85vw;
|
||||
|
||||
@media (min-width: 760px) {
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
@ -255,7 +255,7 @@ export default {
|
||||
successMethod: () => {
|
||||
this.parentFetchData()
|
||||
},
|
||||
response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `Password of the VM is ${result.virtualmachine.password}` : null }
|
||||
response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `The password of VM <b>${result.virtualmachine.displayname}</b> is <b>${result.virtualmachine.password}</b>` : null }
|
||||
})
|
||||
this.closeAction()
|
||||
}).catch(error => {
|
||||
|
||||
@ -369,7 +369,7 @@ export default {
|
||||
params.networkdomain = values.networkdomain
|
||||
}
|
||||
|
||||
api('createAccount', params).then(response => {
|
||||
api('createAccount', {}, 'POST', params).then(response => {
|
||||
this.$emit('refresh-data')
|
||||
this.$notification.success({
|
||||
message: this.$t('label.create.account'),
|
||||
|
||||
@ -37,6 +37,9 @@
|
||||
:form="form"
|
||||
@submit="handleSubmit"
|
||||
layout="vertical" >
|
||||
<a-alert type="warning" v-if="action.message">
|
||||
<span slot="message" v-html="$t(action.message)" />
|
||||
</a-alert>
|
||||
<a-form-item
|
||||
v-for="(field, fieldIndex) in action.paramFields"
|
||||
:key="fieldIndex"
|
||||
|
||||
@ -88,7 +88,9 @@
|
||||
:form="form"
|
||||
@submit="addUserToProject"
|
||||
layout="vertical">
|
||||
<p v-html="$t('message.add.user.to.project')"></p>
|
||||
<a-alert type="warning" style="margin-bottom: 20px">
|
||||
<span slot="message" v-html="$t('message.add.user.to.project')"></span>
|
||||
</a-alert>
|
||||
<a-form-item>
|
||||
<span slot="label">
|
||||
{{ $t('label.user') }}
|
||||
|
||||
@ -133,7 +133,7 @@ export default {
|
||||
updateTable: false,
|
||||
rules: null,
|
||||
newRule: '',
|
||||
newRulePermission: 'allow',
|
||||
newRulePermission: 'deny',
|
||||
newRuleDescription: '',
|
||||
newRuleSelectError: false,
|
||||
drag: false,
|
||||
@ -159,7 +159,7 @@ export default {
|
||||
},
|
||||
resetNewFields () {
|
||||
this.newRule = ''
|
||||
this.newRulePermission = 'allow'
|
||||
this.newRulePermission = 'deny'
|
||||
this.newRuleDescription = ''
|
||||
this.newRuleSelectError = false
|
||||
},
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
<template>
|
||||
<a-spin :spinning="loading">
|
||||
<div class="form-layout">
|
||||
<label>
|
||||
{{ $t('label.header.volume.snapshot') }}
|
||||
</label>
|
||||
<a-alert type="warning">
|
||||
<span slot="message" v-html="$t('label.header.volume.snapshot')" />
|
||||
</a-alert>
|
||||
<div class="form">
|
||||
<a-form
|
||||
:form="form"
|
||||
|
||||
@ -17,9 +17,11 @@
|
||||
|
||||
<template>
|
||||
<div class="migrate-volume-container">
|
||||
|
||||
<div class="modal-form">
|
||||
<div v-if="storagePools.length > 0">
|
||||
<a-alert type="warning">
|
||||
<span slot="message" v-html="$t('message.migrate.volume')" />
|
||||
</a-alert>
|
||||
<p class="modal-form__label">{{ $t('label.storagepool') }}</p>
|
||||
<a-select v-model="selectedStoragePool" style="width: 100%;">
|
||||
<a-select-option v-for="(storagePool, index) in storagePools" :value="storagePool.id" :key="index">
|
||||
@ -168,11 +170,10 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.migrate-volume-container {
|
||||
width: 95vw;
|
||||
max-width: 100%;
|
||||
width: 85vw;
|
||||
|
||||
@media (min-width: 760px) {
|
||||
width: 50vw;
|
||||
width: 500px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -142,9 +142,10 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.form-layout {
|
||||
width: 75vw;
|
||||
@media (min-width: 700px) {
|
||||
width: 40vw;
|
||||
width: 85vw;
|
||||
|
||||
@media (min-width: 760px) {
|
||||
width: 500px;
|
||||
}
|
||||
}
|
||||
.action-button {
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
<template>
|
||||
<div class="take-snapshot">
|
||||
<a-spin :spinning="loading || actionLoading">
|
||||
<label>
|
||||
{{ $t('label.header.volume.take.snapshot') }}
|
||||
</label>
|
||||
<a-alert type="warning">
|
||||
<span slot="message" v-html="$t('label.header.volume.take.snapshot')" />
|
||||
</a-alert>
|
||||
<a-form
|
||||
class="form"
|
||||
:form="form"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user