Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 17 additions & 20 deletions src/components/Global/TableRowAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<b-link
v-else-if="value === 'download' && downloadLocation !== ''"
class="align-bottom btn-icon-only py-0 btn-link"
:download="exportName"
:href="downloadLocation"
:download="`${exportName}.txt`"
:href="`/api/${downloadLocation}`"
:title="title"
>
<slot name="icon" />
Expand All @@ -54,12 +54,11 @@
</span>
</template>

<script>
<script setup>
import { defineProps, computed } from 'vue';
import { omit } from 'lodash';

export default {
name: 'TableRowAction',
props: {
const props = defineProps({
value: {
type: String,
required: true,
Expand Down Expand Up @@ -96,17 +95,15 @@ export default {
type: Boolean,
default: true,
},
},
computed: {
dataForExport() {
return JSON.stringify(omit(this.rowData, 'actions'));
},
download() {
return `${this.exportName}.json`;
},
href() {
return `data:text/json;charset=utf-8,${this.dataForExport}`;
},
},
};
</script>
});

const dataForExport = computed(() => {
return JSON.stringify(omit(props.rowData, 'actions'));
});
const download = computed(() => {
return `${props.exportName}.json`;
});
const href = computed(() => {
return `data:text/json;charset=utf-8,${dataForExport.value}`;
});
</script>
29 changes: 19 additions & 10 deletions src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"tooltip": "Tooltip"
},
"calendar": {
"dateFormat": "YYYY-MM-DD",
"dateFormat": "DD/MM/YYYY",
"selectDate": "Select date",
"useCursorKeysToNavigateCalendarDates": "Use cursor keys to navigate calendar dates"
},
Expand Down Expand Up @@ -408,6 +408,9 @@
"messagePowerOff": "The server must be powered off to change date and time to manual or NTP."
},
"configureSettings": "Configure settings",
"viewDynamicNtp": "View Dynamic NTP servers",
"dhcpNtpInfoTooltip": "This section captures the DHCP supplied NTP server details",
"staticNtp":"Static NTP servers",
"form": {
"date": "Date",
"manual": "Manual",
Expand Down Expand Up @@ -465,12 +468,17 @@
"processorCores": "Processor cores",
"totalCores": "Total cores",
"alert": {
"message": "Memory dimms and processor cores can be configured or deconfigured only when the server is powered off."
"message": "Memory dimms and processor cores can be configured or deconfigured only when the server is powered off.",
"warning": "If memory event occurred at runtime and server has not yet been rebooted then the memory resource is still in use. Once server is rebooted, the memory resource will become deconfigured and not in use."
},
"toast": {
"deleteReqFailed": "The delete request failed because the resource requested cannot be deleted.",
"errorDisablingSetting": "Error disabling setting",
"errorEnablingSetting": "Error enabling setting"
"errorEnablingSetting": "Error enabling setting",
"errorConfiguringProcessorCore": "Error Configuring Processor Core",
"errorConfiguringDIMM": "Error Configuring Memory DIMM",
"errorDeconfiguringProcessorCore": "Error Deconfiguring Processor Core",
"errorDeconfiguringDIMM" : "Error Deconfiguring Memory DIMM"
},
"table": {
"deconfigurationType": "Deconfiguration Type",
Expand Down Expand Up @@ -625,6 +633,8 @@
"errorStartResourceDumpInvalidSelector": "Error initiating dump. Invalid resource selector.",
"errorStartResourceDumpInvalidPassword": "Error initiating dump. Invalid password.",
"errorStartSystemDump": "Error starting new System dump.",
"resourceDumpSuccess": "Resource Dump created successfully.",
"resourceDumpFailed": "Resource Dump creation failed.",
"successDeleteDump": "Successfully deleted %{count} dump. | Successfully deleted %{count} dumps.",
"successStartBmcDumpTitle": "BMC dump started",
"successStartDump": "The dump will take some time to complete.",
Expand Down Expand Up @@ -823,12 +833,10 @@
"concurrentMaintenancePowerOffDesc": "Use this function to power off the power domain that includes resources that are currently in a disk unit attention state.",
"concurrentMaintenancePowerOn": "Concurrent Maintenance Power On Domain (Function 69)",
"concurrentMaintenancePowerOnDesc": "Use this function to power on the power domain that was powered off by using function 68.",
"disableRemoteService": "Disable Remote Service (Function 65)",
"disableRemoteServiceDesc": "Use this function to deactivate a remote service session.",
"consoleServiceFunction": "Console Service Function (Function 65)",
"consoleServiceFunctionDesc": "Use this function to initiate console recovery (IBM i 7.5, or later).",
"diskUnitIOP": "Disk Unit IOP Reset/Reload (Function 67)",
"diskUnitIOPDesc": "Use this function to initiate an I/O processor dump and reset/reload of an IOP that controls resources that are currently in a disk unit attention state.",
"enableRemoteService": "Enable Remote Service (Function 66)",
"enableRemoteServiceDesc": "Use this function to activate a remote service session.",
"execute": "Execute",
"iopControlStorageDump": "IOP Control Storage Dump (Function 70)",
"iopControlStorageDumpDesc": "Use this function to initiate an I/O processor dump and reset/reload of the IOP that was designated to control the load source device when the logical partition was activated.",
Expand Down Expand Up @@ -1153,7 +1161,8 @@
"updateDynamicIoDrawerAttachment": "Update dynamic I/O drawer attachment",
"alert": {
"heading": "Applying changes",
"message": "System has to be powered off. Changes made will take effect on next reboot.",
"message1": "System has to be powered off.",
"message2": "Changes made will take effect on next reboot.",
"serverMustBePoweredOffTo": "Server must be powered off to:",
"updateActiveMemoryMirroring": "Update active memory mirror mode",
"updateIoAdapterEnlargedCapacity": "@:pageMemory.updateIoAdapterEnlargedCapacity",
Expand Down Expand Up @@ -1379,7 +1388,7 @@
"successIpmiNetworkPolicyUpdate": "Successfully updated %{policy}. The BMC normally takes about 30 seconds to change the state.",
"successNextBootToast": "Applying changes to %{policy}. Changes made to %{policy} will take effect on next reboot."
},
"acfUploadEnablementConfirmText": "Caution: Enabling this setting allows unauthenticated users to upload Access Control Files (ACFs) without logging in and without pressing Function 74 on the Operator Panel. Do you want to proceed?",
"acfUploadEnablementConfirmText": "Caution: Enabling this setting removes the physical system access requirement from the process to upload an Access Control File (ACF). This would allow anyone who is authorized to request an ACF and has network access to ASMI to gain access to the admin account. Do you want to proceed?",
"vtpm": "VirtualTPM",
"vtpmDescription": "Enabling vTPM makes a TPM available to the guest operating system."
},
Expand Down Expand Up @@ -1780,7 +1789,7 @@
"invalidVlanTagId": "VLAN ID must be in range %{min} to %{max}",
"invalidIsciTargetPort": "The port value should be a positive integer between %{min} and %{max}",
"chapNameRequired": "CHAP name is required when CHAP secret is specified",
"chapSecretRequired": "CHAP secret is required when CHAP name is specified",
"chapSecretRequired": "CHAP secret is required when CHAP secret is specified",
"invalidFieldLength": "%{field} should not exceed %{max} characters",
"invalidChapSecretLength": "CHAP secret length must be between %{min} and %{max} characters"
}
Expand Down
18 changes: 18 additions & 0 deletions src/router/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ import ServiceLoginConsoles from '@/views/Operations/ServiceLoginConsoles/Servic
import ServiceLogin from '@/views/Operations/ServiceLoginConsoles';
import ProfileSettings from '@/views/ProfileSettings';
import Network from '@/views/Settings/Network';
import Dumps from '@/views/Logs/Dumps';
import DateTime from '@/views/Settings/DateTime/DateTime.vue'

const roles = {
administrator: 'Administrator',
Expand Down Expand Up @@ -200,6 +202,14 @@ export const routes = [
title: i18n.global.t('appPageTitle.auditLogs'),
},
},
{
path: '/logs/dumps',
name: 'dumps',
component: Dumps,
meta: {
title: i18n.global.t('appPageTitle.dumps'),
},
},
{
path: '/logs/post-code-logs',
name: 'post-code-logs',
Expand Down Expand Up @@ -274,6 +284,14 @@ export const routes = [
title: i18n.global.t('appPageTitle.powerRestorePolicy'),
},
},
{
path: '/settings/date-time',
name: 'date-time',
component: DateTime,
meta: {
title: i18n.global.t('appPageTitle.dateTime'),
},
},
{
path: '/settings/hardware-deconfiguration',
name: 'hardware-deconfiguration',
Expand Down
4 changes: 3 additions & 1 deletion src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ import NetworkSettingsStore from './modules/Operations/NetworkSettingsStore.js';
import LdapStore from './modules/SecurityAndAccess/LdapStore.js';
import DumpsStore from './modules/Logs/DumpsStore.js';
import FieldCoreOverrideStore from './modules/ResourceManagement/FieldCoreOverrideStore.js';
import PostCodeLogsStore from './modules/Logs/PostCodeLogsStore.js'
import PostCodeLogsStore from './modules/Logs/PostCodeLogsStore.js';
import DateTimeStore from './modules/Settings/DateTimeStore';
// ... (export use other stores)
export {
EventLogStore,
Expand Down Expand Up @@ -75,4 +76,5 @@ export {
LdapStore,
DumpsStore,
FieldCoreOverrideStore,
DateTimeStore,
};
39 changes: 29 additions & 10 deletions src/store/modules/Logs/DumpsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export const DumpsStore = defineStore('dumps', {
allDumpsGetter: (state) => state.allDumps,
},
actions: {
async getTask() {
return await api.get('/redfish/v1/TaskService/Tasks');
},
async getBmcDumpEntries() {
return api
.get('/redfish/v1/')
Expand Down Expand Up @@ -45,6 +48,14 @@ export const DumpsStore = defineStore('dumps', {
id: dump.Id,
location: dump['@odata.id'],
size: dump.AdditionalDataSizeBytes,
actions: [
{
value: 'download',
},
{
value: 'delete',
},
],
}));
})
.catch((error) => console.log(error));
Expand All @@ -59,19 +70,27 @@ export const DumpsStore = defineStore('dumps', {
)
.catch((error) => {
console.log(error);
const messageId =
const errorMsg =
error.response.data.error?.['@Message.ExtendedInfo'][0].MessageId;

const message = REGEX_MAPPINGS.resourceInStandby.test(messageId)
? i18n.global.t('pageDumps.toast.errorStartDumpAnotherInProgress', {
dump: dumpType,
})
: i18n.global.t('pageDumps.toast.errorStartBmcDump');

throw new Error(message);
switch (true) {
case REGEX_MAPPINGS.resourceInUse.test(errorMsg):
throw new Error(
i18n.global.t('pageDumps.toast.errorStartDumpAnotherInProgress', {
dump: dumpType,
})
);
case REGEX_MAPPINGS.resourceInStandby.test(errorMsg):
throw new Error(
i18n.global.t('pageDumps.toast.errorStartDumpResourceInStandby', {
dump: dumpType,
})
);
default:
throw new Error(i18n.global.t('pageDumps.toast.errorStartBmcDump'));
}
});
},
async createResourceDump(_, { resourceSelector, resourcePassword }) {
async createResourceDump({ resourceSelector, resourcePassword }) {
const delay = (time) =>
new Promise((resolve) => setTimeout(resolve, time));

Expand Down
Loading