Граф коммитов

175 Коммитов

Автор SHA1 Сообщение Дата
Michael Berlin 14afc18998 web/vtctld2: Fix missing zero values in schema view e.g. for "# Rows".
I fixed this by changing the JSON marshaller of the vtctl commands: For
protobuf messages we now use the "jsonpb" package which supports
emitting fields with zero values.

We already used this approach in the vtctld API endpoints. I've moved
the code to the "vtctl" package to make it more generic.

A drawback of this approach is that it doesn't cope well with our *Info
objects e.g. ShardInfo because the type switch recognizes them as
proto.Message and they have unexported fields which let jsonpb panic. To
work-around this, I've changed the vtctl code to marshal only the
embedded protobuf message and not the full *Info object anymore.
2017-03-29 09:37:16 -07:00
Michael Berlin fc17abfde3 web/vtctld2: Fix schema display if a table has no primary key. 2017-03-29 07:41:40 -07:00
Yipei Wang a845e451e1 vtctld UI: Push the recent UI change of workflow creation dialogue. 2017-03-24 13:31:30 -07:00
wangyipei01 925addf07e workflow: Implement canary feature. (#2613)
User can control through UI for running a canary task,
then running the remaining tasks. Create unit tests
and manually test the UI in e2e test environment.
2017-03-14 20:48:55 -07:00
Alain Jobart 0b8e500cc6 ReloadSchema{Shard,Keyspace} and UI fixes.
- Adding vtctl ReloadSchema{Shard,Keyspace} commands.
- Adding ReloadSchema{Shard,Keyspace} to ui.
- Removing test workflow data to avoid flickering at startup.
- Fixing schema display in vtctld2 UI.
- Rebuild vtctl doc.
- Rebuilding UI.
2017-01-31 10:50:33 -08:00
Yipei Wang f90f0151da workflow: Add horizontal resharding workflow.
It supports creating workflow to reshard multiple source shards.
It will show a phase-based tree-structure UI.
Unit Test is included for testing the happy path.
2017-01-20 13:55:08 -08:00
Alain Jobart 4e7b259fb4 Rebuilding webapp. 2017-01-18 10:27:41 -08:00
Alain Jobart 10de39f940 Properly building the sub-workflows.
Otherwise the topovalidator sub-actions buttons don't work.
2017-01-18 09:54:32 -08:00
thompsonja 73381fba35 Add font-awesome directly to angular2 project (#2383)
BUG=33706658
2016-12-16 20:01:37 -08:00
thompsonja 330824a264 Copy external dependencies for vtctld, fix webdriver test (#2345)
* Update vtctld web app to use local files for css and plotly js and fix webdriver test.
2016-12-06 16:38:13 -08:00
Alain Jobart 547e38462a Adding right favicon to web app. 2016-12-06 07:11:24 -08:00
Alain Jobart f67bb63d5b Lots of vtctld2 fixes.
1. Improving tablet sort in dashboard.
When fetching tablet list, we sort by type as we add tablets.
Using sub-ordering for sort by type and sort by cell, to have a
deterministic order within groups.

2. Fixing initial table display in dashboard.
Only display the 'There are no tablets in this shard.' message when we
actually got a result with no tablets.

3. Fixing shard view columns width.

4. No more selection in shards view.

5. Different menus for master vs slaves in shard view.

6. Adding a refresh button to 3 dashboard views.

7. Using a single dialog for all workflows.
That way it's not linked to a single workflow component, but instead to
the window. Which as a side effect fixes the bug where opening the
dialog only greys out half of the window.

8. Moving keyspace / shard creation.
From the floating '+' button that doesn't float to a menu.

9. Using plus icon for new workflow.
Removing plus icon, as it doesn't float.
Only showing + in workflows if master.
2016-12-02 09:49:36 -08:00
Alain Jobart a803f272f0 Removing DemoteMaster from vtctl, and UI.
It is just a confusing command. The tabletmanager RPC command is still
there (and used during reparent). But no need to expose it.
2016-11-29 10:40:15 -08:00
Alain Jobart 585219d68d Link the available workflows for ui and backend.
Also adding a command line way to disable workflows.
And adding message to dialogs to fix UI bug.
2016-11-11 13:15:45 -08:00
Pavel Ivanov 30ee782478 Refactor workflow code to be more UI-friendly. (#2240)
The main goal of this change is to make not started and finished workflows
visible in the UI. Without this it was possible to create a workflow with
-skip_start option, and then it won't be visible in the UI thus not giving any
ability to actually start it. Also once workflow finishes it was disappearing
from the UI thus not giving any ability to see how it finished and whether it
existed at all or not. Besides this UI problem also workflows were never deleted
from the topo server and were accumulating indefinitely. This change makes
everything from topo server visible in the UI thus giving ability for the user
to delete already finished workflows.

This UI improvement allows the validator workflow to become less awkward and
actually finish once all fixers are done working. I'm modifying the validator
workflow to do that here as well.
2016-11-11 11:06:47 -08:00
Alain Jobart 13839f95d3 Many improvements to make vtctld new UI safer.
- adding a flag to not display CRUD topo menus.
So that vtctld can be less dangerous in established production
environments.
- Make set RO / RW behind the replication flag.
Also add better messages, and add the ignore regexp flag.
- Tablet type changes in shard display.
Now they are sorted with master first, then replica, then rdonly, then
everything else.
Also display master in bold, replica/rdonly in italic, rest normal.
2016-11-09 13:18:16 -08:00
Alain Jobart 410283999f Fixing a couple vtctld problems.
1. The schema page is now more resilient to missing data in responses.
2. The topology browser doesn't add extra '/' in topodata URLs, so we
don't do a useless roundtrip with a redirect.
3. Adding a button in UI to switch from old to new and new to old UI.
2016-11-08 11:38:05 -08:00
Alain Jobart 2742950552 Adding features service to vtctld.
So we can enable / disable UI features.
Using it for top-level Status and Workflows links, as well as reparent
menu items.

Also re-organized the menus for shard / tablets.
2016-11-08 08:34:00 -08:00
Pavel Ivanov cac9ce496f Some cleanup on the Node-related Go<->javascript API. (#2221)
- Make the first value of enums (the one that is equal to 0) to be the unknown
  one, so that it was considered a programming error.
- Remove "omitempty" tag from fields where change from some value to empty value
  must be passed in an update to the web UI.
- Add "omitempty" to Children because that's an important special use case.
- Modify javascript to assume that name, state, style and message of an action
  is always there.
- Modify javascript to work when 'children' value was not received.
2016-11-04 23:02:18 -07:00
Pavel Ivanov 55be023434 Fix parsing of actions when updating Node in workflow UI. (#2215)
It looks like something has changed recently and now when WorkflowManager
encodes Node into json it behaves similar to proto3: when 'state' and 'style'
in an action have enum value equal to 0, it's getting omitted from the resulting
json. That caused the javascript code to skip adding the Action object to the
Node. I'm fixing the javascript to account for that and consider missing 'state'
and 'style' as being equal to 0.
2016-11-04 13:59:47 -07:00
thompsonja 981a1bc48b Update worker tablet type to drained in vtctld / docs (#2187)
Update worker tablet type to drained in vtctld / docs
2016-11-01 11:30:22 -07:00
Pavel Ivanov dafc8a453a Incorporate schema swap into workflow framework. (#2199)
This makes a minimal wiring of schema swap process into the workflow framework,
just enough to execute it and to see in the UI when it's in progress. Deeper
integration to display all the steps being done during the schema swap will be
done later.

This also fixes a few nil pointer dereference bugs discovered during testing of
the process. With those bugs fixed the rest of the code works as is.
2016-10-31 09:55:56 -07:00
Alain Jobart 252eda49f7 Adding master election to vtctld.
- Including UI display of the redirect, and a fix in zk topology.
- Better Update support in vtctld2.
  Now always using a single Update structure, and json-encoding it.
  Omitting a bunch of fileds if empty in json encoding.
- Adding unit test for long polling.
2016-10-27 07:20:07 -07:00
Alain Jobart 50a6f36e0f Adding Topo Validator Workflow.
It contains a Keyspace and Shard validator for now, but it's easy to add
new ones.

In the process:
- Fixing minor bugs in vtctld2 web ui.
null and undefined are different in TS.
- Ignoring ErrNoNode in FindAllShardsInKeyspace.
It most likely means a shard creation was aborted in the middle, and we
don't want to error everything out when that happens.
2016-10-20 08:01:05 -07:00
Alain Jobart 07a5a980ab Many changes to the workflow UI.
- Adding workflow creation dialog in vtctld.
- Adding 'Stop' button to workflows in vtctld.
- Fixing exception for redirect keyspaces display.
- Adding skip_start to vtctld.
- Adding Ui side for showing non-running workflows.
- Adding a vtctld HTTP based long-polling mechanism.
- Releasing UI resources for workflow closure.

Also fixing a race condition in manager shutdown:
We were using (manager.ctx == nil) as a test to check out if the manager
was stopped. This is not reliable, as manager.ctx is updated after the
context cancelation and after taking the manager mutex. In the
meantime, a job could have also realized its context was canceled and
started its shutdown, which takes the manager mutex and checks for
manager.ctx == nil as well.
The new logic uses a new 'stopped' flag instead to differentiate the
Manager shutdown from a workflow Stop. It's better documented too.
2016-10-17 14:22:23 -07:00
Alain Jobart 2ee2738bda Adding workflow library.
To manage long running workflows within Vitess.
It contains a sample Sleep workflow.
Wiring up the UI using WebSockets.
Also adding vtctl commands.
2016-10-04 14:09:31 -07:00
Joshua Thompson f2fb448dc5 Merge dsslater's webdriver test. 2016-09-27 09:47:19 -07:00
thompsonja 30b6d1a737 Angular2 webdriver test updates (#2038)
Angular2 webdriver test updates
2016-09-13 17:17:22 -07:00
Priyanka Kulshreshtha 3ced98bafd Fixed some typos 2016-09-08 02:32:08 -07:00
Priyanka Kulshreshtha c0e27eac9a Addressed more comments 2016-09-08 02:31:47 -07:00
Priyanka Kulshreshtha d4462b5a88 Addresed comments from mberlin on PR 1969 2016-09-08 02:30:49 -07:00
pkulsh 3fa827017d webdriver tests for Realtime Status vtctld2 component (#2018)
- Added webdriver tests for the 8 different views checking the dropdowns and number of heatmaps
- Added vtctld2_web_status test to config.json
2016-09-02 16:34:04 -07:00
Priyanka Kulshreshtha 8a28efec9b Addressed comments from mberlin 2016-09-01 16:43:39 -07:00
Priyanka Kulshreshtha 4646e5977f Dropdown now only shows options that actually exist in topology 2016-09-01 16:43:39 -07:00
Priyanka Kulshreshtha 920290bb60 Fixed routing so now it's possible to navigate away from status page 2016-09-01 16:42:10 -07:00
Priyanka Kulshreshtha fb12bc6e7e Changed the metric 'healthy' to 'health' 2016-09-01 06:23:52 -07:00
Priyanka Kulshreshtha cc74e6da89 Added support for a popup for a missing tablet 2016-09-01 06:23:52 -07:00
Priyanka Kulshreshtha d1e44e33b1 Fixed the heatmap display and color scheme 2016-09-01 06:23:52 -07:00
Priyanka Kulshreshtha daf617309f Fixed routing so now it's possible to navigate away from status page 2016-09-01 06:23:19 -07:00
Priyanka Kulshreshtha 0b8c4eba67 Fixed linting errors 2016-09-01 06:23:19 -07:00
Priyanka Kulshreshtha c4894e26f9 Finished the popup for the heatmap 2016-09-01 06:23:19 -07:00
Priyanka Kulshreshtha 77caad86cc Fixed routing issue 2016-09-01 06:23:19 -07:00
Priyanka Kulshreshtha d8f7daba57 Fixed heatmap display - no vertical lines, thiner rows 2016-09-01 06:23:19 -07:00
Priyanka Kulshreshtha e9d6c6acd9 Fixed height of the rows of the heatmap 2016-09-01 06:23:19 -07:00
Priyanka Kulshreshtha e191f692d9 Added support for vertical and horizontal grid lines. 2016-09-01 06:23:19 -07:00
Priyanka Kulshreshtha 92ee380f71 Fixed redrawing map such that it doesn't automatically reset 2016-09-01 06:23:19 -07:00
Priyanka Kulshreshtha 04a8efb0ab Reworked algorithm for getting heatmap data 2016-09-01 06:23:19 -07:00
Priyanka Kulshreshtha 1ae95558dc Generate one heatmap per keyspace 2016-09-01 06:23:19 -07:00
Priyanka Kulshreshtha de2af4a1c3 Implemented routing to different views + basic popup template 2016-09-01 06:23:19 -07:00
dsslater c10f1d4d80 Schema Manager (#1999)
* Added dsahboard view and created keyspace service

* Implemented most of the views necessary. Checking in to sync up.

* restructured file tree

* Working on CRUD interface

* Finished adding mock up views to dashboard

* Implemented keyspace read functionality

* Adds CRUD functionality for Keyspaces and infrastructure

* Started exposing Shard API Endpoints

* gofmt

* Added support for shard endpoints

* Addressed all comments by enisoc and mberlin

* vtctld: added full crud functionality for UI.

Pointed UI to endpoint that leverages vtctl for commands.
Added support for Validation at all levels, RebuildKeyspaceGraph,
RemoveKeyspaceCell, InitShardMaster, Ping, and RefreshState.

* Added new icons on the sidenav, these do not point to new views.

* Removed extraneous merge files and adde new line to dialog-content

* handle partial list error

* gofmt indented return in api.go

* gofmt

* moved material imports to modules in app.module

* fix line length for linter

* adding command support and prime dropdown

* Dashboard has commands working

* removed dashboard prepare function

* finished transition to commands in dialog setting, added tablet actions

* Started adding dropdowns for schema view

* updated to webpack

* adding tablet fetching

* Updateed Tablet service

* Added single schema view for selected schema.

* Changed how columns are processed and moved to prime dialog

* Clean up titles and remove debugging code

* Changed to schema to use vtctlService.runCommand.

* Added spaces for style and removed unnecessary css

* Reworked UI based on team comments

* Removed an unnecessary !important tag
2016-08-30 16:30:31 -07:00