Skip to content

Commit 3a4d94d

Browse files
committed
v1.0.15+14
1 parent 222c0c0 commit 3a4d94d

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

lib/screens/widgets/process_list_item.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
55
import 'package:running_services_monitor/bloc/working_mode_bloc/working_mode_bloc.dart';
66
import 'package:running_services_monitor/core/dependency_injection/dependency_injection.dart';
77
import 'package:running_services_monitor/models/service_info.dart';
8+
import 'package:running_services_monitor/models/working_mode.dart';
89
import 'package:running_services_monitor/utils/format_utils.dart';
910
import 'package:running_services_monitor/core/extensions.dart';
1011
import 'package:running_services_monitor/bloc/stop_service_bloc/stop_service_bloc.dart';
@@ -35,7 +36,7 @@ class ProcessListItem extends StatelessWidget {
3536
trailing: BlocSelector<WorkingModeBloc, WorkingModeState, bool>(
3637
bloc: getIt<WorkingModeBloc>(),
3738
selector: (state) {
38-
return process.pid != null && state.value.isRootAvailable;
39+
return process.pid != null && state.value.currentMode == WorkingMode.root;
3940
},
4041
builder: (context, isShow) {
4142
return isShow

lib/services/process_parser.dart

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,12 @@ class ProcessParser {
99
static final _ramLineRegex = RegExp(r'^\s*([\d,]+)K:\s+(\S+)\s+\(pid\s+(\d+)');
1010
static final _connectionRegex = RegExp(r'([a-zA-Z0-9._]+)/\.?([A-Za-z0-9.$]+):@([a-f0-9]+)\s+flags=(0x[a-f0-9]+)');
1111
static final _pssLineRegex = RegExp(r'^\s*([\d,]+)K:\s+([a-zA-Z0-9._:]+)(?:\s+\(pid\s+(\d+))?', caseSensitive: false);
12-
1312
static final _totalRamRegex = RegExp(r'Total RAM:\s+([\d,]+)K\s*(?:\(status\s+(\w+)\))?');
14-
static final _freeRamRegex = RegExp(
15-
r'Free RAM:\s+([\d,]+)K\s*\(\s*([\d,]+)K\s+cached pss\s*\+\s*([\d,]+)K\s+cached kernel\s*\+\s*([\d,]+)K\s+free\)',
16-
);
13+
static final _freeRamRegex = RegExp(r'Free RAM:\s+([\d,]+)K\s*\(\s*([\d,]+)K\s+cached pss\s*\+\s*([\d,]+)K\s+cached kernel\s*\+\s*([\d,]+)K\s+free\)');
1714
static final _usedRamRegex = RegExp(r'Used RAM:\s+([\d,]+)K\s*\(\s*([\d,]+)K\s+used pss\s*\+\s*([\d,]+)K\s+kernel\)');
1815
static final _gpuRegex = RegExp(r'GPU:\s+([\d,]+)K');
1916
static final _lostRamRegex = RegExp(r'Lost RAM:\s+([\d,]+)K');
20-
static final _zramRegex = RegExp(
21-
r'ZRAM:\s+([\d,]+)K\s+physical\s+used\s+for\s+([\d,]+)K\s+in\s+swap\s*\(\s*([\d,]+)K\s+total\s+swap\)',
22-
);
17+
static final _zramRegex = RegExp(r'ZRAM:\s+([\d,]+)K\s+physical\s+used\s+for\s+([\d,]+)K\s+in\s+swap\s*\(\s*([\d,]+)K\s+total\s+swap\)');
2318
static final _tuningRegex = RegExp(r'Tuning:.*oom\s+([\d,]+)K.*restore limit\s+([\d,]+)K');
2419

2520
static double _parseKb(String? value) {
@@ -277,7 +272,7 @@ class ProcessParser {
277272
if (match == null) continue;
278273

279274
final fullProcessName = match.group(2) ?? '';
280-
if (!fullProcessName.contains('.')) continue;
275+
// if (!fullProcessName.contains('.')) continue;
281276

282277
final colonIdx = fullProcessName.indexOf(':');
283278
final basePackage = colonIdx != -1 ? fullProcessName.substring(0, colonIdx) : fullProcessName;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: running_services_monitor
22
description: "Running Services Monitor"
33
publish_to: 'none'
4-
version: 1.0.14+13
4+
version: 1.0.15+14
55

66
environment:
77
sdk: ^3.10.1

0 commit comments

Comments
 (0)