Skip to content

Conversation

@phillxnet
Copy link
Member

Intended primarily to improve the developer experience.

Fixes #2891

  • Remove prior ancient/legacy admin template overrides.
  • Add previously missing URL entry for admin site.
  • Enable admin docs site, along with matching URL.
  • Remove redundant admin.autodiscover() use.
  • Update Django admin config to reflect more the current project state.
  • Add basic admin site config for:
  • All storageadmin app models: Share, Snapshot, Disk, Pool, SambaShare, SambaCustomConfig, SFTP, NFSExportGroup, NFSExport, IscsiTarget, PosixACLs, DVolume, DContainer, DCustomConfig, ContainerOption, DContainerLink, RockOn, DPort, DContainerArgs, DContainerLabel, DContainerEnv, DContainerDevice, DContainerNetwork, User, Group, DImage, PoolScrub, PoolBalance, BridgeConnection, BondConnection, TeamConnection, EthernetConnection, NetworkDevice, NetworkConnection, APIKeys, Appliance, UpdateSubscription, AdvancedNFSExport, SupportCase, DashboardConfig, Setup, Plugin, InstalledPlugin, OauthApp, TLSCertificate, SMARTInfo, SMARTCapability, SMARTAttribute, SMARTErrorLog, SMARTTestLog, SMARTTestLogDetail, SMARTIdentity, ConfigBackup, EmailClient, Pincard.
  • All smart_manager app models: CPUMetric, DiskStat, LoadAvg, MemInfo, NetStat, NFSDCallDistribution, NFSDClientDistribution, NFSDShareDistribution, NFSDUidGidDistribution, VmStat, SProbe, PoolUsage, Service, ServiceStatus, ShareUsage, Replica, ReplicaTrail, ReplicaShare, ReceiveTrail, TaskDefinition, Task.

Intended primarily to improve the developer experience.
- Remove prior ancient/legacy admin template overrides.
- Add previously missing url entry for admin.
- Enable admindocs, along with matching admin docs url.
- Remove redundant admin.autodiscover() use.
- Update Django admin config to reflect more the current project state.
- Add basic admin site config for:
- All storageadmin app models: Share, Snapshot, Disk, Pool, SambaShare,
  SambaCustomConfig, SFTP, NFSExportGroup, NFSExport, IscsiTarget, PosixACLs,
  DVolume, DContainer, DCustomConfig, ContainerOption, DContainerLink, RockOn,
  DPort, DContainerArgs, DContainerLabel, DContainerEnv, DContainerDevice,
  DContainerNetwork, User, Group, DImage, PoolScrub, PoolBalance, BridgeConnection,
  BondConnection, TeamConnection, EthernetConnection, NetworkDevice, NetworkConnection,
  APIKeys, Appliance, UpdateSubscription, AdvancedNFSExport, SupportCase,
  DashboardConfig, Setup, Plugin, InstalledPlugin, OauthApp, TLSCertificate, SMARTInfo,
  SMARTCapability, SMARTAttribute, SMARTErrorLog, SMARTTestLog, SMARTTestLogDetail,
  SMARTIdentity, ConfigBackup, EmailClient, Pincard.
- All smart_manager app models: CPUMetric, DiskStat, LoadAvg, MemInfo, NetStat,
  NFSDCallDistribution, NFSDClientDistribution, NFSDShareDistribution,
  NFSDUidGidDistribution, VmStat, SProbe, PoolUsage, Service, ServiceStatus,
  ShareUsage, Replica, ReplicaTrail, ReplicaShare, ReceiveTrail, TaskDefinition, Task.
@phillxnet phillxnet added the needs review Ideally by prior rockstor-core contributor label Feb 28, 2025
Copy link
Member

@FroggyFlox FroggyFlox left a comment

Choose a reason for hiding this comment

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

That looks amazing, @phillxnet, thanks a lot for taking the time to not only re-enable the Admin, but include all models and convenience info in many list views!

Just tested in Leap 15.6 and all worked well!

@phillxnet
Copy link
Member Author

@FroggyFlox Thanks, it was a bit of leg-work but at least we have an easier on-boading now for folks already familiar with Django's gem of the admin site. I'd like to link this in to your DDT work pending: but that should wait until the next testing phase given it's a little deeper than what was done here. I.e. it would be good to have the admin site similarly enabled, even if it's just the urls, akin to what you are lining up re DDT.

We have some model comment formatting changes to be done so the admindoc site can show them in every model entry. But I didn't want to push so many (any ideally) model file changes: even if they were comment change only. So we can deal with that in another pr when we are safely into the next testing phase also.

Thanks for the review, as always much appreciated. I'll get this merged shortly ready for the next rpm release also.

I'll try to get a doc issue/pr together soon to introduce the createuser requirement and the slightly non-standard (on purpose) url. This should make for a nice addition to our developers docs hopefully.

@phillxnet phillxnet removed the needs review Ideally by prior rockstor-core contributor label Mar 2, 2025
@phillxnet phillxnet merged commit 689cd33 into rockstor:testing Mar 2, 2025
@phillxnet phillxnet deleted the 2891-Re-establish-Django-admin-interface branch March 2, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants