version with backend
This commit is contained in:
@@ -47,8 +47,9 @@
|
||||
</show-dialog>
|
||||
|
||||
|
||||
<show-dialog v-model:visible="showVersionHistory" :name="targetRow?.name + 'のバージョン履歴'" @close="closeHistoryDg" min-width="50vw" min-height="50vh" :ok-btn-auto-close="false" :ok-btn-loading="isAdding">
|
||||
<version-history ref="versionDialog" :app="targetRow as IAppDisplay" />
|
||||
<show-dialog v-model:visible="showVersionHistory" :name="targetRow?.name + 'のバージョン履歴'" @close="closeHistoryDg" min-width="30vw" :ok-btn-auto-close="false" :ok-btn-loading="isAdding"
|
||||
ok-btn-label="選択">
|
||||
<version-history ref="versionDialog" :app="targetRow" />
|
||||
</show-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -91,6 +92,7 @@ const rowIds = new Set<string>();
|
||||
const $q = useQuasar()
|
||||
const store = useFlowEditorStore();
|
||||
const appDialog = ref();
|
||||
const versionDialog = ref();
|
||||
const showSelectApp=ref(false);
|
||||
const showVersionHistory=ref(false);
|
||||
const isAdding = ref(false);
|
||||
@@ -161,12 +163,13 @@ function showHistory(app:IAppDisplay) {
|
||||
}
|
||||
|
||||
const closeHistoryDg = async (val: 'OK'|'Cancel') => {
|
||||
showSelectApp.value = true;
|
||||
if (val == 'OK' && appDialog.value.selected[0]) {
|
||||
showVersionHistory.value = true;
|
||||
if (val == 'OK' && versionDialog.value.selected[0]) {
|
||||
isAdding.value = true;
|
||||
await api.put(`api/appversions/${targetRow.value?.id}/${versionDialog.value.selected[0].id}`)
|
||||
await getApps();
|
||||
}
|
||||
showSelectApp.value = false;
|
||||
showVersionHistory.value = false;
|
||||
isAdding.value = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<q-icon name="bookmark_border"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>新バージョン保存</q-item-label>
|
||||
<q-item-label>保存して新バージョン</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
@@ -85,8 +85,8 @@
|
||||
<action-select ref="appDg" name="model" :filter="filter" type="single" @clearFilter="onClearFilter" ></action-select>
|
||||
</ShowDialog>
|
||||
<!-- save version dialog -->
|
||||
<ShowDialog v-model:visible="saveVersionAction" name="新バージョン保存" @close="closeSaveVersionDg" min-width="500px">
|
||||
<version-input v-model="versionInfo" />
|
||||
<ShowDialog v-model:visible="saveVersionAction" name="保存して新バージョン" @close="closeSaveVersionDg" min-width="500px">
|
||||
<version-input v-model="versionSubmit" />
|
||||
</ShowDialog>
|
||||
<q-inner-loading
|
||||
:showing="initLoading"
|
||||
@@ -100,7 +100,7 @@
|
||||
import { ref, reactive, computed, onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { IActionNode, ActionNode, IActionFlow, ActionFlow, RootAction, IActionProperty } from 'src/types/ActionTypes';
|
||||
import { IAppDisplay, IManagedApp, IVersionInfo } from 'src/types/AppTypes';
|
||||
import { IAppDisplay, IManagedApp, IVersionSubmit } from 'src/types/AppTypes';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||
import { useAuthStore } from 'stores/useAuthStore';
|
||||
@@ -119,7 +119,7 @@ const deployLoading = ref(false);
|
||||
const saveLoading = ref(false);
|
||||
const initLoading = ref(true);
|
||||
const drawerLeft = ref(false);
|
||||
const versionInfo = ref<IVersionInfo>();
|
||||
const versionSubmit = ref<IVersionSubmit>();
|
||||
const $q = useQuasar();
|
||||
const store = useFlowEditorStore();
|
||||
const authStore = useAuthStore();
|
||||
@@ -262,16 +262,18 @@ const onSaveActionProps=(props:IActionProperty[])=>{
|
||||
};
|
||||
|
||||
const onSaveVersion = async () => {
|
||||
versionInfo.value = {
|
||||
id: '1' // TODO
|
||||
}
|
||||
versionSubmit.value = { appId: store.appInfo?.appId }
|
||||
saveVersionAction.value = true;
|
||||
// await onSaveAllFlow();
|
||||
}
|
||||
|
||||
const closeSaveVersionDg = (val: 'OK'|'CANCEL') => {
|
||||
const closeSaveVersionDg = async (val: 'OK'|'CANCEL') => {
|
||||
if (val == 'OK') {
|
||||
console.log(versionInfo.value);
|
||||
await onSaveAllFlow();
|
||||
await api.post('api/apps', {
|
||||
'appid': versionSubmit.value?.appId,
|
||||
'versionname': versionSubmit.value?.name,
|
||||
'comment': versionSubmit.value?.comment
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ const columns = [
|
||||
// classes: inactiveRowClass
|
||||
// },
|
||||
{ name: 'name', label: '環境名', field: 'name', align: 'left', sortable: true, classes: inactiveRowClass },
|
||||
{ name: 'active', label: 'x', align: 'left', field: 'domainActive', classes: inactiveRowClass },
|
||||
{ name: 'active', label: '', align: 'left', field: 'domainActive', classes: inactiveRowClass },
|
||||
{ name: 'url', label: 'URL', field: 'url', align: 'left', sortable: true, classes: inactiveRowClass },
|
||||
{ name: 'user', label: 'ログイン名', field: 'user', align: 'left', classes: inactiveRowClass },
|
||||
{ name: 'owner', label: '所有者', field: (row: IDomainOwnerDisplay) => row.owner.fullName, align: 'left', classes: inactiveRowClass },
|
||||
|
||||
Reference in New Issue
Block a user