Skip to content

Commit

Permalink
542 remove links to application versions (#543)
Browse files Browse the repository at this point in the history
* remove the "Versions" button from application details and list

* removed the deprecation warning

* drop versions /approvals completely

* fix lint issues and remove dead code

* remove more dead code

* remove usage of deleted code
  • Loading branch information
André Hartmann authored and hjacobs committed Oct 27, 2017
1 parent 27ca358 commit fe4243b
Show file tree
Hide file tree
Showing 51 changed files with 13 additions and 3,109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Placeholder from './placeholder.jsx';
import DefaultError from 'common/src/error.jsx';
import 'common/asset/less/application/application-detail.less';

export default function ApplicationDetail({applicationId, application, versions, editable, api}) {
export default function ApplicationDetail({applicationId, application, editable, api}) {
const LINK_PARAMS = { applicationId };

if (application instanceof FetchResult) {
Expand Down Expand Up @@ -41,11 +41,6 @@ export default function ApplicationDetail({applicationId, application, versions,
className='btn btn-default'>
<Icon name='key' /> Access Control
</Link>
<Link
to={Routes.verList(LINK_PARAMS)}
className='btn btn-primary'>
<Icon name='list' /> Versions
</Link>
{ENV_DEVELOPMENT ?
<Link
to={Routes.lifecycle(LINK_PARAMS)}
Expand Down Expand Up @@ -147,37 +142,6 @@ export default function ApplicationDetail({applicationId, application, versions,
</span>
</td>
</tr>
<tr>
<th>Recently updated versions</th>
<td>
{versions.length ?
versions.map(
v => <div key={v.id}>
<Link
to={Routes.verApproval({
applicationId: applicationId,
versionId: v.id
})}
className='btn btn-default btn-small'>
<Icon name='check' />
</Link> <Link
to={Routes.verDetail({
applicationId: applicationId,
versionId: v.id
})}>
{v.id}
</Link>
</div>)
:
<div>No versions yet.</div>
}
<Link
to={Routes.verCreate(LINK_PARAMS)}
className={`btn btn-default applicationDetail-newVersion ${editable ? '' : 'btn-disabled'}`}>
<Icon name='plus' /> New version
</Link>
</td>
</tr>
</tbody>
</table>
<h4 className='applicationDetail-descriptionTitle'>Description</h4>
Expand All @@ -199,9 +163,6 @@ ApplicationDetail.propTypes = {
applicationId: React.PropTypes.string.isRequired,
editable: React.PropTypes.bool,
kioActions: React.PropTypes.object.isRequired,
notificationActions: React.PropTypes.object.isRequired,
versions: React.PropTypes.arrayOf(React.PropTypes.shape({
id: React.PropTypes.string
}))
notificationActions: React.PropTypes.object.isRequired
};

31 changes: 0 additions & 31 deletions client/lib/application/src/application-detail/placeholder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ const ApplicationDetailPlaceholder = (props) => {
className='btn btn-default'>
<Icon name='key' /> Access Control
</Link>
<Link
to={Routes.verList(LINK_PARAMS)}
className='btn btn-primary'>
<Icon name='list' /> Versions
</Link>
</div>

<h4>
Expand Down Expand Up @@ -93,32 +88,6 @@ const ApplicationDetailPlaceholder = (props) => {
<th>Criticality Level</th>
<td className='u-placeholder-text'>1</td>
</tr>
<tr>
<th>Recently updated versions</th>
<td>
<div>
<a className='btn btn-disabled btn-small'>
<Icon name='check' />
</a> <span className='u-placeholder-text'>0.1</span>
</div>
<div>
<a className='btn btn-disabled btn-small'>
<Icon name='check' />
</a> <span className='u-placeholder-text'>0.1</span>
</div>
<div>
<a className='btn btn-disabled btn-small'>
<Icon name='check' />
</a> <span className='u-placeholder-text'>0.1</span>
</div>

<Link
to={Routes.verCreate(LINK_PARAMS)}
className='btn btn-default applicationDetail-newVersion btn-disabled'>
<Icon name='plus' /> New version
</Link>
</td>
</tr>
</tbody>
</table>
<h4 className='applicationDetail-descriptionTitle'>Description</h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';

import { Link } from 'react-router';
import * as Routes from 'application/src/routes';
import Chart from 'common/src/components/pure/Chart.jsx';
import Icon from 'react-fa';
import ThreeColumns from 'common/src/components/pure/ThreeColumns.jsx';
Expand All @@ -18,7 +17,7 @@ const Charts = (props) => {
<div style={{display: 'flex', flexDirection: 'column', justifyContent: 'flex-end'}}>
<div>
<Link
to={Routes.verApproval({applicationId: props.applicationId, versionId: version.id})}
to='i/do/not/exist'
className='btn btn-default btn-small'>
<Icon fixedWidth name='check' />
</Link> Approvals
Expand Down Expand Up @@ -80,4 +79,4 @@ Charts.propTypes = {
width: React.PropTypes.number.isRequired
};

export default Charts;
export default Charts;
52 changes: 2 additions & 50 deletions client/lib/application/src/application-list/account-app-list.jsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
import React from 'react';
import Icon from 'react-fa';
import {Link} from 'react-router';
import * as Routes from 'application/src/routes';

const AccountAppList = (props) => {
let {account, kioStore, showInactive, search} = props,
apps = kioStore.getApplications(search, account),
latestVersions = kioStore.getLatestApplicationVersions(account);
apps = kioStore.getApplications(search, account);

return <div className='teamAppList'>
{apps.length ?
<table className='table'>
<colgroup>
<col width='60%' />
<col width='40%' />
<col width='0*' />
</colgroup>
<thead>
<tr>
<th>Application</th>
<th>Latest&nbsp;version</th>
<th></th>
</tr>
</thead>
<tbody data-block='apps'>
Expand All @@ -40,44 +31,6 @@ const AccountAppList = (props) => {
{ta.name}
</Link>
</td>
<td>
{latestVersions[ta.id] ?
<div>
{ta.active ?
<Link
className='btn btn-default btn-small applicationList-approvalButton'
title={'Approve version ' + latestVersions[ta.id] + ' of ' + ta.name}
to={Routes.verApproval({
versionId: latestVersions[ta.id],
applicationId: ta.id
})}> <Icon name='check' />
</Link>
:
null}
<Link
to={Routes.verDetail({
versionId: latestVersions[ta.id],
applicationId: ta.id
})}>
{latestVersions[ta.id]}
</Link>
</div>
:
null}
</td>
<td>
{ta.active ?
<Link
className='btn btn-default btn-small'
to={Routes.verCreate({
applicationId: ta.id
})}
title={'Create new version for ' + ta.name}>
<Icon name='plus' />
</Link>
:
null}
</td>
</tr>
)}
</tbody>
Expand All @@ -93,8 +46,7 @@ AccountAppList.displayName = 'AccountAppList';
AccountAppList.propTypes = {
account: React.PropTypes.string,
kioStore: React.PropTypes.shape({
getApplications: React.PropTypes.func,
getLatestApplicationVersions: React.PropTypes.func
getApplications: React.PropTypes.func
}).isRequired,
search: React.PropTypes.string,
showInactive: React.PropTypes.bool
Expand Down
81 changes: 0 additions & 81 deletions client/lib/application/src/approval-form/approval-card.jsx

This file was deleted.

0 comments on commit fe4243b

Please sign in to comment.