-
- Tag
-
+
+
+ Tag
+
+ {
+ const confirmed = window.confirm('Are you sure you want to perform this action?');
+ if (confirmed) {
+ console.log('Button clicked and confirmed!');
+ console.log(props);
+ console.log('REPONAME: ', repoName);
+ const apiUrl = `http://localhost:3000/v2/${repoName}/manifests/${tag}`;
+ fetch(apiUrl, {
+ method: 'DELETE'
+ })
+ .then((response) => {
+ if (response.status === 202) {
+ // Tag deleted successfully
+ console.log('Tag deleted successfully');
+ // You may want to refresh the UI or perform other actions as needed
+ } else {
+ console.log('Failed to delete the tag');
+ // Handle the failure case here
+ }
+ })
+ .catch((error) => {
+ console.error('An error occurred:', error);
+ // Handle any network or request error
+ });
+ window.location.reload();
+ } else {
+ // User canceled the action
+ console.log('Button click canceled.');
+ }
+ console.log('Button clicked!');
+ //should hold repo name and tag [line 119 and 120]
+ }}
+ >
+
+
+
goToTags()}>
{repoName && `${repoName}:`}
{tag}
-
Created
diff --git a/src/components/Tag/TagDetails.jsx b/src/components/Tag/TagDetails.jsx
index a9579bd7..4dc587b1 100644
--- a/src/components/Tag/TagDetails.jsx
+++ b/src/components/Tag/TagDetails.jsx
@@ -148,7 +148,6 @@ function TagDetails() {
// get url param from {
diff --git a/src/host.js b/src/host.js
index 582b6ac4..32bbc7e2 100644
--- a/src/host.js
+++ b/src/host.js
@@ -1,6 +1,6 @@
const hostConfig = {
- auto: true,
- default: 'http://localhost:5000'
+ auto: false,
+ default: 'http://localhost:8080'
};
const host = (manualHost = null) => {
diff --git a/src/setupProxy.js b/src/setupProxy.js
new file mode 100644
index 00000000..52ae1d3d
--- /dev/null
+++ b/src/setupProxy.js
@@ -0,0 +1,11 @@
+const { createProxyMiddleware } = require('http-proxy-middleware');
+
+module.exports = function(app) {
+ app.use(
+ '/v2',
+ createProxyMiddleware({
+ target: 'http://localhost:8080',
+ changeOrigin: true,
+ })
+ );
+};
\ No newline at end of file