Skip to content
Permalink
Browse files
Add support for algorithm analyzing (#242)
* [hubble-fe] Add support for analyzing algorithm

* [hubble-fe] Bumped version to 1.6.0, add description
  • Loading branch information
OshotOkill committed Aug 27, 2020
1 parent 6fd8ce4 commit 93fa40eab591f549e65f79661eee43be2252dc7c
Showing 48 changed files with 1,593 additions and 318 deletions.
@@ -1,3 +1,11 @@
## 1.6.0 (2020-08-14)

#### :rocket: New Feature

- Add analyzing algorithm tab in data-analyze module, only support shortest-path algorithm for now

<br />

## 1.5.0 (2020-08-06)

#### :rocket: New Feature
@@ -1,3 +1,11 @@
## 1.6.0 (2020-08-14)

#### :rocket: 特性

- 数据分析模块添加算法分析,算法目前仅支持最短路径

<br />

## 1.5.0 (2020-08-06)

#### :rocket: 特性
@@ -1,6 +1,6 @@
{
"name": "hubble",
"version": "1.5.0",
"version": "1.6.0",
"author": "wangzixi",
"license": "Apache-2.0",
"repository": {
@@ -24,7 +24,7 @@ const App: React.FC = () => {
<AppBar />
<GraphManagementSidebar />
<Route
path="/graph-management/:id/data-import/import-tasks/:taskId/error-log"
path="/graph-management/:id/data-import/:jobId/import-tasks/:taskId/error-log"
component={TaskErrorLogs}
/>
<Route
@@ -1,7 +1,6 @@
import React, { useContext, useCallback } from 'react';
import React, { useCallback } from 'react';
import { observer } from 'mobx-react';
import { useLocation } from 'wouter';
import { AppStoreContext } from '../../stores';

import './AppBar.less';

@@ -6,6 +6,7 @@
padding: 16px;
font-size: 14px;
background-color: #fff;
word-wrap: break-word;

&-error {
line-height: 2;
@@ -3,6 +3,8 @@ import { useRoute } from 'wouter';
import { observer } from 'mobx-react';
import { isNull } from 'lodash-es';
import ReactJsonView from 'react-json-view';

import { convertStringToJSON } from '../../../utils';
import { AsyncTasksStoreContext } from '../../../stores';

import './AsyncTaskResult.less';
@@ -12,6 +14,9 @@ const TaskErrorLogs: React.FC = observer(() => {
const [, params] = useRoute(
'/graph-management/:id/async-tasks/:taskId/result'
);
const taskResult = isNull(asyncTasksStore.singleAsyncTask)
? null
: convertStringToJSON(asyncTasksStore.singleAsyncTask!.task_result);

useEffect(() => {
asyncTasksStore.setCurrentId(Number(params!.id));
@@ -26,17 +31,17 @@ const TaskErrorLogs: React.FC = observer(() => {
<section className="async-task-result">
{!isNull(asyncTasksStore.singleAsyncTask) &&
(asyncTasksStore.singleAsyncTask.task_status === 'success' ? (
<ReactJsonView
src={
!isNull(asyncTasksStore.singleAsyncTask)
? JSON.parse(asyncTasksStore.singleAsyncTask!.task_result)
: []
}
name={false}
displayObjectSize={false}
displayDataTypes={false}
groupArraysAfterLength={50}
/>
!isNull(taskResult) ? (
<ReactJsonView
src={taskResult}
name={false}
displayObjectSize={false}
displayDataTypes={false}
groupArraysAfterLength={50}
/>
) : (
asyncTasksStore.singleAsyncTask!.task_result
)
) : (
<div className="async-task-result-error">
{asyncTasksStore.singleAsyncTask!.task_result}
@@ -231,6 +231,93 @@
display: flex;
}

// v1.6.0 algorithm analyze
.query-tab-content-title {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 14px;
font-weight: 900;
line-height: 24px;
margin-bottom: 14px;

& img {
cursor: pointer;
}
}

.query-tab-content-menu {
display: flex;
// justify-content: space-between;
align-items: center;
font-size: 14px;
color: #333;
line-height: 32px;
margin-bottom: 14px;

&:last-child {
margin-bottom: 0;
}

& > span {
width: 200px;
padding-left: 20px;

&:hover {
color: #2b65ff;
background-color: #f2f7ff;
cursor: pointer;
}

&.query-tab-content-menu-item-disabled {
color: #ccc;
cursor: not-allowed;

&:hover {
background-color: #fff;
}
}
}
}

.query-tab-content-form {
padding: 0 32px 0 0;
}

.query-tab-content-form-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32px;

&:last-child {
margin-bottom: 0;
}
}

.query-tab-content-form-item {
display: flex;
// justify-content: space-between;
align-items: center;
// margin-bottom: 32px;
}

.query-tab-content-form-item-title {
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 14px;
margin-right: 32px;
min-width: 89px;
max-width: 120px;
line-height: 22px;
// text-align: right;

& > i {
color: #fb4b53;
}
}

.query-tab-code-edit {
width: calc(100% - 55px);

@@ -494,7 +581,8 @@
}

&-empty {
height: calc(100vh - 328px);
// height: calc(100vh - 328px);
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;

0 comments on commit 93fa40e

Please sign in to comment.