+ Share Object
+
+
+
+ (this.copyTextInput = node)}
+ readOnly="readOnly"
+ value={window.location.protocol + "//" + shareObjectDetails.url}
+ onClick={() => this.copyTextInput.select()}
+ />
+
+
+
+
+
+
this.updateExpireValue("days", 1)}
+ />
+ Days
+
+
+
+ this.updateExpireValue("days", -1)}
+ />
+
+
+
this.updateExpireValue("hours", 1)}
+ />
+ Hours
+
+
+
+ this.updateExpireValue("hours", -1)}
+ />
+
+
+
this.updateExpireValue("minutes", 1)}
+ />
+ Minutes
+
+
+
+ this.updateExpireValue("minutes", -1)}
+ />
+
+
+
+
+
+
+
+
+
+
+
+ )
+ }
+}
+
+const mapStateToProps = (state, ownProps) => {
+ return {
+ object: ownProps.object,
+ shareObjectDetails: state.objects.shareObject
+ }
+}
+
+const mapDispatchToProps = dispatch => {
+ return {
+ shareObject: (object, days, hours, minutes) =>
+ dispatch(objectsActions.shareObject(object, days, hours, minutes)),
+ hideShareObject: () => dispatch(objectsActions.hideShareObject()),
+ showCopyAlert: message =>
+ dispatch(alertActions.set({ type: "success", message: message }))
+ }
+}
+
+export default connect(mapStateToProps, mapDispatchToProps)(ShareObjectModal)
diff --git a/browser/app/js/objects/__tests__/DeleteObjectConfirmModal.test.js b/browser/app/js/objects/__tests__/DeleteObjectConfirmModal.test.js
new file mode 100644
index 000000000..d5536a225
--- /dev/null
+++ b/browser/app/js/objects/__tests__/DeleteObjectConfirmModal.test.js
@@ -0,0 +1,45 @@
+/*
+ * Minio Cloud Storage (C) 2018 Minio, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import React from "react"
+import { shallow } from "enzyme"
+import { DeleteObjectConfirmModal } from "../DeleteObjectConfirmModal"
+
+describe("DeleteObjectConfirmModal", () => {
+ it("should render without crashing", () => {
+ shallow(