Ceph : Issueshttps://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2020-07-29T11:08:26ZCeph
Redmine Dashboard - Cleanup #46750 (Resolved): mgr/dashboard: Merge disable and disableDesc table action ...https://tracker.ceph.com/issues/467502020-07-29T11:08:26ZTiago Melo
<p>Currently we have to separate methods to calculate if a action is disabled and if it should display any description.<br />By merging both we reduce duplicated code, keeping the same functionality.</p> Dashboard - Feature #45934 (Resolved): mgr/dashboard: Use SASS's new Modules instead of the old @...https://tracker.ceph.com/issues/459342020-06-08T11:32:05ZEnno Gottholdmatrixfueller@gmail.com
<p>SASS recently announced its new module system (see: <a class="external" href="https://sass-lang.com/blog/the-module-system-is-launched">https://sass-lang.com/blog/the-module-system-is-launched</a>). This means that of the 1st October 2022 most likely our code won't compile with the most up to date SASS version.</p> Dashboard - Cleanup #43375 (Resolved): mgr/dashboard: replace doc URL literals in TS code withhttps://tracker.ceph.com/issues/433752019-12-18T20:20:21ZErnesto Puerta
<p>This comes from the need to update upstream doc URLs to downstream ones. Being these literals scattered across the front-end code makes them harder to find/update/fix them.</p>
<p>The immediate fix would be to move these strings to a shared constants file (e.g.: <code>shared/constants/app.constants</code> like <code>DocUrls</code> static class), but given upstream URLs use Javascript template literals for pointing to the proper release (e.g.: <code>`http://docs.ceph.com/docs/${releaseName}/mgr/dashboard/`</code>), that doesn't work when the interpolated variable does not exists (now that variable is calculated live from back-end provided version). IMHO this could be easily fixed by using explicit version name in the same constant file (we cannot avoid the need of manually hardcoding the mapping between ceph versions and release names at least once).</p>
<p>As a result of this refactor, dashboard components (DashboardHelp, RGW, NFS, iSCSI, Grafana) would only need to point to a valid Ceph-Dashboard docs anchor ("#enabling-the-object-gateway-management-frontend", "#configuring-nfs-ganesha-in-the-dashboard", "#enabling-iscsi-management", ...).</p>
<p>PG Calculator link should also be extracted.</p>
<p>Additionally, it could be interesting to explore how to better link, integrate (and maintain) dashboard with Ceph documentation (by connecting dashboard components to Ceph docs structure, and provide help with context-sensitive or index-based searches). AFAIK most tools to integrate this into web applications are proprietary ones.</p> Dashboard - Bug #42794 (New): mgr/dashboard: align front-end and back-end validation with core Ce...https://tracker.ceph.com/issues/427942019-11-13T11:08:40ZErnesto Puerta
<p>Currently we have validation in the front-end that it's stricter than core Ceph one.</p>
<p>As an example: for pool names we only allow <code>[.A-Za-z0-9_/-]</code> chars, that is, ASCII alphanum + some special chars (<code>_/-</code>). However, the type for Pool names in core Ceph is <code>CephPoolname</code> which turns out to be a Python <code>str</code>, essentially any <code>utf-8</code> char:</p>
<pre>
$ ceph osd pool create 'hello world'
pool 'hello world' created
$ ceph osd pool create 'ñûôç'
pool 'ñûôç' created
</pre>
That could happen also to other data types (RBD image names, snapshots, RGW users, etc.). In order to align this, there are different approaches available:
<ul>
<li>Manually creating Angular Custom Validators in the front-end aligned with the core Ceph types (<code>src/pybind/ceph_argparse.py</code>): <code>CdValidators.cephPoolname</code>.</li>
<li>Driving validation from the back-end. Being Python too, it might consume <code>ceph_argparse.py</code> types and automatically perform validation against actual core supported types. However, back-end driven validation (while necessary) results in a less responsive front-end behavior, even if that happens asynchronously in the background (data needs to go a round-trip).</li>
<li>The ultimate approach could be extract Ceph data types from <code>ceph_argparse.py</code> and use a cross-language data typing/model specification framework, like <a href="https://json-schema.org/" class="external">Json-schema</a>. Json-schema validators are implemented for a lot of programmming languages (JS, Python, C++, Go...).</li>
</ul>
<pre><code class="json syntaxhl"><span class="CodeRay">{
<span class="key"><span class="delimiter">"</span><span class="content">$id</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">https://ceph.com/schemas/master/poolname.schema.json</span><span class="delimiter">"</span></span>,
<span class="key"><span class="delimiter">"</span><span class="content">$schema</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">http://json-schema.org/draft-07/schema#</span><span class="delimiter">"</span></span>,
<span class="key"><span class="delimiter">"</span><span class="content">title</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">CephPoolname</span><span class="delimiter">"</span></span>,
<span class="key"><span class="delimiter">"</span><span class="content">type</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">string</span><span class="delimiter">"</span></span>,
<span class="key"><span class="delimiter">"</span><span class="content">pattern</span><span class="delimiter">"</span></span>: <span class="string"><span class="delimiter">"</span><span class="content">/...<whatever>.../</span><span class="delimiter">"</span></span>
}
</span></code></pre>