Skip to content

Commit

Permalink
feat: remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Jan 14, 2019
1 parent 7c70d6a commit 866d959
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 36 deletions.
11 changes: 4 additions & 7 deletions view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
"document": "https://github.com/macacajs/reliable/tree/master/docs"
},
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --mode development",
"dev:test": "cross-env NODE_ENV=test webpack-dev-server --mode development",
"dev": "NODE_ENV=development webpack-dev-server --mode development",
"dev:test": "NODE_ENV=test webpack-dev-server --mode development",
"serve": "npm run dev:test &",
"test": "macaca run -d ./test",
"lint": "eslint --fix . --ext jsx,js && stylelint --fix assets/**/*.less -s less",
"build": "cross-env NODE_ENV=production webpack -p --mode production",
"build": "NODE_ENV=production webpack -p --mode production",
"build:report": "npm run build --report",
"prepublishOnly": "npm run build",
"ci": "npm run lint && npm run build && npm run serve && npm test",
"contributor": "git-contributor"
"ci": "npm run lint && npm run build && npm run serve && npm test"
},
"precommit": [
"lint"
Expand All @@ -43,13 +42,11 @@
"babel-loader": "^8.0.0",
"babel-plugin-import": "^1.2.1",
"babel-plugin-istanbul": "^5.0.1",
"cross-env": "^5.1.1",
"css-loader": "^0.28.11",
"eslint": "^4.5.0",
"eslint-config-antife": "^1.0.2",
"eslint-plugin-mocha": "^5.0.0",
"eslint-plugin-react": "^7.2.1",
"git-contributor": "^1.0.8",
"less": "^2.7.2",
"less-loader": "^4.1.0",
"lodash.get": "^4.4.2",
Expand Down
20 changes: 0 additions & 20 deletions view/src/components/BuildsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,6 @@ export default class BuildsTable extends React.Component {
render: (text, record) => (
<span>
{dayjs(text).format('YYYY-MM-DD HH:mm:ss')}
<Popover content={
<div>
<p>uniqId: {record.buildUniqId}</p>
</div>
} trigger="hover" placement="top">
<Icon onClick={() => {
Clipboard.write(record.buildUniqId).then(res => {
res && message.success('UniqId copied to clipboard.');
});
}} className="builds-table-uniqId-tip"
type="copy" theme="filled" style={{ color: '#2593fc' }}
/>
</Popover>
</span>
),
}, {
Expand All @@ -109,13 +96,6 @@ export default class BuildsTable extends React.Component {
<span>
{record.gitCommitInfo.committer.name}
</span>,
}, {
title: <FormattedMessage id='buildinfo.state' />,
dataIndex: 'state',
width: 90,
render: (text, record) => {
return record.state === 'INIT' ? 'init' : 'done';
},
}, {
title: <FormattedMessage id='builds.detailInfo' />,
align: 'center',
Expand Down
2 changes: 1 addition & 1 deletion view/src/components/SiderBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class SiderBar extends React.Component {
<Menu
theme="dark"
mode="inline"
defaultSelectedKeys={[location.pathname]}
defaultSelectedKeys={[location.pathname === '/' ? '/insight' : location.pathname]}
defaultOpenKeys={[location.pathname]}
onClick={this.handleMenuClick.bind(this)}
>
Expand Down
8 changes: 0 additions & 8 deletions view/src/components/buildsTable.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,4 @@
td:last-child {
position: relative;
}
.builds-table-uniqId-tip {
padding: 0 4px;
opacity: 0;
}
tr:hover .builds-table-uniqId-tip {
cursor: pointer;
opacity: 1;
}
}

0 comments on commit 866d959

Please sign in to comment.