forked from Gitlink/forgeplus-react
update
This commit is contained in:
parent
e69af9c003
commit
a38ba5c7e2
|
@ -4403,9 +4403,9 @@ window._whenPasterDoUpload = function (event, action, callback) {
|
||||||
// 读取该图片
|
// 读取该图片
|
||||||
var file = item.getAsFile();
|
var file = item.getAsFile();
|
||||||
var oMyForm = new FormData();
|
var oMyForm = new FormData();
|
||||||
oMyForm.append("editormd-image-file", file);
|
oMyForm.append("file", file);
|
||||||
oMyForm.append("file_param_name", "editormd-image-file");
|
// oMyForm.append("file_param_name", "editormd-image-file");
|
||||||
oMyForm.append("byxhr", "true");
|
// oMyForm.append("byxhr", "true");
|
||||||
var xhr = new window.XMLHttpRequest();
|
var xhr = new window.XMLHttpRequest();
|
||||||
xhr.addEventListener("load",
|
xhr.addEventListener("load",
|
||||||
function (_xhr) {
|
function (_xhr) {
|
||||||
|
|
|
@ -782,7 +782,7 @@ class App extends Component {
|
||||||
} />
|
} />
|
||||||
<Route exact path="/"
|
<Route exact path="/"
|
||||||
render={
|
render={
|
||||||
(props) => (<ShixunsHome {...this.props} {...props} {...this.state}></ShixunsHome>)
|
(props) => (<Projects {...this.props} {...props} {...this.state}></Projects>)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Route component={Shixunnopage} />
|
<Route component={Shixunnopage} />
|
||||||
|
|
|
@ -86,7 +86,7 @@ export function getUrl(path, goTest) {
|
||||||
// testbdweb.educoder.net testbdweb.trustie.net
|
// testbdweb.educoder.net testbdweb.trustie.net
|
||||||
// const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000'
|
// const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000'
|
||||||
// const local = 'https://testeduplus2.educoder.net'
|
// const local = 'https://testeduplus2.educoder.net'
|
||||||
const local = 'https://testforgeplus.trustie.net/'
|
const local = 'https://testforgeplus.trustie.net'
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
return `${local}${path?path:''}`
|
return `${local}${path?path:''}`
|
||||||
}
|
}
|
||||||
|
@ -155,35 +155,28 @@ export function getmyUrl(geturl) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUploadActionUrl(path, goTest) {
|
export function getUploadActionUrl(path, goTest) {
|
||||||
// Railsgettimes()
|
return `${getUrl()}/api/attachments.json?debug=${window._debugType || 'admin'}`;
|
||||||
let anewopens=md5(newopens+newtimestamp);
|
|
||||||
return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUploadLogoActionUrl() {
|
export function getUploadLogoActionUrl() {
|
||||||
let anewopens=md5(newopens+newtimestamp);
|
return `${getUrl()}/api/resumes/logo.json?debug=${window._debugType || 'admin'}`;
|
||||||
return `${getUrl()}/api/resumes/logo.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUploadActionUrltwo(id) {
|
export function getUploadActionUrltwo(id) {
|
||||||
let anewopens=md5(newopens+newtimestamp);
|
return `${getUrlmys()}/api/shixuns/${id}/upload_data_sets.json?debug=${window._debugType || 'admin'}`
|
||||||
return `${getUrlmys()}/api/shixuns/${id}/upload_data_sets.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUploadActionUrlthree() {
|
export function getUploadActionUrlthree() {
|
||||||
let anewopens=md5(newopens+newtimestamp);
|
return `${getUrlmys()}/api/jupyters/import_with_tpm.json?debug=${window._debugType || 'admin'}`
|
||||||
return `${getUrlmys()}/api/jupyters/import_with_tpm.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getupload_git_file(id) {
|
export function getupload_git_file(id) {
|
||||||
let anewopens=md5(newopens+newtimestamp);
|
return `${getUrlmys()}/api/shixuns/${id}/upload_git_file.json?debug=${window._debugType || 'admin'}`
|
||||||
return `${getUrlmys()}/api/shixuns/${id}/upload_git_file.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function getUploadActionUrlOfAuth(id) {
|
export function getUploadActionUrlOfAuth(id) {
|
||||||
let anewopens=md5(newopens+newtimestamp);
|
return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json?debug=${window._debugType || 'admin'}`
|
||||||
return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getRandomNumber(type) {
|
export function getRandomNumber(type) {
|
||||||
|
@ -205,15 +198,7 @@ export function getTaskUrlById(id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getRandomcode(url) {
|
export function getRandomcode(url) {
|
||||||
Railsgettimes()
|
return url;
|
||||||
let anewopens=md5(newopens+newtimestamp);
|
|
||||||
|
|
||||||
if (url.indexOf('?') == -1) {
|
|
||||||
return `${url}?randomcode=${newtimestamp}&client_key=${anewopens}`
|
|
||||||
}else {
|
|
||||||
return `${url}&randomcode=${newtimestamp}&client_key=${anewopens}`
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function htmlEncode(str) {
|
export function htmlEncode(str) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React , { Component } from 'react';
|
import React , { Component } from 'react';
|
||||||
import {Menu, Spin} from 'antd';
|
import {Menu, Spin} from 'antd';
|
||||||
import { getImageUrl , markdownToHTML } from 'educoder';
|
import { getImageUrl , markdownToHTML } from 'educoder';
|
||||||
import { Router , Route , Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import Top from './DetailTop';
|
import Top from './DetailTop';
|
||||||
|
|
||||||
import './list.css';
|
import './list.css';
|
||||||
|
@ -10,11 +10,10 @@ import SelectBranch from '../Branch/SelectBranch';
|
||||||
import CloneAddress from '../Branch/CloneAddress';
|
import CloneAddress from '../Branch/CloneAddress';
|
||||||
import RootTable from './RootTable';
|
import RootTable from './RootTable';
|
||||||
import CoderRootFileDetail from './CoderRootFileDetail';
|
import CoderRootFileDetail from './CoderRootFileDetail';
|
||||||
import NullData from './NullData';
|
|
||||||
import { truncateCommitId } from '../common/util';
|
import { truncateCommitId } from '../common/util';
|
||||||
|
import RenderHtml from '../../components/render-html';
|
||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import img_fork from "../Images/fork.png";
|
|
||||||
/**
|
/**
|
||||||
* address:http和SSH,http_url(对应git地址)
|
* address:http和SSH,http_url(对应git地址)
|
||||||
* branch:当前分支
|
* branch:当前分支
|
||||||
|
@ -241,7 +240,7 @@ class CoderRootDirectory extends Component{
|
||||||
<div className="commonBox-info">
|
<div className="commonBox-info">
|
||||||
{
|
{
|
||||||
readMeContent[0].content ?
|
readMeContent[0].content ?
|
||||||
<div className={"markdown-body readme-index"} dangerouslySetInnerHTML={{__html: markdownToHTML(readMeContent[0].content).replace(/▁/g, "▁▁▁")}}></div>
|
<RenderHtml className="break_word_comments" value={readMeContent[0].content} />
|
||||||
:
|
:
|
||||||
<span>暂无~</span>
|
<span>暂无~</span>
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import Nav from '../Order/Nav';
|
||||||
import UploadComponent from '../Upload/Index';
|
import UploadComponent from '../Upload/Index';
|
||||||
import { getImageUrl } from 'educoder';
|
import { getImageUrl } from 'educoder';
|
||||||
import{ Modal , Form , Input , Select } from 'antd'
|
import{ Modal , Form , Input , Select } from 'antd'
|
||||||
import QuillForEditor from '../quillForEditor';
|
import MDEditor from '../../modules/tpm/challengesnew/tpm-md-editor';
|
||||||
|
|
||||||
|
|
||||||
import Attachments from '../Upload/attachment'
|
import Attachments from '../Upload/attachment'
|
||||||
|
@ -195,9 +195,6 @@ class UpdateMerge extends Component{
|
||||||
const { issue_tag_ids , fixed_version_id , assigned_to_id , issue_chosen , subject, textcount,get_attachments } = this.state;
|
const { issue_tag_ids , fixed_version_id , assigned_to_id , issue_chosen , subject, textcount,get_attachments } = this.state;
|
||||||
return(
|
return(
|
||||||
<div className="main">
|
<div className="main">
|
||||||
{/*<div className="topWrapper">*/}
|
|
||||||
{/*<Nav {...this.props} {...this.state}/>*/}
|
|
||||||
{/*</div>*/}
|
|
||||||
<div>
|
<div>
|
||||||
<Form>
|
<Form>
|
||||||
<div className="f-wrap-between mt20" style={{alignItems:"flex-start"}}>
|
<div className="f-wrap-between mt20" style={{alignItems:"flex-start"}}>
|
||||||
|
@ -216,26 +213,8 @@ class UpdateMerge extends Component{
|
||||||
<Input placeholder="标题" onChange={this.changmodelname}/>
|
<Input placeholder="标题" onChange={this.changmodelname}/>
|
||||||
)}
|
)}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{/* <Form.Item>
|
<MDEditor placeholder={'请输入合并请求的描述...'} height={200}
|
||||||
{getFieldDecorator('body', {
|
mdID={`orderdetail-add-description`} initValue={textcount} onChange={this.textcount} ></MDEditor>
|
||||||
rules: [],
|
|
||||||
initialValue: textcount
|
|
||||||
})(
|
|
||||||
<TextArea placeholder="请输入任务的描述..." style={{height:"300px"}} onChange={this.changmodelcount}/>
|
|
||||||
)}
|
|
||||||
</Form.Item> */}
|
|
||||||
<QuillForEditor
|
|
||||||
value = {this.stringJson(textcount)}
|
|
||||||
wrapStyle={{
|
|
||||||
height: '240px',
|
|
||||||
opacity:1,
|
|
||||||
}}
|
|
||||||
// autoFocus={true}
|
|
||||||
style={{ height: '170px' }}
|
|
||||||
placeholder="请输入合并请求的描述..."
|
|
||||||
options={options}
|
|
||||||
onContentChange={this.onContentChange}
|
|
||||||
/>
|
|
||||||
<UploadComponent load={this.UploadFunc} showNotification={this.props.showNotification} isComplete={true} ></UploadComponent>
|
<UploadComponent load={this.UploadFunc} showNotification={this.props.showNotification} isComplete={true} ></UploadComponent>
|
||||||
{
|
{
|
||||||
get_attachments ?
|
get_attachments ?
|
||||||
|
|
|
@ -144,14 +144,10 @@ class New extends Component{
|
||||||
render(){
|
render(){
|
||||||
const { getFieldDecorator } = this.props.form;
|
const { getFieldDecorator } = this.props.form;
|
||||||
const { current_user } = this.props;
|
const { current_user } = this.props;
|
||||||
const { issue_tag_ids , fixed_version_id , branch_name , status_id , tracker_id , description ,assigned_to_id , priority_id , done_ratio,
|
const { description , issue_chosen , branches } = this.state;
|
||||||
issue_chosen , branches } = this.state;
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div className="main">
|
<div className="main">
|
||||||
{/*<div className="topWrapper">*/}
|
|
||||||
{/*<Nav {...this.props} {...this.state} />*/}
|
|
||||||
{/*</div>*/}
|
|
||||||
<Form>
|
<Form>
|
||||||
<div className="f-wrap-between mt20" style={{alignItems:"flex-start"}}>
|
<div className="f-wrap-between mt20" style={{alignItems:"flex-start"}}>
|
||||||
<div className="list-right df">
|
<div className="list-right df">
|
||||||
|
@ -173,7 +169,7 @@ class New extends Component{
|
||||||
<MDEditor placeholder={'请输入描述信息'} height={200}
|
<MDEditor placeholder={'请输入描述信息'} height={200}
|
||||||
mdID={'order-new-description'} initValue={description} onChange={this.onContentChange} ></MDEditor>
|
mdID={'order-new-description'} initValue={description} onChange={this.onContentChange} ></MDEditor>
|
||||||
</div>
|
</div>
|
||||||
<UploadComponent load={this.UploadFunc} showNotification={this.props.showNotification} isComplete={true}></UploadComponent>
|
<UploadComponent load={this.UploadFunc} showNotification={this.props.showNotification} isComplete={true}></UploadComponent>
|
||||||
<p className="clearfix mt15">
|
<p className="clearfix mt15">
|
||||||
<a className="topWrapper_btn fr" type="submit" onClick={this.handleSubmit}>创建任务</a>
|
<a className="topWrapper_btn fr" type="submit" onClick={this.handleSubmit}>创建任务</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -230,7 +226,7 @@ class New extends Component{
|
||||||
required: true, message: '请选择完成状态'
|
required: true, message: '请选择完成状态'
|
||||||
}],
|
}],
|
||||||
})(
|
})(
|
||||||
<Select value={status_id}>
|
<Select>
|
||||||
{ this.renderSelect(issue_chosen && issue_chosen.issue_status) }
|
{ this.renderSelect(issue_chosen && issue_chosen.issue_status) }
|
||||||
</Select>
|
</Select>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
import React , { Component } from "react";
|
import React , { Component } from "react";
|
||||||
import {Link} from 'react-router-dom';
|
import { Input ,Dropdown , Menu , Icon , Pagination , Spin } from 'antd';
|
||||||
import { Input ,Dropdown , Menu , Icon , Pagination , Spin, Button } from 'antd';
|
|
||||||
import './order.css';
|
import './order.css';
|
||||||
|
|
||||||
import NoneData from '../Nodata';
|
import NoneData from '../Nodata';
|
||||||
import Nav from './Nav';
|
|
||||||
import OrderItem from './OrderItem';
|
import OrderItem from './OrderItem';
|
||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
Loading…
Reference in New Issue