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));
|
||||
http.get('/api/repository/', {params: {deploy_id}})
|
||||
.then(res => setVersions(res))
|
||||
if (hostStore.records.length === 0) hostStore.fetchRecords()
|
||||
if (!hostStore.records || hostStore.records.length === 0) hostStore.fetchRecords()
|
||||
}, [])
|
||||
|
||||
function handleSubmit() {
|
||||
|
|
|
@ -26,7 +26,7 @@ export default observer(function () {
|
|||
useEffect(() => {
|
||||
const {app_host_ids, host_ids, extra} = store.record;
|
||||
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'}])
|
||||
}, [])
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ export default function () {
|
|||
appStore.records = [];
|
||||
requestStore.records = [];
|
||||
requestStore.deploys = [];
|
||||
hostStore.records = [];
|
||||
hostStore.records = null;
|
||||
execStore.hosts = [];
|
||||
}, [])
|
||||
|
||||
|
|
|
@ -16,9 +16,7 @@ import hostStore from '../host/store';
|
|||
export default observer(function () {
|
||||
useEffect(() => {
|
||||
store.targets = store.record.id ? store.record['targets'] : [undefined];
|
||||
if (hostStore.records.length === 0) {
|
||||
hostStore.fetchRecords()
|
||||
}
|
||||
if (!hostStore.records || hostStore.records.length === 0) hostStore.fetchRecords()
|
||||
}, [])
|
||||
return (
|
||||
<Modal
|
||||
|
|
Loading…
Reference in New Issue