From 2bc74d4d36f5320bb535db972a43fd46cd45a93b Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Thu, 7 May 2020 22:03:26 +0000 Subject: [webapp/external-backends] Remove step 3 from stepper & eslint fixes --- webapp/src/components/BackendModuleEdit.vue | 84 +++-------------------------- 1 file changed, 6 insertions(+), 78 deletions(-) (limited to 'webapp') diff --git a/webapp/src/components/BackendModuleEdit.vue b/webapp/src/components/BackendModuleEdit.vue index 0b235da..b6fcfd5 100644 --- a/webapp/src/components/BackendModuleEdit.vue +++ b/webapp/src/components/BackendModuleEdit.vue @@ -7,13 +7,7 @@ "backendEmptyError": "This field can not be empty.", "backendType": "Backend type", "backendtypeEmptyError": "Please choose a backend type.", - "backendSaved": "Backend was successfully saved.", - "stepperOptional": "optional", - "pending": "pending", - "progress": "in progress ...", - "success": "success", - "error": "error", - "testConnection": "Test connection" + "backendSaved": "Backend was successfully saved." }, "de": { "inputCredentials": "Anmeldedaten", @@ -22,13 +16,7 @@ "backendEmptyError": "Dieses Feld darf nicht leer sein.", "backendType": "Backend Typ", "backendtypeEmptyError": "Bitte wähle einen Backendtyp aus.", - "backendSaved": "Backend wurde erfolgreich gespeichert.", - "stepperOptional": "Optional", - "pending": "nicht getestet", - "progress": "test läuft ...", - "success": "erfolgreich", - "error": "Fehler", - "testConnection": "Verbindung überprüfen" + "backendSaved": "Backend wurde erfolgreich gespeichert." } } @@ -57,13 +45,6 @@ step="2" :editable="stepCompleted >= 2" >{{ $t('inputCredentials') }} - - {{ $t('testConnection') }}{{ $t('stepperOptional') }} - @@ -91,25 +72,6 @@ > - - - - - cached - -
{{ $t('Status') }}: {{ statusLabel }}
-
{{ $t('Status') }}: TODO: REMOVE
-
-
-
@@ -119,8 +81,7 @@ {{ $t('cancel') }} {{ $t('continue') }} - {{ $t('continue') }} - {{ backendId ? $t('save') : $t('create') }} + {{ backendId ? $t('save') : $t('create') }} @@ -145,10 +106,7 @@ export default { backendType: '', backendName: '', elements: [], - loadData: false, - loading: false, - statusColor: 'primary--text', - statusLabel: this.$t('pending') + loadData: false } }, methods: { @@ -206,38 +164,10 @@ export default { completeStepTwo () { // Error handling if (this.backendName !== '') { - this.step = 3 this.stepCompleted = Math.max(2, this.stepCompleted) } else { this.$refs.form.validate() } - }, - checkConnection () { - // Start the loading animation and reset the label colors. - this.loading = true - this.statusColor = 'primary--text' - this.statusLabel = this.$t('progress') - - // Test the credential connection. - this.$http.post('/api/backends/0/connection', { - name: this.backendName, - type: this.backendType, - credentials: JSON.stringify(this.credentials), - headers: { - 'Cache-Control': 'no-cache' - } - }).then(response => { - if (response.data.success) { - this.statusColor = 'success--text' - this.statusLabel = this.$t('success') - } else { - this.statusColor = 'error--text' - this.statusLabel = this.$t('error') - this.$snackbar({ color: 'error', text: response.data.error }) - } - // End the loading animation. - this.loading = false - }) } }, computed: { @@ -252,14 +182,12 @@ export default { edit: function (value) { if (value) { this.loadBackendTypes() - this.statusColor = 'primary--text' - this.statusLabel = this.$t('pending') - this.$refs.form.reset() + if (this.$refs.form) this.$refs.form.reset() this.elements = [] if (this.backendId !== 0) { this.loadBackend(this.backendId) this.step = 2 - this.stepCompleted = 3 + this.stepCompleted = 2 } else { this.backendName = '' this.backendType = '' -- cgit v1.2.3-55-g7522