anchor.diff:  
       }
   
  -    function stop(name) {
  +    function stop(name, stateName) {
  +        if (stateName != "<%= DONE_STATE %>" && stateName
  +                    != "<%= STOPPED_STATE %>") {
  +            $("#stopRestartModal").attr("data-name", name);
  +            $("#stopRestartModal").attr("data-type", "Stop");
  +            $("#stopRestartModal").modal();
  +        } else {
  +            doStop(name);
  +        }
  +    }
  +
  +    function doStop(name) {
           $.ajax({
                      type: "POST",
                      url: '<%= WORKFLOWSTATEMONITOR_SERVICE %>' + 'states/' + name,
                      contentType: "application/json",
  -                   data: JSON.stringify({component: 'yousee_ingest_monitor_webpage', stateName: '<%= STOPPED_STATE %>'}),
  +                   data: JSON.stringify({component: 'yousee_ingest_monitor_webpage', stateName: '<%= STOPPED_STATE %>'})
                  }).done(hashchange);
  -        $.bbq.pushState("#mode=details&file=" + name, 0);
  -    }
  -
  -    function restart(name) {
  +    }
  +
  +    function restart(name, stateName) {
  +        if (stateName != "<%= DONE_STATE %>" && stateName
  +                    != "<%= STOPPED_STATE %>") {
  +            $("#stopRestartModal").attr("data-name", name);
  +            $("#stopRestartModal").attr("data-type", "Restart");
  +            $("#stopRestartModal").modal();
  +        } else {
  +            doRestart(name);
  +        }
  +    }
  +
  +    function doRestart(name) {
           $.ajax({
                      type: "POST",
                      url: '<%= WORKFLOWSTATEMONITOR_SERVICE %>' + 'states/' + name,
                      contentType: "application/json",
  -                   data: JSON.stringify({component: 'yousee_ingest_monitor_webpage', stateName: '<%= RESTARTED_STATE %>'}),
  +                   data: JSON.stringify({component: 'yousee_ingest_monitor_webpage', stateName: '<%= RESTARTED_STATE %>'})
                  }).done(hashchange);
  -        $.bbq.pushState("#mode=details&file=" + name, 0);
       }
   
       function update(path, title, allStates) {
  
positive.code: 
          $("#reload").click(function() {
              hashchange();
          });
      })
  </script>
  
negative.code:         $.each(state, function(id, content) {
              var allStatesLink = '<a href="#" class="btn" onclick="$.bbq.pushState(\'#mode=details&file=' + content
                      .entity.name + '\', 0); return false"><i class="icon-list"></i> Show all states</a>';
              var stopLink = '<a href="#" class="btn" onclick="stop(\'' + content.entity.name + "\',\'" + content.stateName
                      + '\'); return false"><i class="icon-stop"></i> Stop</a>';
              var restartLink = '<a href="#" class="btn" onclick="restart(\'' + content.entity.name + "\',\'" + content.stateName
                      + '\'); return false"><i class="icon-play"></i> Restart</a>';
  
              var item = "<tr>";
  