onlyurei/knockout-spa

View on GitHub
app/files/dependencies/dependencies.html

Summary

Maintainability
Test Coverage
<section class="row padding-left-right">
  <page-source-display params="js: 'app/files/dependencies/dependencies.js',
                               html: 'app/files/dependencies/dependencies.html',
                               css: 'app/files/dependencies/dependencies.css'">
  </page-source-display>
  <p data-bind="string: 'files.dependencies.instruction'"></p>
  <!-- ko template: 'app/shared/error' --><!-- /ko -->
  <select data-bind="options: graph.nodes.map(function (node) { return node.data.id; }).sort(),
                     optionsCaption: $root.strings('files.dependencies.select.module').assign({ count: graph.nodes.length }),
                     value: selectedNode"></select>
  <!-- ko ifnot: selectedNode -->
  <div data-bind="cytoscape: graph, cytoscapeOptions: { zoom: 0.8, layout: { fit: false } }" class="graph"></div>
  <!-- /ko -->
  <!-- ko if: selectedNode -->
  <div data-bind="cytoscape: nodeGraph" class="graph"></div>
  <!-- /ko -->
</section>