1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-09-20 09:27:44 +03:00

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

@ -255,6 +255,7 @@ export interface IN8nUISettings {
saveManualExecutions: boolean;
timezone: string;
urlBaseWebhook: string;
versionCli: string;
}

View File

@ -6,6 +6,7 @@ import {
import * as bodyParser from 'body-parser';
import * as history from 'connect-history-api-fallback';
import * as requestPromise from 'request-promise-native';
import { version as versionCli } from '../package.json';
import {
ActiveExecutions,
@ -73,6 +74,7 @@ import * as config from '../config';
// @ts-ignore
import * as timezones from 'google-timezones-json';
import * as parseUrl from 'parseurl';
import { version } from '@oclif/command/lib/flags';
class App {
@ -989,6 +991,7 @@ class App {
saveManualExecutions: this.saveManualExecutions,
timezone: this.timezone,
urlBaseWebhook: WebhookHelpers.getWebhookBaseUrl(),
versionCli,
};
}));

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();