Removed TFTP code update option

- Removed TFTP server firmware update ability in the UI.

Signed-off-by: Nikhil Ashoka <a.nikhil@ibm.com>
Change-Id: Icbeddc7a3faa262f12e85268206ae70850f37905
diff --git a/src/views/Operations/Firmware/FirmwareFormUpdate.vue b/src/views/Operations/Firmware/FirmwareFormUpdate.vue
index ac4b23f..4c302df 100644
--- a/src/views/Operations/Firmware/FirmwareFormUpdate.vue
+++ b/src/views/Operations/Firmware/FirmwareFormUpdate.vue
@@ -2,21 +2,8 @@
   <div>
     <div class="form-background p-3">
       <b-form @submit.prevent="onSubmitUpload">
-        <b-form-group
-          v-if="isTftpUploadAvailable"
-          :label="$t('pageFirmware.form.updateFirmware.fileSource')"
-          :disabled="isPageDisabled"
-        >
-          <b-form-radio v-model="isWorkstationSelected" :value="true">
-            {{ $t('pageFirmware.form.updateFirmware.workstation') }}
-          </b-form-radio>
-          <b-form-radio v-model="isWorkstationSelected" :value="false">
-            {{ $t('pageFirmware.form.updateFirmware.tftpServer') }}
-          </b-form-radio>
-        </b-form-group>
-
         <!-- Workstation Upload -->
-        <template v-if="isWorkstationSelected">
+        <template>
           <b-form-group
             :label="$t('pageFirmware.form.updateFirmware.imageFile')"
             label-for="image-file"
@@ -37,25 +24,6 @@
           </b-form-group>
         </template>
 
-        <!-- TFTP Server Upload -->
-        <template v-else>
-          <b-form-group
-            :label="$t('pageFirmware.form.updateFirmware.fileAddress')"
-            label-for="tftp-address"
-          >
-            <b-form-input
-              id="tftp-address"
-              v-model="tftpFileAddress"
-              type="text"
-              :state="getValidationState($v.tftpFileAddress)"
-              :disabled="isPageDisabled"
-              @input="$v.tftpFileAddress.$touch()"
-            />
-            <b-form-invalid-feedback role="alert">
-              {{ $t('global.form.fieldRequired') }}
-            </b-form-invalid-feedback>
-          </b-form-group>
-        </template>
         <b-btn
           data-test-id="firmware-button-startUpdate"
           type="submit"
@@ -73,7 +41,7 @@
 </template>
 
 <script>
-import { requiredIf } from 'vuelidate/lib/validators';
+import { required } from 'vuelidate/lib/validators';
 
 import BVToastMixin from '@/components/Mixins/BVToastMixin';
 import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin';
@@ -99,36 +67,15 @@
   data() {
     return {
       loading,
-      isWorkstationSelected: true,
       file: null,
-      tftpFileAddress: null,
       isServerPowerOffRequired:
         process.env.VUE_APP_SERVER_OFF_REQUIRED === 'true',
     };
   },
-  computed: {
-    isTftpUploadAvailable() {
-      return this.$store.getters['firmware/isTftpUploadAvailable'];
-    },
-  },
-  watch: {
-    isWorkstationSelected: function () {
-      this.$v.$reset();
-      this.file = null;
-      this.tftpFileAddress = null;
-    },
-  },
   validations() {
     return {
       file: {
-        required: requiredIf(function () {
-          return this.isWorkstationSelected;
-        }),
-      },
-      tftpFileAddress: {
-        required: requiredIf(function () {
-          return !this.isWorkstationSelected;
-        }),
+        required,
       },
     };
   },
@@ -149,11 +96,7 @@
         title: this.$t('pageFirmware.toast.updateStarted'),
         timestamp: true,
       });
-      if (this.isWorkstationSelected) {
-        this.dispatchWorkstationUpload(timerId);
-      } else {
-        this.dispatchTftpUpload(timerId);
-      }
+      this.dispatchWorkstationUpload(timerId);
     },
     dispatchWorkstationUpload(timerId) {
       this.$store
@@ -164,15 +107,6 @@
           clearTimeout(timerId);
         });
     },
-    dispatchTftpUpload(timerId) {
-      this.$store
-        .dispatch('firmware/uploadFirmwareTFTP', this.tftpFileAddress)
-        .catch(({ message }) => {
-          this.endLoader();
-          this.errorToast(message);
-          clearTimeout(timerId);
-        });
-    },
     onSubmitUpload() {
       this.$v.$touch();
       if (this.$v.$invalid) return;