code: function addVariable() {
              variableService.addOrUpdate(vm.variable, function () {
                  vm.variables[vm.variable.key] = vm.variable.value;
                  vm.variable = {
                      key: undefined,
                      value: undefined
                  };
              });
          }
docs: Adds the given variable.