Merge changes I36beff43,Iab7275b9 am: 503e12a866 am: 4d21078ab9
Original change: https://android-review.googlesource.com/c/platform/development/+/1781347 Change-Id: Ibc02cc4e8879b290f5826f691a21f8bf400cb291
This commit is contained in:
@@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from 'vue-router'
|
|||||||
import PackageAnalysis from '@/views/PackageAnalysis.vue'
|
import PackageAnalysis from '@/views/PackageAnalysis.vue'
|
||||||
import Demo from'@/views/Demo.vue'
|
import Demo from'@/views/Demo.vue'
|
||||||
import About from '@/views/About.vue'
|
import About from '@/views/About.vue'
|
||||||
|
import NotFound from '@/views/NotFound.vue'
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
@@ -21,6 +22,11 @@ const routes = [
|
|||||||
path: '/about',
|
path: '/about',
|
||||||
name: 'About',
|
name: 'About',
|
||||||
component: About
|
component: About
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/:catchAll(.*)',
|
||||||
|
name: 'Not Found',
|
||||||
|
component: NotFound
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
21
tools/ota_analysis/src/views/NotFound.vue
Normal file
21
tools/ota_analysis/src/views/NotFound.vue
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<center>
|
||||||
|
<h1>Not Found!</h1>
|
||||||
|
<p>
|
||||||
|
<a href="/">Go home?</a>
|
||||||
|
</p>
|
||||||
|
</center>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
center {
|
||||||
|
margin: 15vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: var(--border);
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -179,7 +179,7 @@ class ProcessesManagement:
|
|||||||
if args['extra_keys']:
|
if args['extra_keys']:
|
||||||
args['extra'] += '--' + ' --'.join(args['extra_keys'])
|
args['extra'] += '--' + ' --'.join(args['extra_keys'])
|
||||||
if args['extra']:
|
if args['extra']:
|
||||||
command.append(args['extra'])
|
command += args['extra'].split(' ')
|
||||||
command.append('-k')
|
command.append('-k')
|
||||||
command.append(
|
command.append(
|
||||||
'../../../build/make/target/product/security/testkey')
|
'../../../build/make/target/product/security/testkey')
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
display: function (row) {
|
display: function (row) {
|
||||||
return (
|
return (
|
||||||
"<a href=/check/" + row.id + '>'
|
"<a href=/check-job/" + row.id + '>'
|
||||||
+ row.status
|
+ row.status
|
||||||
+ "</a>"
|
+ "</a>"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import JobList from '@/views/JobList.vue'
|
|||||||
import JobDetails from '@/views/JobDetails.vue'
|
import JobDetails from '@/views/JobDetails.vue'
|
||||||
import About from '@/views/About.vue'
|
import About from '@/views/About.vue'
|
||||||
import JobConfigure from '@/views/JobConfigure.vue'
|
import JobConfigure from '@/views/JobConfigure.vue'
|
||||||
|
import NotFound from '@/views/NotFound.vue'
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
@@ -11,7 +12,7 @@ const routes = [
|
|||||||
component: JobList
|
component: JobList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/check/:id',
|
path: '/check-job/:id',
|
||||||
name: 'JobDetails',
|
name: 'JobDetails',
|
||||||
props: true,
|
props: true,
|
||||||
component: JobDetails
|
component: JobDetails
|
||||||
@@ -25,6 +26,11 @@ const routes = [
|
|||||||
path: '/create',
|
path: '/create',
|
||||||
name: 'Create',
|
name: 'Create',
|
||||||
component: JobConfigure
|
component: JobConfigure
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/:catchAll(.*)',
|
||||||
|
name: 'Not Found',
|
||||||
|
component: NotFound
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
21
tools/otagui/src/views/NotFound.vue
Normal file
21
tools/otagui/src/views/NotFound.vue
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<center>
|
||||||
|
<h1>Not Found!</h1>
|
||||||
|
<p>
|
||||||
|
<a href="/">Go home?</a>
|
||||||
|
</p>
|
||||||
|
</center>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
center {
|
||||||
|
margin: 15vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: var(--border);
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -64,7 +64,6 @@ class RequestHandler(CORSSimpleHTTPHandler):
|
|||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
|
||||||
def do_GET(self):
|
def do_GET(self):
|
||||||
if self.path.startswith('/check'):
|
|
||||||
if self.path == '/check' or self.path == '/check/':
|
if self.path == '/check' or self.path == '/check/':
|
||||||
statuses = jobs.get_status()
|
statuses = jobs.get_status()
|
||||||
self._set_response(type='application/json')
|
self._set_response(type='application/json')
|
||||||
@@ -72,14 +71,13 @@ class RequestHandler(CORSSimpleHTTPHandler):
|
|||||||
json.dumps([status.to_dict_basic()
|
json.dumps([status.to_dict_basic()
|
||||||
for status in statuses]).encode()
|
for status in statuses]).encode()
|
||||||
)
|
)
|
||||||
else:
|
elif self.path.startswith('/check/'):
|
||||||
id = self.path[7:]
|
id = self.path[7:]
|
||||||
status = jobs.get_status_by_ID(id=id)
|
status = jobs.get_status_by_ID(id=id)
|
||||||
self._set_response(type='application/json')
|
self._set_response(type='application/json')
|
||||||
self.wfile.write(
|
self.wfile.write(
|
||||||
json.dumps(status.to_dict_detail(target_lib)).encode()
|
json.dumps(status.to_dict_detail(target_lib)).encode()
|
||||||
)
|
)
|
||||||
return
|
|
||||||
elif self.path.startswith('/file'):
|
elif self.path.startswith('/file'):
|
||||||
if self.path == '/file' or self.path == '/file/':
|
if self.path == '/file' or self.path == '/file/':
|
||||||
file_list = target_lib.get_builds()
|
file_list = target_lib.get_builds()
|
||||||
@@ -98,6 +96,10 @@ class RequestHandler(CORSSimpleHTTPHandler):
|
|||||||
elif self.path.startswith('/download'):
|
elif self.path.startswith('/download'):
|
||||||
self.path = self.path[10:]
|
self.path = self.path[10:]
|
||||||
return CORSSimpleHTTPHandler.do_GET(self)
|
return CORSSimpleHTTPHandler.do_GET(self)
|
||||||
|
else:
|
||||||
|
if not os.path.exists('dist' + self.path):
|
||||||
|
logging.info('redirect to dist')
|
||||||
|
self.path = '/dist/'
|
||||||
else:
|
else:
|
||||||
self.path = '/dist' + self.path
|
self.path = '/dist' + self.path
|
||||||
return CORSSimpleHTTPHandler.do_GET(self)
|
return CORSSimpleHTTPHandler.do_GET(self)
|
||||||
|
|||||||
Reference in New Issue
Block a user