Display currently installed version in editor-ui

This commit is contained in:
Jan Oberhauser
2019-09-11 18:40:22 +02:00
parent 52bd08fae0
commit d6b8b9544f
6 changed files with 17 additions and 1 deletions

View File

@@ -389,6 +389,7 @@ export interface IN8nUISettings {
saveManualExecutions: boolean;
timezone: string;
urlBaseWebhook: string;
versionCli: string;
}
export interface IWorkflowSettings extends IWorkflowSettingsWorkflow {

View File

@@ -16,7 +16,7 @@
<el-menu-item index="logo" class="logo-item">
<img src="/n8n-icon-small.png" class="icon" alt="n8n.io"/>
<a href="https://n8n.io" class="logo-text" target="_blank" slot="title">
n8n.io
n8n.io - Currently installed version {{versionCli}}
</a>
</el-menu-item>
@@ -205,6 +205,9 @@ export default mixins(
currentWorkflow (): string {
return this.$route.params.name;
},
versionCli (): string {
return this.$store.getters.versionCli;
},
workflowExecution (): IExecutionResponse | null {
return this.$store.getters.getWorkflowExecution;
},

View File

@@ -53,6 +53,7 @@ export const store = new Vuex.Store({
saveDataSuccessExecution: 'all',
saveManualExecutions: false,
timezone: 'America/New_York',
versionCli: '0.0.0',
workflowExecutionData: null as IExecutionResponse | null,
lastSelectedNode: null as string | null,
nodeIndex: [] as Array<string | null>,
@@ -478,6 +479,9 @@ export const store = new Vuex.Store({
setTimezone (state, timezone: string) {
Vue.set(state, 'timezone', timezone);
},
setVersionCli(state, version: string) {
Vue.set(state, 'versionCli', version);
},
addNodeType (state, typeData: INodeTypeDescription) {
if (!typeData.hasOwnProperty('name')) {
@@ -581,6 +585,9 @@ export const store = new Vuex.Store({
timezone: (state): string => {
return state.timezone;
},
versionCli: (state): string => {
return state.versionCli;
},
// Push Connection
pushConnectionActive: (state): boolean => {

View File

@@ -1846,6 +1846,7 @@ export default mixins(
this.$store.commit('setSaveDataSuccessExecution', settings.saveDataSuccessExecution);
this.$store.commit('setSaveManualExecutions', settings.saveManualExecutions);
this.$store.commit('setTimezone', settings.timezone);
this.$store.commit('setVersionCli', settings.versionCli);
},
async loadNodeTypes (): Promise<void> {
const nodeTypes = await this.restApi().getNodeTypes();