mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix app name length issue in APPM Store
This commit is contained in:
parent
e9cb3eae91
commit
2e690892d5
@ -117,7 +117,7 @@ class EditReleaseModal extends React.Component {
|
||||
|
||||
|
||||
showModal = () => {
|
||||
const {release} = this.props;
|
||||
const {app, release} = this.props;
|
||||
const {formConfig} = this.state;
|
||||
const {specificElements} = formConfig;
|
||||
let metaData = [];
|
||||
@ -143,6 +143,14 @@ class EditReleaseModal extends React.Component {
|
||||
}
|
||||
});
|
||||
|
||||
// if (specificElements.hasOwnProperty("packageName")) {
|
||||
// this.props.form.setFields({
|
||||
// packageName: {
|
||||
// value: app.packageName
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
if (specificElements.hasOwnProperty("version")) {
|
||||
this.props.form.setFields({
|
||||
version: {
|
||||
@ -238,10 +246,10 @@ class EditReleaseModal extends React.Component {
|
||||
if (specificElements.hasOwnProperty("url")) {
|
||||
release.url = values.url;
|
||||
}
|
||||
|
||||
if (specificElements.hasOwnProperty("packageName")) {
|
||||
release.packageName = values.packageName;
|
||||
}
|
||||
//
|
||||
// if (specificElements.hasOwnProperty("packageName")) {
|
||||
// release.packageName = values.packageName;
|
||||
// }
|
||||
|
||||
if (icons.length === 1) {
|
||||
data.append('icon', icons[0].originFileObj);
|
||||
@ -362,18 +370,18 @@ class EditReleaseModal extends React.Component {
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
{formConfig.specificElements.hasOwnProperty("packageName") && (
|
||||
<Form.Item {...formItemLayout} label="Package Name">
|
||||
{getFieldDecorator('packageName', {
|
||||
rules: [{
|
||||
required: true,
|
||||
message: 'Please input the package name'
|
||||
}],
|
||||
})(
|
||||
<Input placeholder="Package Name"/>
|
||||
)}
|
||||
</Form.Item>
|
||||
)}
|
||||
{/*{formConfig.specificElements.hasOwnProperty("packageName") && (*/}
|
||||
{/* <Form.Item {...formItemLayout} label="Package Name">*/}
|
||||
{/* {getFieldDecorator('packageName', {*/}
|
||||
{/* rules: [{*/}
|
||||
{/* required: true,*/}
|
||||
{/* message: 'Please input the package name'*/}
|
||||
{/* }],*/}
|
||||
{/* })(*/}
|
||||
{/* <Input placeholder="Package Name"/>*/}
|
||||
{/* )}*/}
|
||||
{/* </Form.Item>*/}
|
||||
{/*)}*/}
|
||||
|
||||
{formConfig.specificElements.hasOwnProperty("url") && (
|
||||
<Form.Item {...formItemLayout} label="URL">
|
||||
|
||||
@ -16,11 +16,12 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import {message, notification} from "antd";
|
||||
import {notification} from "antd";
|
||||
|
||||
export const handleApiError = (error, message) => {
|
||||
if (error.hasOwnProperty("response") && error.response.status === 401) {
|
||||
window.location.href = window.location.origin + '/publisher/login';
|
||||
const redirectUrl = encodeURI(window.location.href);
|
||||
window.location.href = window.location.origin + `/publisher/login?redirect=${redirectUrl}`;
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: "There was a problem",
|
||||
|
||||
@ -99,7 +99,12 @@ class NormalLoginForm extends React.Component {
|
||||
axios.post(window.location.origin+ config.serverConfig.loginUri, request
|
||||
).then(res=>{
|
||||
if (res.status === 200) {
|
||||
window.location = window.location.origin+"/publisher";
|
||||
let redirectUrl = window.location.origin+"/publisher";
|
||||
const searchParams = new URLSearchParams(window.location.search);
|
||||
if(searchParams.has("redirect")){
|
||||
redirectUrl = searchParams.get("redirect");
|
||||
}
|
||||
window.location = redirectUrl;
|
||||
}
|
||||
}).catch(function (error) {
|
||||
handleApiError(error, "Error occurred while trying to login.");
|
||||
@ -152,7 +157,7 @@ class NormalLoginForm extends React.Component {
|
||||
)}
|
||||
<br/>
|
||||
<a className="login-form-forgot" href="">Forgot password</a>
|
||||
<Button block type="primary" htmlType="submit" className="login-form-button">
|
||||
<Button loading={this.state.loading} block type="primary" htmlType="submit" className="login-form-button">
|
||||
Log in
|
||||
</Button>
|
||||
</Form.Item>
|
||||
|
||||
@ -81,12 +81,12 @@ class Dashboard extends React.Component {
|
||||
>
|
||||
<Menu.Item key="add-new-public-app">
|
||||
<Link to="/publisher/add-new-app/public">
|
||||
Public APP
|
||||
Public App
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="add-new-enterprise-app">
|
||||
<Link to="/publisher/add-new-app/enterprise">
|
||||
Enterprise APP
|
||||
Enterprise App
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="add-new-web-clip">
|
||||
@ -94,6 +94,11 @@ class Dashboard extends React.Component {
|
||||
Web Clip
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item key="add-new-custom-app">
|
||||
<Link to="/publisher/add-new-app/custom-app">
|
||||
Custom App
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</SubMenu>
|
||||
|
||||
<SubMenu
|
||||
|
||||
@ -47,3 +47,10 @@
|
||||
width: 100%;
|
||||
border-radius: 28%;
|
||||
}
|
||||
|
||||
.release .app-name{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
@ -49,7 +49,7 @@ class AppCard extends React.Component {
|
||||
{/*<Avatar shape="square" size={128} src={release.iconPath} />*/}
|
||||
</Col>
|
||||
<Col span={24} style={{paddingTop:10}}>
|
||||
<Text strong level={4}>{app.name}</Text><br/>
|
||||
<Text className="app-name" strong level={4}>{app.name}</Text><br/>
|
||||
<Text type="secondary" level={4}>{app.subMethod.toLowerCase()}</Text><br/>
|
||||
<StarRatings
|
||||
rating={app.rating}
|
||||
|
||||
@ -25,7 +25,7 @@ export const handleApiError = (error, message) => {
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: "There was a problem",
|
||||
duration: 0,
|
||||
duration: 10,
|
||||
description: message,
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user