Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
fa79d05f
Commit
fa79d05f
authored
Jan 05, 2018
by
陈帅
Committed by
ddcat1115
Jan 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 578 (#581)
parent
013247c6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
27 deletions
+29
-27
package.json
package.json
+12
-13
src/components/HeaderSearch/index.js
src/components/HeaderSearch/index.js
+2
-1
src/components/SiderMenu/SiderMenu.js
src/components/SiderMenu/SiderMenu.js
+9
-8
src/components/StandardTable/index.js
src/components/StandardTable/index.js
+3
-3
src/routes/Dashboard/Monitor.js
src/routes/Dashboard/Monitor.js
+3
-2
No files found.
package.json
View file @
fa79d05f
...
@@ -45,25 +45,25 @@
...
@@ -45,25 +45,25 @@
"
react-fittext
"
:
"
^1.0.0
"
"
react-fittext
"
:
"
^1.0.0
"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"
babel-eslint
"
:
"
^8.
0.1
"
,
"
babel-eslint
"
:
"
^8.
1.2
"
,
"
babel-jest
"
:
"
^22.0.4
"
,
"
babel-jest
"
:
"
^22.0.4
"
,
"
babel-plugin-dva-hmr
"
:
"
^0.4.1
"
,
"
babel-plugin-dva-hmr
"
:
"
^0.4.1
"
,
"
babel-plugin-import
"
:
"
^1.
2.1
"
,
"
babel-plugin-import
"
:
"
^1.
6.3
"
,
"
babel-plugin-transform-class-properties
"
:
"
^6.24.1
"
,
"
babel-plugin-transform-class-properties
"
:
"
^6.24.1
"
,
"
babel-plugin-transform-decorators-legacy
"
:
"
^1.3.4
"
,
"
babel-plugin-transform-decorators-legacy
"
:
"
^1.3.4
"
,
"
babel-plugin-transform-runtime
"
:
"
^6.
9
.0
"
,
"
babel-plugin-transform-runtime
"
:
"
^6.
23
.0
"
,
"
babel-preset-env
"
:
"
^1.6.1
"
,
"
babel-preset-env
"
:
"
^1.6.1
"
,
"
babel-preset-react
"
:
"
^6.24.1
"
,
"
babel-preset-react
"
:
"
^6.24.1
"
,
"
cross-env
"
:
"
^5.1.1
"
,
"
cross-env
"
:
"
^5.1.1
"
,
"
cross-port-killer
"
:
"
^1.0.1
"
,
"
cross-port-killer
"
:
"
^1.0.1
"
,
"
enzyme
"
:
"
^3.1.0
"
,
"
enzyme
"
:
"
^3.1.0
"
,
"
enzyme-adapter-react-16
"
:
"
^1.0.2
"
,
"
enzyme-adapter-react-16
"
:
"
^1.0.2
"
,
"
eslint
"
:
"
^4.
8
.0
"
,
"
eslint
"
:
"
^4.
14
.0
"
,
"
eslint-config-airbnb
"
:
"
^16.0.0
"
,
"
eslint-config-airbnb
"
:
"
^16.0.0
"
,
"
eslint-plugin-babel
"
:
"
^4.0.0
"
,
"
eslint-plugin-babel
"
:
"
^4.0.0
"
,
"
eslint-plugin-compat
"
:
"
^2.1.0
"
,
"
eslint-plugin-compat
"
:
"
^2.1.0
"
,
"
eslint-plugin-import
"
:
"
^2.
2
.0
"
,
"
eslint-plugin-import
"
:
"
^2.
8
.0
"
,
"
eslint-plugin-jsx-a11y
"
:
"
^6.0.
0
"
,
"
eslint-plugin-jsx-a11y
"
:
"
^6.0.
3
"
,
"
eslint-plugin-markdown
"
:
"
^1.0.0-beta.6
"
,
"
eslint-plugin-markdown
"
:
"
^1.0.0-beta.6
"
,
"
eslint-plugin-react
"
:
"
^7.0.1
"
,
"
eslint-plugin-react
"
:
"
^7.0.1
"
,
"
gh-pages
"
:
"
^1.0.0
"
,
"
gh-pages
"
:
"
^1.0.0
"
,
...
@@ -72,14 +72,13 @@
...
@@ -72,14 +72,13 @@
"
jsdom
"
:
"
^11.5.1
"
,
"
jsdom
"
:
"
^11.5.1
"
,
"
lint-staged
"
:
"
^6.0.0
"
,
"
lint-staged
"
:
"
^6.0.0
"
,
"
mockjs
"
:
"
^1.0.1-beta3
"
,
"
mockjs
"
:
"
^1.0.1-beta3
"
,
"
prettier
"
:
"
^1.9.0
"
,
"
pro-download
"
:
"
^1.0.1
"
,
"
pro-download
"
:
"
^1.0.0
"
,
"
react-test-renderer
"
:
"
^16.2.0
"
,
"
react-test-renderer
"
:
"
^16.0.0
"
,
"
redbox-react
"
:
"
^1.5.0
"
,
"
redbox-react
"
:
"
^1.3.2
"
,
"
roadhog
"
:
"
^2.0.3
"
,
"
roadhog
"
:
"
^2.0.0-0
"
,
"
roadhog-api-doc
"
:
"
^0.3.3
"
,
"
roadhog-api-doc
"
:
"
^0.3.3
"
,
"
rollbar
"
:
"
^2.3.
1
"
,
"
rollbar
"
:
"
^2.3.
4
"
,
"
stylelint
"
:
"
^8.
1
.0
"
,
"
stylelint
"
:
"
^8.
4
.0
"
,
"
stylelint-config-standard
"
:
"
^18.0.0
"
"
stylelint-config-standard
"
:
"
^18.0.0
"
},
},
"optionalDependencies"
:
{
"optionalDependencies"
:
{
...
...
src/components/HeaderSearch/index.js
View file @
fa79d05f
...
@@ -64,8 +64,9 @@ export default class HeaderSearch extends PureComponent {
...
@@ -64,8 +64,9 @@ export default class HeaderSearch extends PureComponent {
className
=
{
classNames
(
className
,
styles
.
headerSearch
)}
className
=
{
classNames
(
className
,
styles
.
headerSearch
)}
onClick
=
{
this
.
enterSearchMode
}
onClick
=
{
this
.
enterSearchMode
}
>
>
<
Icon
type
=
"
search
"
/>
<
Icon
type
=
"
search
"
key
=
"
Icon
"
/>
<
AutoComplete
<
AutoComplete
key
=
"
AutoComplete
"
{...
restProps
}
{...
restProps
}
className
=
{
inputClass
}
className
=
{
inputClass
}
value
=
{
this
.
state
.
value
}
value
=
{
this
.
state
.
value
}
...
...
src/components/SiderMenu/SiderMenu.js
View file @
fa79d05f
...
@@ -141,13 +141,13 @@ export default class SiderMenu extends PureComponent {
...
@@ -141,13 +141,13 @@ export default class SiderMenu extends PureComponent {
if
(
!
menusData
)
{
if
(
!
menusData
)
{
return
[];
return
[];
}
}
return
menusData
.
map
((
item
)
=>
{
return
menusData
if
(
!
item
.
name
||
item
.
hideInMenu
)
{
.
filter
(
item
=>
item
.
name
&&
!
item
.
hideInMenu
)
return
null
;
.
map
((
item
)
=>
{
}
const
ItemDom
=
this
.
getSubMenuOrItem
(
item
);
const
ItemDom
=
this
.
getSubMenuOrItem
(
item
);
return
this
.
checkPermissionItem
(
item
.
authority
,
ItemDom
);
return
this
.
checkPermissionItem
(
item
.
authority
,
ItemDom
);
});
})
.
filter
(
item
=>
!!
item
);
}
}
// conversion Path
// conversion Path
// 转化路径
// 转化路径
...
@@ -200,13 +200,14 @@ export default class SiderMenu extends PureComponent {
...
@@ -200,13 +200,14 @@ export default class SiderMenu extends PureComponent {
width
=
{
256
}
width
=
{
256
}
className
=
{
styles
.
sider
}
className
=
{
styles
.
sider
}
>
>
<
div
className
=
{
styles
.
logo
}
>
<
div
className
=
{
styles
.
logo
}
key
=
"
logo
"
>
<
Link
to
=
"
/
"
>
<
Link
to
=
"
/
"
>
<
img
src
=
{
logo
}
alt
=
"
logo
"
/>
<
img
src
=
{
logo
}
alt
=
"
logo
"
/>
<
h1
>
Ant
Design
Pro
<
/h1
>
<
h1
>
Ant
Design
Pro
<
/h1
>
<
/Link
>
<
/Link
>
<
/div
>
<
/div
>
<
Menu
<
Menu
key
=
"
Menu
"
theme
=
"
dark
"
theme
=
"
dark
"
mode
=
"
inline
"
mode
=
"
inline
"
{...
menuProps
}
{...
menuProps
}
...
...
src/components/StandardTable/index.js
View file @
fa79d05f
import
React
,
{
PureComponent
}
from
'
react
'
;
import
React
,
{
PureComponent
,
Fragment
}
from
'
react
'
;
import
moment
from
'
moment
'
;
import
moment
from
'
moment
'
;
import
{
Table
,
Alert
,
Badge
,
Divider
}
from
'
antd
'
;
import
{
Table
,
Alert
,
Badge
,
Divider
}
from
'
antd
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
...
@@ -96,11 +96,11 @@ class StandardTable extends PureComponent {
...
@@ -96,11 +96,11 @@ class StandardTable extends PureComponent {
{
{
title
:
'
操作
'
,
title
:
'
操作
'
,
render
:
()
=>
(
render
:
()
=>
(
<
div
>
<
Fragment
>
<
a
href
=
""
>
配置
<
/a
>
<
a
href
=
""
>
配置
<
/a
>
<
Divider
type
=
"
vertical
"
/>
<
Divider
type
=
"
vertical
"
/>
<
a
href
=
""
>
订阅警报
<
/a
>
<
a
href
=
""
>
订阅警报
<
/a
>
<
/
div
>
<
/
Fragment
>
),
),
},
},
];
];
...
...
src/routes/Dashboard/Monitor.js
View file @
fa79d05f
...
@@ -2,14 +2,15 @@ import React, { PureComponent } from 'react';
...
@@ -2,14 +2,15 @@ import React, { PureComponent } from 'react';
import
{
connect
}
from
'
dva
'
;
import
{
connect
}
from
'
dva
'
;
import
{
Row
,
Col
,
Card
,
Tooltip
}
from
'
antd
'
;
import
{
Row
,
Col
,
Card
,
Tooltip
}
from
'
antd
'
;
import
numeral
from
'
numeral
'
;
import
numeral
from
'
numeral
'
;
import
{
Secured
}
from
'
../../utils/Authorized
'
;
import
Authorized
from
'
../../utils/Authorized
'
;
import
{
Pie
,
WaterWave
,
Gauge
,
TagCloud
}
from
'
../../components/Charts
'
;
import
{
Pie
,
WaterWave
,
Gauge
,
TagCloud
}
from
'
../../components/Charts
'
;
import
NumberInfo
from
'
../../components/NumberInfo
'
;
import
NumberInfo
from
'
../../components/NumberInfo
'
;
import
CountDown
from
'
../../components/CountDown
'
;
import
CountDown
from
'
../../components/CountDown
'
;
import
ActiveChart
from
'
../../components/ActiveChart
'
;
import
ActiveChart
from
'
../../components/ActiveChart
'
;
import
styles
from
'
./Monitor.less
'
;
import
styles
from
'
./Monitor.less
'
;
const
{
Secured
}
=
Authorized
;
const
targetTime
=
new
Date
().
getTime
()
+
3900000
;
const
targetTime
=
new
Date
().
getTime
()
+
3900000
;
@
Secured
(
'
admin
'
)
@
Secured
(
'
admin
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment