Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Led's to enhance use experience #122

Open
wants to merge 1 commit into
base: 1060
Choose a base branch
from

Conversation

Patel-Kamalkumar
Copy link

@Patel-Kamalkumar Patel-Kamalkumar commented Jun 28, 2023

  • Adding custom LED component to enhance visual representation of physical LED State which will be dipict the original system LED colour and it's behaviour.
  • When user toggle the identify LED button then as current behaviour toast message will be appears for the LED status but as part of this change when user toggle identify LED button then it's appears as LED button and colour of the LED continuously blinking based on toggle button status.
  • For each toggle button behaviour is different as similar as Hardware LED colour code.
    For example:
  • Dimms, fans, processor etc LED colour representation are amber and system identify LED colour is blue as similar as Hardware colour.

New physical LED are looks like attached images:
dimm slot led
power button led
sys attention led

@mzipse
Copy link

mzipse commented Aug 30, 2023

If we do this, let's target this for FW1060.

@Patel-Kamalkumar Patel-Kamalkumar changed the base branch from 1050 to 1060 December 11, 2023 13:09
package.json Outdated
@@ -17,6 +17,7 @@
"dependencies": {
"@carbon/icons-vue": "10.28.0",
"@novnc/novnc": "1.2.0",
"@vue/runtime-dom": "3.3.4",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure gunner, will remove from PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file is removed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not push the package-lock.json file. Not recommended.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure nikhil, will remove from PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file is removed

@gtmills
Copy link

gtmills commented Dec 11, 2023

Can you explain more on what this does? Why we need this? Can you add a summary of the changes? Can you add a screenshot of what it looks like?

offColours: this.offColour,
errColours: 'red',
cid: this.id,
//isSolidLeds: this.isSolidLed,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove unwanted code, console logs, debuggers.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed unwanted codes.

@@ -29,6 +29,7 @@ const FanStore = {
partNumber: PartNumber,
serialNumber: SerialNumber,
identifyLed: LocationIndicatorActive,
ledStatus: LocationIndicatorActive,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use identifyLed without creating ledStatus.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each LED is attached with unique ledStatus, so mentioned separately.

- Adding custom LED component to enhance visual representation of
physical LED State which will be dipict the original system LED
colour and it's behaviour.
- When user toggle the identify LED button then as current behaviour
toast message will be appears for the LED status but as part of this
change when user toggle identify LED button then it's appears as LED
button and colour of the LED continuously blinking based on toggle
button status.
- For each toggle button behaviour is different as similar as Hardware
LED colour code.
- For example:
Dimms, fans, processor etc LED colour representation are amber and
system identify LED colour is blue as similar as Hardware colour.

Signed-off-by: Kamalkumar <[email protected]>
ledValue: { type: Boolean, default: false },
isSolidLed: { type: Boolean, default: false },
isServiceLed: { type: Boolean, default: false },
issysAttentionLed: { type: Boolean, default: false },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change issysAttentionLed -> isSysAttentionLed.

isSolidLed: { type: Boolean, default: false },
isServiceLed: { type: Boolean, default: false },
issysAttentionLed: { type: Boolean, default: false },
issysidentifyLed: { type: Boolean, default: false },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change issysidentifyLed -> isSysIdentifyLed

data() {
return {
checkbox: false,
blinkcolour: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blinkcolour -> blinkColour

@@ -21,11 +21,14 @@ const SystemStore = {
system.sysAttentionLed =
data.Oem?.IBM?.PartitionSystemAttentionIndicator ||
data.Oem?.IBM?.PlatformSystemAttentionIndicator;
system.issysAttentionLed = system.sysAttentionLed;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issysAttentionLed -> isSysAttentionLed

system.locationIndicatorActive = data.LocationIndicatorActive;
system.issysidentifyLed = data.LocationIndicatorActive;
Copy link
Collaborator

@Nikhil-Ashoka Nikhil-Ashoka Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change issysidentifyLed to isSysIdentifyLed

},
created() {
this.$store.dispatch('system/getSystem').finally(() => {
// Emit initial data fetch complete to parent component
this.$root.$emit('hardware-status-service-complete');
// this.updatePowerStatusLedState(`global.status.${this.serverStatus}`);
Copy link
Collaborator

@Nikhil-Ashoka Nikhil-Ashoka Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comments

.then((message) => this.successToast(message))
.catch(({ message }) => this.errorToast(message));
.then(() => {
//this.successToast(message);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this success Toast is required?

},
toggleSystemAttentionLedSwitch(systemLedState) {
this.$store
.dispatch('system/changeSystemAttentionLedState', systemLedState)
.then((message) => this.successToast(message))
.catch(({ message }) => this.errorToast(message));
.then(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the success toast is still required?

@@ -197,6 +214,11 @@ export default {
label: this.$t('pageInventory.table.identifyLed'),
formatter: this.dataFormatter,
},
{
key: 'ledStatus',
label: 'Physical LED State',
Copy link
Collaborator

@Nikhil-Ashoka Nikhil-Ashoka Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label: 'Physical LED State', Should be taken from the translation file.

@@ -286,8 +308,29 @@ export default {
memberId: row.id,
identifyLed: row.identifyLed,
})
.then((message) => this.successToast(message))
.catch(({ message }) => this.errorToast(message));
.then(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success toast message will still be required.

@@ -181,8 +196,21 @@ export default {
uri: row.uri,
identifyLed: row.identifyLed,
})
.then((message) => this.successToast(message))
.catch(({ message }) => this.errorToast(message));
.then(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success toast will still be required.

@@ -197,6 +216,11 @@ export default {
formatter: this.dataFormatter,
sortable: false,
},
{
key: 'ledStatus',
label: 'Physical LED State',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Physical LED State should be taken from the translation file.

@@ -207,6 +224,11 @@ export default {
label: this.$t('pageInventory.table.identifyLed'),
formatter: this.dataFormatter,
},
{
key: 'ledStatus',
label: 'Physical LED State',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Physical LED State should be taken from the translation file.

@@ -139,6 +154,11 @@ export default {
label: this.$t('pageInventory.table.identifyLed'),
formatter: this.dataFormatter,
},
{
key: 'ledStatus',
label: 'Physical LED State',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Label should be taken from the translation file.

@@ -206,6 +225,11 @@ export default {
label: this.$t('pageInventory.table.identifyLed'),
formatter: this.dataFormatter,
},
{
key: 'ledStatus',
label: 'Physical LED State',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label should be taken from the translation file

@@ -275,13 +299,33 @@ export default {
this.searchTotalFilteredRows = filteredItems.length;
},
toggleIdentifyLedValue(row) {
console.log('row->', row);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console.log

@@ -195,6 +212,11 @@ export default {
formatter: this.dataFormatter,
sortable: false,
},
{
key: 'ledStatus',
label: 'Physical LED State',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label Should be taken from the translation file.

@@ -228,8 +250,25 @@ export default {
uri: row.uri,
identifyLed: row.identifyLed,
})
.then((message) => this.successToast(message))
.catch(({ message }) => this.errorToast(message));
.then(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successtoast will still be required.

@@ -194,6 +213,11 @@ export default {
label: this.$t('pageInventory.table.identifyLed'),
formatter: this.dataFormatter,
},
{
key: 'ledStatus',
label: 'Physical LED State',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Label should be taken from the translation file

@@ -260,8 +284,17 @@ export default {
memberId: row.id,
identifyLed: row.identifyLed,
})
.then((message) => this.successToast(message))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

success toast message will still be needed

@@ -151,6 +161,11 @@ export default {
label: this.$t('pageInventory.table.identifyLed'),
formatter: this.dataFormatter,
},
{
key: 'ledStatus',
label: 'Physical LED State',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label must be taken from the translation file

@@ -134,6 +145,11 @@ export default {
label: this.$t('pageInventory.table.identifyLed'),
formatter: this.dataFormatter,
},
{
key: 'ledStatus',
label: 'Physical LED State',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label must be taken from the translation file

@@ -157,8 +173,21 @@ export default {
uri: row.uri,
identifyLed: row.identifyLed,
})
.then((message) => this.successToast(message))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

success toast message would still be required.

this.$store
.dispatch('powerSupply/updateIdentifyLedValue', {
uri: row.uri,
identifyLed: row.identifyLed,
})
.then((message) => this.successToast(message))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

success toast will still be required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants