deploy機能実装

This commit is contained in:
2023-10-16 17:13:14 +09:00
parent b54c0f8022
commit 178cf33949
5 changed files with 55 additions and 7 deletions

1
backend/.gitignore vendored
View File

@@ -126,3 +126,4 @@ cython_debug/
.vscode/ .vscode/
*.lock *.lock
Temp/

View File

@@ -1,6 +1,6 @@
{ {
"name": "kintone-app-builder", "name": "kintone-app-builder",
"version": "0.0.1", "version": "0.2.0",
"description": "Kintoneアプリの自動生成とデプロイを支援ツールです", "description": "Kintoneアプリの自動生成とデプロイを支援ツールです",
"productName": "Kintone App Builder", "productName": "Kintone App Builder",
"author": "maxiaozhe@alicorns.co.jp <maxiaozhe@alicorns.co.jp>", "author": "maxiaozhe@alicorns.co.jp <maxiaozhe@alicorns.co.jp>",

View File

@@ -30,14 +30,28 @@ export class FlowCtrl
console.info(result.data) console.info(result.data)
return true; return true;
} }
/**
* フローを更新する
* @param jsonData
* @returns
*/
async UpdateFlow(jsonData:any):Promise<boolean> async UpdateFlow(jsonData:any):Promise<boolean>
{ {
const result = await api.put('http://127.0.0.1:8000/api/flow/' + jsonData.flowid,jsonData); const result = await api.put('http://127.0.0.1:8000/api/flow/' + jsonData.flowid,jsonData);
console.info(result.data) console.info(result.data)
return true; return true;
} }
/**
* デプロイ
* @param appid
* @returns
*/
async depoly(appid:string):Promise<boolean>
{
const result = await api.post(`http://127.0.0.1:8000/api/v1/createjstokintone?app=${appid}`);
console.info(result.data);
return true;
}
} }

View File

@@ -122,8 +122,32 @@ const closeDg=(val :any)=>{
store.currentFlow?.addNode(action, prevNodeIfo.value.prevNode,prevNodeIfo.value.inputPoint); store.currentFlow?.addNode(action, prevNodeIfo.value.prevNode,prevNodeIfo.value.inputPoint);
} }
} }
/**
const onDeploy=()=>{ * デプロイ
*/
const onDeploy= async ()=>{
if(store.appInfo===undefined || store.flows?.length===0){
$q.notify({
type: 'negative',
caption:"エラー",
message: `設定されたフローがありません。`
});
return;
}
try{
await store.deploy();
$q.notify({
type: 'positive',
caption:"通知",
message: `デプロイを成功しました。`
});
}catch(error){
$q.notify({
type: 'negative',
caption:"エラー",
message: `デプロイが失敗しました。`
})
}
return; return;
} }

View File

@@ -96,6 +96,15 @@ export const useFlowEditorStore = defineStore("flowEditor",{
}else{ }else{
return await flowCtrl.UpdateFlow(jsonData); return await flowCtrl.UpdateFlow(jsonData);
} }
},
/**
* デプロイする
*/
async deploy():Promise<boolean>{
if(this.appInfo===undefined){
return false;
}
return await flowCtrl.depoly(this.appInfo?.appId);
} }
} }