add side panel and more build log controls
This commit is contained in:
		@@ -42,8 +42,7 @@ class _APIBuilderState<T extends BaseProvider, K, DTO>
 | 
			
		||||
 | 
			
		||||
    if (widget.interval != null) {
 | 
			
		||||
      timer = Timer.periodic(widget.interval!, (Timer t) {
 | 
			
		||||
        Provider.of<T>(context, listen: false)
 | 
			
		||||
            .refresh(context);
 | 
			
		||||
        Provider.of<T>(context, listen: false).refresh(context);
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -31,11 +31,13 @@ class _BuildOutputState extends State<BuildOutput> {
 | 
			
		||||
        scrollDirection: Axis.vertical, //.horizontal
 | 
			
		||||
        child: Padding(
 | 
			
		||||
          padding: const EdgeInsets.only(left: 30, right: 15),
 | 
			
		||||
          child: Text(
 | 
			
		||||
            output,
 | 
			
		||||
            style: const TextStyle(
 | 
			
		||||
              fontSize: 16.0,
 | 
			
		||||
              color: Colors.white,
 | 
			
		||||
          child: SelectionArea(
 | 
			
		||||
            child: Text(
 | 
			
		||||
              output,
 | 
			
		||||
              style: const TextStyle(
 | 
			
		||||
                fontSize: 16.0,
 | 
			
		||||
                color: Colors.white,
 | 
			
		||||
              ),
 | 
			
		||||
            ),
 | 
			
		||||
          ),
 | 
			
		||||
        ),
 | 
			
		||||
 
 | 
			
		||||
@@ -2,17 +2,18 @@ import 'package:flutter/material.dart';
 | 
			
		||||
 | 
			
		||||
import '../../constants/color_constants.dart';
 | 
			
		||||
 | 
			
		||||
class ChartCard extends StatelessWidget {
 | 
			
		||||
  const ChartCard({
 | 
			
		||||
    Key? key,
 | 
			
		||||
class SideCard extends StatelessWidget {
 | 
			
		||||
  const SideCard({
 | 
			
		||||
    super.key,
 | 
			
		||||
    required this.title,
 | 
			
		||||
    required this.color,
 | 
			
		||||
    this.color,
 | 
			
		||||
    required this.textRight,
 | 
			
		||||
    required this.subtitle,
 | 
			
		||||
  }) : super(key: key);
 | 
			
		||||
    this.subtitle,
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  final Color color;
 | 
			
		||||
  final String title, textRight, subtitle;
 | 
			
		||||
  final Color? color;
 | 
			
		||||
  final String title, textRight;
 | 
			
		||||
  final String? subtitle;
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  Widget build(BuildContext context) {
 | 
			
		||||
@@ -27,12 +28,13 @@ class ChartCard extends StatelessWidget {
 | 
			
		||||
      ),
 | 
			
		||||
      child: Row(
 | 
			
		||||
        children: [
 | 
			
		||||
          SizedBox(
 | 
			
		||||
              height: 20,
 | 
			
		||||
              width: 20,
 | 
			
		||||
              child: Container(
 | 
			
		||||
                color: color,
 | 
			
		||||
              )),
 | 
			
		||||
          if (color != null)
 | 
			
		||||
            SizedBox(
 | 
			
		||||
                height: 20,
 | 
			
		||||
                width: 20,
 | 
			
		||||
                child: Container(
 | 
			
		||||
                  color: color,
 | 
			
		||||
                )),
 | 
			
		||||
          Expanded(
 | 
			
		||||
            child: Padding(
 | 
			
		||||
              padding: const EdgeInsets.symmetric(horizontal: defaultPadding),
 | 
			
		||||
@@ -44,13 +46,14 @@ class ChartCard extends StatelessWidget {
 | 
			
		||||
                    maxLines: 1,
 | 
			
		||||
                    overflow: TextOverflow.ellipsis,
 | 
			
		||||
                  ),
 | 
			
		||||
                  Text(
 | 
			
		||||
                    subtitle,
 | 
			
		||||
                    style: Theme.of(context)
 | 
			
		||||
                        .textTheme
 | 
			
		||||
                        .bodySmall!
 | 
			
		||||
                        .copyWith(color: Colors.white70),
 | 
			
		||||
                  ),
 | 
			
		||||
                  if (subtitle != null)
 | 
			
		||||
                    Text(
 | 
			
		||||
                      subtitle!,
 | 
			
		||||
                      style: Theme.of(context)
 | 
			
		||||
                          .textTheme
 | 
			
		||||
                          .bodySmall!
 | 
			
		||||
                          .copyWith(color: Colors.white70),
 | 
			
		||||
                    ),
 | 
			
		||||
                ],
 | 
			
		||||
              ),
 | 
			
		||||
            ),
 | 
			
		||||
 
 | 
			
		||||
@@ -39,21 +39,21 @@ class SidePanel extends StatelessWidget {
 | 
			
		||||
              nrbuilds: nrbuilds,
 | 
			
		||||
              nrfailedbuilds: nrfailedbuilds,
 | 
			
		||||
              nrActiveBuilds: nrActiveBuilds),
 | 
			
		||||
          ChartCard(
 | 
			
		||||
          SideCard(
 | 
			
		||||
            color: const Color(0xff0a7005),
 | 
			
		||||
            title: "Successful Builds",
 | 
			
		||||
            textRight:
 | 
			
		||||
                "${((nrbuilds - nrfailedbuilds) * 100 / nrbuilds).toStringAsFixed(2)}%",
 | 
			
		||||
            subtitle: (nrbuilds - nrfailedbuilds).toString(),
 | 
			
		||||
          ),
 | 
			
		||||
          ChartCard(
 | 
			
		||||
          SideCard(
 | 
			
		||||
            color: const Color(0xff760707),
 | 
			
		||||
            title: "Failed Builds",
 | 
			
		||||
            textRight:
 | 
			
		||||
                "${(nrfailedbuilds * 100 / nrbuilds).toStringAsFixed(2)}%",
 | 
			
		||||
            subtitle: nrfailedbuilds.toString(),
 | 
			
		||||
          ),
 | 
			
		||||
          ChartCard(
 | 
			
		||||
          SideCard(
 | 
			
		||||
            color: const Color(0xff9d8d00),
 | 
			
		||||
            title: "Active Builds",
 | 
			
		||||
            textRight:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user