Merged PR 101: Bug694:ツール以外でJavaScriptをURL指定でアップロードするとデプロイエラーになる
変更内容: 1.Bug694:ツール以外でアップロードされたファイルがURL指定の場合、デプロイを対応できるように修正しました。 2. 階層化ドロップダウンの属性設定ダイアログの保存ボタン⇒確定ボタンへ変更 Related work items: #694
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -216,9 +216,7 @@ def deoployappfromkintone(app:str,revision:str,c:config.KINTONE_ENV):
|
|||||||
headers={config.API_V1_AUTH_KEY:c.API_V1_AUTH_VALUE,"Content-Type": "application/json"}
|
headers={config.API_V1_AUTH_KEY:c.API_V1_AUTH_VALUE,"Content-Type": "application/json"}
|
||||||
url = f"{c.BASE_URL}{config.API_V1_STR}/preview/app/deploy.json"
|
url = f"{c.BASE_URL}{config.API_V1_STR}/preview/app/deploy.json"
|
||||||
data = {"apps":[{"app":app,"revision":revision}],"revert": False}
|
data = {"apps":[{"app":app,"revision":revision}],"revert": False}
|
||||||
print(data)
|
|
||||||
r = httpx.post(url,headers=headers,data=json.dumps(data))
|
r = httpx.post(url,headers=headers,data=json.dumps(data))
|
||||||
print(r.json)
|
|
||||||
return r.json
|
return r.json
|
||||||
|
|
||||||
# 既定項目に含めるアプリのフィールドのみ取得する
|
# 既定項目に含めるアプリのフィールドのみ取得する
|
||||||
@@ -403,9 +401,11 @@ def updateappjscss(app,uploads,c:config.KINTONE_ENV):
|
|||||||
for key in upload:
|
for key in upload:
|
||||||
filename = os.path.basename(key)
|
filename = os.path.basename(key)
|
||||||
if key.endswith('.js'):
|
if key.endswith('.js'):
|
||||||
existing_js = next((item for item in current_js if item['file']['name'] == filename), None)
|
existing_js = next((item for item in current_js
|
||||||
|
if item.get('type') == 'FILE' and item['file']['name'] == filename
|
||||||
|
), None)
|
||||||
if existing_js:
|
if existing_js:
|
||||||
current_js = [item for item in current_js if item['file'].get('name') != filename]
|
current_js = [item for item in current_js if item.get('type') == 'URL' or item['file'].get('name') != filename]
|
||||||
dsjs.append({'type':'FILE','file':{'fileKey':upload[key]}})
|
dsjs.append({'type':'FILE','file':{'fileKey':upload[key]}})
|
||||||
else:
|
else:
|
||||||
if (key.endswith('alc_runtime.js') and config.DEPLOY_MODE == "DEV"):
|
if (key.endswith('alc_runtime.js') and config.DEPLOY_MODE == "DEV"):
|
||||||
@@ -413,19 +413,15 @@ def updateappjscss(app,uploads,c:config.KINTONE_ENV):
|
|||||||
else:
|
else:
|
||||||
dsjs.append({'type':'FILE','file':{'fileKey':upload[key]}})
|
dsjs.append({'type':'FILE','file':{'fileKey':upload[key]}})
|
||||||
elif key.endswith('.css'):
|
elif key.endswith('.css'):
|
||||||
existing_css = next((item for item in current_css if item['file']['name'] == filename), None)
|
existing_css = next((item for item in current_css
|
||||||
|
if item.get('type') == 'FILE' and item['file']['name'] == filename
|
||||||
|
), None)
|
||||||
if existing_css:
|
if existing_css:
|
||||||
current_css = [item for item in current_css if item['file'].get('name') != filename]
|
current_css = [item for item in current_css if item.get('type') == 'URL' or item['file'].get('name') != filename]
|
||||||
dscss.append({'type': 'FILE', 'file': {'fileKey': upload[key]}})
|
dscss.append({'type': 'FILE', 'file': {'fileKey': upload[key]}})
|
||||||
else:
|
else:
|
||||||
dscss.append({'type': 'FILE', 'file': {'fileKey': upload[key]}})
|
dscss.append({'type': 'FILE', 'file': {'fileKey': upload[key]}})
|
||||||
#現在のJSとCSSがdsjsに追加する
|
#現在のJSとCSSがdsjsに追加する
|
||||||
current_js = [{'type': 'FILE', 'file': {'fileKey': item['file']['fileKey']}}
|
|
||||||
for item in current_js
|
|
||||||
if item.get('type') == 'FILE' and 'fileKey' in item.get('file', {})]
|
|
||||||
current_css = [{'type': 'FILE', 'file': {'fileKey': item['file']['fileKey']}}
|
|
||||||
for item in current_css
|
|
||||||
if item.get('type') == 'FILE' and 'fileKey' in item.get('file', {})]
|
|
||||||
dsjs.extend(current_js)
|
dsjs.extend(current_js)
|
||||||
dscss.extend(current_css)
|
dscss.extend(current_css)
|
||||||
mbjs.extend(current_mobile_js)
|
mbjs.extend(current_mobile_js)
|
||||||
|
|||||||
@@ -84,8 +84,8 @@
|
|||||||
<template v-slot:navigation>
|
<template v-slot:navigation>
|
||||||
<q-stepper-navigation>
|
<q-stepper-navigation>
|
||||||
<div class="row justify-end q-mt-md">
|
<div class="row justify-end q-mt-md">
|
||||||
<q-btn v-if="step > 1" flat color="primary" @click="$refs.stepper.previous()" label="戻る" class="q-ml-sm" />
|
<q-btn v-if="step > 1" flat color="primary" @click="$refs.stepper.previous()" label="戻る" class="q-ml-sm" />
|
||||||
<q-btn @click="stepperNext" color="primary" :label="step === 2 ? '保存' : '次へ'"
|
<q-btn @click="stepperNext" color="primary" :label="step === 2 ? '確定' : '次へ'"
|
||||||
:disable="nextBtnCheck()" />
|
:disable="nextBtnCheck()" />
|
||||||
</div>
|
</div>
|
||||||
</q-stepper-navigation>
|
</q-stepper-navigation>
|
||||||
|
|||||||
Reference in New Issue
Block a user