test
This commit is contained in:
@@ -10,12 +10,13 @@ import 'package:oc_front/core/services/specialized_services/logs_service.dart';
|
||||
|
||||
bool isLoading = true;
|
||||
Map<String, bool> valid = {};
|
||||
// ignore: must_be_immutable
|
||||
class LogsWidget extends StatefulWidget {
|
||||
String? level;
|
||||
String search = "";
|
||||
WorkflowExecution? exec;
|
||||
List<Log> logs = [];
|
||||
LogsWidget ({ Key? key, this.search = "", this.level, this.exec }): super(key: key);
|
||||
LogsWidget ({ super.key, this.search = "", this.level, this.exec });
|
||||
@override LogsWidgetState createState() => LogsWidgetState();
|
||||
}
|
||||
|
||||
@@ -73,12 +74,12 @@ class LogsWidgetState extends State<LogsWidget> {
|
||||
List<LogWidget> itemRows = logs.where((element) => (element.message?.toLowerCase().contains(widget.search.toLowerCase()) ?? true)
|
||||
&& (widget.level?.contains(element.level ?? "") ?? true) ).map((e) => LogWidget(item: e)).toList();
|
||||
if (isLoading) {
|
||||
return Container( height: getMainHeight(context) - 100,
|
||||
child: Center( child: CircularProgressIndicator()) );
|
||||
return SizedBox( height: getMainHeight(context) - 100,
|
||||
child: const Center( child: CircularProgressIndicator()) );
|
||||
}
|
||||
return Stack( children: [
|
||||
SingleChildScrollView( child: itemRows.isEmpty ?
|
||||
Container( height: getMainHeight(context) - 100,
|
||||
SizedBox( height: getMainHeight(context) - 100,
|
||||
child: const Center( child: Text("no log registered", style: TextStyle(color: Colors.grey, fontSize: 25 ),)))
|
||||
: Column( children: [...itemRows, Container(height: 50,) ] ) ),
|
||||
]);
|
||||
@@ -88,10 +89,11 @@ class LogsWidgetState extends State<LogsWidget> {
|
||||
}
|
||||
}
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class LogWidget extends StatefulWidget {
|
||||
final Log item;
|
||||
bool expanded = false;
|
||||
LogWidget ({ Key? key, required this.item }): super(key: key);
|
||||
LogWidget ({ super.key, required this.item });
|
||||
@override LogWidgetState createState() => LogWidgetState();
|
||||
}
|
||||
class LogWidgetState extends State<LogWidget> {
|
||||
|
||||
Reference in New Issue
Block a user