feat(web): 增加服务个数显示
This commit is contained in:
@@ -10,11 +10,13 @@ import org.eclipse.collections.api.map.ImmutableMap;
|
|||||||
*/
|
*/
|
||||||
public class CloudServiceVO {
|
public class CloudServiceVO {
|
||||||
private final String name;
|
private final String name;
|
||||||
|
private final Integer size;
|
||||||
@JsonProperty("children")
|
@JsonProperty("children")
|
||||||
private final ImmutableList<Service> services;
|
private final ImmutableList<Service> services;
|
||||||
|
|
||||||
public CloudServiceVO(String name, ImmutableList<Service> services) {
|
public CloudServiceVO(String name, ImmutableList<Service> services) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
this.size = services.size();
|
||||||
this.services = services;
|
this.services = services;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,6 +24,10 @@ public class CloudServiceVO {
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getSize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
public ImmutableList<Service> getServices() {
|
public ImmutableList<Service> getServices() {
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
@@ -29,9 +35,10 @@ public class CloudServiceVO {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "CloudServiceVO{" +
|
return "CloudServiceVO{" +
|
||||||
"name='" + name + '\'' +
|
"name='" + name + '\'' +
|
||||||
", services=" + services +
|
", size=" + size +
|
||||||
'}';
|
", services=" + services +
|
||||||
|
'}';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final class Service {
|
public static final class Service {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
const commonInfo = {
|
const commonInfo = {
|
||||||
|
// baseUrl: 'http://132.126.207.130:35690/hudi_services/service_web',
|
||||||
baseUrl: '/hudi_services/service_web',
|
baseUrl: '/hudi_services/service_web',
|
||||||
clusters: {
|
clusters: {
|
||||||
// hudi同步运行集群和yarn队列名称
|
// hudi同步运行集群和yarn队列名称
|
||||||
|
|||||||
@@ -16,7 +16,11 @@ function cloudCrud(title, path) {
|
|||||||
loadDataOnce: true,
|
loadDataOnce: true,
|
||||||
perPage: 100,
|
perPage: 100,
|
||||||
columns: [
|
columns: [
|
||||||
{name: 'name', label: '名称'},
|
{
|
||||||
|
label: '名称',
|
||||||
|
type: 'tpl',
|
||||||
|
tpl: `\${name} \${IF(size === undefined, '', '<span class="font-bold label label-primary">' + size + '</span>')}`
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'status',
|
name: 'status',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
|
|||||||
Reference in New Issue
Block a user