deploy機能実装
This commit is contained in:
3
backend/.gitignore
vendored
3
backend/.gitignore
vendored
@@ -125,4 +125,5 @@ cython_debug/
|
||||
# VS Code settings
|
||||
.vscode/
|
||||
|
||||
*.lock
|
||||
*.lock
|
||||
Temp/
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kintone-app-builder",
|
||||
"version": "0.0.1",
|
||||
"version": "0.2.0",
|
||||
"description": "Kintoneアプリの自動生成とデプロイを支援ツールです",
|
||||
"productName": "Kintone App Builder",
|
||||
"author": "maxiaozhe@alicorns.co.jp <maxiaozhe@alicorns.co.jp>",
|
||||
|
||||
@@ -30,14 +30,28 @@ export class FlowCtrl
|
||||
console.info(result.data)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* フローを更新する
|
||||
* @param jsonData
|
||||
* @returns
|
||||
*/
|
||||
async UpdateFlow(jsonData:any):Promise<boolean>
|
||||
{
|
||||
const result = await api.put('http://127.0.0.1:8000/api/flow/' + jsonData.flowid,jsonData);
|
||||
console.info(result.data)
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -122,8 +122,32 @@ const closeDg=(val :any)=>{
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,16 @@ export const useFlowEditorStore = defineStore("flowEditor",{
|
||||
}else{
|
||||
return await flowCtrl.UpdateFlow(jsonData);
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* デプロイする
|
||||
*/
|
||||
async deploy():Promise<boolean>{
|
||||
if(this.appInfo===undefined){
|
||||
return false;
|
||||
}
|
||||
return await flowCtrl.depoly(this.appInfo?.appId);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user