Project

General

Profile

Feature #25686

Add Notes field to FreeNAS

Added by Stuart Espey about 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Lola Yang
Category:
GUI (new)
Estimated time:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

11-U2


Description

Many server web GUIs provide a notes field where configuration notes/details can be recorded for other admins.

AFAIK, FreeNAS does not have this capability.

It would be useful if there was a notes field on the System or System/General tabs whcih would allow miscellaneous information to be recorded, displayed, and backed up/restored via a config.


Related issues

Related to FreeNAS - Feature #27608: Add API for additional user attributesDone
Related to FreeNAS - Feature #27705: Add API to remove user attributes Done2018-01-08
Has duplicate FreeNAS - Feature #30558: Note SectionClosed2018-03-22

Associated revisions

Revision 7e3c2c77 (diff)
Added by Dru Lavigne almost 4 years ago

Add Enabled checkbox to Init/Scripts. Ticket: #25686

History

#1 Updated by Dru Lavigne about 4 years ago

  • Assignee changed from Release Council to Kris Moore

Over to Kris for consideration.

#2 Avatar?id=14398&size=24x24 Updated by Kris Moore about 4 years ago

  • Category changed from 2 to GUI (new)
  • Assignee changed from Kris Moore to Anonymous
  • Priority changed from No priority to Nice to have
  • Target version set to 11.2-BETA1

This is a good one, now that we have API call to "save" these notes / settings. Over to Erin for the new UI

#3 Updated by Anonymous about 4 years ago

  • Status changed from Unscreened to Screened

#4 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 4 years ago

Update on this one. It should be a "widget" that can be added to the dashboard along with other stat views and whatnot. Ideally we could support multiple text-widgets, so the user can leave various notes wherever they want. (I.E. maybe next to each reporting widget, the sysadmin leaves a note what to watch for)

#5 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 4 years ago

  • Assignee changed from Anonymous to Nesma Shah

#6 Updated by Nesma Shah almost 4 years ago

  • Status changed from Screened to 15
  • Assignee changed from Nesma Shah to Kris Moore

I have question regarding this as which API to call and what is the field configuration.?

#7 Updated by Nesma Shah almost 4 years ago

the update API for `account/users/1` is not adding notes to the user...

#8 Updated by Nesma Shah almost 4 years ago

  • Status changed from 15 to Fix In Progress
  • Assignee changed from Kris Moore to Nesma Shah

#9 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 4 years ago

  • Assignee changed from Nesma Shah to Peter Southwell

Pete, I know you used the user APIs to save theme settings, can you point Nesma in the right direction here?

#10 Updated by Nesma Shah almost 4 years ago

  • Assignee changed from Peter Southwell to Nesma Shah

Kris, I am able to get that cleared and Mostly I will able to get it done by tomorrow as need to check few things.

#11 Updated by Peter Southwell almost 4 years ago

./src/app/services/theme/theme.service.ts

Saving:

changeTheme(theme) {
domHelper.changeTheme(this.freenasThemes, theme.name);
this.freenasThemes.forEach((t) => {
t.isActive = (t.name === theme.name);
});

this.ws.call('user.update', [1, {
attributes: {
usertheme: theme.name
}
}]).subscribe((res_ws) => {
console.log("Saved usertheme:", res_ws, theme.name);
});
}

Note: usertheme I was the one that invented that name... So.. It can be...

attributes: {
whatevercustomfield: "something"
}

Pulling the variable back up...

I check the user to see if they have a usertheme attribute that exists.. And has a value.. If it does... I set the theme.

constructor(private rest: RestService, private ws: WebSocketService) {
this.rest.get("account/users/1", {}).subscribe((res) => {
this.savedUserTheme = res.data.bsdusr_attributes.usertheme;
this.freenasThemes.forEach((t) => {
t.isActive = (t.name === this.savedUserTheme);
});
if( typeof(this.savedUserTheme) !== "undefined" && this.savedUserTheme !== "" ) {
domHelper.changeTheme(this.freenasThemes, this.savedUserTheme);
}
});
}

Hope that helps. :)

#12 Updated by Nesma Shah almost 4 years ago

  • Status changed from Fix In Progress to Needs Developer Review
  • Assignee changed from Nesma Shah to Lola Yang

#13 Updated by Lola Yang almost 4 years ago

  • Status changed from Needs Developer Review to 15
  • Assignee changed from Lola Yang to Nesma Shah

Hi @Nesma1988, Your PR works, it enable to add a note. but it allows adding only one note. I have some suggestions:
1. should allow adding multiple notes, not only one.
2. list view for all notes
3. enable to update and delete existing notes.

#14 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 4 years ago

  • Assignee changed from Nesma Shah to Anonymous

#15 Updated by Dru Lavigne almost 4 years ago

  • Status changed from 15 to Unscreened
  • Assignee changed from Anonymous to Lola Yang

Lola: can you do the remaining work for this ticket?

#16 Updated by Lola Yang almost 4 years ago

  • Status changed from Unscreened to Screened

Dru Lavigne wrote:

Lola: can you do the remaining work for this ticket?

Okay.

#17 Updated by Lola Yang over 3 years ago

  • Related to Feature #27608: Add API for additional user attributes added

#18 Updated by Lola Yang over 3 years ago

  • Status changed from Screened to Fix In Progress
  • % Done changed from 0 to 90

#19 Updated by Lola Yang over 3 years ago

#20 Updated by Lola Yang over 3 years ago

  • Status changed from Fix In Progress to Needs Developer Review
  • Assignee changed from Lola Yang to Anonymous

#21 Updated by Dru Lavigne over 3 years ago

  • Status changed from Needs Developer Review to 46
  • Assignee changed from Anonymous to Lola Yang

Lola: this branch is out of date.

#22 Updated by Lola Yang over 3 years ago

Dru Lavigne wrote:

Lola: this branch is out of date.

The PR already merged to master by Erin.

#23 Updated by Dru Lavigne over 3 years ago

  • Status changed from 46 to Resolved
  • Target version changed from 11.2-BETA1 to Master - FreeNAS Nightlies

#24 Updated by Dru Lavigne over 3 years ago

Also available in: Atom PDF