From d0dc300a598e635cd539d0b961ba85097c84d0b9 Mon Sep 17 00:00:00 2001 From: Nick Date: Sun, 22 Sep 2019 16:32:39 -0400 Subject: [PATCH] feat: docker auto upgrade --- client/components/admin/admin-system.vue | 85 ++++++++++++- .../editor/editor-modal-editorselect.vue | 8 +- client/components/setup.vue | 8 +- .../admin/system/system-mutation-upgrade.gql | 12 ++ .../graph/admin/system/system-query-info.gql | 9 +- package.json | 1 + server/graph/resolvers/system.js | 74 +++++++---- server/graph/schemas/system.graphql | 3 + yarn.lock | 117 +++++++++++++++++- 9 files changed, 273 insertions(+), 44 deletions(-) create mode 100644 client/graph/admin/system/system-mutation-upgrade.gql diff --git a/client/components/admin/admin-system.vue b/client/components/admin/admin-system.vue index 939473f7..e00d4ca5 100644 --- a/client/components/admin/admin-system.vue +++ b/client/components/admin/admin-system.vue @@ -27,6 +27,16 @@ v-list-item-subtitle {{ info.latestVersion }} v-list-item-action v-list-item-action-text {{ $t('admin:system.published') }} {{ info.latestVersionReleaseDate | moment('from') }} + v-card-actions(v-if='upgradeCapable && !isLatestVersion && info.platform === `docker`', :class='$vuetify.theme.dark ? `grey darken-3-d5` : `indigo lighten-5`') + .caption.indigo--text.pl-3(:class='$vuetify.theme.dark ? `text--lighten-4` : ``') Wiki.js can perform the upgrade to the latest version for you. + v-spacer + v-btn.px-3( + color='indigo' + dark + @click='performUpgrade' + ) + v-icon(left) mdi-upload + span Perform Upgrade v-card.mt-4.animated.fadeInUp.wait-p2s v-subheader {{ $t('admin:system.hostInfo') }} @@ -92,24 +102,58 @@ v-list-item-subtitle {{ info.dbHost }} v-alert.mt-3.mx-4(:value='isDbLimited', color='deep-orange darken-2', icon='mdi-alert', dark) {{ $t('admin:system.dbPartialSupport') }} + + v-dialog( + v-model='isUpgrading' + persistent + width='450' + ) + v-card.blue.darken-5(dark) + v-card-text.text-center.pa-10 + self-building-square-spinner( + :animation-duration='4000' + :size='40' + color='#FFF' + style='margin: 0 auto;' + ) + .body-2.mt-5.blue--text.text--lighten-4 Your Wiki.js container is being upgraded... + .caption.blue--text.text--lighten-2 Please wait + v-progress-linear.mt-5( + color='blue lighten-2' + :value='upgradeProgress' + :buffer-value='upgradeProgress' + rounded + :stream='isUpgradingStarted' + query + :indeterminate='!isUpgradingStarted' + )