mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
upgrade & opt
- flutter 3.0.1 - show snackbar when no server to ping - server detail page replace nice to iowait - make script show stdout when error
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -354,7 +354,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 137;
|
CURRENT_PROJECT_VERSION = 138;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -362,7 +362,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.137;
|
MARKETING_VERSION = 1.0.138;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -484,7 +484,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 137;
|
CURRENT_PROJECT_VERSION = 138;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -492,7 +492,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.137;
|
MARKETING_VERSION = 1.0.138;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -508,7 +508,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 137;
|
CURRENT_PROJECT_VERSION = 138;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -516,7 +516,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.137;
|
MARKETING_VERSION = 1.0.138;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -45,5 +45,12 @@ class Cpu2Status {
|
|||||||
return used.isNaN ? 0 : used * 100;
|
return used.isNaN ? 0 : used * 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double get iowait {
|
||||||
|
if (now.length != pre.length) return 0;
|
||||||
|
final delta = now[0].iowait - pre[0].iowait;
|
||||||
|
final used = delta / totalDelta;
|
||||||
|
return used.isNaN ? 0 : used * 100;
|
||||||
|
}
|
||||||
|
|
||||||
double get idle => 100 - usedPercent();
|
double get idle => 100 - usedPercent();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 137;
|
static const int build = 138;
|
||||||
static const String engine =
|
static const String engine =
|
||||||
"Flutter 3.0.0 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision ee4e09cce0 (11 days ago) • 2022-05-09 16:45:18 -0700\nEngine • revision d1b9a6938a\nTools • Dart 2.17.0 • DevTools 2.12.2\n";
|
"Flutter 3.0.1 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision fb57da5f94 (2 days ago) • 2022-05-19 15:50:29 -0700\nEngine • revision caaafc5604\nTools • Dart 2.17.1 • DevTools 2.12.2\n";
|
||||||
static const String buildAt = "2022-05-20 19:48:33.039675";
|
static const String buildAt = "2022-05-21 20:15:15.896932";
|
||||||
static const int modifications = 7;
|
static const int modifications = 6;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,6 +148,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"pingAvg": MessageLookupByLibrary.simpleMessage("Avg:"),
|
"pingAvg": MessageLookupByLibrary.simpleMessage("Avg:"),
|
||||||
"pingInputIP": MessageLookupByLibrary.simpleMessage(
|
"pingInputIP": MessageLookupByLibrary.simpleMessage(
|
||||||
"Please input a target IP/domain."),
|
"Please input a target IP/domain."),
|
||||||
|
"pingNoServer": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"No server to ping.\nPlease add a server in server tab."),
|
||||||
"platformNotSupportUpdate": MessageLookupByLibrary.simpleMessage(
|
"platformNotSupportUpdate": MessageLookupByLibrary.simpleMessage(
|
||||||
"Current platform does not support in app update.\nPlease build from source and install it."),
|
"Current platform does not support in app update.\nPlease build from source and install it."),
|
||||||
"plzEnterHost":
|
"plzEnterHost":
|
||||||
|
|||||||
@@ -130,6 +130,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||||||
"ping": MessageLookupByLibrary.simpleMessage("Ping"),
|
"ping": MessageLookupByLibrary.simpleMessage("Ping"),
|
||||||
"pingAvg": MessageLookupByLibrary.simpleMessage("平均:"),
|
"pingAvg": MessageLookupByLibrary.simpleMessage("平均:"),
|
||||||
"pingInputIP": MessageLookupByLibrary.simpleMessage("请输入目标IP或域名"),
|
"pingInputIP": MessageLookupByLibrary.simpleMessage("请输入目标IP或域名"),
|
||||||
|
"pingNoServer": MessageLookupByLibrary.simpleMessage(
|
||||||
|
"没有服务器可用于Ping\n请在服务器tab添加服务器后再试"),
|
||||||
"platformNotSupportUpdate":
|
"platformNotSupportUpdate":
|
||||||
MessageLookupByLibrary.simpleMessage("当前平台不支持更新,请编译最新源码后手动安装"),
|
MessageLookupByLibrary.simpleMessage("当前平台不支持更新,请编译最新源码后手动安装"),
|
||||||
"plzEnterHost": MessageLookupByLibrary.simpleMessage("请输入主机"),
|
"plzEnterHost": MessageLookupByLibrary.simpleMessage("请输入主机"),
|
||||||
|
|||||||
@@ -1220,6 +1220,16 @@ class S {
|
|||||||
args: [],
|
args: [],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// `No server to ping.\nPlease add a server in server tab.`
|
||||||
|
String get pingNoServer {
|
||||||
|
return Intl.message(
|
||||||
|
'No server to ping.\nPlease add a server in server tab.',
|
||||||
|
name: 'pingNoServer',
|
||||||
|
desc: '',
|
||||||
|
args: [],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||||
|
|||||||
@@ -115,5 +115,6 @@
|
|||||||
"platformNotSupportUpdate": "Current platform does not support in app update.\nPlease build from source and install it.",
|
"platformNotSupportUpdate": "Current platform does not support in app update.\nPlease build from source and install it.",
|
||||||
"invalidVersionHelp": "Please make sure that docker is installed correctly, or that you are using a non-self-compiled version. If you don't have the above issues, please submit an issue on {url}.",
|
"invalidVersionHelp": "Please make sure that docker is installed correctly, or that you are using a non-self-compiled version. If you don't have the above issues, please submit an issue on {url}.",
|
||||||
"noInterface": "No interface",
|
"noInterface": "No interface",
|
||||||
"lastTry": "Last try!"
|
"lastTry": "Last try!",
|
||||||
|
"pingNoServer": "No server to ping.\nPlease add a server in server tab."
|
||||||
}
|
}
|
||||||
@@ -115,5 +115,6 @@
|
|||||||
"platformNotSupportUpdate": "当前平台不支持更新,请编译最新源码后手动安装",
|
"platformNotSupportUpdate": "当前平台不支持更新,请编译最新源码后手动安装",
|
||||||
"invalidVersionHelp": "请确保正确安装了docker,或者使用的非自编译版本。如果没有以上问题,请在 {url} 提交问题。",
|
"invalidVersionHelp": "请确保正确安装了docker,或者使用的非自编译版本。如果没有以上问题,请在 {url} 提交问题。",
|
||||||
"noInterface": "没有可用的接口",
|
"noInterface": "没有可用的接口",
|
||||||
"lastTry": "最后尝试"
|
"lastTry": "最后尝试",
|
||||||
|
"pingNoServer": "没有服务器可用于Ping\n请在服务器tab添加服务器后再试"
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,7 @@ class _PingPageState extends State<PingPage>
|
|||||||
late TextEditingController _textEditingController;
|
late TextEditingController _textEditingController;
|
||||||
late MediaQueryData _media;
|
late MediaQueryData _media;
|
||||||
final List<PingResult> _results = [];
|
final List<PingResult> _results = [];
|
||||||
|
final _serverProvider = locator<ServerProvider>();
|
||||||
late S s;
|
late S s;
|
||||||
static const summaryTextStyle = TextStyle(
|
static const summaryTextStyle = TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@@ -106,7 +107,12 @@ class _PingPageState extends State<PingPage>
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await Future.wait(locator<ServerProvider>().servers.map((e) async {
|
if (_serverProvider.servers.isEmpty) {
|
||||||
|
showSnackBar(context, Text(s.pingNoServer));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await Future.wait(_serverProvider.servers.map((e) async {
|
||||||
if (e.client == null) {
|
if (e.client == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: _media.size.width * 0.03,
|
width: _media.size.width * 0.03,
|
||||||
),
|
),
|
||||||
_buildCPUTimePercent(ss.cpu2Status.nice, 'nice'),
|
_buildCPUTimePercent(ss.cpu2Status.iowait, 'io'),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: _media.size.width * 0.03,
|
width: _media.size.width * 0.03,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -420,14 +420,14 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 137;
|
CURRENT_PROJECT_VERSION = 138;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.137;
|
MARKETING_VERSION = 1.0.138;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -550,14 +550,14 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 137;
|
CURRENT_PROJECT_VERSION = 138;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.137;
|
MARKETING_VERSION = 1.0.138;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@@ -574,14 +574,14 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 137;
|
CURRENT_PROJECT_VERSION = 138;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.137;
|
MARKETING_VERSION = 1.0.138;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
@@ -135,7 +135,8 @@ Future<void> flutterBuild(
|
|||||||
|
|
||||||
print('Done.\n');
|
print('Done.\n');
|
||||||
} else {
|
} else {
|
||||||
print(buildResult.stderr.toString());
|
print(buildResult.stdout);
|
||||||
|
print(buildResult.stderr);
|
||||||
print('\nBuild failed with exit code $exitCode');
|
print('\nBuild failed with exit code $exitCode');
|
||||||
exit(exitCode);
|
exit(exitCode);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user