Skip to content

Commit 03d8ebc

Browse files
authored
feat(object-storage): ceph-specific notes (#1871)
1 parent 094af43 commit 03d8ebc

File tree

3 files changed

+38
-29
lines changed

3 files changed

+38
-29
lines changed

app/javascript/lib/widget.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ class Widget {
6767
setPolicy(policy)
6868
}
6969

70-
render(container) {
70+
render(container, props = {}) {
7171
// const Container = React.createElement(container, this.config.params)
7272
for (let reactContainer of this.reactContainers) {
7373
let dataset = getDataset(reactContainer)
74-
let wrappedComponent = React.createElement(container, Object.assign({}, dataset, this.config.params))
74+
let wrappedComponent = React.createElement(container, Object.assign({}, dataset, this.config.params, props))
7575

7676
if (!reactContainer) continue
7777
if (this.store) {

plugins/object_storage/app/javascript/widgets/app/App.jsx

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,26 @@ import Router from "./Router"
66

77
const App = (props) => (
88
<StateProvider>
9-
<Router
10-
baseName={props.baseName}
11-
resourcesPath={props.resourcesPath}
12-
projectPath={props.projectPath}
13-
/>
9+
{props.serviceName === "ceph" && (
10+
<>
11+
<div className="bs-callout bs-callout-info">
12+
<h5>Note for Ceph</h5>
13+
<p>
14+
This view uses the Swift API to display bucket contents and basic object storage information. While suitable
15+
for standard operations, some S3-specific features, such as bucket versioning, object versions, and delete
16+
markers are not fully visible or manageable through the dashboard.
17+
</p>
18+
<p>
19+
Buckets with S3 versioning enabled cannot be deleted using the dashboard and may only be fully inspected or
20+
managed via S3 CLI tools. This limitation is due to fundamental differences between the Swift and S3 APIs in
21+
Ceph RGW. For full and accurate access to all Ceph object storage features, especially when working with
22+
versioned buckets, we strongly recommend using S3-compatible tools such as `aws s3api` or other S3 CLI/SDK
23+
tools.
24+
</p>
25+
</div>
26+
</>
27+
)}
28+
<Router baseName={props.baseName} resourcesPath={props.resourcesPath} projectPath={props.projectPath} />
1429
</StateProvider>
1530
)
1631

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
import { createWidget } from "lib/widget"
2-
import {
3-
setApiClient,
4-
setServiceName,
5-
setServiceEndpoint,
6-
} from "./lib/apiClient"
2+
import { setApiClient, setServiceName, setServiceEndpoint } from "./lib/apiClient"
73
import { createAjaxHelper } from "lib/ajax_helper"
84
import App from "./App"
95

10-
createWidget({ pluginName: "object_storage", widgetName: "app" }).then(
11-
(widget) => {
12-
const baseURL = widget.config.scriptParams.baseName
13-
// split baseURL by "/" ignoring the trailing slash
14-
const parts = baseURL.split("/").filter((part) => part)
15-
const [domain, project, plugin, serviceName] = parts
16-
const ajaxHelper = createAjaxHelper({
17-
//baseURL: widget.config.scriptParams.baseName,
18-
baseURL: `/${domain}/${project}/${plugin}`,
19-
})
20-
setApiClient(ajaxHelper)
21-
setServiceName(serviceName)
22-
setServiceEndpoint(widget.config.scriptParams.serviceEndpoint)
23-
widget.setPolicy()
24-
widget.render(App)
25-
}
26-
)
6+
createWidget({ pluginName: "object_storage", widgetName: "app" }).then((widget) => {
7+
const baseURL = widget.config.scriptParams.baseName
8+
// split baseURL by "/" ignoring the trailing slash
9+
const parts = baseURL.split("/").filter((part) => part)
10+
const [domain, project, plugin, serviceName] = parts
11+
const ajaxHelper = createAjaxHelper({
12+
//baseURL: widget.config.scriptParams.baseName,
13+
baseURL: `/${domain}/${project}/${plugin}`,
14+
})
15+
setApiClient(ajaxHelper)
16+
setServiceName(serviceName)
17+
setServiceEndpoint(widget.config.scriptParams.serviceEndpoint)
18+
widget.setPolicy()
19+
widget.render(App, { serviceName: serviceName })
20+
})

0 commit comments

Comments
 (0)