IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Переглянути джерело

A basic navigation is in place.

pull/1/head
Stanislaw Adaszewski 4 роки тому
джерело
коміт
a5f2377b65
6 змінених файлів з 43 додано та 29 видалено
  1. +9
    -1
      backend/srv.py
  2. +0
    -2
      frontend/package.json
  3. +1
    -1
      frontend/rollup.config.js
  4. +13
    -24
      frontend/src/js/component/wb-app.js
  5. +1
    -1
      frontend/src/js/component/wb-project-listing.js
  6. +19
    -0
      frontend/src/js/page/wb-browse.js

+ 9
- 1
backend/srv.py Переглянути файл

@@ -1,7 +1,15 @@
import BaseHTTPServer, SimpleHTTPServer
import ssl

httpd = BaseHTTPServer.HTTPServer(('0.0.0.0', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler)
class RequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
print(self.path)
if '.' not in self.path:
self.path = '/'
SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
# RequestHandler, self).do_GET()

httpd = BaseHTTPServer.HTTPServer(('0.0.0.0', 4443), RequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='/pstore/home/adaszews/workspace/arvados-workbench-advanced/backend/server.pem', server_side=True)
httpd.serve_forever()


+ 0
- 2
frontend/package.json Переглянути файл

@@ -2,13 +2,11 @@
"dependencies": {
"@fortawesome/fontawesome-free": "^5.12.0",
"bootstrap": "^4.4.1",
"font-awesome": "^4.7.0",
"jquery": "^3.4.1",
"linkstate": "^1.1.1",
"popper.js": "^1.16.1",
"preact": "^8.2.9",
"preact-router": "^2.6.1",
"random-bytes": "^1.0.0",
"rollup": "^0.62.0",
"rollup-plugin-buble": "^0.19.2",
"rollup-plugin-copy": "^0.2.3",


+ 1
- 1
frontend/rollup.config.js Переглянути файл

@@ -16,7 +16,7 @@ export default {
},
plugins: [
includePaths({
paths: ['src/js', 'src/js/widget', 'src/js/misc', 'src/js/component']
paths: ['src/js', 'src/js/widget', 'src/js/misc', 'src/js/component', 'src/js/page']
}),
copy({
'src/html/index.html': 'dist/index.html',


+ 13
- 24
frontend/src/js/component/wb-app.js Переглянути файл

@@ -1,37 +1,26 @@
import { h, Component } from 'preact';
import { Router, route } from 'preact-router';
import WBTabs from 'wb-tabs';
import WBTable from 'wb-table';
import WBPagination from 'wb-pagination';
import WBProjectListing from 'wb-project-listing';
import WBNavbar from 'wb-navbar';
import WBBrowse from 'wb-browse';
class WBApp extends Component {
render({}, { activePage }) {
return (
<div>
<h1>WBApp <i class="fab fa-adobe"></i></h1>
<WBNavbar />
<WBProjectListing arvHost="api.arkau.roche.com"
arvToken="v2/arkau-gj3su-uf4hnu2o2qkvm8j/15kla38mafzq6b31d5t74ynhk6iuy32v1ticslodr0obvvhde9"
itemsPerPage="5" />
<WBPagination numPages={ 0 } activePage={ 0 } />
<WBPagination numPages={ 100 } activePage={ activePage || 0 }
onPageChanged={ i => this.setState({ 'activePage': i }) } />
<WBTable
columns={ [ 'Name', 'Description', 'Size' ] }
rows={ [
[ 'Name', 'Description', '0 bytes'],
[ 'Name', 'Description', '0 bytes'],
[ 'Name', 'Description', '0 bytes'],
[ 'Name', 'Description', '0 bytes'],
[ 'Name', 'Description', '0 bytes']
] } />
<WBTabs tabs={ [
{ 'name': 'Ala', 'isActive': true },
"Ma",
{ 'name': 'Kota', 'isDisabled': true }
] } onTabChanged={ idx => alert(idx) } />
</div>
<Router>
<div path="/">
Hello, world!
</div>
<div path="/login">
<WBNavbar />
</div>
<WBBrowse path="/browse/:ownerUuid?" />
</Router>
);
}
}


+ 1
- 1
frontend/src/js/component/wb-project-listing.js Переглянути файл

@@ -29,7 +29,7 @@ class WBProjectListing extends Component {
let filters = [
[ 'group_class', '=', 'project' ]
];
if (this.props.ownerUuid !== null)
if (this.props.ownerUuid)
filters.push([ 'owner_uuid', '=', this.props.ownerUuid ]);
let prom = makeArvadosRequest(this.props.arvHost, this.props.arvToken,
'/arvados/v1/groups?filters=' + encodeURIComponent(JSON.stringify(filters)) +


+ 19
- 0
frontend/src/js/page/wb-browse.js Переглянути файл

@@ -0,0 +1,19 @@
import { h, Component } from 'preact';
import WBNavbar from 'wb-navbar';
import WBProjectListing from 'wb-project-listing';
class WBBrowse extends Component {
render({ ownerUuid }) {
return (
<div>
<WBNavbar />
<WBProjectListing arvHost="api.arkau.roche.com"
arvToken="v2/arkau-gj3su-uf4hnu2o2qkvm8j/15kla38mafzq6b31d5t74ynhk6iuy32v1ticslodr0obvvhde9"
ownerUuid={ ownerUuid }
itemsPerPage="5" />
</div>
);
}
}
export default WBBrowse;

Завантаження…
Відмінити
Зберегти