mirror of https://github.com/openspug/spug
fix issues
parent
4ad6476a11
commit
eb5441f9a4
|
@ -26,7 +26,7 @@ export default observer(function () {
|
||||||
setHostIds(lds.clone(host_ids || app_host_ids));
|
setHostIds(lds.clone(host_ids || app_host_ids));
|
||||||
http.get('/api/repository/', {params: {deploy_id}})
|
http.get('/api/repository/', {params: {deploy_id}})
|
||||||
.then(res => setVersions(res))
|
.then(res => setVersions(res))
|
||||||
if (hostStore.records.length === 0) hostStore.fetchRecords()
|
if (!hostStore.records || hostStore.records.length === 0) hostStore.fetchRecords()
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
function handleSubmit() {
|
function handleSubmit() {
|
||||||
|
|
|
@ -26,7 +26,7 @@ export default observer(function () {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const {app_host_ids, host_ids, extra} = store.record;
|
const {app_host_ids, host_ids, extra} = store.record;
|
||||||
setHostIds(lds.clone(host_ids || app_host_ids));
|
setHostIds(lds.clone(host_ids || app_host_ids));
|
||||||
if (hostStore.records.length === 0) hostStore.fetchRecords();
|
if (!hostStore.records || hostStore.records.length === 0) hostStore.fetchRecords();
|
||||||
if (store.record.extra) setFileList([{...extra, uid: '0'}])
|
if (store.record.extra) setFileList([{...extra, uid: '0'}])
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ export default function () {
|
||||||
appStore.records = [];
|
appStore.records = [];
|
||||||
requestStore.records = [];
|
requestStore.records = [];
|
||||||
requestStore.deploys = [];
|
requestStore.deploys = [];
|
||||||
hostStore.records = [];
|
hostStore.records = null;
|
||||||
execStore.hosts = [];
|
execStore.hosts = [];
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,7 @@ import hostStore from '../host/store';
|
||||||
export default observer(function () {
|
export default observer(function () {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
store.targets = store.record.id ? store.record['targets'] : [undefined];
|
store.targets = store.record.id ? store.record['targets'] : [undefined];
|
||||||
if (hostStore.records.length === 0) {
|
if (!hostStore.records || hostStore.records.length === 0) hostStore.fetchRecords()
|
||||||
hostStore.fetchRecords()
|
|
||||||
}
|
|
||||||
}, [])
|
}, [])
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
|
|
Loading…
Reference in New Issue