Commit e841cbb0 authored by jonasled's avatar jonasled

Merge branch 'develop'

parents 195c9765 f3f40d11
......@@ -10,7 +10,7 @@ android {
minSdkVersion 23
targetSdkVersion 29
versionCode Integer.valueOf(System.env.VERSION_CODE ?: 10)
versionName "1.9.0-${System.env.VERSION_SHA}"
versionName "1.10.0-${System.env.VERSION_SHA}"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
......
......@@ -519,7 +519,7 @@ public class ClusterActivity extends AppCompatActivity {
icon.add(R.drawable.server_offline);//qemu grey and white
}
} else if (vmctList.get(key.toString()).get(3) == "storage") {
label.set(label.size() - 1, vmctList.get(key.toString()).get(0));
label.set(label.size() - 1,vmctList.get(key.toString()).get(0) + " (" + vmctList.get(key.toString()).get(2) + ")");
if (vmctList.get(key.toString()).get(4).equals("available")) {
icon.add(R.drawable.storage_online);//qemu color
} else {
......
......@@ -65,6 +65,8 @@ public class HelperFunctions {
}
public static void formatGraph(GraphView graphView, LineGraphSeries... lineGraphSeries){
double maxY = lineGraphSeries[0].getHighestValueY();
double minY = lineGraphSeries[0].getLowestValueY();
double maxX = lineGraphSeries[0].getHighestValueX();
double minX = lineGraphSeries[0].getLowestValueX();
......@@ -72,13 +74,18 @@ public class HelperFunctions {
for (LineGraphSeries series: lineGraphSeries) {
graphView.addSeries(series);
if(series.getHighestValueY()> maxY) maxY = series.getHighestValueY();
if(series.getLowestValueY()> minY) minY = series.getLowestValueY();
if(series.getHighestValueX()> maxX) maxX = series.getHighestValueX();
if(series.getLowestValueX()> minX) minX = series.getLowestValueX();
}
graphView.getViewport().setYAxisBoundsManual(true);
graphView.getViewport().setMaxY(maxY + 1);
graphView.getViewport().setMinY(minY - 1);
graphView.getViewport().setXAxisBoundsManual(true);
graphView.getViewport().setMaxX(maxX);
graphView.getViewport().setMinX(minX);
graphView.getViewport().setMaxX(maxX + 1);
graphView.getViewport().setMinX(minX - 1);
}
public static String totpGenerator(String secretKey) { //used to generate the TFA tokens on open connection, if TFA is enabled
......
......@@ -114,6 +114,7 @@ public class ServerControlActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(startActivity.theme == 3) setTheme(R.style.Theme_App_black);
setContentView(R.layout.activity_server_control);
Toolbar toolbar = findViewById(R.id.toolbar);
consoleButton = findViewById(R.id.buttonConsole);
......
......@@ -54,7 +54,6 @@ public class StorageControlActivity extends AppCompatActivity {
TextView driveText;
ListView storageList;
Spinner graphSpinner;
Spinner avgMaxSpinner;
GraphView usageGraph;
LineGraphSeries<DataPoint> usageGraphSeries = new LineGraphSeries<>();
Map<String, ArrayList<String>> storageContent = new HashMap<>();
......@@ -73,7 +72,6 @@ public class StorageControlActivity extends AppCompatActivity {
idText = findViewById(R.id.labelID);
driveText = findViewById(R.id.labelDrive);
graphSpinner = findViewById(R.id.spinnerTime);
avgMaxSpinner = findViewById(R.id.spinnerAvgMax);
usageGraph = findViewById(R.id.graphUsage);
ticket = getIntent().getStringExtra("ticket");
......@@ -98,18 +96,6 @@ public class StorageControlActivity extends AppCompatActivity {
}
});
avgMaxSpinnerValues = ArrayAdapter.createFromResource(this, R.array.avgMaxSpinner, android.R.layout.simple_spinner_dropdown_item);
avgMaxSpinner.setAdapter(avgMaxSpinnerValues);
avgMaxSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
new getConfig().execute();
}
public void onNothingSelected(AdapterView<?> adapterView) {
return;
}
});
//new getConfig().execute();
}
private class getConfig extends AsyncTask<String, String, String> {
......@@ -141,7 +127,6 @@ public class StorageControlActivity extends AppCompatActivity {
}
});
spinnerID = graphSpinner.getSelectedItemPosition();
spinner2ID = avgMaxSpinner.getSelectedItemPosition();
}
@Override
......@@ -221,17 +206,7 @@ public class StorageControlActivity extends AppCompatActivity {
break;
}
String cf = "AVERAGE";
switch (spinnerID){
case 0:
cf = "AVERAGE";
break;
case 1:
cf = "MAX";
break;
}
url = new URL(urlString + "api2/json/nodes/" + node + "/storage/" + vmConfig.getString("storage") + "/rrddata?timeframe=" + timeframe + "&cf=" + cf);
url = new URL(urlString + "api2/json/nodes/" + node + "/storage/" + vmConfig.getString("storage") + "/rrddata?timeframe=" + timeframe);
conn2 = (HttpsURLConnection) url.openConnection();
conn2.setSSLSocketFactory(HelperFunctions.context.getSocketFactory());
conn2.setHostnameVerifier(HelperFunctions.hostnameVerifier);
......
Neue Features:
* Schwarzes Design wurde hinzugefügt
* Graph für verwendung von Speicher wurde hinzugefügt
* Graphen können nun umgeschaltet werden zwischen Durchschnitt und Maximum
Fehlerbehebung:
* Graph wird manchmal nicht angezeigt
* Bei Verwendung eines signierten Zertifikates in Proxmox werden keine VMs angezeigt
* Bei der Betriebszeit hat eine 0 bei werten kleiner 10 gefehlt
* Beim Scrollen von Speichern wird nun auch die übersicht mitgescrollt
\ No newline at end of file
* Schwarzes Design funktioniert nun auch in der VM / Container Steuerung.
* Durchschnitt / Maximum Spinner wurde in der Speicher Ansicht entfernt, da nicht unterstützt von Proxmox
\ No newline at end of file
......@@ -146,11 +146,6 @@
android:layout_height="wrap_content"
android:layout_weight="1" />
<Spinner
android:id="@+id/spinnerAvgMax"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<Space
......
......@@ -11,7 +11,7 @@
<string name="issuer">Utgivaren</string>
<string name="load">ladda</string>
<string name="realm">Område</string>
<string name="title_activity_console_view">KonsollVy</string>
<string name="title_activity_console_view">Konsol</string>
<string name="username">Användarnamn</string>
<string name="password">Lösenord</string>
<string name="name">Namn</string>
......@@ -53,7 +53,7 @@
<string name="restart">Starta om</string>
<string name="appSettings">Appinställningar</string>
<string name="listTextSize">Listors textstorlek</string>
<string name="darkmode">Mörkt läge</string>
<string name="darkmode">Apptema</string>
<string name="beta">Medverkande</string>
<string name="appRestartRequired">Appen måste startas om för att ändringar ska gälla.</string>
<string name="joinBeta">Gå med betatestning</string>
......@@ -108,4 +108,20 @@
<string name="testIntent">Testa avsikt</string>
<string name="errUnknownLong">Okänt fel uppstod, detta ska ej hända.</string>
<string name="errUnknown">Okänt fel uppstod</string>
<string name="maximum">Maximal</string>
<string name="average">Genomsnitt</string>
<string name="detailedError">Detaljerat felmeddelande</string>
<string name="moreDetails">Mer detaljer</string>
<string name="light">Ljust</string>
<string name="black">Svart</string>
<string name="dark">Mörkt</string>
<string name="automatic">Automatiskt</string>
<string name="settings">Inställningar</string>
<string name="year">År</string>
<string name="month">Månad</string>
<string name="week">Vecka</string>
<string name="day">Dag</string>
<string name="hour">Timme</string>
<string name="delete">Ta bort</string>
<string name="edit">Redigera</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Proxdroid</string>
<string name="title_activity_proxmox_connected">集群</string>
<string name="title_activity_main">节点列表</string>
<string name="loading">载入中</string>
<string name="day"></string>
<string name="title_activity_settings">设置</string>
<string name="title_activity_console_view">控制台视图</string>
<string name="username">用户名</string>
<string name="password">密码</string>
<string name="realm">登录域</string>
<string name="name">节点名称</string>
<string name="serverURL">节点链接</string>
<string name="ok">确认</string>
<string name="login">已登录</string>
<string name="getVM_CT">获取虚拟机硬件信息从</string>
<string name="ksmSharing">KSM共享</string>
<string name="edit">编辑</string>
<string name="delete">删除</string>
<string name="console">控制台</string>
<string name="start">开启</string>
<string name="shutdown">关闭</string>
<string name="stop">停止</string>
<string name="node">节点</string>
<string name="id">ID</string>
<string name="status">状态</string>
<string name="stopped">已停止</string>
<string name="cpuUsage">CPU利用率</string>
<string name="ramUsage">内存利用率</string>
<string name="driveUsage">磁盘利用率</string>
<string name="write">写入</string>
<string name="read">读取</string>
<string name="in">入方向</string>
<string name="out">出方向</string>
<string name="getDataOf">获取数据</string>
<string name="loginSuccessTitle">登录成功</string>
<string name="testLogin">测试登录</string>
<string name="accept">已通过</string>
<string name="deny">被拒绝</string>
<string name="issuer">发布者</string>
<string name="validFrom">有效期自</string>
<string name="to"></string>
<string name="load">载入</string>
<string name="requiresTOTP">账户需要 TFA 验证</string>
<string name="totpToken">TFA 验证码</string>
<string name="fingerprintAuthenticationLong">如要启用指纹功能请将你的手指放在扫描器上</string>
<string name="notes">备注</string>
<string name="online">在线</string>
<string name="offline">离线</string>
<string name="ioWait">IO 延迟</string>
<string name="utilization">服务器利用率</string>
<string name="restart">重启</string>
<string name="uptime">运行时间</string>
<string name="days"></string>
<string name="hour">小时</string>
<string name="errUnknownLong">发生未知错误,这个错误不应该发生.</string>
<string name="week"></string>
<string name="month"></string>
<string name="year"></string>
<string name="settings">设置</string>
<string name="appSettings">APP 设置</string>
<string name="listTextSize">列表字体大小</string>
<string name="darkmode">APP 主题</string>
<string name="automatic">自动切换</string>
<string name="beta">贡献</string>
<string name="joinBeta">加入 Beta 测试</string>
<string name="bugFound">发现 BUG \?</string>
<string name="bugFoundLong">如果你发现了一个 BUG .请向我发送邮件进行反馈(英语或德语).</string>
<string name="black">黑色</string>
<string name="light">光亮</string>
<string name="sortOrder">排序列表中虚拟机的顺序</string>
<string name="sourcecode">源代码</string>
<string name="discord">加入 Discord 频道</string>
<string name="discordLong">如果你有问题或者只是想和其他用户聊天.你可以加入官方的Discord服务器.</string>
<string name="donate">向作者捐赠</string>
<string name="donateLong">请考虑捐款来维持这个项目和其他项目.</string>
<string name="security">安全</string>
<string name="fingerprint">用指纹锁保护数据</string>
<string name="fingerprintLong">如果你启用这个选项.你必须在应用程序中扫描你的手指解密数据.</string>
<string name="version">版本</string>
<string name="consoleFullScreen">全屏显示控制台</string>
<string name="consoleFullScreenLong">在某些带有圆角屏幕的设备上.禁用此选项有助于查看完整的内容.</string>
<string name="xtermFontSize">xterm.js 字体大小</string>
<string name="errInvalidJsonTitle">无效响应</string>
<string name="errNotReachable">无法连接到 Proxmox 实例,请检查您的服务器是否可访问.</string>
<string name="errInvalidJson">从 Proxmox 实例得到的响应无效,请检查你的链接.</string>
<string name="errNotReachableTitle">连接失败</string>
<string name="errnotEmpty">此处不能为空</string>
<string name="errnoServer">未配置服务器</string>
<string name="errUntrustedCertTitle">不可信的证书</string>
<string name="errRunAgainTitle">请再次重复此操作</string>
<string name="errNoRealm">请选择登录域</string>
<string name="errAppCrashed">抱歉,应用程序崩溃.请将报告发送给开发者.</string>
<string name="crashreport">崩溃报告</string>
<string name="pref_disable_acra">自动向开发人员发送崩溃报告.</string>
<string name="pref_acra_user_email">邮箱</string>
<string name="translators">翻译人员</string>
<string name="advancedSettings">高级设置</string>
<string name="action">行为</string>
<string name="extra">额外元素</string>
<string name="testIntent">试运行宏</string>
<string name="callIntentEnable">当连接出错执行宏</string>
<string name="selectApp">选择执行的应用程序</string>
<string name="moreDetails">更多信息</string>
<string name="detailedError">详细错误</string>
<string name="useXterm">使用 xterm.js 来运行虚拟控制台而不是 novnc</string>
<string name="xtermFontSizeLong">如果你使用 xterm.js 并且想要修改显示的字体大小可以在这里更改.</string>
<string name="maximum">最大值</string>
<string name="average">平均值</string>
<string name="running">运行中</string>
<string name="joinBetaLong">如果你参加 Beta 测试.你可以帮助我开发这个应用程序.并在其他人之前获得最新功能.</string>
<string name="title_activity_new_server">添加节点</string>
<string name="networkUsage">网络利用率</string>
<string name="errRunAgain">请再次重复此操作以信任该证书.</string>
<string name="getNode">获取节点中</string>
<string name="appRestartRequired">需要重新启动应用程序才能使此设置生效.</string>
<string name="pref_acra_user_email_summary">如果您在此处输入你的邮箱,并且你需要更多信息,我们可以通过这个邮箱与您联系.</string>
<string name="extraDescription">每行增加一个额外元素.格式为: NAME:VALUE[输入值],以及 true/false .</string>
<string name="sourcecodeLong">如果您发现了一个 BUG 并想自己修复它.或者只想查看源代码.可以点击这里.</string>
<string name="title_activity_server_control">虚拟控制台</string>
<string name="loginSuccess">已成功连接致你的 Proxmox 服务器.现在你可以点击保存该设置后关闭这个提示.</string>
<string name="fingerprintAuthentication">指纹认证</string>
<string name="dark">黑暗</string>
<string name="errUnknown">发生未知错误</string>
<string name="showAdvancedSettings">显示高级设置</string>
</resources>
\ No newline at end of file
......@@ -6,7 +6,7 @@
<string name="title_activity_proxmox_connected">Proxdroid - Cluster</string>
<string name="title_activity_server_control">Proxdroid - VM control</string>
<string name="title_activity_settings">Proxdroid - Settings</string>
<string name="title_activity_console_view">ConsoleView</string>
<string name="title_activity_console_view">Console</string>
<string name="username">Username</string>
<string name="password">Password</string>
<string name="realm">Realm</string>
......@@ -155,7 +155,7 @@
<string name="extraDescription">Put one extra element per line. To in the following format: NAME:VALUE enter Text, or true / false for boolean values.</string>
<string name="testIntent">Test Intent</string>
<string name="feedbackMail" translatable="false">proxdroid_feedback_gSt44pHrBC@jonasled.de</string>
<string name="translatorsDescription" translatable="false">German: jonasled\nSwedish: McTwist</string>
<string name="translatorsDescription" translatable="false">German: jonasled\nSwedish: McTwist\nChinese (simplified): Shuazi</string>
<string name="moreDetails">More details</string>
<string name="detailedError">Detailed error</string>
<string name="average">Average</string>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment