This project is mirrored from https://gitee.com/NQL886/scope.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
  1. 21 Nov, 2017 2 commits
  2. 18 Nov, 2017 2 commits
    • Matthias Radestock's avatar
      simplify render decoration · a82d245e
      Matthias Radestock authored
      Decoration is in fact quite a simple process that is applied on entry
      to rendering: we take a base renderer, transform it with a decorator,
      and then render a report with it. The new render.Decorate() function
      does exactly that.
      
      There is one exception. When rendering an individual node, e.g. for
      showing its details panel in the UI, we must not lose the node during
      decoration. That requires some special logic, which previously resided
      in the PreciousNodeRenderer, and now lives in handleNode.
      a82d245e
    • Matthias Radestock's avatar
      Expand the app's k8s namespace calculation · 4e4c3b25
      Matthias Radestock authored
      to include recently added k8s types.
      
      This is all rather inefficient. See #2945.
      4e4c3b25
  3. 08 Nov, 2017 1 commit
  4. 04 Nov, 2017 1 commit
    • Matthias Radestock's avatar
      memoise top-level rendering · 0b9bab25
      Matthias Radestock authored
      This deals with browsers requesting the same rendering for the same
      timespan when no new reports have been received for that timespan.
      0b9bab25
  5. 15 Aug, 2017 1 commit
    • Roland Schilter's avatar
      Link scope-ui graphs clickable to prometheus queries (#2664) · 0d381a34
      Roland Schilter authored
      scope-app:
      * Adds `-app.metrics-graph` cli flag for configuring the base url to
      use for graph links; supports :orgID and :query placeholders
      * Assigns query URLs to existing metrics and appends empty metrics if missing
      
      scope-ui:
      * Extends <CloudFeature /> with option alwaysShow
      * Adds <CloudLink /> to simplify routing when in cloud vs not in cloud
      * Links metric graphs in the ui's node details view for all k8s
      toplogies and containers so far
      * Tracks metric graph click in mixpanel `scope.node.metric.click`
      * Uses percentages and MB for CPU/Memory urls
      * Passes timetravel timestamp to cortex in deeplink
      0d381a34
  6. 29 Jun, 2017 2 commits
    • Mike Lang's avatar
      Remove type filter in controllers view · c521b50b
      Mike Lang authored
      This was always temporary until we could search for type via the search box instead,
      since it resulted in too much clutter / didn't seem a useful use-case.
      
      As it turns out, searching like this was already possible.
      c521b50b
    • Mike Lang's avatar
      Remove replica sets · ef2b6f6c
      Mike Lang authored
      Use a special kind of selector renderer to elide replica sets from pod nodes
      and directly reference deployment parents instead.
      Do the inverse (replace replica sets with pods) during the mapping from pod to deployment.
      
      Note we can no longer use renderParents since we're using a non-standard Selector
      ef2b6f6c
  7. 27 Jun, 2017 4 commits
  8. 21 Jun, 2017 2 commits
    • Mike Lang's avatar
      Don't omitempty for option group default value · 0e54b27e
      Mike Lang authored
      The value "" is meaningful, and the UI does not behave correctly if it's not present.
      0e54b27e
    • Mike Lang's avatar
      Replace 'none' id for the none option in union types with '' · 383ace4d
      Mike Lang authored
      In union option groups, the list of selected ids is encoded as a comma-delimited string.
      For example, if 'foo' and 'bar' are selected, the value 'foo,bar' is sent, ie ["foo", "bar"] -> "foo,bar"
      Under this scheme, with nothing selected, the empty string should be sent, ie. [] -> ""
      
      Before this change, the frontend code called the "none option" by id 'none'.
      There were several issues with this:
      * The frontend would send 'none' when nothing was selected, not ''. The backend ignored this as it ignores
        junk values in the options, treating them as though they hadn't been given.
      * The backend would attempt to set the default value of an option to "nothing selected", ie. [], by sending ''.
        The frontend would interpret this as nothing selected, *not even the 'none' option*, which caused a visual bug.
      * Everything would break if one of the legitimate options had the id 'none', which could easily happen eg.
        if a user had a 'none' k8s namespace. This is perhaps an unusual name, but our code shouldn't break when
        a particular arbitary string is used as an input.
      
      With this change, the none option is called '', which fixes all the above problems:
      * The frontend encodes [''] as ''
      * The frontend decodes '' as [''], and therefore shows the '' option as selected
      * The string '' is not a valid k8s namespace name and is a reasonable "prohibited value" for all other use cases.
        The backend already couldn't handle a value with this id correctly prior to this change anyway.
      383ace4d
  9. 20 Jun, 2017 1 commit
    • Filip Barl's avatar
      Make API calls with time travel timestamp (#2600) · eb64d3f0
      Filip Barl authored
      * Node details fetching reports at proper timestamp.
      
      * Corrected all the relevant timestamps in the UI.
      
      * Renamed some state variables.
      
      * Time travel works for topologies list.
      
      * Added a whole screen overlay for time travel.
      
      * Polished the backend.
      
      * Make time travel work also with the Resource View.
      
      * Fixed the jest tests.
      
      * Fixed the empty view message for resource view.
      
      * Some naming polishing.
      
      * Addressed the comments.
      eb64d3f0
  10. 12 Jun, 2017 1 commit
    • Filip Barl's avatar
      Time travel control (#2524) · b6dfe254
      Filip Barl authored
      * Hacky working prototype.
      
      * Operate with time.Duration offset instead of fixed timestamp.
      
      * Polished the backend code.
      
      * Made a nicer UI component.
      
      * Small refactorings of the websockets code.
      
      * Fixed the backend tests.
      
      * Better websocketing and smoother transitions
      
      * Small styling refactoring.
      
      * Detecting empty topologies.
      
      * Improved error messaging.
      
      * Addressed some of David's comments.
      
      * Moved nodesDeltaBuffer to a global state to fix the paused status rendering bug.
      
      * Small styling changes
      
      * Changed the websocket global state variables a bit.
      
      * Polishing & refactoring.
      
      * More polishing.
      
      * Final refactoring.
      
      * Addressed a couple of bugs.
      
      * Hidden the timeline control behind Cloud context and a feature flag.
      
      * Addressed most of @davkal's comments.
      
      * Added mixpanel tracking.
      b6dfe254
  11. 19 May, 2017 1 commit
  12. 16 May, 2017 1 commit
    • Matthias Radestock's avatar
      show all namespaces by default · f7bba529
      Matthias Radestock authored
      There is nothing special about the "default" namespace, and selecting
      it by default means we only show a partial view of the system, which
      is hard to spot, especially for novice users.
      f7bba529
  13. 08 May, 2017 1 commit
  14. 18 Apr, 2017 1 commit
    • Mike Lang's avatar
      Add docker swarm Stack selector ala k8s namespace selector · 51999529
      Mike Lang authored
      We have to introduce the kinda hacky concept of a 'No Stack' stack
      to reconcile it with the idea of a 'default' k8s namespace. This is important
      because swarm services without a stack don't have the same docker labels as ones that do.
      Curiously, they still have what appears to be a stack name 'prefix' on their names,
      but I can't isolate that name anywhere easily so they'll just have to make do.
      
      I basically copy-pasted updateFilters to make this work, todo go back and refactor
      to not duplicate 90% of the code.
      51999529
  15. 15 Apr, 2017 1 commit
  16. 27 Mar, 2017 3 commits
    • Mike Lang's avatar
      api_topologies: Change semantics of blank or omitted option values · 9e1666cb
      Mike Lang authored
      Instead of value being "" or omitted meaning "use group.Default", we now allow the empty value
      to go through. This was done to allow multi-value options to be able to encode 'no options selected'.
      This is important as the alternative is very confusing, as 'nothing selected' would generally mean
      'match everything', not 'select default' (which in the k8s namespace example, means the "default" namespace).
      
      Since the UI is the only user of this API, and it already sends the default value always, this does not affect
      any existing usage.
      
      Since the UI still wants to show a 'match all' button to prevent confusion, but it's not a normal option
      (if it were a normal option, it could be combined with others, which isn't meaningful), we add a new key
      NoneLabel that indicates the name that should be displayed on this extra button.
      
      Finally, we implement these changes for the k8s namespace button, ie.
      - Get rid of All Namespaces option
      - Add "All Namespaces" as the NoneLabel
      - Default to "" when "default" namespace not present, which is equivalent to the old "all" option.
      9e1666cb
    • Mike Lang's avatar
      api_topologies: Allow selecting multiple k8s namespace filters · bfb68a54
      Mike Lang authored
      This is the first usage of the new 'union' selectType.
      Note that we're still sending 'all' for now. There's currently no easy
      way to specify this meaning, and arguably it should be done entirely clientside.
      But for now it just means some UI weirdness where 'all' is one of the options and having it on
      means anything else you select doesn't matter.
      bfb68a54
    • Mike Lang's avatar
      api_topologies: Add a selectType field to option groups · efb68fb2
      Mike Lang authored
      This field changes the option group behaviour depending on its value.
      Currently only supports two values:
      "one" (default): Old behaviour, one option can be selected
      "union": Any number of options can be selected, and the filters are OR-ed togther
      
      It is written in such a way as to easily enable a future "intersection" option,
      as per union but AND-ing the filters. But this is not done here. YAGNI.
      efb68fb2
  17. 21 Mar, 2017 1 commit
  18. 20 Mar, 2017 2 commits
  19. 17 Mar, 2017 1 commit
  20. 16 Mar, 2017 1 commit
    • Mike Lang's avatar
      When k8s present, allow filtering of containers by namespace · b01e8904
      Mike Lang authored
      To facilitate this, we replace the existing functionality of updateFilters which
      sets k8s topologies to have the filters [namespace, managed], to instead append the namespace filter
      to any existing. This lets it apply to both k8s and container topologies without overwriting existing
      container filters. We instead set the managed filter in the static definition.
      
      This however has the side effect that the ordering of the namespace filter and the managed filter
      in k8s topologies has been reversed, so it reads:
      	Show Unmanaged | Hide Unmanaged
      	foo | bar | default | baz | All Namespaces
      instead of:
      	foo | bar | default | baz | All Namespaces
      	Show Unmanaged | Hide Unmanaged
      b01e8904
  21. 20 Feb, 2017 1 commit
  22. 23 Jan, 2017 1 commit
  23. 20 Jan, 2017 1 commit
  24. 29 Nov, 2016 4 commits
  25. 28 Nov, 2016 1 commit
  26. 15 Nov, 2016 1 commit
    • CarltonSemple's avatar
      Added container filters as CLI arguments · 9833a854
      CarltonSemple authored
      gofmt load_container_filters.go
      
      removed the environment variable for container label filters
      
      Added the --app.container-label-filter command line argument, and load_container_filters.go now uses the results from that
      
      Changed init() to InitializeTopologies()
      
      Changed init() to InitializeTopologies() so that it can be called after the container filters are loaded from the command line argument. init() executes before main() in prog/main.go, so the flag parsing isn't finished before init() is called
      
      Applied lint fixes
      
      fixed lint issues
      
      brought back the init function for api_topologies.go
      
      Addressed many of the PR comments, except escaping colons
      
      Renamed IsDesired to HasLabel in render/filters.go
      
      Allows for the user to escape colons
      
      added registry function for modifying the container filters
      
      created a separate function that parses the container filter flags
      
      simplified registry.addContainerFilters()
      
      addressed review comments
      
      switched API Topology Description IDs to constants
      
      addressed review comments
      
      joined constants
      
      added test functions
      
      addressed most of the review comments
      
      Changed containerLabelFilters to an array of APItopologyOptions, placing the parsing in the Set() function. Removed parsing from HasLabel in render/filters.go
      
      refactored code
      
      added test that applies to the container filtering by labels
      
      applied golint
      
      made Registry items private and added a MakeRegistry() function
      
      fixed usage of topologyRegistry.RendererForTopology
      
      Added container label filters by exclusion
      
      minor update to report_fixture
      
      Modified container labels test to use existing report
      
      I added labels to the existing containers in the fixed report for testing.
      
      refactored code
      
      refactored code
      
      further code refactoring
      
      addressed @ijsnellf's review comments
      
      unexported Registry, and reduced duplicate code
      
      addressed @ijsnellf's review comments
      
      Addressed review comments
      
      Addressed final review comments
      9833a854
  27. 28 Oct, 2016 1 commit