|
|
@ -44,6 +44,8 @@ import pSBC from 'shade-blend-color';
|
|
|
|
import { withConfigContext } from '../../../../../../../../../components/ConfigContext';
|
|
|
|
import { withConfigContext } from '../../../../../../../../../components/ConfigContext';
|
|
|
|
import ManagedConfigurationsIframe from './components/ManagedConfigurationsIframe';
|
|
|
|
import ManagedConfigurationsIframe from './components/ManagedConfigurationsIframe';
|
|
|
|
import { handleApiError } from '../../../../../../../../../services/utils/errorHandler';
|
|
|
|
import { handleApiError } from '../../../../../../../../../services/utils/errorHandler';
|
|
|
|
|
|
|
|
import Authorized from '../../../../../../../../../components/Authorized/Authorized';
|
|
|
|
|
|
|
|
import { isAuthorized } from '../../../../../../../../../services/utils/authorizationHandler';
|
|
|
|
|
|
|
|
|
|
|
|
const { Meta } = Card;
|
|
|
|
const { Meta } = Card;
|
|
|
|
const { Text, Title } = Typography;
|
|
|
|
const { Text, Title } = Typography;
|
|
|
@ -100,7 +102,15 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
isAuthorized(
|
|
|
|
|
|
|
|
this.props.context.user,
|
|
|
|
|
|
|
|
'/permission/admin/app-mgt/publisher/application/update',
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
) {
|
|
|
|
this.getCategories();
|
|
|
|
this.getCategories();
|
|
|
|
|
|
|
|
this.getTags();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
|
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
|
@ -130,7 +140,6 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
if (res.status === 200) {
|
|
|
|
if (res.status === 200) {
|
|
|
|
const categories = JSON.parse(res.data.data);
|
|
|
|
const categories = JSON.parse(res.data.data);
|
|
|
|
this.getTags();
|
|
|
|
|
|
|
|
const globalCategories = categories.map(category => {
|
|
|
|
const globalCategories = categories.map(category => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Option key={category.categoryName}>
|
|
|
|
<Option key={category.categoryName}>
|
|
|
@ -520,27 +529,37 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
<Spin spinning={loading} delay={500}>
|
|
|
|
<Spin spinning={loading} delay={500}>
|
|
|
|
<div style={{ textAlign: 'center' }}>
|
|
|
|
<div style={{ textAlign: 'center' }}>
|
|
|
|
{avatar}
|
|
|
|
{avatar}
|
|
|
|
|
|
|
|
<Authorized
|
|
|
|
|
|
|
|
permission="/permission/admin/app-mgt/publisher/application/update"
|
|
|
|
|
|
|
|
yes={
|
|
|
|
<Title editable={{ onChange: this.handleNameSave }} level={2}>
|
|
|
|
<Title editable={{ onChange: this.handleNameSave }} level={2}>
|
|
|
|
{name}
|
|
|
|
{name}
|
|
|
|
</Title>
|
|
|
|
</Title>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
no={<Title level={2}>{name}</Title>}
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Divider />
|
|
|
|
<Divider />
|
|
|
|
{/* display manage config button only if the app is public android app*/}
|
|
|
|
{/* display manage config button only if the app is public android app*/}
|
|
|
|
{app.isAndroidEnterpriseApp &&
|
|
|
|
{app.isAndroidEnterpriseApp &&
|
|
|
|
config.androidEnterpriseToken !== null && (
|
|
|
|
config.androidEnterpriseToken !== null && (
|
|
|
|
|
|
|
|
<Authorized
|
|
|
|
|
|
|
|
permission="/permission/admin/device-mgt/enterprise/user/modify"
|
|
|
|
|
|
|
|
yes={
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Text strong={true}>Set up managed configurations</Text>
|
|
|
|
<Text strong={true}>Set up managed configurations</Text>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div style={{ paddingTop: 16 }}>
|
|
|
|
<div style={{ paddingTop: 16 }}>
|
|
|
|
<Text>
|
|
|
|
<Text>
|
|
|
|
If you are developing apps for the enterprise market, you
|
|
|
|
If you are developing apps for the enterprise market,
|
|
|
|
may need to satisfy particular requirements set by a
|
|
|
|
you may need to satisfy particular requirements set by
|
|
|
|
organization's policies. Managed configurations,
|
|
|
|
a organization's policies. Managed
|
|
|
|
previously known as application restrictions, allow the
|
|
|
|
configurations, previously known as application
|
|
|
|
organization's IT admin to remotely specify settings
|
|
|
|
restrictions, allow the organization's IT admin
|
|
|
|
for apps. This capability is particularly useful for
|
|
|
|
to remotely specify settings for apps. This capability
|
|
|
|
organization-approved apps deployed to a work profile.
|
|
|
|
is particularly useful for organization-approved apps
|
|
|
|
|
|
|
|
deployed to a work profile.
|
|
|
|
</Text>
|
|
|
|
</Text>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
@ -550,6 +569,8 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Divider dashed={true} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
<Text strong={true}>Releases </Text>
|
|
|
|
<Text strong={true}>Releases </Text>
|
|
|
|
<div className="releases-details">
|
|
|
|
<div className="releases-details">
|
|
|
@ -640,6 +661,9 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
{/* display add new release only if app type is enterprise*/}
|
|
|
|
{/* display add new release only if app type is enterprise*/}
|
|
|
|
{app.type === 'ENTERPRISE' && (
|
|
|
|
{app.type === 'ENTERPRISE' && (
|
|
|
|
|
|
|
|
<Authorized
|
|
|
|
|
|
|
|
permission="/permission/admin/app-mgt/publisher/application/update"
|
|
|
|
|
|
|
|
yes={
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<div style={{ paddingBottom: 16 }}>
|
|
|
|
<div style={{ paddingBottom: 16 }}>
|
|
|
@ -653,11 +677,16 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</Link>
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Divider dashed={true} />
|
|
|
|
|
|
|
|
|
|
|
|
<Text strong={true}>Description </Text>
|
|
|
|
<Text strong={true}>Description </Text>
|
|
|
|
{!isDescriptionEditEnabled && (
|
|
|
|
<Authorized
|
|
|
|
|
|
|
|
permission="/permission/admin/app-mgt/publisher/application/update"
|
|
|
|
|
|
|
|
yes={
|
|
|
|
|
|
|
|
!isDescriptionEditEnabled && (
|
|
|
|
<Text
|
|
|
|
<Text
|
|
|
|
style={{
|
|
|
|
style={{
|
|
|
|
color: config.theme.primaryColor,
|
|
|
|
color: config.theme.primaryColor,
|
|
|
@ -667,7 +696,9 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Icon type="edit" />
|
|
|
|
<Icon type="edit" />
|
|
|
|
</Text>
|
|
|
|
</Text>
|
|
|
|
)}
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
{!isDescriptionEditEnabled && (
|
|
|
|
{!isDescriptionEditEnabled && (
|
|
|
|
<div>{ReactHtmlParser(description)}</div>
|
|
|
|
<div>{ReactHtmlParser(description)}</div>
|
|
|
@ -708,14 +739,22 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Text strong={true}>Categories </Text>
|
|
|
|
<Text strong={true}>Categories </Text>
|
|
|
|
{!isCategoriesEditEnabled && (
|
|
|
|
<Authorized
|
|
|
|
|
|
|
|
permission="/permission/admin/app-mgt/publisher/application/update"
|
|
|
|
|
|
|
|
yes={
|
|
|
|
|
|
|
|
!isCategoriesEditEnabled && (
|
|
|
|
<Text
|
|
|
|
<Text
|
|
|
|
style={{ color: config.theme.primaryColor, cursor: 'pointer' }}
|
|
|
|
style={{
|
|
|
|
|
|
|
|
color: config.theme.primaryColor,
|
|
|
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
|
|
|
}}
|
|
|
|
onClick={this.enableCategoriesEdit}
|
|
|
|
onClick={this.enableCategoriesEdit}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Icon type="edit" />
|
|
|
|
<Icon type="edit" />
|
|
|
|
</Text>
|
|
|
|
</Text>
|
|
|
|
)}
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
{isCategoriesEditEnabled && (
|
|
|
|
{isCategoriesEditEnabled && (
|
|
|
@ -767,14 +806,22 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Text strong={true}>Tags </Text>
|
|
|
|
<Text strong={true}>Tags </Text>
|
|
|
|
{!isTagsEditEnabled && (
|
|
|
|
<Authorized
|
|
|
|
|
|
|
|
permission="/permission/admin/app-mgt/publisher/application/update"
|
|
|
|
|
|
|
|
yes={
|
|
|
|
|
|
|
|
!isTagsEditEnabled && (
|
|
|
|
<Text
|
|
|
|
<Text
|
|
|
|
style={{ color: config.theme.primaryColor, cursor: 'pointer' }}
|
|
|
|
style={{
|
|
|
|
|
|
|
|
color: config.theme.primaryColor,
|
|
|
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
|
|
|
}}
|
|
|
|
onClick={this.enableTagsEdit}
|
|
|
|
onClick={this.enableTagsEdit}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Icon type="edit" />
|
|
|
|
<Icon type="edit" />
|
|
|
|
</Text>
|
|
|
|
</Text>
|
|
|
|
)}
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
{isTagsEditEnabled && (
|
|
|
|
{isTagsEditEnabled && (
|
|
|
@ -819,9 +866,11 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
<Authorized
|
|
|
|
|
|
|
|
permission="/permission/admin/app-mgt/publisher/review/view"
|
|
|
|
|
|
|
|
yes={
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<Divider dashed={true} />
|
|
|
|
<Divider dashed={true} />
|
|
|
|
|
|
|
|
|
|
|
|
<div className="app-rate">
|
|
|
|
<div className="app-rate">
|
|
|
|
{app.applicationReleases.length > 0 && (
|
|
|
|
{app.applicationReleases.length > 0 && (
|
|
|
|
<DetailedRating
|
|
|
|
<DetailedRating
|
|
|
@ -830,6 +879,9 @@ class AppDetailsDrawer extends React.Component {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/>
|
|
|
|
</Spin>
|
|
|
|
</Spin>
|
|
|
|
</Drawer>
|
|
|
|
</Drawer>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|