|
@@ -10,9 +10,13 @@ import YAML from 'yaml'
|
|
|
|
|
|
const store = useStore()
|
|
|
const newDialogOpen = ref(false);
|
|
|
+const newServerConfigOpen = ref(false);
|
|
|
const newDialogDisabled = ref(false); //Disables buttons while loading project
|
|
|
const projectType = ref("ua");
|
|
|
|
|
|
+
|
|
|
+let sconfig = store.sConfig;
|
|
|
+
|
|
|
async function exportProject() {
|
|
|
const blob = await store.addressSpace?.exportProject();
|
|
|
if (blob)
|
|
@@ -28,6 +32,12 @@ function downloadBlob(blob: Blob, filename: string) {
|
|
|
document.body.removeChild(link);
|
|
|
}
|
|
|
|
|
|
+async function exportConf() {
|
|
|
+ const blob = await sconfig?.exportConfig();
|
|
|
+ if (blob)
|
|
|
+ downloadBlob(blob, "config.zip");
|
|
|
+}
|
|
|
+
|
|
|
async function newProject() {
|
|
|
newDialogDisabled.value = true;
|
|
|
store.addressSpace = new AddressSpace([] as UANodeSet[])
|
|
@@ -93,6 +103,7 @@ async function loadZip(file: File){
|
|
|
<div class="btn-group">
|
|
|
<button class="btn btn-light" @click.prevent="exportProject()">Export</button>
|
|
|
<button class="btn btn-light" @click="newDialogOpen = true">New project</button>
|
|
|
+ <button class="btn btn-light" @click="newServerConfigOpen = true">Server Config</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<p class="card-text">
|
|
@@ -138,6 +149,71 @@ async function loadZip(file: File){
|
|
|
<button @click="newProject()" :disabled="newDialogDisabled">OK</button>
|
|
|
<button @click="newDialogOpen = false" :disabled="newDialogDisabled">Cancel</button>
|
|
|
</v-dialog>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <v-dialog :open="newServerConfigOpen" @cancel="newServerConfigOpen = false">
|
|
|
+ <p>Server Configuration</p>
|
|
|
+ <div v-if="sconfig">
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text" id="inputGroup-sizing-default">Manufacturer Name</span>
|
|
|
+ </div>
|
|
|
+ <input type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" v-model="sconfig.manufacturerName" v-bind:key="'...'">
|
|
|
+ </div>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text" id="inputGroup-sizing-default">Product Name</span>
|
|
|
+ </div>
|
|
|
+ <input type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" v-model="sconfig.productName" v-bind:key="'...'">
|
|
|
+ </div>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text" id="inputGroup-sizing-default">Software Version</span>
|
|
|
+ </div>
|
|
|
+ <input type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" v-model="sconfig.softwareVersion" v-bind:key="'...'">
|
|
|
+ </div>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text" id="inputGroup-sizing-default">Application Name</span>
|
|
|
+ </div>
|
|
|
+ <input type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" v-model="sconfig.applicationName" v-bind:key="'...'">
|
|
|
+ </div>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text" id="inputGroup-sizing-default">Application Uri</span>
|
|
|
+ </div>
|
|
|
+ <input type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" v-model="sconfig.applicationUri" v-bind:key="'...'">
|
|
|
+ </div>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text" id="inputGroup-sizing-default">Product Uri</span>
|
|
|
+ </div>
|
|
|
+ <input type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" v-model="sconfig.productUri" v-bind:key="'...'">
|
|
|
+ </div>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text" id="inputGroup-sizing-default">Port</span>
|
|
|
+ </div>
|
|
|
+ <input type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" v-model="sconfig.port" v-bind:key="4840">
|
|
|
+ </div>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text" id="inputGroup-sizing-default">Max Connections Per Endpoint</span>
|
|
|
+ </div>
|
|
|
+ <input type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-default" v-model="sconfig.maxConnections" v-bind:key="100">
|
|
|
+ </div>
|
|
|
+ <div class="input-group mb-3">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <input type="checkbox" id="checkbox" v-model="sconfig.allowAnonymous" />
|
|
|
+ <label for="checkbox"> Allow Anonymous</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <button @click="exportConf()"> Export</button>
|
|
|
+ <button @click="newServerConfigOpen = false" :disabled="newDialogDisabled">Close</button>
|
|
|
+ </v-dialog>
|
|
|
</template>
|
|
|
|
|
|
|