MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / unBindExtranet

Method unBindExtranet

class/projectModel/pythonModel.py:2606–2623  ·  view source on GitHub ↗

@name 解绑外网 @author hwliang<2021-08-09> @param get { name: string<项目名称> } @return dict

(self, get)

Source from the content-addressed store, hash-verified

2604 return public.returnMsg(True, '开启外网映射成功')
2605
2606 def unBindExtranet(self, get):
2607 ''&#x27;
2608 @name 解绑外网
2609 @author hwliang<2021-08-09>
2610 @param get<dict_obj>{
2611 name: string<项目名称>
2612 }
2613 @return dict
2614 ''&#x27;
2615 project_name = get.name.strip()
2616 self.clear_config(project_name)
2617 public.serviceReload()
2618 project_find = self.get_project_find(project_name)
2619 project_find['project_config']['bind_extranet'] = 0
2620 public.M('sites').where("id=?", (project_find['id'],)).setField(
2621 'project_config', json.dumps(project_find['project_config']))
2622 public.WriteLog(self._log_name, 'Python项目{}, 关闭外网映射'.format(project_name))
2623 return public.returnMsg(True, '关闭成功')
2624
2625 def GetProjectDomain(self, get):
2626 ''&#x27;

Callers

nothing calls this directly

Calls 8

clear_configMethod · 0.95
get_project_findMethod · 0.95
returnMsgMethod · 0.80
setFieldMethod · 0.45
whereMethod · 0.45
MMethod · 0.45
dumpsMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected