Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
131 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
<div> | ||
<v-dialog :value="true" persistent=""> | ||
<v-card hover="" style="background:white;"> | ||
<v-card-row class="deep-purple darken-1"> | ||
<v-card-title class="white--text"> | ||
<div class="text-xs-center"> {{$t("Login")}}</div> | ||
</v-card-title> | ||
</v-card-row> | ||
<v-card-row> | ||
<v-card-text class="pt-4"> | ||
<v-form v-model="model" action="login" :fields="fields" @success="onSuccess" submitButtonText="Login"> | ||
<div class="flex pb-2"><small>{{$t("* Indicates required field")}}</small></div> | ||
</v-form> | ||
</v-card-text> | ||
</v-card-row> | ||
</v-card> | ||
</v-dialog> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data () { | ||
return { | ||
model: { | ||
username: 'admin', | ||
password: '123456' | ||
}, | ||
fields: { | ||
username: { label: 'Username' }, | ||
password: { label: 'Password', type: 'password' } | ||
}, | ||
show: true | ||
} | ||
}, | ||
methods: { | ||
onSuccess (data) { | ||
this.$store.commit('setAuth', data) | ||
this.$router.replace('/') | ||
} | ||
}, | ||
mounted () { | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
body{ | ||
background: #666 !important; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const discovery_config = { | ||
'endpoint':'http://127.0.0.1:3000' | ||
} | ||
|
||
export { | ||
discovery_config | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import axios from 'axios' | ||
import { discovery_config } from './config' | ||
|
||
class Discovery { | ||
constructor(endpoint) { | ||
self.endpoint = endpoint | ||
} | ||
} | ||
|
||
const discovery = Discovery(discovery_config.endpoint) | ||
|
||
export { | ||
discovery | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import axios from 'axios' | ||
import { discovery_config } from './config' | ||
|
||
class Discovery { | ||
constructor(endpoint) { | ||
self.endpoint = endpoint | ||
} | ||
getSystemStatus () { | ||
return new Promise((resolve, reject) => { | ||
resolve({ | ||
'status':'ok' | ||
}) | ||
}) | ||
} | ||
} | ||
|
||
const discovery = Discovery(discovery_config.endpoint) | ||
|
||
export { | ||
discovery | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
function getMenus () { | ||
return [ | ||
{ 'header': 'Admin' }, | ||
{ 'href': '/', 'title': 'Home', 'icon': 'home' }, | ||
{ 'href': '/local/package', 'title': 'Packages', 'icon': 'view_list' }, | ||
{ 'href': '/local/pretrained', 'title': 'Pre-trained', 'icon': 'view_list' }, | ||
{ 'header': 'System' }, | ||
{ 'href': '/settings', 'title': 'Settings', 'icon': 'settings' }, | ||
{ 'href': '/login', 'icon': 'lock', 'title': 'Logout' } | ||
] | ||
} | ||
|
||
export { | ||
getMenus | ||
} |