|
@@ -24,22 +24,28 @@
|
|
|
|
|
|
<h2 class="mb-3">Docker Run</h2>
|
|
<h2 class="mb-3">Docker Run</h2>
|
|
<div class="mb-3">
|
|
<div class="mb-3">
|
|
- <textarea id="name" v-model="dockerRunCommand" type="text" class="form-control docker-run" required placeholder="docker run ..."></textarea>
|
|
|
|
|
|
+ <textarea id="name" v-model="dockerRunCommand" type="text" class="form-control docker-run" required
|
|
|
|
+ placeholder="docker run ..."></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <button class="btn-normal btn" @click="convertDockerRun">Convert to Compose</button>
|
|
|
|
|
|
+ <button class="btn-normal btn mb-4" @click="convertDockerRun">Convert to Compose</button>
|
|
|
|
+
|
|
|
|
+ <h2 class="mb-3">Import from URL</h2>
|
|
|
|
+ <div class="mb-3">
|
|
|
|
+ <input id="url" v-model="importUrl" class="form-control import-url" required placeholder="URL"/>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <button class="btn-normal btn" @click="importFromUrl">Import</button>
|
|
</div>
|
|
</div>
|
|
</transition>
|
|
</transition>
|
|
- <router-view ref="child" />
|
|
|
|
|
|
+ <router-view ref="child"/>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { statusNameShort } from "../../../backend/util-common";
|
|
|
|
|
|
+import {statusNameShort} from "../../../backend/util-common";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- components: {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
|
|
+ components: {},
|
|
props: {
|
|
props: {
|
|
calculatedHeight: {
|
|
calculatedHeight: {
|
|
type: Number,
|
|
type: Number,
|
|
@@ -58,6 +64,7 @@ export default {
|
|
importantHeartBeatListLength: 0,
|
|
importantHeartBeatListLength: 0,
|
|
displayedRecords: [],
|
|
displayedRecords: [],
|
|
dockerRunCommand: "",
|
|
dockerRunCommand: "",
|
|
|
|
+ importUrl: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -127,6 +134,18 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ importFromUrl() {
|
|
|
|
+ fetch(this.importUrl)
|
|
|
|
+ .then(res => res.text())
|
|
|
|
+ .then(text => {
|
|
|
|
+ this.$root.composeTemplate = text;
|
|
|
|
+ this.$router.push("/compose");
|
|
|
|
+ })
|
|
|
|
+ .catch(err => {
|
|
|
|
+ this.$root.toastError(err);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Updates the displayed records when a new important heartbeat arrives.
|
|
* Updates the displayed records when a new important heartbeat arrives.
|
|
* @param {object} heartbeat - The heartbeat object received.
|
|
* @param {object} heartbeat - The heartbeat object received.
|
|
@@ -230,4 +249,11 @@ table {
|
|
font-family: 'JetBrains Mono', monospace;
|
|
font-family: 'JetBrains Mono', monospace;
|
|
font-size: 15px;
|
|
font-size: 15px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.import-url {
|
|
|
|
+ background-color: $dark-bg !important;
|
|
|
|
+ border: none;
|
|
|
|
+ font-family: 'JetBrains Mono', monospace;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|