mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
fix #1646
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.taobao.arthas.core.command.model;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hengyunabc 2021-01-05
|
||||
*
|
||||
*/
|
||||
public class Base64Model extends ResultModel {
|
||||
|
||||
private String content;
|
||||
|
||||
public Base64Model() {
|
||||
}
|
||||
|
||||
public Base64Model(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "base64";
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.taobao.arthas.core.command.view;
|
||||
|
||||
import com.taobao.arthas.core.command.model.Base64Model;
|
||||
import com.taobao.arthas.core.shell.command.CommandProcess;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hengyunabc 2021-01-05
|
||||
*
|
||||
*/
|
||||
public class Base64View extends ResultView<Base64Model> {
|
||||
|
||||
@Override
|
||||
public void draw(CommandProcess process, Base64Model result) {
|
||||
String content = result.getContent();
|
||||
if (content != null) {
|
||||
process.write(content);
|
||||
}
|
||||
process.write("\n");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user