update to pyapp
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<title>PyTorchBoot Project</title>
|
||||
<title>PyApp Project</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
21372
package-lock.json
generated
21372
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -78,9 +78,6 @@
|
||||
<Menu-item name="1">
|
||||
<Icon type="md-pie" size="16" />{{ sub_navi_name[0] }}
|
||||
</Menu-item>
|
||||
<Menu-item name="2">
|
||||
<Icon type="ios-stats" size="16" />{{ sub_navi_name[1] }}
|
||||
</Menu-item>
|
||||
</div>
|
||||
</Menu>
|
||||
<div class="layout-breadcrumb" >
|
||||
@@ -93,22 +90,21 @@
|
||||
<component :is="currentComponent"></component>
|
||||
</div>
|
||||
<div class="layout-copy">
|
||||
PyTorchBoot © Author: lexhofee@gmail.com
|
||||
PyApp © Author: lexhofee@gmail.com
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import Dashboard from '@/components/content/Dashboard.vue'
|
||||
import Tensorboard from '@/components/content/Tensorboard.vue'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
project_name: "PyTorchBoot",
|
||||
sub_navi_name: ["Project Dashboard", "Tensorboard"],
|
||||
project_name: "PyApp",
|
||||
sub_navi_name: ["Project Dashboard"],
|
||||
curr_sub_navi_idx: 0,
|
||||
components: [Dashboard, Tensorboard],
|
||||
components: [Dashboard],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
<template>
|
||||
<div style="padding: 20px;">
|
||||
<div style="display: flex; justify-content: center;">
|
||||
<h1>Tensorboard</h1>
|
||||
</div>
|
||||
<Divider />
|
||||
<Alert :type="notice_status" show-icon>
|
||||
{{ notice_msg }}
|
||||
</Alert>
|
||||
<Row style="padding-right: 20%; padding-left: 15%;">
|
||||
<Col :span="6">
|
||||
<span style="font-size: 16px; font-weight: bold;">Tensorboard Log Directory</span>
|
||||
</Col>
|
||||
<Col :span="15">
|
||||
<AutoComplete
|
||||
v-model="log_dir"
|
||||
:data="tensorboard_dirs"
|
||||
placeholder="Enter or choose one 'log_dir' ..."
|
||||
style="margin-bottom: 20px;">
|
||||
</AutoComplete>
|
||||
</Col>
|
||||
<Col offset="1">
|
||||
<Button icon="ios-play" type="primary" @click="run_tensorboard">Run</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
<Divider />
|
||||
<!-- TensorBoard iframe -->
|
||||
<Row type="flex" style="margin-top: 20px;">
|
||||
<Col v-for="(url, log_dir) in running_tensorboards" :key="url" :span="7" style="margin-right: 10px;">
|
||||
<Card>
|
||||
<p slot="title" style="font-weight: bold;">TensorBoard</p>
|
||||
<a :href="url" target="_blank" slot="extra">{{ url }}</a>
|
||||
<iframe :src="url" width="100%" height="400px" frameborder="0"></iframe>
|
||||
<Divider />
|
||||
<Tag>Log Directory:</Tag>
|
||||
<Input v-model="log_dir" type="textarea" readonly placeholder="Enter something..." />
|
||||
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
</Row>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Tensorboard',
|
||||
data() {
|
||||
return {
|
||||
log_dir: "", // Input field for the log directory
|
||||
notice_msg: "Please enter the log directory to run TensorBoard.",
|
||||
notice_status: "info",
|
||||
tensorboard_dirs: [],
|
||||
running_tensorboards: {}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.get_tensorboard_dirs();
|
||||
this.get_running_tensorboards();
|
||||
},
|
||||
methods: {
|
||||
run_tensorboard() {
|
||||
const params = { log_dir: this.log_dir };
|
||||
|
||||
this.$ajax.postjson("/tensorboard/run", params)
|
||||
.then((data) => {
|
||||
if (data.status === "success") {
|
||||
this.notice_msg = data.message;
|
||||
this.notice_status = "success";
|
||||
|
||||
} else if (data.status === "warning") {
|
||||
this.tensorboardUrl = data.url;
|
||||
this.notice_msg = data.message;
|
||||
this.notice_status = "warning";
|
||||
}
|
||||
else {
|
||||
this.notice_msg = data.message;
|
||||
this.notice_status = "error";
|
||||
}
|
||||
this.get_running_tensorboards();
|
||||
});
|
||||
|
||||
},
|
||||
get_tensorboard_dirs(){
|
||||
const params = { };
|
||||
this.$ajax.postjson("/tensorboard/dirs", params)
|
||||
.then((data) => {
|
||||
this.tensorboard_dirs = data.tensorboard_dirs;
|
||||
});
|
||||
},
|
||||
get_running_tensorboards(){
|
||||
const params = { };
|
||||
this.$ajax.postjson("/tensorboard/running_tensorboards", params)
|
||||
.then((data) => {
|
||||
this.running_tensorboards = data.running_tensorboards;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user