test
This commit is contained in:
@@ -42,7 +42,6 @@ class WorkspaceLocal {
|
||||
} else {
|
||||
WorkspaceLocal.createWorkspace("main", null);
|
||||
}
|
||||
print("qsdqsd $current");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -103,7 +102,6 @@ class WorkspaceLocal {
|
||||
}
|
||||
|
||||
static void changeWorkspace(String id) {
|
||||
print("WORKSPACES ID $id");
|
||||
_service.put(null, id, { "active" : true }, {});
|
||||
current = id;
|
||||
fill();
|
||||
|
||||
@@ -78,8 +78,6 @@ class APIService<T extends SerializerDeserializer> {
|
||||
_dio.options.headers["authorization"] = auth;
|
||||
_dio.interceptors.clear();
|
||||
var response = await _request(url, method, body, options);
|
||||
print(response.data);
|
||||
print(url);
|
||||
if (response.statusCode != null && response.statusCode! < 400) {
|
||||
if (method == "delete") { cache.remove(url); return APIResponse<T>(); }
|
||||
APIResponse<T> resp = APIResponse<T>().deserialize(response.data);
|
||||
|
||||
@@ -15,7 +15,6 @@ abstract class AbstractService<T extends SerializerDeserializer> {
|
||||
return service.get("$subPath$id", true, context);
|
||||
}
|
||||
Future<APIResponse<T>> post(BuildContext? context, Map<String, dynamic> body, Map<String, String> params) {
|
||||
print("Creating workspace $body");
|
||||
return service.post(subPath, body, context);
|
||||
}
|
||||
Future<APIResponse<T>> put(BuildContext? context, String id, Map<String, dynamic> body, Map<String, String> params) {
|
||||
|
||||
@@ -76,11 +76,13 @@ class WorkflowExecution extends SerializerDeserializer<WorkflowExecution> {
|
||||
@override deserialize(dynamic json) {
|
||||
try { json = json as Map<String, dynamic>;
|
||||
} catch (e) { return WorkflowExecution(); }
|
||||
print("qsdqdqssd");
|
||||
print(json);
|
||||
return WorkflowExecution(
|
||||
id: json.containsKey("id") ? json["id"] : "",
|
||||
endDate: json.containsKey("end_date") ? json["end_date"] : "",
|
||||
executionData: json.containsKey("execution_date") ? json["execution_date"] : "",
|
||||
status: json.containsKey("status") ? json["status"] : 1,
|
||||
status: json.containsKey("state") ? json["state"] : 1,
|
||||
workflowId: json.containsKey("workflow_id") ? json["workflow_id"] : "",
|
||||
name: json.containsKey("name") ? json["name"] : "",
|
||||
);
|
||||
|
||||
@@ -50,13 +50,15 @@ class SchedulerFormsWidgetState extends State<SchedulerFormsWidget> {
|
||||
GlobalKey<FormFieldState>(), GlobalKey<FormFieldState>()];
|
||||
var shallow = ShallowTextInputWidget(
|
||||
width: 250 - 1,
|
||||
current: dash.name,
|
||||
current: widget.item.name,
|
||||
type: SharedWorkspaceType.workflow,
|
||||
canRemove: (p0) => p0 != null && p0.isEmpty,
|
||||
canRemove: (p0) => p0 != null && p0.isNotEmpty,
|
||||
remove: (p0) async {
|
||||
await WorflowService().delete(context, widget.item.id ?? "", {}).then((value) {
|
||||
dash.clear();
|
||||
dash.id = null;
|
||||
dash.name = "";
|
||||
dash.isOpened = false;
|
||||
dash.clear();
|
||||
dash.chartKey.currentState?.widget.flowChart.setState(() { });
|
||||
});
|
||||
},
|
||||
@@ -75,7 +77,7 @@ class SchedulerFormsWidgetState extends State<SchedulerFormsWidget> {
|
||||
Text("WORKFLOW INFO", style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold), textAlign: TextAlign.center),
|
||||
Text("<general>", style: TextStyle(fontSize: 12), textAlign: TextAlign.center),
|
||||
])),
|
||||
Container(
|
||||
widget.item.name == "" ? Container() : Container(
|
||||
decoration: BoxDecoration( border: Border(
|
||||
left: BorderSide(color: Colors.grey.shade300, width: 1),
|
||||
bottom: const BorderSide(color: Colors.grey))),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:oc_front/models/response.dart';
|
||||
import 'package:oc_front/pages/shared.dart';
|
||||
|
||||
class ShallowDropdownInputWidget extends StatefulWidget {
|
||||
double? width;
|
||||
SharedWorkspaceType type = SharedWorkspaceType.workspace;
|
||||
@@ -50,7 +51,7 @@ class ShallowDropdownInputWidgetState extends State<ShallowDropdownInputWidget>
|
||||
Tooltip( message: widget.hint ?? "current $t", child:
|
||||
Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
canvasColor: Colors.grey.shade300,
|
||||
canvasColor: widget.filled ??Colors.white,
|
||||
),
|
||||
child: Container( height: 50, width: (widget.width ?? MediaQuery.of(context).size.width) - (widget.load == null ? 0 : 50) - (widget.remove == null ? 0 : 50),
|
||||
decoration: const BoxDecoration(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:oc_front/models/response.dart';
|
||||
import 'package:oc_front/pages/shared.dart';
|
||||
|
||||
class ShallowTextInputWidget extends StatefulWidget {
|
||||
double? width;
|
||||
SharedWorkspaceType type = SharedWorkspaceType.workspace;
|
||||
@@ -69,9 +69,7 @@ class ShallowTextInputWidgetState extends State<ShallowTextInputWidget> {
|
||||
canvasColor: Colors.grey.shade300,
|
||||
),
|
||||
child: Container( height: 50, width: (widget.width ?? MediaQuery.of(context).size.width) - (widget.load == null ? 0 : 50) - (widget.remove == null ? 0 : 50),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
decoration: const BoxDecoration( color: Colors.white ),
|
||||
child: TextFormField(
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_box_transform/flutter_box_transform.dart';
|
||||
import 'package:oc_front/core/sections/header/header.dart';
|
||||
import 'package:oc_front/core/services/specialized_services/logs_service.dart';
|
||||
import 'package:oc_front/models/logs.dart';
|
||||
import 'package:oc_front/models/workflow.dart';
|
||||
import 'package:oc_front/widgets/logs.dart';
|
||||
@@ -26,7 +24,6 @@ class ScheduleWidget extends StatefulWidget {
|
||||
String? selected;
|
||||
String? selectedReal;
|
||||
class ScheduleWidgetState extends State<ScheduleWidget> {
|
||||
LogsService _service = LogsService();
|
||||
String search = "";
|
||||
String? level;
|
||||
List<Color> colors = [Colors.blue, Colors.orange, Colors.red, Colors.green];
|
||||
|
||||
Reference in New Issue
Block a user