hwsc-org / hwsc-frontend Goto Github PK
View Code? Open in Web Editor NEWProvides GUI for HWSC user
Provides GUI for HWSC user
As a developer, I want to group all user related operations and states in a user store module.
As a user, I want to be able to login using my email and password
ViewLogin.vue
should be classified as Vue views. Official DocTheLogin.vue
should defined as a Vue component. Official DocAs a developer I want to lint unused imports e.g.
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import HelloWorld from '@/components/HelloWorld.vue';
@Component
export default class App extends Vue {
}
</script>
Note that HelloWorld
is not being used.
References:
https://vuejs.github.io/eslint-plugin-vue/rules/
https://eslint.org/docs/rules/
Set up internationalization plugin
Ts lint complains of type issues with grpc-web
package, and is stopping unit testing for now.
It is fixed with this commit. Just awaiting release.
hwsc-frontend/tests/unit/store/gateway/mutations.spec.ts
npm run test:unit
As a developer, I want to use docker-compose
to run services locally and in the pipeline for frontend development.
For this task, I highly recommend looking at the docker-compose file in app-gateway-svc.
Start with user-svc, PSQL, and app-gateway-svc. Add the remaining services as required.
Create more folder structure to better organize files
As of May 6th, 2019
, running npm install
produced the following warnings:
found 98 vulnerabilities (73 low, 9 moderate, 16 high) in 33024 scanned packages
run `npm audit fix` to fix 97 of them.
1 vulnerability requires semver-major dependency updates.
node_modules
foldernpm install
As a user, I want to maintain my authenticated session using my browsers local storage and history.
This task includes the following:
Reference: https://hwsc-org.github.io/wikis/app-gateway-svc/epics.html#getnewauthtoken
For this task, I would recommend the to do the following prior to starting this task.
login
action that saves the current user's uuid, auth token, token expiration in browser's local storage
.router
const routes = [
{ path: '/', component: WelcomePage },
{ path: '/login', component: SigninPage },
{
path: '/dashboard',
component: DashboardPage,
beforeEnter (to, from, next) {
if (store.state.token) {
next()
} else {
next('/login')
}
}
}
]
logout
action that clears the user's uuid, auth token, token expiration from the browser's local local storage, and routes to a login or signin page
auto-login
action that attempts to login the user using the auth data stored in the browser's local storage during the created
lifecycle hook of App.vue
. If the authentication has expired, then route to the proper page. Hopefully, this covers keeping the session after restarting and refreshing the browser.dispatch
another action to automatically get a new auth token per epic requirement using possibly setInterval(func, interval)
. This action can be possibly be dispatched within login
action.As a developer, I need to use vuejs-logger within vuex store
Re-bootstrap the outdated hwsc-frontend
repo using the newest version of Vue CLI so that team can work with the latest versions of technology.
TODO
TODO
As a developer, I want to encapsulate all properties and methods related to User in a class.
Reference https://github.com/hwsc-org/hwsc-api-blocks/blob/master/lib/user.proto to define User's properties.
Refer: hwsc-org/hwsc-app-gateway-svc#9 (comment)
Contains all states related to filters and methods that manipulate these states.
hard coded
Used in a dropdown menu to display to users the type of filters that are available and can choose from.
Filter types: publishers, call types, ground types, regions, oceans, sensor, sample rates, geographic coordinate, date
retrieved from backend
Used to generate a list of selectable, available publishers by their firstName and lastName. Sortable by firstName
or lastName
.
interface Publisher {
firstName: string;
lastName: string;
}
retrieved from backend
Used to generate a list of selectable, available call types, i.e: Herd, Friend, Feed Point, Dependency Migration.
retrieved from backend
Used to generate a list of selectable ground types, i.e: Social Ground, Atlas, Breeding Migrating.
retrieved from backend
Used to generate a list of selectable, available regions.
interface Region {
city: string;
country: string;
}
hard coded
Used to generate a list of selectable oceans.
Oceans: Pacific, Atlantic, Indian, Southern, and Arctic.
retrieved from backend
Used to generate a list of selectable, available sensor by their tag
and name
. Sortable by tag
or name
.
interface Sensor {
tag: string;
name: string;
}
some state
is not set
for whatever you need
.some state
some block quote
so i can get css
We should check it out if we can add an authentication header in new AppGatewayServiceClient('http://localhost:50056', null, null);
instead of adding it as metadata per GRPC calls https://github.com/hwsc-org/hwsc-frontend/pull/21/files#r285904231
Originally posted by @faraonc in https://github.com/hwsc-org/hwsc-frontend/pull/21/files
TBD
As a user, I want to remove the hashmark and use my browsers history mode.
Reference: https://router.vuejs.org/guide/essentials/history-mode.html#html5-history-mode
Enable https://github.com/improbable-eng/grpc-web official grpc-web in our web app
GetStatus
with app-gateway-svc
using docker-compose
As a developer, I need to be able to create an account using a registration page
As a developer, I need a test page to test styles.
As a user, I want to be able to click on a dropdown menu button and select my preferred language (if available).
Resources:
i18n vue locale changing
vue-flag-icon
example use of vue-flag-icon
Article on how to properly use flag icons
As a user, I want to query my metadata in a given index type e.g. oceanography
TODO needs an epic
The Vue.js's idiomatic way of managing state and http requests is through vuex actions
property.
I believe the recommended workflow is the following:
getters
, mutations
, actions
.actions
property due to the following reasons:
actions
can contain arbitrary asynchronous operationsmutations
property.Examples: https://vuex.vuejs.org/guide/actions.html
app-gateway-svc
client if still neededdispatch
from vue component -> commit
from vuex's action -> mutate the state from vuex's mutationapp-gateway-svc
client is not the only client. We should be able to use different clients within Vuex's mutations
property e.g. elastic-search client
+ app-gateway-svc client
+ etc.
As a developer, I want to use the vuetify to manage my web app's theme.
https://vuetifyjs.com/en/getting-started/quick-start
As a developer, I need to have consistent styles that are only available and allowed for the web app.
Libraries(CSS) for the following:
As a user, I want the app to load the translations based on my browser language preference (if it is available).
If language specified in browser is not available in the app, default english
will be used.
User has to be able to register an account using the following information:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.