Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: task detail change #182

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/lib/modules/dashboard/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DashboardController extends GetxController {
Rx<Tasks> tasks = Tasks.fromList([]).obs;
Rx<TaskDetail> taskDetail = TaskDetail.fromMap({}).obs;
RxString filters = ''.obs;
RxBool showDetail = true.obs;
RxBool showDetail = false.obs;
RxString detailTaskId = ''.obs;

final String query = r'''
Expand Down
22 changes: 11 additions & 11 deletions ui/lib/modules/dashboard/task_detail/base_information_pane.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ class BaseInformationPane extends StatelessWidget {
children: [
getPane(
[
getTitle('source library settings'),
getTitle('Source library settings'),
SizedBox(height: 20,),
Row(
children: [
SizedBox(width: 20,),
Expanded(
flex: 1,
child: getContent(
'target library',
textContent: 'local files - FS',
'Target library',
textContent: 'Local files - FS',
),
),
Expanded(
Expand All @@ -126,22 +126,22 @@ class BaseInformationPane extends StatelessWidget {
),
getPane(
[
getTitle('target library settings'),
getTitle('Target library settings'),
SizedBox(height: 20,),
Row(
children: [
SizedBox(width: 20,),
Expanded(
flex: 1,
child: getContent(
'target library',
textContent: 'local files - FS'
'Target library',
textContent: 'Local files - FS'
),
),
Expanded(
flex: 2,
child: getContent(
'identity',
'Identity',
customWidet: TextButton(
style: ButtonStyle(
foregroundColor: MaterialStateProperty.resolveWith(getForeGroundColor),
Expand All @@ -151,7 +151,7 @@ class BaseInformationPane extends StatelessWidget {
Get.dialog(IdentityDialog());
},
child: Text(
'QingStor - identity 1',
'QingStor - Services 1',
style: TextStyle(
decoration: TextDecoration.underline,
)
Expand All @@ -168,7 +168,7 @@ class BaseInformationPane extends StatelessWidget {
Expanded(
flex: 1,
child: getContent(
'bucket name',
'Bucket name',
textContent: 'QingStor bucket name',
),
),
Expand All @@ -185,15 +185,15 @@ class BaseInformationPane extends StatelessWidget {
),
getPane(
[
getTitle('other settings'),
getTitle('Other settings'),
SizedBox(height: 20,),
Row(
children: [
SizedBox(width: 20,),
Expanded(
flex: 1,
child: getContent(
'task type',
'Task type',
textContent: 'One - time task',
),
),
Expand Down
6 changes: 3 additions & 3 deletions ui/lib/modules/dashboard/task_detail/identity_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class IdentityDialog extends StatelessWidget {
@override
Widget build(BuildContext context) {
return CommonDialog(
title: 'QingStor - identity 1'.tr,
title: 'QingStor - Services 1'.tr,
width: 800,
content: Container(
width: 320,
Expand All @@ -26,7 +26,7 @@ class IdentityDialog extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SelectableText(
'credential',
'Credential',
style: TextStyle(
fontFamily: 'Roboto',
fontWeight: FontWeight.w500,
Expand Down Expand Up @@ -70,7 +70,7 @@ class IdentityDialog extends StatelessWidget {
),
SizedBox(height: 20,),
SelectableText(
'endpoint',
'Endpoint',
style: TextStyle(
fontFamily: 'Roboto',
fontWeight: FontWeight.w500,
Expand Down
2 changes: 1 addition & 1 deletion ui/lib/modules/dashboard/task_detail/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TaskDetail extends GetView<DashboardController> {
return Column(
children: [
ReturnToList(
title: "Return Tasks List".tr,
title: "Return tasks tist".tr,
onTap: () {
controller.showDetail(false);
controller.detailTaskId('');
Expand Down
48 changes: 29 additions & 19 deletions ui/lib/modules/dashboard/task_detail/return_task_list.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

import '../../../common/colors.dart';

Expand All @@ -15,28 +16,37 @@ class ReturnToList extends StatelessWidget {
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(bottom: 10),
child: GestureDetector(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.only(top: 3, right: 8),
child: Icon(IconData(0xe607, fontFamily: 'tpIcon'), size: 20,),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
child: Container(
margin: EdgeInsets.only(top: 3, right: 8),
child: Icon(IconData(0xe607, fontFamily: 'tpIcon'), size: 20,),
),
onTap: () => onTap(),
),
SelectableText(
title,
style: TextStyle(
fontSize: 14,
fontFamily: 'Roboto',
fontWeight: FontWeight.normal,
fontStyle: FontStyle.normal,
color: regularFontColor,
),
MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
child: Text(
title,
style: TextStyle(
fontSize: 14,
fontFamily: 'Roboto',
fontWeight: FontWeight.normal,
fontStyle: FontStyle.normal,
color: regularFontColor,
),
),
onTap: () => onTap(),
),
],
),
onTap: () => onTap(),
),
],
),
);
}
Expand Down
6 changes: 3 additions & 3 deletions ui/lib/modules/dashboard/task_detail/task_description.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TaskDescription extends GetView<DashboardController> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SelectableText('DM Task - 1', style: Theme.of(context).textTheme.headline2),
SelectableText('task ID:DM 2021041223', style: Theme.of(context).textTheme.bodyText2),
SelectableText('Task id:DM 2021041223', style: Theme.of(context).textTheme.bodyText2),
],
),
SizedBox(width: 30,),
Expand Down Expand Up @@ -95,7 +95,7 @@ class TaskDescription extends GetView<DashboardController> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SelectableText(
'Task Progress'.tr,
'Task progress'.tr,
style: TextStyle(
fontFamily: 'Roboto',
fontStyle: FontStyle.normal,
Expand All @@ -104,7 +104,7 @@ class TaskDescription extends GetView<DashboardController> {
color: headlineFontColor,
),
),
SizedBox(height: 14,),
SizedBox(height: 7,),
ProgressBar(
ratio: 0.4,
barWidth: 480,
Expand Down
4 changes: 2 additions & 2 deletions ui/lib/modules/dashboard/task_detail/task_information.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class TaskInformation extends GetView<DashboardController> {

List<TabPane> TabsList = [
TabPane(
tabTitle: 'Base Information'.tr,
tabTitle: 'Base information'.tr,
pane: BaseInformationPane()
),
TabPane(
tabTitle: 'Real - Time Log'.tr,
tabTitle: 'Real - time log'.tr,
pane: TimeLogPane(
logTitle: 'Unit Test (1.16, macos-latest)',
description: 'Successed on 18 Mar in 53s',
Expand Down
2 changes: 1 addition & 1 deletion ui/lib/modules/identity/create_identity_dialog/form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class CreateIdentityForm extends GetView<CreateIdentityController> {
),
SizedBox(height: 22),
SelectableText(
'Identity Name'.tr,
'Services Name'.tr,
style: TextStyle(
color: regularFontColor,
fontSize: 12,
Expand Down
2 changes: 1 addition & 1 deletion ui/lib/modules/identity/create_identity_dialog/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CreateIdentityDialog extends StatelessWidget {
@override
Widget build(BuildContext context) {
return CommonDialog(
title: 'Create Identity'.tr,
title: 'Create Services'.tr,
width: 400,
content: Container(
width: 400,
Expand Down
8 changes: 4 additions & 4 deletions ui/lib/modules/identity/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ class Identity extends GetView<IdentityController> {
children: [
PageDescription(
icon: IconData(0xe60b, fontFamily: 'tpIcon'),
title: 'Identities'.tr,
title: 'Services'.tr,
subtitle:
"Support Binding One Or More Cloud Service Accounts / API Key"
.tr,
),
Obx(() => controller.identities.value.length() == 0
? EmptyEntryList(
icon: IconData(0xe60b, fontFamily: 'tpIcon'),
title: 'The Identity List Is Empty'.tr,
title: 'The Services List Is Empty'.tr,
subTitle:
'Please Click The Button Below To Create Identity'.tr,
buttonText: 'Create Identity'.tr,
'Please Click The Button Below To Create Services'.tr,
buttonText: 'Create Services'.tr,
onClick: () => Get.dialog(CreateIdentityDialog(
getIdentities: controller.getIdentities)),
)
Expand Down
6 changes: 3 additions & 3 deletions ui/lib/modules/identity/panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ class IdentityPanel extends GetView<IdentityController> {
MoreActions(
onSelected: (String option) {
Get.dialog(Confirm(
title: "Are You Sure To Delete This Identity?".tr,
title: "Are You Sure To Delete This Services?".tr,
description:
"After Deleting, It Will Not Affect The Created Tasks, But It Will Not Appear In The Identity List And The Identity Option Of The Created Task."
"After Deleting, It Will Not Affect The Created Tasks, But It Will Not Appear In The Services List And The Services Option Of The Created Task."
.tr,
onConfirm: () {
controller.deleteIdentity(identity).then((result) {
Expand All @@ -64,7 +64,7 @@ class IdentityPanel extends GetView<IdentityController> {
PopupMenuItem(
value: "delete",
height: 32.0,
child: Text("Delete Identity".tr,
child: Text("Delete Services".tr,
style: TextStyle(
fontSize: 12.0,
color: regularFontColor,
Expand Down
4 changes: 2 additions & 2 deletions ui/lib/modules/identity/toolbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ class Toolbar extends GetView<IdentityController> {
children: [
Button(
icon: Icons.add,
child: Text("Create Identity".tr),
child: Text("Create Services".tr),
type: ButtonType.primary,
onPressed: () => Get.dialog(
CreateIdentityDialog(getIdentities: controller.getIdentities)),
),
SizedBox(width: 20),
Obx(
() => SelectableText(
'${controller.identities.value.length()} Identities',
'${controller.identities.value.length()} Services',
style: TextStyle(
color: regularFontColor,
fontSize: 12,
Expand Down
2 changes: 1 addition & 1 deletion ui/lib/modules/layout/navigators.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Navigators extends StatelessWidget {
SideLink(title: "Tasks".tr, icon: IconData(0xe600, fontFamily: 'tpIcon'), path: Routes.main),
SideLink(title: "Agents".tr, icon: IconData(0xe608, fontFamily: 'tpIcon'), path: Routes.agents),
SideLink(
title: "Identities".tr,
title: "Services".tr,
icon: IconData(0xe60b, fontFamily: 'tpIcon'),
path: Routes.identities,
),
Expand Down