Skip to content

Commit 775de36

Browse files
committed
Merge remote-tracking branch 'origin/4.15'
2 parents c8f7c0d + f07e4d3 commit 775de36

24 files changed

Lines changed: 86 additions & 48 deletions

File tree

engine/schema/src/main/java/com/cloud/projects/dao/ProjectAccountDaoImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import com.cloud.projects.ProjectAccount;
2525
import com.cloud.projects.ProjectAccountVO;
26+
import com.cloud.utils.db.Filter;
2627
import com.cloud.utils.db.GenericDaoBase;
2728
import com.cloud.utils.db.GenericSearchBuilder;
2829
import com.cloud.utils.db.SearchBuilder;
@@ -96,8 +97,8 @@ public List<ProjectAccountVO> getProjectOwners(long projectId) {
9697
public List<ProjectAccountVO> listByProjectId(long projectId) {
9798
SearchCriteria<ProjectAccountVO> sc = AllFieldsSearch.create();
9899
sc.setParameters("projectId", projectId);
99-
100-
return listBy(sc);
100+
Filter filter = new Filter(ProjectAccountVO.class, "id", Boolean.TRUE, null, null);
101+
return listBy(sc, filter);
101102
}
102103

103104
@Override

server/src/main/java/com/cloud/capacity/CapacityManagerImpl.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -675,11 +675,9 @@ public void updateCapacityForHost(final Host host, final Map<Long, ServiceOfferi
675675
Map<String, String> vmDetails = _userVmDetailsDao.listDetailsKeyPairs(vm.getId());
676676
String vmDetailCpu = vmDetails.get("cpuOvercommitRatio");
677677
String vmDetailRam = vmDetails.get("memoryOvercommitRatio");
678-
if (vmDetailCpu != null) {
679-
//if vmDetail_cpu is not null it means it is running in a overcommited cluster.
680-
cpuOvercommitRatio = Float.parseFloat(vmDetailCpu);
681-
ramOvercommitRatio = Float.parseFloat(vmDetailRam);
682-
}
678+
// if vmDetailCpu or vmDetailRam is not null it means it is running in a overcommitted cluster.
679+
cpuOvercommitRatio = (vmDetailCpu != null) ? Float.parseFloat(vmDetailCpu) : clusterCpuOvercommitRatio;
680+
ramOvercommitRatio = (vmDetailRam != null) ? Float.parseFloat(vmDetailRam) : clusterRamOvercommitRatio;
683681
ServiceOffering so = offeringsMap.get(vm.getServiceOfferingId());
684682
if (so == null) {
685683
so = _offeringsDao.findByIdIncludingRemoved(vm.getServiceOfferingId());

server/src/main/java/com/cloud/servlet/ConsoleProxyServlet.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,10 @@ private String composeConsoleAccessUrl(String rootUrl, VirtualMachine vm, HostVO
495495
if (param.getHypervHost() != null || !ConsoleProxyManager.NoVncConsoleDefault.value()) {
496496
sb.append("/ajax?token=" + encryptor.encryptObject(ConsoleProxyClientParam.class, param));
497497
} else {
498-
sb.append("/resource/noVNC/vnc.html?port=" + ConsoleProxyManager.DEFAULT_NOVNC_PORT + "&token="
499-
+ encryptor.encryptObject(ConsoleProxyClientParam.class, param));
498+
sb.append("/resource/noVNC/vnc.html")
499+
.append("?autoconnect=true")
500+
.append("&port=" + ConsoleProxyManager.DEFAULT_NOVNC_PORT)
501+
.append("&token=" + encryptor.encryptObject(ConsoleProxyClientParam.class, param));
500502
}
501503

502504
// for console access, we need guest OS type to help implement keyboard

systemvm/agent/noVNC/app/styles/base.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,10 @@ select:active {
672672
max-width: 100%;
673673
}
674674

675+
:root:not(.noVNC_connected) #noVNC_fullscreen_button {
676+
display: none;
677+
}
678+
675679
/* Settings */
676680
#noVNC_settings {
677681
}

systemvm/agent/noVNC/vnc.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,4 @@ <h1 class="noVNC_logo" translate="no" style="display: none;"><span>no</span><br>
333333
<source src="app/sounds/bell.mp3" type="audio/mpeg">
334334
</audio>
335335
</body>
336-
<script type="application/javascript">
337-
window.onload = function() {
338-
document.getElementById("noVNC_connect_button").click();
339-
}
340-
</script>
341336
</html>

ui/public/locales/en.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@
202202
"label.action.generate.keys": "Generate Keys",
203203
"label.action.generate.keys.processing": "Generate Keys....",
204204
"label.action.get.diagnostics": "Get Diagnostics Data",
205+
"label.action.image.store.read.only": "Make Image store read-only",
206+
"label.action.image.store.read.write": "Make Image store read-write",
205207
"label.action.iso.permission": "Update ISO Permissions",
206208
"label.action.iso.share": "Update ISO Sharing",
207209
"label.action.list.nexusvswitch": "List Nexus 1000v",
@@ -2438,6 +2440,8 @@
24382440
"message.action.revert.snapshot": "Please confirm that you want to revert the owning volume to this snapshot.",
24392441
"message.action.router.health.checks": "Health checks result will be fetched from router.",
24402442
"message.action.router.health.checks.disabled.warning": "Please enable router health checks.",
2443+
"message.action.secondary.storage.read.only": "Please confirm that you want to make this secondary storage read only.",
2444+
"message.action.secondary.storage.read.write": "Please confirm that you want to make this secondary storage read write.",
24412445
"message.action.secure.host": "This will restart the host agent and libvirtd process after applying new X509 certificates, please confirm?",
24422446
"message.action.settings.warning.vm.running": "Please stop the virtual machine to access settings",
24432447
"message.action.settings.warning.vm.started": "Virtual machine has been started. It needs to be stopped to access settings",
@@ -3057,7 +3061,7 @@
30573061
"message.restart.mgmt.usage.server": "Please restart your management server(s) and usage server(s) for your new settings to take effect.",
30583062
"message.restart.network": "All services provided by this network will be interrupted. Please confirm that you want to restart this network.",
30593063
"message.restart.vpc": "Please confirm that you want to restart the VPC",
3060-
"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>",
3064+
"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>",
30613065
"message.restorevm": "Do you want to restore the VM ?",
30623066
"message.role.ordering.fail": "Reordering of rule permissions aborted as the list has changed while you were making changes. Please try again.",
30633067
"message.role.update.fail": "Failed updating rule permission",
@@ -3191,6 +3195,7 @@
31913195
"message.update.ipaddress.processing": "Updating IP Address...",
31923196
"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.",
31933197
"message.update.resource.count": "Please confirm that you want to update resource counts for this account.",
3198+
"message.update.resource.count.domain": "Please confirm that you want to update resource counts for this domain.",
31943199
"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:",
31953200
"message.update.ssl.failed": "Failed to update SSL Certificate.",
31963201
"message.update.ssl.succeeded": "Update SSL Certificates succeeded",

ui/src/components/view/ActionButton.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717

1818
<template>
1919
<span class="row-action-button">
20-
<console :resource="resource" :size="size" v-if="resource && resource.id && dataView" />
20+
<a-tooltip arrowPointAtCenter placement="bottomRight">
21+
<template slot="title">
22+
{{ $t('label.view.console') }}
23+
</template>
24+
<console :resource="resource" :size="size" v-if="resource && resource.id && dataView" />
25+
</a-tooltip>
2126
<a-tooltip
2227
v-for="(action, actionIndex) in actions"
2328
:key="actionIndex"

ui/src/config/section/compute.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export default {
311311
message: 'message.action.instance.reset.password',
312312
dataView: true,
313313
show: (record) => { return ['Running', 'Stopped'].includes(record.state) && record.passwordenabled },
314-
response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `Password of the VM is ${result.virtualmachine.password}` : null }
314+
response: (result) => { return result.virtualmachine && result.virtualmachine.password ? `The password of VM <b>${result.virtualmachine.displayname}</b> is <b>${result.virtualmachine.password}</b>` : null }
315315
},
316316
{
317317
api: 'resetSSHKeyForVirtualMachine',
@@ -537,6 +537,7 @@ export default {
537537
api: 'deleteSSHKeyPair',
538538
icon: 'delete',
539539
label: 'label.remove.ssh.key.pair',
540+
message: 'message.please.confirm.remove.ssh.key.pair',
540541
dataView: true,
541542
args: ['name', 'account', 'domainid'],
542543
mapping: {

ui/src/config/section/domain.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default {
9393
api: 'updateResourceCount',
9494
icon: 'sync',
9595
label: 'label.action.update.resource.count',
96-
message: 'message.update.resource.count',
96+
message: 'message.update.resource.count.domain',
9797
listView: true,
9898
dataView: true,
9999
args: ['domainid'],

ui/src/config/section/infra/routers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export default {
104104
api: 'migrateSystemVm',
105105
icon: 'drag',
106106
label: 'label.action.migrate.router',
107+
message: 'message.migrate.router.confirm',
107108
dataView: true,
108109
show: (record, store) => { return record.state === 'Running' && ['Admin'].includes(store.userInfo.roletype) },
109110
component: () => import('@/views/compute/MigrateWizard'),

0 commit comments

Comments
 (0)