domain切替バグ修正

This commit is contained in:
2023-11-20 01:50:02 +09:00
parent f83dd693d5
commit e20625abdb
7 changed files with 18 additions and 12 deletions

View File

@@ -260,9 +260,9 @@ def updateappjscss(app,uploads,c:config.KINTONE_ENV):
r = httpx.put(url,headers=headers,data=json.dumps(data))
return r.json()
def createappjs(app):
def createappjs(domainid,app):
db = SessionLocal()
flows = get_flows_by_app(db,app)
flows = get_flows_by_app(db,domainid,app)
db.close()
content={}
for flow in flows:
@@ -516,12 +516,12 @@ async def updateprocessfromexcel(app:str,env = Depends(getkintoneenv)):
@r.post("/createjstokintone",)
async def createjstokintone(app:str,env = Depends(getkintoneenv)):
async def createjstokintone(app:str,env:config.KINTONE_ENV = Depends(getkintoneenv)):
try:
jscs=[]
files=[]
files.append(createappjs(app))
files.append(createappjs(env.DOMAIN_ID, app))
files.append('Temp\\alc_runtime.js')
for file in files:
upload = uploadkintonefiles(file,env)

View File

@@ -107,6 +107,7 @@ async def flow_list(
db=Depends(get_db),
):
domain = get_activedomain(db, user.id)
print("domain=>",domain)
flows = get_flows_by_app(db, domain.id, appid)
return flows

View File

@@ -24,7 +24,10 @@ class KINTONE_ENV:
KINTONE_USER = ""
DOMAIN_ID = ""
def __init__(self,domain) -> None:
self.DOMAIN_ID=domain.id
self.BASE_URL = domain.url
self.KINTONE_USER = domain.kintoneuser
self.API_V1_AUTH_VALUE = base64.b64encode(bytes(f"{domain.kintoneuser}:{domain.kintonepwd}","utf-8"))

View File

@@ -1,2 +1,2 @@
VUE_BACKEND_URL="http://localhost:8000/api/"
#KAB_BACKEND_URL="https://kab-backend.azurewebsites.net/"
KAB_BACKEND_URL="http://127.0.0.1:8000/"

View File

@@ -10,6 +10,7 @@
"format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
"test": "echo \"No test specified\" && exit 0",
"dev": "quasar dev",
"dev:local": "set \"LOCAL=true\" && quasar dev",
"build": "set \"SOURCE_MAP=false\" && quasar build",
"build:dev":"set \"SOURCE_MAP=true\" && quasar build"

View File

@@ -10,12 +10,14 @@
const { configure } = require('quasar/wrappers');
const dotenv = require('dotenv').config().parsed;
const package = require('./package.json');
const envPath = process.env.LOCAL==='true'?'.env.development':'.env';
const dotenv = require('dotenv').config({path:envPath}).parsed;
console.log('dotenv=>',dotenv);
// const package = require('./package.json');
const { Notify } = require('quasar');
const version = package.version;
const productName=package.productName;
console.log(process.env);
const version = process.env.npm_package_version;
const productName=process.env.npm_package_productName;
// console.log(process.env);
module.exports = configure(function (/* ctx */) {
return {
eslint: {

View File

@@ -28,7 +28,6 @@ import { IKintoneEvent } from '../../types/KintoneEvents';
import { storeToRefs } from 'pinia';
import { useFlowEditorStore } from 'stores/flowEditor';
import { ActionFlow, ActionNode, RootAction } from 'src/types/ActionTypes';
import { S } from 'app/dist/spa/assets/QTable.50486f7c';
export default defineComponent({
name: 'EventTree',
setup(props, context) {