feat: add Control Room with containers and stacks management
- Add Control Room page with stacks sidebar and containers list - Implement container actions (start/stop/restart) with snackbars - Add container logs viewer dialog - Add search/filter for both stacks and containers lists - Add external links for Portainer and Netdata (url_launcher) - Add VS Code launch configuration for Flutter web debugging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
dd6bcbdbda
commit
3b89ed8c18
@@ -0,0 +1,35 @@
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
import '../../data/repositories/stack_repository_impl.dart';
|
||||
import '../../domain/entities/stack.dart';
|
||||
|
||||
part 'stacks_provider.g.dart';
|
||||
|
||||
/// Provides the list of all stacks.
|
||||
@riverpod
|
||||
Future<List<Stack>> stacks(StacksRef ref) async {
|
||||
final repository = ref.watch(stackRepositoryProvider);
|
||||
return repository.getStacks();
|
||||
}
|
||||
|
||||
/// Provides a single stack by ID.
|
||||
@riverpod
|
||||
Future<Stack> stack(StackRef ref, String id) async {
|
||||
final repository = ref.watch(stackRepositoryProvider);
|
||||
return repository.getStack(id);
|
||||
}
|
||||
|
||||
/// Currently selected stack ID (null = all containers).
|
||||
@riverpod
|
||||
class SelectedStack extends _$SelectedStack {
|
||||
@override
|
||||
String? build() => null;
|
||||
|
||||
void select(String? stackId) {
|
||||
state = stackId;
|
||||
}
|
||||
|
||||
void clear() {
|
||||
state = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user